From b7b203d29af95fae3d24d568fc0ab9b252ecc092 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 4 Jan 2007 14:12:36 +0000 Subject: [PATCH] Windows: Clear the window with OpenGL to replace UpdateWindow(HWND) and run message loop once in Display.create(). --- src/java/org/lwjgl/opengl/Display.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/java/org/lwjgl/opengl/Display.java b/src/java/org/lwjgl/opengl/Display.java index 4757b69a..23d54d98 100644 --- a/src/java/org/lwjgl/opengl/Display.java +++ b/src/java/org/lwjgl/opengl/Display.java @@ -734,6 +734,9 @@ public final class Display { GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glViewport(0, 0, current_mode.getWidth(), current_mode.getHeight()); + // Clear window to avoid the desktop "showing through" + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + update(); } static DisplayImplementation getImplementation() {