mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
ios vout: Avoid opengles1.1 naming convention for 2.0 version
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
This commit is contained in:
parent
b990bc7105
commit
d76a2ff321
@ -297,7 +297,7 @@ static void OpenglSwap(vlc_gl_t *gl)
|
|||||||
{
|
{
|
||||||
vout_display_sys_t *sys = gl->sys;
|
vout_display_sys_t *sys = gl->sys;
|
||||||
EAGLContext *context = [sys->glView context];
|
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);
|
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];
|
[EAGLContext setCurrentContext:_context];
|
||||||
// Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
|
// 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
|
glGenFramebuffers(1, &_defaultFramebuffer); // Generate one framebuffer, store it in _defaultFrameBuffer
|
||||||
glGenRenderbuffersOES(1, &_colorRenderbuffer);
|
glGenRenderbuffers(1, &_colorRenderbuffer);
|
||||||
glBindFramebufferOES(GL_FRAMEBUFFER_OES, _defaultFramebuffer);
|
glBindFramebuffer(GL_FRAMEBUFFER, _defaultFramebuffer);
|
||||||
glBindRenderbufferOES(GL_RENDERBUFFER_OES, _colorRenderbuffer);
|
glBindRenderbuffer(GL_RENDERBUFFER, _colorRenderbuffer);
|
||||||
|
|
||||||
// This call associates the storage for the current render buffer with the EAGLDrawable (our CAEAGLLayer)
|
// 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).
|
// 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];
|
[_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(id<EAGLDrawable>)self.layer];
|
||||||
glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, _colorRenderbuffer);
|
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _colorRenderbuffer);
|
||||||
|
|
||||||
GLint backingWidth, backingHeight;
|
GLint backingWidth, backingHeight;
|
||||||
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
|
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
|
||||||
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
|
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight);
|
||||||
|
|
||||||
if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
|
if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
|
||||||
msg_Err(_vd, "Failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
|
msg_Err(_vd, "Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
|
||||||
}
|
}
|
||||||
[self _updateViewportWithBackingWitdh:backingWidth andBackingHeight:backingHeight];
|
[self _updateViewportWithBackingWitdh:backingWidth andBackingHeight:backingHeight];
|
||||||
}
|
}
|
||||||
@ -456,9 +456,9 @@ static void OpenglSwap(vlc_gl_t *gl)
|
|||||||
|
|
||||||
- (void)_destroyFramebuffer {
|
- (void)_destroyFramebuffer {
|
||||||
[EAGLContext setCurrentContext:_context];
|
[EAGLContext setCurrentContext:_context];
|
||||||
glDeleteFramebuffersOES(1, &_defaultFramebuffer);
|
glDeleteFramebuffers(1, &_defaultFramebuffer);
|
||||||
_defaultFramebuffer = 0;
|
_defaultFramebuffer = 0;
|
||||||
glDeleteRenderbuffersOES(1, &_colorRenderbuffer);
|
glDeleteRenderbuffers(1, &_colorRenderbuffer);
|
||||||
_colorRenderbuffer = 0;
|
_colorRenderbuffer = 0;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user