[vlc-devel] [PATCH] Avoid opengles1.1 naming convention for 2.0 version
Gleb Pinigin
gpinigin at gmail.com
Sat Feb 9 12:01:57 CET 2013
---
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 7f13f23..9e08e1b 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];
}
/*****************************************************************************
@@ -405,22 +405,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];
}
@@ -467,9 +467,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
--
1.7.12.4 (Apple Git-37)
More information about the vlc-devel
mailing list