Don't make context current in DisplayImplementation.createWindow(), but let Display do it explicitly to increase native call granularity

This commit is contained in:
Elias Naur 2005-01-14 09:24:59 +00:00
parent 3d30d60c7e
commit 859204c4a0
2 changed files with 2 additions and 7 deletions

View file

@ -202,12 +202,13 @@ public final class Display {
*/
private static void createWindow() throws LWJGLException {
display_impl.createWindow(current_mode, fullscreen, (fullscreen) ? 0 : x, (fullscreen) ? 0 : y);
makeCurrent();
// if no display location set, center window
if(x == -1 && y == -1) {
setLocation(Math.max(0, (initial_mode.getWidth() - current_mode.getWidth()) / 2),
Math.max(0, (initial_mode.getHeight() - current_mode.getHeight()) / 2));
}
setTitle(title);
initControls();
setVSyncEnabled(vsync);