diff --git a/platform_build/build-definitions.xml b/platform_build/build-definitions.xml
index 96b417b6..47244735 100644
--- a/platform_build/build-definitions.xml
+++ b/platform_build/build-definitions.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java b/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
index d117fda5..ab641e25 100644
--- a/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
+++ b/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
@@ -164,6 +164,8 @@ public class ContextCapabilitiesGenerator {
public static void generateInitStubs(PrintWriter writer, InterfaceDeclaration d, boolean context_specific) {
if ( d.getMethods().size() > 0 ) {
if ( context_specific ) {
+ if ( d.getAnnotation(ForceInit.class) != null )
+ writer.println("\t\t" + CACHED_EXTS_VAR_NAME + ".add(\"" + translateFieldName(d.getSimpleName()) + "\");");
writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\"");
writer.print(translateFieldName(d.getSimpleName()) + "\")");
writer.print(" && !" + getAddressesInitializerName(d.getSimpleName()) + "(");
@@ -218,7 +220,7 @@ public class ContextCapabilitiesGenerator {
continue;
if ( !first )
- writer.println(" &&");
+ writer.println(" &");
else
first = false;
diff --git a/src/java/org/lwjgl/util/generator/ForceInit.java b/src/java/org/lwjgl/util/generator/ForceInit.java
new file mode 100644
index 00000000..7173f6e5
--- /dev/null
+++ b/src/java/org/lwjgl/util/generator/ForceInit.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2002-2008 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.util.generator;
+
+/**
+ * Extensions marked with ForceInit will be initialized by LWJGL even if not exposed in the GL_EXTENSIONS string.
+ *
+ * @author spasi
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.TYPE })
+public @interface ForceInit {
+}
\ No newline at end of file
diff --git a/src/java/org/lwjgl/util/generator/GeneratorVisitor.java b/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
index 446e5a96..a945bd6e 100644
--- a/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
+++ b/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
@@ -186,6 +186,7 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
//java_writer.println("import org.lwjgl.NondirectBufferWrapper;");
java_writer.println("import java.nio.*;");
java_writer.println();
+ Utils.printDocComment(java_writer, d);
java_writer.print("public ");
boolean is_final = Utils.isFinal(d);
if (is_final)
diff --git a/src/java/org/lwjgl/util/generator/Utils.java b/src/java/org/lwjgl/util/generator/Utils.java
index ceb8a0b2..63f6bf3d 100644
--- a/src/java/org/lwjgl/util/generator/Utils.java
+++ b/src/java/org/lwjgl/util/generator/Utils.java
@@ -149,11 +149,12 @@ public class Utils {
public static void printDocComment(PrintWriter writer, Declaration decl) {
String doc_comment = decl.getDocComment();
if (doc_comment != null) {
- writer.println("\t/**");
+ String tab = decl instanceof InterfaceDeclaration ? "" : "\t";
+ writer.println(tab + "/**");
StringTokenizer doc_lines = new StringTokenizer(doc_comment, "\n");
while (doc_lines.hasMoreTokens())
- writer.println("\t *" + doc_lines.nextToken());
- writer.println("\t */");
+ writer.println(tab + " * " + doc_lines.nextToken());
+ writer.println(tab + " */");
} else if ( (decl instanceof MethodDeclaration) && decl.getAnnotation(Alternate.class) != null )
writer.println("\t/** Overloads " + decl.getAnnotation(Alternate.class).value() + " */");
}
diff --git a/src/templates/org/lwjgl/opengl/ATI_texture_env_combine3.java b/src/templates/org/lwjgl/opengl/ATI_texture_env_combine3.java
new file mode 100644
index 00000000..7bf1121d
--- /dev/null
+++ b/src/templates/org/lwjgl/opengl/ATI_texture_env_combine3.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2002-2008 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengl;
+
+public interface ATI_texture_env_combine3 {
+
+ /**
+ * Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv,
+ * and TexEnviv when the <pname> parameter value is COMBINE_RGB_ARB
+ * or COMBINE_ALPHA_ARB
+ */
+ int GL_MODULATE_ADD_ATI = 0x8744;
+ int GL_MODULATE_SIGNED_ADD_ATI = 0x8745;
+ int GL_MODULATE_SUBTRACT_ATI = 0x8746;
+
+}
\ No newline at end of file
diff --git a/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java b/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java
index b69f035b..676e2987 100644
--- a/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java
+++ b/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java
@@ -35,6 +35,7 @@ import org.lwjgl.util.generator.*;
import java.nio.*;
+@ForceInit
@Dependent
@DeprecatedGL
public interface EXT_direct_state_access {
@@ -518,9 +519,11 @@ public interface EXT_direct_state_access {
value parameters
*/
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@Dependent("OpenGL30")
void glEnableClientStateiEXT(@GLenum int array, @GLuint int index);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@Dependent("OpenGL30")
void glDisableClientStateiEXT(@GLenum int array, @GLuint int index);
@@ -562,6 +565,7 @@ public interface EXT_direct_state_access {
and before state value parameters
*/
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@Dependent("OpenGL30")
@StripPostfix("params")
void glGetFloati_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params);
@@ -572,6 +576,7 @@ public interface EXT_direct_state_access {
@StripPostfix("params")
void glGetFloati_vEXT2(@GLenum int pname, @GLuint int index, @OutParameter FloatBuffer params);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@Dependent("OpenGL30")
@StripPostfix("params")
void glGetDoublei_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params);
@@ -582,6 +587,7 @@ public interface EXT_direct_state_access {
@StripPostfix("params")
void glGetDoublei_vEXT2(@GLenum int pname, @GLuint int index, @OutParameter DoubleBuffer params);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@Dependent("OpenGL30")
@StripPostfix(value = "params", hasPostfix = false)
void glGetPointeri_vEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params);
@@ -812,6 +818,7 @@ public interface EXT_direct_state_access {
@GLshort
@GLint Buffer img);
+ @Dependent("OpenGL13")
void glGetCompressedTexImage(@GLenum int target, int lod,
@OutParameter
@BufferObject(BufferKind.PackPBO)
@@ -946,6 +953,7 @@ public interface EXT_direct_state_access {
@Dependent("OpenGL20")
void glProgramUniform4fEXT(@GLuint int program, int location, float v0, float v1, float v2, float v3);
+ @Dependent("OpenGL20")
void glProgramUniform1iEXT(@GLuint int program, int location, int v0);
@Dependent("OpenGL20")
diff --git a/src/templates/org/lwjgl/opengl/GL32.java b/src/templates/org/lwjgl/opengl/GL32.java
index dced9b1e..d823725e 100644
--- a/src/templates/org/lwjgl/opengl/GL32.java
+++ b/src/templates/org/lwjgl/opengl/GL32.java
@@ -63,7 +63,6 @@ public interface GL32 {
// ----------------------[ ARB_draw_elements_base_vertex ]----------------------
// -----------------------------------------------------------------------------
- @Optional(reason = "AMD's 3.2 implementation does not expose this (last driver checked: 10.1)")
void glDrawElementsBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type,
@BufferObject(BufferKind.ElementVBO)
@Const
@@ -71,7 +70,6 @@ public interface GL32 {
@GLushort
@GLuint Buffer indices, int basevertex);
- @Optional(reason = "AMD's 3.2 implementation does not expose this (last driver checked: 10.1)")
void glDrawRangeElementsBaseVertex(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type,
@BufferObject(BufferKind.ElementVBO)
@Const
@@ -79,7 +77,6 @@ public interface GL32 {
@GLushort
@GLuint Buffer indices, int basevertex);
- @Optional(reason = "AMD's 3.2 implementation does not expose this (last driver checked: 10.1)")
void glDrawElementsInstancedBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type,
@BufferObject(BufferKind.ElementVBO)
@Const
@@ -326,7 +323,6 @@ public interface GL32 {
@Alternate("glGetInteger64i_v")
@GLreturn("data")
@StripPostfix(value = "data", postfix = "64")
- @Optional(reason = "NV's 3.2 implementation does not expose this (last driver checked: 19?.??)")
void glGetInteger64i_v2(@GLenum int value, @GLuint int index, @OutParameter @GLint64 LongBuffer data);
@StripPostfix("values")
diff --git a/src/templates/org/lwjgl/opengl/GL40.java b/src/templates/org/lwjgl/opengl/GL40.java
index cec7778f..c8997980 100644
--- a/src/templates/org/lwjgl/opengl/GL40.java
+++ b/src/templates/org/lwjgl/opengl/GL40.java
@@ -46,12 +46,16 @@ public interface GL40 {
// ----------------------[ ARB_draw_buffers_blend ]----------------------
// ----------------------------------------------------------------------
+ @Optional(reason = "AMD's 4.0 implementation does not expose this (last driver checked: 10.3)")
void glBlendEquationi(@GLuint int buf, @GLenum int mode);
+ @Optional(reason = "AMD's 4.0 implementation does not expose this (last driver checked: 10.3)")
void glBlendEquationSeparatei(@GLuint int buf, @GLenum int modeRGB, @GLenum int modeAlpha);
+ @Optional(reason = "AMD's 4.0 implementation does not expose this (last driver checked: 10.3)")
void glBlendFunci(@GLuint int buf, @GLenum int src, @GLenum int dst);
+ @Optional(reason = "AMD's 4.0 implementation does not expose this (last driver checked: 10.3)")
void glBlendFuncSeparatei(@GLuint int buf, @GLenum int srcRGB, @GLenum int dstRGB, @GLenum int srcAlpha, @GLenum int dstAlpha);
// -----------------------------------------------------------------
@@ -182,6 +186,7 @@ public interface GL40 {
*/
int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37;
+ @Optional(reason = "AMD's 4.0 implementation does not expose this (last driver checked: 10.3)")
void glMinSampleShading(@GLclampf float value);
// ---------------------------------------------------------------------
diff --git a/src/templates/org/lwjgl/opengl/NVX_gpu_memory_info.java b/src/templates/org/lwjgl/opengl/NVX_gpu_memory_info.java
new file mode 100644
index 00000000..694e719a
--- /dev/null
+++ b/src/templates/org/lwjgl/opengl/NVX_gpu_memory_info.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002-2008 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengl;
+
+/** Experimental extension, may be removed/changed in the future. */
+public interface NVX_gpu_memory_info {
+
+ /** Accepted by the <pname> parameter of GetIntegerv: */
+ int GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = 0x9047;
+ int GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048;
+ int GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = 0x9049;
+ int GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX = 0x904A;
+ int GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = 0x904B;
+
+}
\ No newline at end of file
diff --git a/src/templates/org/lwjgl/opengl/NV_half_float.java b/src/templates/org/lwjgl/opengl/NV_half_float.java
index 13ecc2a3..93c18706 100644
--- a/src/templates/org/lwjgl/opengl/NV_half_float.java
+++ b/src/templates/org/lwjgl/opengl/NV_half_float.java
@@ -78,23 +78,34 @@ public interface NV_half_float {
void glSecondaryColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ void glVertexWeighthNV(@GLhalf short weight);
+
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
void glVertexAttrib1hNV(@GLuint int index, @GLhalf short x);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
void glVertexAttrib2hNV(@GLuint int index, @GLhalf short x, @GLhalf short y);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
void glVertexAttrib3hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
void glVertexAttrib4hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@StripPostfix("attribs")
void glVertexAttribs1hvNV(@GLuint int index, @AutoSize("attribs") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@StripPostfix("attribs")
void glVertexAttribs2hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 1") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@StripPostfix("attribs")
void glVertexAttribs3hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " / 3") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
+ @Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
@StripPostfix("attribs")
void glVertexAttribs4hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 2") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
}
diff --git a/src/templates/org/lwjgl/opengl/NV_primitive_restart.java b/src/templates/org/lwjgl/opengl/NV_primitive_restart.java
index 7fb0a21b..d521de67 100644
--- a/src/templates/org/lwjgl/opengl/NV_primitive_restart.java
+++ b/src/templates/org/lwjgl/opengl/NV_primitive_restart.java
@@ -33,6 +33,7 @@ package org.lwjgl.opengl;
import org.lwjgl.util.generator.*;
+@ForceInit
public interface NV_primitive_restart {
/**