fix stupid event backlog. bug?

This commit is contained in:
Chris Forbes
2010-02-18 00:22:58 +13:00
parent 998572a589
commit 262bf55219

View File

@@ -55,8 +55,7 @@ namespace OpenRa.GlRenderer
public GraphicsDevice( int width, int height, bool fullscreen, bool vsync ) public GraphicsDevice( int width, int height, bool fullscreen, bool vsync )
{ {
Glfw.glfwInit(); Glfw.glfwInit();
Glfw.glfwOpenWindow(width, height, 0, 0, 0, 0, 0, 0, /*fullscreen ? Glfw.GLFW_FULLSCREEN :*/ Glfw.GLFW_WINDOW); Glfw.glfwOpenWindow(width, height, 0, 0, 0, 0, 0, 0, fullscreen ? Glfw.GLFW_FULLSCREEN : Glfw.GLFW_WINDOW);
Glfw.glfwSetWindowTitle("OpenRA (OpenGL version)");
bool initDone = false; bool initDone = false;
Glfw.glfwSetMouseButtonCallback( mouseButtonCallback = ( button, action ) => Glfw.glfwSetMouseButtonCallback( mouseButtonCallback = ( button, action ) =>
{ {
@@ -138,6 +137,7 @@ namespace OpenRa.GlRenderer
public void Present() public void Present()
{ {
Glfw.glfwSwapBuffers(); Glfw.glfwSwapBuffers();
Glfw.glfwPollEvents();
CheckGlError(); CheckGlError();
} }