Fixed extension code
This commit is contained in:
parent
579dc64f4f
commit
1cdcd06fe5
|
@ -189,7 +189,7 @@ public class GLWindow extends Window {
|
||||||
determineAvailableWGLExtensions();
|
determineAvailableWGLExtensions();
|
||||||
|
|
||||||
// Grab all the public booleans out of this class
|
// 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);
|
HashMap map = new HashMap(fields.length);
|
||||||
for (int i = 0; i < fields.length; i++) {
|
for (int i = 0; i < fields.length; i++) {
|
||||||
if (!Modifier.isStatic(fields[i].getModifiers())
|
if (!Modifier.isStatic(fields[i].getModifiers())
|
||||||
|
@ -256,10 +256,10 @@ public class GLWindow extends Window {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Grab all the public booleans out of this class
|
// 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);
|
HashMap map = new HashMap(fields.length);
|
||||||
for (int i = 0; i < fields.length; i++) {
|
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)
|
&& fields[i].getType() == boolean.class)
|
||||||
map.put(fields[i].getName(), fields[i]);
|
map.put(fields[i].getName(), fields[i]);
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ public class GLWindow extends Window {
|
||||||
Field f = (Field) map.get(ext);
|
Field f = (Field) map.get(ext);
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
try {
|
try {
|
||||||
f.setBoolean(GL.class, true);
|
f.setBoolean(this, true);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue