fix stupid event backlog. bug?
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user