(iOS) Camera - do glBindTexture(GL_TEXTURE_2D, 0) at end of processFrame

to prevent stale garbage texture frame from being output to main
framebuffer. There is still flickering going on though
This commit is contained in:
twinaphex 2013-12-01 23:19:59 +01:00
parent 5a483468f0
commit 99b5c77b0d

View File

@ -254,6 +254,8 @@ static bool g_is_syncing = true;
[[NSNotificationCenter defaultCenter] postNotificationName:@"NewCameraTextureReady" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"NewCameraTextureReady" object:nil];
newFrame = true; newFrame = true;
glBindTexture(GL_TEXTURE_2D, 0);
CVOpenGLESTextureCacheFlush(textureCache, 0); CVOpenGLESTextureCacheFlush(textureCache, 0);
CFRelease(renderTexture); CFRelease(renderTexture);
} }