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.
This commit is contained in:
parent
04f21abb52
commit
184377b493
@ -140,6 +140,7 @@ information on what to include when reporting a bug.
|
|||||||
- Bugfix: Built-in mappings failed because some OEMs re-used VID/PID (#1583)
|
- Bugfix: Built-in mappings failed because some OEMs re-used VID/PID (#1583)
|
||||||
- Bugfix: Some extension loader headers did not prevent default OpenGL header
|
- Bugfix: Some extension loader headers did not prevent default OpenGL header
|
||||||
inclusion (#1695)
|
inclusion (#1695)
|
||||||
|
- Bugfix: Buffers were swapped at creation on single-buffered windows (#1873)
|
||||||
- [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
|
- [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
|
||||||
to the window menu
|
to the window menu
|
||||||
- [Win32] Added a version info resource to the GLFW DLL
|
- [Win32] Added a version info resource to the GLFW DLL
|
||||||
|
@ -570,7 +570,9 @@ GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,
|
|||||||
PFNGLCLEARPROC glClear = (PFNGLCLEARPROC)
|
PFNGLCLEARPROC glClear = (PFNGLCLEARPROC)
|
||||||
window->context.getProcAddress("glClear");
|
window->context.getProcAddress("glClear");
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
window->context.swapBuffers(window);
|
|
||||||
|
if (window->doublebuffer)
|
||||||
|
window->context.swapBuffers(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
glfwMakeContextCurrent((GLFWwindow*) previous);
|
glfwMakeContextCurrent((GLFWwindow*) previous);
|
||||||
|
Loading…
Reference in New Issue
Block a user