mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 15:25:50 +00:00
Skip initial buffer swap when single-buffered
This skips the buffer swap after the initial glClear performed during
window creation, if the window is single-buffered. This call confused
apitrace into thinking the window was double-buffered.
Fixes #1873.
(cherry picked from commit 184377b493)
This commit is contained in:
+3
-1
@@ -570,7 +570,9 @@ GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,
|
||||
PFNGLCLEARPROC glClear = (PFNGLCLEARPROC)
|
||||
window->context.getProcAddress("glClear");
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
window->context.swapBuffers(window);
|
||||
|
||||
if (window->doublebuffer)
|
||||
window->context.swapBuffers(window);
|
||||
}
|
||||
|
||||
glfwMakeContextCurrent((GLFWwindow*) previous);
|
||||
|
||||
Reference in New Issue
Block a user