From 1cdcd06fe559a94e7cce614abd3205665d1f2399 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 26 Jul 2003 11:43:26 +0000 Subject: [PATCH] Fixed extension code --- src/java/org/lwjgl/opengl/GLWindow.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/lwjgl/opengl/GLWindow.java b/src/java/org/lwjgl/opengl/GLWindow.java index f2f32d89..0b74c12b 100644 --- a/src/java/org/lwjgl/opengl/GLWindow.java +++ b/src/java/org/lwjgl/opengl/GLWindow.java @@ -189,7 +189,7 @@ public class GLWindow extends Window { determineAvailableWGLExtensions(); // Grab all the public booleans out of this class - Field[] fields = GL.class.getDeclaredFields(); + Field[] fields = GLWindow.class.getDeclaredFields(); HashMap map = new HashMap(fields.length); for (int i = 0; i < fields.length; i++) { if (!Modifier.isStatic(fields[i].getModifiers()) @@ -256,10 +256,10 @@ public class GLWindow extends Window { return; // Grab all the public booleans out of this class - Field[] fields = GL.class.getDeclaredFields(); + Field[] fields = GLWindow.class.getDeclaredFields(); HashMap map = new HashMap(fields.length); for (int i = 0; i < fields.length; i++) { - if (Modifier.isStatic(fields[i].getModifiers()) + if (!Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType() == boolean.class) map.put(fields[i].getName(), fields[i]); } @@ -291,7 +291,7 @@ public class GLWindow extends Window { Field f = (Field) map.get(ext); if (f != null) { try { - f.setBoolean(GL.class, true); + f.setBoolean(this, true); } catch (IllegalAccessException e) { e.printStackTrace(System.err); }