mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
Clear back buffer to black in CreateWindow
This eliminates flashing in OS X when running a barebones GLFW example app that doesn't do any rendering.
This commit is contained in:
parent
afe4aadade
commit
b61aa94609
@ -200,10 +200,10 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Clearing the front buffer to black to avoid garbage pixels left over
|
||||
// from previous uses of our bit of VRAM
|
||||
// Clear the buffers to black to avoid left over garbage pixels in VRAM
|
||||
window->Clear(GL_COLOR_BUFFER_BIT);
|
||||
_glfwPlatformSwapBuffers(window);
|
||||
window->Clear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// Restore the previously current context (or NULL)
|
||||
_glfwPlatformMakeContextCurrent(previous);
|
||||
|
Loading…
Reference in New Issue
Block a user