From ddabfaa81a04317e8ac966909f4b00c7f1aa16c6 Mon Sep 17 00:00:00 2001 From: Caspian Rychlik-Prince Date: Sun, 4 Apr 2004 13:01:53 +0000 Subject: [PATCH] Rules with mighty fist. New API killed off before it even sees light of day. Some refactoring. --- src/java/org/lwjgl/opengl/Window.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/java/org/lwjgl/opengl/Window.java b/src/java/org/lwjgl/opengl/Window.java index 10febfc1..c67b023e 100644 --- a/src/java/org/lwjgl/opengl/Window.java +++ b/src/java/org/lwjgl/opengl/Window.java @@ -350,7 +350,7 @@ public final class Window { * the minimum requirements could not be met satisfactorily */ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLException { - create(title, x, y, width, height, bpp, alpha, depth, stencil); + create(title, x, y, width, height, bpp, alpha, depth, stencil, 0); } /** @@ -375,8 +375,15 @@ public final class Window { */ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLException { - - create(title, x, y, width, height, bpp, alpha, depth, stencil, samples); + if (isCreated()) + throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); + Window.fullscreen = false; + Window.x = x; + Window.y = y; + Window.width = width; + Window.height = height; + Window.title = title; + createWindow(bpp, alpha, depth, stencil, samples); } /**