Skip unnecessary glClear() on X11
This commit is contained in:
parent
93dc6d6b60
commit
e89f63b8fb
1 changed files with 5 additions and 1 deletions
|
|
@ -803,7 +803,11 @@ void EGLRenderer::renderFrame(AVFrame* frame)
|
||||||
m_glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, imgs[i]);
|
m_glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, imgs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
// We already called glClear() after last frame's SDL_GL_SwapWindow()
|
||||||
|
// to synchronize with our fence if swap buffers is blocking
|
||||||
|
if (!m_BlockingSwapBuffers) {
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
int drawableWidth, drawableHeight;
|
int drawableWidth, drawableHeight;
|
||||||
SDL_GL_GetDrawableSize(m_Window, &drawableWidth, &drawableHeight);
|
SDL_GL_GetDrawableSize(m_Window, &drawableWidth, &drawableHeight);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue