mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-25 13:31:41 +00:00
Skip unnecessary glClear() on X11
This commit is contained in:
1 parent
93dc6d6b60
commit
e89f63b8fb
1 file changed
+5
-1
@@ -803,7 +803,11 @@ void EGLRenderer::renderFrame(AVFrame* frame)
|
||||
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;
|
||||
SDL_GL_GetDrawableSize(m_Window, &drawableWidth, &drawableHeight);
|
||||
|
||||
Reference in new issue
Block a user