*/
+interface ContextAttribsImplementation {
+
+ int getMajorVersionAttrib();
+
+ int getMinorVersionAttrib();
+
+ int getLayerPlaneAttrib();
+
+ int getFlagsAttrib();
+
+ int getDebugBit();
+
+ int getForwardCompatibleBit();
+
+}
\ No newline at end of file
diff --git a/src/java/org/lwjgl/opengl/GLContext.java b/src/java/org/lwjgl/opengl/GLContext.java
index c494de08..5ac9271b 100644
--- a/src/java/org/lwjgl/opengl/GLContext.java
+++ b/src/java/org/lwjgl/opengl/GLContext.java
@@ -291,16 +291,16 @@ public final class GLContext {
* of caps and function pointers will be used. The reference to the context is held in a weak reference; therefore if no
* strong reference exists to the GL context it will automatically be forgotten by the VM at an indeterminate point in the
* future, freeing up a little RAM.
- *
If forwardCombatible is true, function pointers of deprecated GL11-GL21 functionality will not be loaded. Calling a deprecated
+ *
If forwardCompatible is true, function pointers of deprecated GL11-GL21 functionality will not be loaded. Calling a deprecated
* function using the specified context will result in an IllegalStateException.
*
* @param context The context object, which uniquely identifies a GL context. If context is null, the native stubs are
* unloaded.
- * @param forwardCombatible If the context is a forward combatible context (does not expose deprecated functionality, see XGL_ARB_create_context)
+ * @param forwardCompatible If the context is a forward compatible context (does not expose deprecated functionality, see XGL_ARB_create_context)
*
* @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded
*/
- public static synchronized void useContext(Object context, boolean forwardCombatible) throws LWJGLException {
+ public static synchronized void useContext(Object context, boolean forwardCompatible) throws LWJGLException {
if ( context == null ) {
ContextCapabilities.unloadAllStubs();
setCapabilities(null);
@@ -321,7 +321,7 @@ public final class GLContext {
* as part of its capability discovery, but GL functions cannot be called before
* a capabilities object has been set.
*/
- new ContextCapabilities(forwardCombatible);
+ new ContextCapabilities(forwardCompatible);
capability_cache.put(context, getCapabilities());
} else
setCapabilities(capabilities);
diff --git a/src/java/org/lwjgl/opengl/LinuxContextAttribs.java b/src/java/org/lwjgl/opengl/LinuxContextAttribs.java
index 5c4f0803..061b59e2 100644
--- a/src/java/org/lwjgl/opengl/LinuxContextAttribs.java
+++ b/src/java/org/lwjgl/opengl/LinuxContextAttribs.java
@@ -38,7 +38,7 @@ package org.lwjgl.opengl;
*
* @author spasi
*/
-final class LinuxContextAttribs extends ContextAttribs {
+final class LinuxContextAttribs implements ContextAttribsImplementation {
private static final int GLX_CONTEXT_MAJOR_VERSION_ARB = 0x2091;
private static final int GLX_CONTEXT_MINOR_VERSION_ARB = 0x2092;
@@ -48,35 +48,30 @@ final class LinuxContextAttribs extends ContextAttribs {
private static final int GLX_CONTEXT_DEBUG_BIT_ARB = 0x0001;
private static final int GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
- LinuxContextAttribs(final int majorVersion, final int minorVersion) {
- super(majorVersion, minorVersion);
+ LinuxContextAttribs() {
}
- LinuxContextAttribs(final ContextAttribs attribs) {
- super(attribs);
- }
-
- protected int getMajorVersionAttrib() {
+ public int getMajorVersionAttrib() {
return GLX_CONTEXT_MAJOR_VERSION_ARB;
}
- protected int getMinorVersionAttrib() {
+ public int getMinorVersionAttrib() {
return GLX_CONTEXT_MINOR_VERSION_ARB;
}
- protected int getLayerPlaneAttrib() {
+ public int getLayerPlaneAttrib() {
return GLX_CONTEXT_LAYER_PLANE_ARB;
}
- protected int getFlagsAttrib() {
+ public int getFlagsAttrib() {
return GLX_CONTEXT_FLAGS_ARB;
}
- protected int getDebugBit() {
+ public int getDebugBit() {
return GLX_CONTEXT_DEBUG_BIT_ARB;
}
- protected int getForwardCombatibleBit() {
+ public int getForwardCompatibleBit() {
return GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
}
diff --git a/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java b/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java
index 0baea275..dd7de803 100644
--- a/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java
+++ b/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java
@@ -38,7 +38,7 @@ package org.lwjgl.opengl;
*
* @author spasi
*/
-final class MacOSXContextAttribs extends ContextAttribs {
+final class MacOSXContextAttribs implements ContextAttribsImplementation {
private static final int XGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091;
private static final int XGL_CONTEXT_MINOR_VERSION_ARB = 0x2092;
@@ -48,35 +48,30 @@ final class MacOSXContextAttribs extends ContextAttribs {
private static final int XGL_CONTEXT_DEBUG_BIT_ARB = 0x0001;
private static final int XGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
- MacOSXContextAttribs(final int majorVersion, final int minorVersion) {
- super(majorVersion, minorVersion);
+ MacOSXContextAttribs() {
}
- MacOSXContextAttribs(final ContextAttribs attribs) {
- super(attribs);
- }
-
- protected int getMajorVersionAttrib() {
+ public int getMajorVersionAttrib() {
return XGL_CONTEXT_MAJOR_VERSION_ARB;
}
- protected int getMinorVersionAttrib() {
+ public int getMinorVersionAttrib() {
return XGL_CONTEXT_MINOR_VERSION_ARB;
}
- protected int getLayerPlaneAttrib() {
+ public int getLayerPlaneAttrib() {
return XGL_CONTEXT_LAYER_PLANE_ARB;
}
- protected int getFlagsAttrib() {
+ public int getFlagsAttrib() {
return XGL_CONTEXT_FLAGS_ARB;
}
- protected int getDebugBit() {
+ public int getDebugBit() {
return XGL_CONTEXT_DEBUG_BIT_ARB;
}
- protected int getForwardCombatibleBit() {
+ public int getForwardCompatibleBit() {
return XGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
}
diff --git a/src/java/org/lwjgl/opengl/WindowsContextAttribs.java b/src/java/org/lwjgl/opengl/WindowsContextAttribs.java
index 79a79192..6aea35d2 100644
--- a/src/java/org/lwjgl/opengl/WindowsContextAttribs.java
+++ b/src/java/org/lwjgl/opengl/WindowsContextAttribs.java
@@ -36,7 +36,7 @@ package org.lwjgl.opengl;
*
* @author spasi
*/
-final class WindowsContextAttribs extends ContextAttribs {
+final class WindowsContextAttribs implements ContextAttribsImplementation {
private static final int WGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091;
private static final int WGL_CONTEXT_MINOR_VERSION_ARB = 0x2092;
@@ -46,35 +46,30 @@ final class WindowsContextAttribs extends ContextAttribs {
private static final int WGL_CONTEXT_DEBUG_BIT_ARB = 0x0001;
private static final int WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
- WindowsContextAttribs(final int majorVersion, final int minorVersion) {
- super(majorVersion, minorVersion);
+ WindowsContextAttribs() {
}
- WindowsContextAttribs(final ContextAttribs attribs) {
- super(attribs);
- }
-
- protected int getMajorVersionAttrib() {
+ public int getMajorVersionAttrib() {
return WGL_CONTEXT_MAJOR_VERSION_ARB;
}
- protected int getMinorVersionAttrib() {
+ public int getMinorVersionAttrib() {
return WGL_CONTEXT_MINOR_VERSION_ARB;
}
- protected int getLayerPlaneAttrib() {
+ public int getLayerPlaneAttrib() {
return WGL_CONTEXT_LAYER_PLANE_ARB;
}
- protected int getFlagsAttrib() {
+ public int getFlagsAttrib() {
return WGL_CONTEXT_FLAGS_ARB;
}
- protected int getDebugBit() {
+ public int getDebugBit() {
return WGL_CONTEXT_DEBUG_BIT_ARB;
}
- protected int getForwardCombatibleBit() {
+ public int getForwardCompatibleBit() {
return WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
}
diff --git a/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java b/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
index 62d6da09..65a8721a 100644
--- a/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
+++ b/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
@@ -70,8 +70,8 @@ public class ContextCapabilitiesGenerator {
}
public static void generateInitializerPrologue(PrintWriter writer) {
- writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "(boolean forwardCombatible) throws LWJGLException {");
- writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "(forwardCombatible);");
+ writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "(boolean forwardCompatible) throws LWJGLException {");
+ writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "(forwardCompatible);");
}
private static String translateFieldName(String interface_name) {
@@ -116,13 +116,13 @@ public class ContextCapabilitiesGenerator {
}
public static void generateInitStubsPrologue(PrintWriter writer, boolean context_specific) {
- writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "(boolean forwardCombatible) throws LWJGLException {");
+ writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "(boolean forwardCompatible) throws LWJGLException {");
if ( !context_specific ) {
writer.println("\t\tif (" + STUBS_LOADED_NAME + ")");
writer.println("\t\t\treturn GLContext.getSupportedExtensions();");
writer.println("\t\torg.lwjgl.opengl.GL11." + Utils.STUB_INITIALIZER_NAME + "();");
} else {
- writer.println("\t\tif (!" + getAddressesInitializerName("GL11") + "(forwardCombatible))");
+ writer.println("\t\tif (!" + getAddressesInitializerName("GL11") + "(forwardCompatible))");
writer.println("\t\t\tthrow new LWJGLException(\"GL11 not supported\");");
}
// Try to initialize GL30.glGetStringi here, in case we have created an OpenGL 3.0 context
@@ -154,7 +154,7 @@ public class ContextCapabilitiesGenerator {
writer.print(translateFieldName(d.getSimpleName()) + "\")");
writer.print(" && !" + getAddressesInitializerName(d.getSimpleName()) + "(");
if ( d.getAnnotation(DeprecatedGL.class) != null )
- writer.print("forwardCombatible");
+ writer.print("forwardCompatible");
if ( d.getAnnotation(Dependent.class) != null ) {
if ( d.getAnnotation(DeprecatedGL.class) != null )
writer.print(",");
@@ -186,7 +186,7 @@ public class ContextCapabilitiesGenerator {
DeprecatedGL deprecated = d.getAnnotation(DeprecatedGL.class);
Dependent dependent = d.getAnnotation(Dependent.class);
if ( deprecated != null )
- writer.print("boolean forwardCombatible");
+ writer.print("boolean forwardCompatible");
if ( dependent != null ) {
if ( deprecated != null )
writer.print(",");
@@ -202,7 +202,7 @@ public class ContextCapabilitiesGenerator {
writer.print("\t\t\t(");
if ( deprecated != null )
- writer.print("forwardCombatible || ");
+ writer.print("forwardCompatible || ");
if ( dependent != null )
writer.print("!supported_extensions.contains(\"" + dependent.value() + "\") || ");
if ( deprecated != null || dependent != null )
diff --git a/src/java/org/lwjgl/util/generator/DeprecatedGL.java b/src/java/org/lwjgl/util/generator/DeprecatedGL.java
index 21f0fcba..4789d98c 100644
--- a/src/java/org/lwjgl/util/generator/DeprecatedGL.java
+++ b/src/java/org/lwjgl/util/generator/DeprecatedGL.java
@@ -33,7 +33,7 @@ package org.lwjgl.util.generator;
/**
* Use this annotation on extensions with deprecated functionality.
- * Functions in such extensions marked with this annotation will not be loaded in a forward combatible context.
+ * Functions in such extensions marked with this annotation will not be loaded in a forward compatible context.
*
* @author spasi
*/
diff --git a/src/native/windows/org_lwjgl_opengl_Pbuffer.c b/src/native/windows/org_lwjgl_opengl_Pbuffer.c
index dd022b67..f2093e93 100644
--- a/src/native/windows/org_lwjgl_opengl_Pbuffer.c
+++ b/src/native/windows/org_lwjgl_opengl_Pbuffer.c
@@ -68,7 +68,7 @@ static bool getExtensions(JNIEnv *env, WGLExtensions *extensions, jobject pixel_
return false;
}
dummy_hdc = GetDC(dummy_hwnd);
- pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, true, false, false, false);
+ pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, true, false, false);
if (pixel_format_id == -1) {
closeWindow(&dummy_hwnd, &dummy_hdc);
return false;
@@ -137,7 +137,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nCreate
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
int pixel_format_id;
jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format);
- bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z"));
if ( pBufferAttribs != NULL ) {
pBufferAttribs_ptr = (const int *)(*env)->GetDirectBufferAddress(env, pBufferAttribs);
@@ -152,7 +151,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nCreate
return;
}
dummy_hdc = GetDC(dummy_hwnd);
- pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, false, true, false, floating_point);
+ pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, false, true, false);
if (pixel_format_id == -1) {
closeWindow(&dummy_hwnd, &dummy_hdc);
return;