[vlc-commits] ios vout: Avoid opengles1.1 naming convention for 2.0 version

Gleb Pinigin git at videolan.org
Sat Feb 9 12:57:11 CET 2013


vlc | branch: master | Gleb Pinigin <gpinigin at gmail.com> | Sat Feb  9 18:01:57 2013 +0700| [d76a2ff3219ccf61ae4ca563c11dc4f9305cb8e2] | committer: Felix Paul Kühne

ios vout: Avoid opengles1.1 naming convention for 2.0 version

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d76a2ff3219ccf61ae4ca563c11dc4f9305cb8e2
---

 modules/video_output/ios.m |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 6059e57..69b586b 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -297,7 +297,7 @@ static void OpenglSwap(vlc_gl_t *gl)
 {
     vout_display_sys_t *sys = gl->sys;
     EAGLContext *context = [sys->glView context];
-    [context presentRenderbuffer:GL_RENDERBUFFER_OES];
+    [context presentRenderbuffer:GL_RENDERBUFFER];
 }
 
 /*****************************************************************************
@@ -394,22 +394,22 @@ static void OpenglSwap(vlc_gl_t *gl)
     msg_Dbg(_vd, "Creating framebuffer for layer %p with bounds (%.1f,%.1f,%.1f,%.1f)", self.layer, self.layer.bounds.origin.x, self.layer.bounds.origin.y, self.layer.bounds.size.width, self.layer.bounds.size.height);
     [EAGLContext setCurrentContext:_context];
     // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
-    glGenFramebuffersOES(1, &_defaultFramebuffer); // Generate one framebuffer, store it in _defaultFrameBuffer
-    glGenRenderbuffersOES(1, &_colorRenderbuffer);
-    glBindFramebufferOES(GL_FRAMEBUFFER_OES, _defaultFramebuffer);
-    glBindRenderbufferOES(GL_RENDERBUFFER_OES, _colorRenderbuffer);
+    glGenFramebuffers(1, &_defaultFramebuffer); // Generate one framebuffer, store it in _defaultFrameBuffer
+    glGenRenderbuffers(1, &_colorRenderbuffer);
+    glBindFramebuffer(GL_FRAMEBUFFER, _defaultFramebuffer);
+    glBindRenderbuffer(GL_RENDERBUFFER, _colorRenderbuffer);
 
     // This call associates the storage for the current render buffer with the EAGLDrawable (our CAEAGLLayer)
     // allowing us to draw into a buffer that will later be rendered to screen wherever the layer is (which corresponds with our view).
-    [_context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(id<EAGLDrawable>)self.layer];
-    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, _colorRenderbuffer);
+    [_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(id<EAGLDrawable>)self.layer];
+    glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _colorRenderbuffer);
 
     GLint backingWidth, backingHeight;
-    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
-    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
+    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
+    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight);
 
-    if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
-        msg_Err(_vd, "Failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
+    if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
+        msg_Err(_vd, "Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
     }
     [self _updateViewportWithBackingWitdh:backingWidth andBackingHeight:backingHeight];
 }
@@ -456,9 +456,9 @@ static void OpenglSwap(vlc_gl_t *gl)
 
 - (void)_destroyFramebuffer {
     [EAGLContext setCurrentContext:_context];
-    glDeleteFramebuffersOES(1, &_defaultFramebuffer);
+    glDeleteFramebuffers(1, &_defaultFramebuffer);
     _defaultFramebuffer = 0;
-    glDeleteRenderbuffersOES(1, &_colorRenderbuffer);
+    glDeleteRenderbuffers(1, &_colorRenderbuffer);
     _colorRenderbuffer = 0;
 }
 @end



More information about the vlc-commits mailing list