提交 0557f844 编写于 作者: B bbcallen

ijksdl: ios: change contentMode of glview on display thread

上级 0373ffac
......@@ -151,6 +151,7 @@ static void mat4f_LoadOrtho(float left, float right, float bottom, float top, fl
id<IJKSDLGLRender> _renderer;
BOOL _didSetContentMode;
BOOL _didRelayoutSubViews;
}
......@@ -289,10 +290,8 @@ enum {
- (void)setContentMode:(UIViewContentMode)contentMode
{
_didSetContentMode = YES;
[super setContentMode:contentMode];
[self updateVertices];
if (_renderer.isValid)
[self display:nil];
}
- (BOOL)setupDisplay: (SDL_VoutOverlay *) overlay
......@@ -454,6 +453,11 @@ exit:
_didRelayoutSubViews = NO;
}
if (_didSetContentMode) {
[self updateVertices];
_didSetContentMode = NO;
}
glBindFramebuffer(GL_FRAMEBUFFER, _framebuffer);
glViewport(0, 0, _backingWidth, _backingHeight);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册