aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build-jogl.xml32
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl2.java12
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java12
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl3.java12
-rwxr-xr-xmake/config/jogl/gl-impl-CustomJavaCode-gles1.java12
-rwxr-xr-xmake/config/jogl/gl-impl-CustomJavaCode-gles2.java12
-rwxr-xr-xmake/stub_includes/opengl/GL3/gl3.h157
-rw-r--r--make/stub_includes/opengl/GL3/gl3ext.h230
8 files changed, 306 insertions, 173 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index bf07499a6..7151151cd 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -134,7 +134,7 @@
value="com/sun/opengl/impl/**/gl3/**"/>
<property name="java.part.gl3.dbg"
- value="javax/media/opengl/TraceGL3.* javax/media/opengl/DebugGL3.*"/>
+ value="javax/media/opengl/TraceGL3.* javax/media/opengl/DebugGL3.* javax/media/opengl/TraceGL3bc.* javax/media/opengl/DebugGL3bc.*"/>
<property name="java.part.gl2"
value="com/sun/opengl/impl/**/gl2/**"/>
@@ -678,8 +678,20 @@
</gluegen>
</target>
+ <target name="java.generate.gl3bc">
+ <echo message="Generating GL3bc implementation" />
+ <antcall target="java.generate.copy2temp" inheritRefs="true" />
+ <gluegen src="${stub.includes.opengl}/gl3bc.c"
+ outputRootDir="${build}"
+ config="${config}/gl-gl3bc.cfg"
+ includeRefid="stub.includes.fileset.all.gl2"
+ emitter="com.sun.gluegen.opengl.GLEmitter">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+ </target>
+
<target name="java.generate.gl2es12">
- <echo message="Generating GL2ES12 interface and implementation" />
+ <echo message="Generating GL2ES12 implementation" />
<antcall target="java.generate.copy2temp" inheritRefs="true" />
<gluegen src="${stub.includes.opengl}/gl2es12.c"
outputRootDir="${build}"
@@ -714,7 +726,7 @@
</gluegen>
</target>
- <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl2es12, java.generate.gles1, java.generate.gles2"/>
+ <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl2es12, java.generate.gles1, java.generate.gles2"/>
<!-- target name="java.generate.gl.nsig" if="gluegen.nsig">
<echo message="Generating GL interface and implementation" />
@@ -987,7 +999,7 @@
<dependset>
<srcfilelist dir="${classes}/javax/media/opengl" files="GL3.class" />
<targetfileset dir="${src.generated.java}/javax/media/opengl"
- includes="DebugGL3.java,TraceGL3.java" />
+ includes="DebugGL3.java,TraceGL3.java,DebugGL3bc.java,TraceGL3bc.java" />
</dependset>
<!-- Now choose one of the two to test to see if we have to regenerate -->
@@ -1057,6 +1069,16 @@
<fileset dir="${src.generated.java}"
includes="javax/media/opengl/DebugGL3.java javax/media/opengl/TraceGL3.java" />
</copy>
+
+ <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
+ <arg value="javax.media.opengl.GL3bc" />
+ <arg value="${src.generated.java}/javax/media/opengl" />
+ <classpath refid="pipeline.classpath" />
+ </java>
+ <copy todir="${src.generated.java-cdc}">
+ <fileset dir="${src.generated.java}"
+ includes="javax/media/opengl/DebugGL3bc.java javax/media/opengl/TraceGL3bc.java" />
+ </copy>
</target>
<target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2, java.generate.composable.pipeline.gl3">
@@ -1106,7 +1128,7 @@
<!-- Perform the first pass Java compile. -->
<javac destdir="${classes}"
- includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java"
+ includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
source="1.4" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
index 587bb6738..cd1a24459 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
@@ -28,6 +28,10 @@ public final boolean isGL() {
return true;
}
+public final boolean isGL3bc() {
+ return false;
+}
+
public final boolean isGL3() {
return false;
}
@@ -68,6 +72,10 @@ public final GL getGL() throws GLException {
return this;
}
+public final GL3bc getGL3bc() throws GLException {
+ throw new GLException("Not a GL3bc implementation");
+}
+
public final GL3 getGL3() throws GLException {
throw new GLException("Not a GL3 implementation");
}
@@ -147,7 +155,7 @@ public Object getPlatformGLExtensions() {
based on code in the SGI OpenGL sample implementation. */
private int imageSizeInBytes(int format, int type, int w, int h, int d,
- int dimensions, boolean pack) {
+ boolean pack) {
int elements = 0;
int esize = 0;
@@ -230,7 +238,7 @@ private int imageSizeInBytes(int format, int type, int w, int h, int d,
default:
return 0;
}
- return imageSizeInBytes(elements * esize, w, h, d, dimensions, pack);
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
}
private GLBufferSizeTracker bufferSizeTracker;
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java
index 8e9c8bf01..2eca2b6ab 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java
@@ -30,6 +30,10 @@ public final boolean isGL() {
return true;
}
+public final boolean isGL3bc() {
+ return false;
+}
+
public final boolean isGL3() {
return false;
}
@@ -70,6 +74,10 @@ public final GL getGL() throws GLException {
return this;
}
+public final GL3bc getGL3bc() throws GLException {
+ throw new GLException("Not a GL3bc implementation");
+}
+
public final GL3 getGL3() throws GLException {
throw new GLException("Not a GL3 implementation");
}
@@ -147,7 +155,7 @@ public Object getPlatformGLExtensions() {
based on code in the SGI OpenGL sample implementation. */
private int imageSizeInBytes(int format, int type, int w, int h, int d,
- int dimensions, boolean pack) {
+ boolean pack) {
int elements = 0;
int esize = 0;
@@ -202,7 +210,7 @@ private int imageSizeInBytes(int format, int type, int w, int h, int d,
default:
return 0;
}
- return imageSizeInBytes(elements * esize, w, h, d, dimensions, pack);
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
}
private GLBufferSizeTracker bufferSizeTracker;
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl3.java b/make/config/jogl/gl-impl-CustomJavaCode-gl3.java
index b69188c73..16ff008cf 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl3.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl3.java
@@ -27,6 +27,10 @@ public final boolean isGL() {
return true;
}
+public final boolean isGL3bc() {
+ return false;
+}
+
public final boolean isGL3() {
return true;
}
@@ -67,6 +71,10 @@ public final GL getGL() throws GLException {
return this;
}
+public final GL3bc getGL3bc() throws GLException {
+ throw new GLException("Not a GL3bc implementation");
+}
+
public final GL3 getGL3() throws GLException {
return this;
}
@@ -146,7 +154,7 @@ public Object getPlatformGLExtensions() {
based on code in the SGI OpenGL sample implementation. */
private int imageSizeInBytes(int format, int type, int w, int h, int d,
- int dimensions, boolean pack) {
+ boolean pack) {
int elements = 0;
int esize = 0;
@@ -221,7 +229,7 @@ private int imageSizeInBytes(int format, int type, int w, int h, int d,
default:
return 0;
}
- return imageSizeInBytes(elements * esize, w, h, d, dimensions, pack);
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
}
private GLBufferSizeTracker bufferSizeTracker;
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 4e46f076b..dfef10ec9 100755
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -10,6 +10,10 @@ public final boolean isGL() {
return true;
}
+public final boolean isGL3bc() {
+ return false;
+}
+
public final boolean isGL3() {
return false;
}
@@ -50,6 +54,10 @@ public final GL getGL() throws GLException {
return this;
}
+public final GL3bc getGL3bc() throws GLException {
+ throw new GLException("Not a GL3bc implementation");
+}
+
public final GL3 getGL3() throws GLException {
throw new GLException("Not a GL3 implementation");
}
@@ -121,7 +129,7 @@ public Object getPlatformGLExtensions() {
based on code in the SGI OpenGL sample implementation. */
private int imageSizeInBytes(int format, int type, int w, int h, int d,
- int dimensions, boolean pack) {
+ boolean pack) {
int elements = 0;
int esize = 0;
@@ -166,7 +174,7 @@ private int imageSizeInBytes(int format, int type, int w, int h, int d,
default:
return 0;
}
- return imageSizeInBytes(elements * esize, w, h, d, dimensions, pack);
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
}
private GLBufferSizeTracker bufferSizeTracker;
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
index 97a0dbd27..7287408a0 100755
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
@@ -14,6 +14,10 @@ public final boolean isGL() {
return true;
}
+public final boolean isGL3bc() {
+ return false;
+}
+
public final boolean isGL3() {
return false;
}
@@ -54,6 +58,10 @@ public final GL getGL() throws GLException {
return this;
}
+public final GL3bc getGL3bc() throws GLException {
+ throw new GLException("Not a GL3bc implementation");
+}
+
public final GL3 getGL3() throws GLException {
throw new GLException("Not a GL3 implementation");
}
@@ -125,7 +133,7 @@ public Object getPlatformGLExtensions() {
based on code in the SGI OpenGL sample implementation. */
private int imageSizeInBytes(int format, int type, int w, int h, int d,
- int dimensions, boolean pack) {
+ boolean pack) {
int elements = 0;
int esize = 0;
@@ -176,7 +184,7 @@ private int imageSizeInBytes(int format, int type, int w, int h, int d,
default:
return 0;
}
- return imageSizeInBytes(elements * esize, w, h, d, dimensions, pack);
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
}
private GLBufferSizeTracker bufferSizeTracker;
diff --git a/make/stub_includes/opengl/GL3/gl3.h b/make/stub_includes/opengl/GL3/gl3.h
index 437830dfa..8bdff4644 100755
--- a/make/stub_includes/opengl/GL3/gl3.h
+++ b/make/stub_includes/opengl/GL3/gl3.h
@@ -864,75 +864,6 @@ typedef void GLvoid;
/* reuse GL_VERTEX_ARRAY_BINDING */
#endif
-#ifndef GL_VERSION_3_1
-#define GL_SAMPLER_2D_RECT 0x8B63
-#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
-#define GL_SAMPLER_BUFFER 0x8DC2
-#define GL_INT_SAMPLER_2D_RECT 0x8DCD
-#define GL_INT_SAMPLER_BUFFER 0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
-#define GL_TEXTURE_BUFFER 0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
-#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E
-#define GL_TEXTURE_RECTANGLE 0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
-#define GL_RED_SNORM 0x8F90
-#define GL_RG_SNORM 0x8F91
-#define GL_RGB_SNORM 0x8F92
-#define GL_RGBA_SNORM 0x8F93
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGB8_SNORM 0x8F96
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_R16_SNORM 0x8F98
-#define GL_RG16_SNORM 0x8F99
-#define GL_RGB16_SNORM 0x8F9A
-#define GL_RGBA16_SNORM 0x8F9B
-#define GL_SIGNED_NORMALIZED 0x8F9C
-#define GL_PRIMITIVE_RESTART 0x8F9D
-#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
-/* Reuse tokens from ARB_copy_buffer */
-/* reuse GL_COPY_READ_BUFFER */
-/* reuse GL_COPY_WRITE_BUFFER */
-/* Would reuse tokens from ARB_draw_instanced, but it has none */
-/* Reuse tokens from ARB_uniform_buffer_object */
-/* reuse GL_UNIFORM_BUFFER */
-/* reuse GL_UNIFORM_BUFFER_BINDING */
-/* reuse GL_UNIFORM_BUFFER_START */
-/* reuse GL_UNIFORM_BUFFER_SIZE */
-/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */
-/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */
-/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */
-/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */
-/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */
-/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */
-/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */
-/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */
-/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */
-/* reuse GL_ACTIVE_UNIFORM_BLOCKS */
-/* reuse GL_UNIFORM_TYPE */
-/* reuse GL_UNIFORM_SIZE */
-/* reuse GL_UNIFORM_NAME_LENGTH */
-/* reuse GL_UNIFORM_BLOCK_INDEX */
-/* reuse GL_UNIFORM_OFFSET */
-/* reuse GL_UNIFORM_ARRAY_STRIDE */
-/* reuse GL_UNIFORM_MATRIX_STRIDE */
-/* reuse GL_UNIFORM_IS_ROW_MAJOR */
-/* reuse GL_UNIFORM_BLOCK_BINDING */
-/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */
-/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */
-/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */
-/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */
-/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */
-/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */
-/* reuse GL_INVALID_INDEX */
-#endif
-
#ifndef GL_ARB_framebuffer_object
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
@@ -1026,47 +957,6 @@ typedef void GLvoid;
#define GL_VERTEX_ARRAY_BINDING 0x85B5
#endif
-#ifndef GL_ARB_uniform_buffer_object
-#define GL_UNIFORM_BUFFER 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING 0x8A28
-#define GL_UNIFORM_BUFFER_START 0x8A29
-#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
-#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
-#define GL_UNIFORM_TYPE 0x8A37
-#define GL_UNIFORM_SIZE 0x8A38
-#define GL_UNIFORM_NAME_LENGTH 0x8A39
-#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
-#define GL_UNIFORM_OFFSET 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-/** Manual: #define GL_INVALID_INDEX -1 == (int) 0xFFFFFFFFu */
-#endif
-
-#ifndef GL_ARB_copy_buffer
-#define GL_COPY_READ_BUFFER 0x8F36
-#define GL_COPY_WRITE_BUFFER 0x8F37
-#endif
-
#ifndef GL_ARB_depth_buffer_float
#define GL_DEPTH_COMPONENT32F 0x8CAC
#define GL_DEPTH32F_STENCIL8 0x8CAD
@@ -1687,23 +1577,6 @@ typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer
typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
#endif
-#ifndef GL_VERSION_3_1
-#define GL_VERSION_3_1 1
-/* OpenGL 3.1 also reuses entry points from these extensions: */
-/* ARB_copy_buffer */
-/* ARB_uniform_buffer_object */
-#ifdef GL3_PROTOTYPES
-GLAPI void APIENTRY glDrawArraysInstanced (GLenum, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glDrawElementsInstanced (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
-GLAPI void APIENTRY glTexBuffer (GLenum, GLenum, GLuint);
-GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint);
-#endif /* GL3_PROTOTYPES */
-typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
-typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
-#endif
-
#ifndef GL_ARB_framebuffer_object
#define GL_ARB_framebuffer_object 1
#ifdef GL3_PROTOTYPES
@@ -1774,35 +1647,7 @@ typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
#endif
-#ifndef GL_ARB_uniform_buffer_object
-#define GL_ARB_uniform_buffer_object 1
-#ifdef GL3_PROTOTYPES
-GLAPI void APIENTRY glGetUniformIndices (GLuint, GLsizei, const GLchar* *, GLuint *);
-GLAPI void APIENTRY glGetActiveUniformsiv (GLuint, GLsizei, const GLuint *, GLenum, GLint *);
-GLAPI void APIENTRY glGetActiveUniformName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
-GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint, const GLchar *);
-GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint, GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
-GLAPI void APIENTRY glUniformBlockBinding (GLuint, GLuint, GLuint);
-#endif /* GL3_PROTOTYPES */
-typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-#endif
-
-#ifndef GL_ARB_copy_buffer
-#define GL_ARB_copy_buffer 1
-#ifdef GL3_PROTOTYPES
-GLAPI void APIENTRY glCopyBufferSubData (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr);
-#endif /* GL3_PROTOTYPES */
-typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-#endif
-
-/* Include Post-GL 3.1 changes and extensions */
+/* Include Post-GL 3.0 changes and extensions */
#include <GL3/gl3ext.h>
diff --git a/make/stub_includes/opengl/GL3/gl3ext.h b/make/stub_includes/opengl/GL3/gl3ext.h
index 7d391921f..46b2c6ee7 100644
--- a/make/stub_includes/opengl/GL3/gl3ext.h
+++ b/make/stub_includes/opengl/GL3/gl3ext.h
@@ -26,6 +26,153 @@
* #endif
*/
+
+#ifndef GL_VERSION_3_1
+#define GL_SAMPLER_2D_RECT 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
+#define GL_SAMPLER_BUFFER 0x8DC2
+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
+#define GL_INT_SAMPLER_BUFFER 0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
+#define GL_TEXTURE_BUFFER 0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E
+#define GL_TEXTURE_RECTANGLE 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
+#define GL_RED_SNORM 0x8F90
+#define GL_RG_SNORM 0x8F91
+#define GL_RGB_SNORM 0x8F92
+#define GL_RGBA_SNORM 0x8F93
+#define GL_R8_SNORM 0x8F94
+#define GL_RG8_SNORM 0x8F95
+#define GL_RGB8_SNORM 0x8F96
+#define GL_RGBA8_SNORM 0x8F97
+#define GL_R16_SNORM 0x8F98
+#define GL_RG16_SNORM 0x8F99
+#define GL_RGB16_SNORM 0x8F9A
+#define GL_RGBA16_SNORM 0x8F9B
+#define GL_SIGNED_NORMALIZED 0x8F9C
+#define GL_PRIMITIVE_RESTART 0x8F9D
+#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
+/* Reuse tokens from ARB_copy_buffer */
+/* reuse GL_COPY_READ_BUFFER */
+/* reuse GL_COPY_WRITE_BUFFER */
+/* Would reuse tokens from ARB_draw_instanced, but it has none */
+/* Reuse tokens from ARB_uniform_buffer_object */
+/* reuse GL_UNIFORM_BUFFER */
+/* reuse GL_UNIFORM_BUFFER_BINDING */
+/* reuse GL_UNIFORM_BUFFER_START */
+/* reuse GL_UNIFORM_BUFFER_SIZE */
+/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */
+/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */
+/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */
+/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */
+/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */
+/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */
+/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */
+/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */
+/* reuse GL_ACTIVE_UNIFORM_BLOCKS */
+/* reuse GL_UNIFORM_TYPE */
+/* reuse GL_UNIFORM_SIZE */
+/* reuse GL_UNIFORM_NAME_LENGTH */
+/* reuse GL_UNIFORM_BLOCK_INDEX */
+/* reuse GL_UNIFORM_OFFSET */
+/* reuse GL_UNIFORM_ARRAY_STRIDE */
+/* reuse GL_UNIFORM_MATRIX_STRIDE */
+/* reuse GL_UNIFORM_IS_ROW_MAJOR */
+/* reuse GL_UNIFORM_BLOCK_BINDING */
+/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */
+/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */
+/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */
+/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */
+/* reuse GL_INVALID_INDEX */
+#endif
+#ifndef GL_VERSION_3_1
+#define GL_VERSION_3_1 1
+/* OpenGL 3.1 also reuses entry points from these extensions: */
+/* ARB_copy_buffer */
+/* ARB_uniform_buffer_object */
+#ifdef GL3_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstanced (GLenum, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glDrawElementsInstanced (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
+GLAPI void APIENTRY glTexBuffer (GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint);
+#endif /* GL3_PROTOTYPES */
+/* No need for explicit function pointer: we force generation of ProcAddress .. */
+#endif
+
+
+#ifndef GL_ARB_copy_buffer
+#define GL_COPY_READ_BUFFER 0x8F36
+#define GL_COPY_WRITE_BUFFER 0x8F37
+#endif
+#ifndef GL_ARB_copy_buffer
+#define GL_ARB_copy_buffer 1
+#ifdef GL3_PROTOTYPES
+GLAPI void APIENTRY glCopyBufferSubData (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr);
+#endif /* GL3_PROTOTYPES */
+/* No need for explicit function pointer: we force generation of ProcAddress .. */
+#endif
+
+
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_UNIFORM_BUFFER 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING 0x8A28
+#define GL_UNIFORM_BUFFER_START 0x8A29
+#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
+#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+#define GL_UNIFORM_TYPE 0x8A37
+#define GL_UNIFORM_SIZE 0x8A38
+#define GL_UNIFORM_NAME_LENGTH 0x8A39
+#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+#define GL_UNIFORM_OFFSET 0x8A3B
+#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
+#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+/** Manual: #define GL_INVALID_INDEX -1 == (int) 0xFFFFFFFFu */
+#endif
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_ARB_uniform_buffer_object 1
+#ifdef GL3_PROTOTYPES
+GLAPI void APIENTRY glGetUniformIndices (GLuint, GLsizei, const GLchar* *, GLuint *);
+GLAPI void APIENTRY glGetActiveUniformsiv (GLuint, GLsizei, const GLuint *, GLenum, GLint *);
+GLAPI void APIENTRY glGetActiveUniformName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint, GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glUniformBlockBinding (GLuint, GLuint, GLuint);
+#endif /* GL3_PROTOTYPES */
+/* No need for explicit function pointer: we force generation of ProcAddress .. */
+#endif
+
+
#ifndef GL_VERSION_3_2
#define GL_VERSION_3_2 1
/* OpenGL 3.2 also reuses entry points from these extensions: */
@@ -284,9 +431,88 @@ GLAPI void APIENTRY glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize,
GLAPI void APIENTRY glTessellationFactorAMD(GLfloat factor);
GLAPI void APIENTRY glTessellationModeAMD(GLenum mode);
#endif
-typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
-typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
+/* No need for explicit function pointer: we force generation of ProcAddress .. */
+#endif
+
+/**
+ * http://www.opengl.org/registry/specs/NV/shader_buffer_load.txt
+ */
+#ifndef GL_NV_shader_buffer_load
+#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
+#define GL_GPU_ADDRESS_NV 0x8F34
+#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
+#endif
+#ifndef GL_NV_shader_buffer_load
+#define GL_NV_shader_buffer_load 1
+#ifdef GL_GL3EXT_PROTOTYPE
+GLAPI void APIENTRY glMakeBufferResidentNV(GLenum target, GLenum access);
+GLAPI void APIENTRY glMakeBufferNonResidentNV(GLenum target);
+GLAPI GLboolean APIENTRY glIsBufferResidentNV(GLenum target);
+GLAPI void APIENTRY glNamedMakeBufferResidentNV(GLuint buffer, GLenum access);
+GLAPI void APIENTRY glNamedMakeBufferNonResidentNV(GLuint buffer);
+GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV(GLuint buffer);
+GLAPI void APIENTRY glGetBufferParameterui64vNV(GLenum target, GLenum pname, GLuint64 *params);
+GLAPI void APIENTRY glGetNamedBufferParameterui64vNV(GLuint buffer, GLenum pname, GLuint64 *params);
+GLAPI void APIENTRY glGetIntegerui64vNV(GLenum value, GLuint64 *result);
+GLAPI void APIENTRY glUniformui64NV(GLint location, GLuint64 value);
+GLAPI void APIENTRY glUniformui64vNV(GLint location, GLsizei count, GLuint64 *value);
+GLAPI void APIENTRY glGetUniformui64vNV(GLuint program, GLint location, GLuint64 *params);
+GLAPI void APIENTRY glProgramUniformui64NV(GLuint program, GLint location, GLuint64 value);
+GLAPI void APIENTRY glProgramUniformui64vNV(GLuint program, GLint location, GLsizei count, GLuint64 *value);
+#endif
+/* No need for explicit function pointer: we force generation of ProcAddress .. */
+#endif
+
+/**
+ * http://www.opengl.org/registry/specs/NV/vertex_buffer_unified_memory.txt
+ */
+#ifndef GL_NV_vertex_buffer_unified_memory
+#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
+#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
+#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
+#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
+#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
+#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
+#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
+#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
+#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
+#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
+#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
+#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
+#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
+#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
+#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
+#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
+#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
+#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
+#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
+#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
+#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
+#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
+#endif
+#ifndef GL_NV_vertex_buffer_unified_memory
+#define GL_NV_vertex_buffer_unified_memory 1
+#ifdef GL_GL3EXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsEnabled( GLenum cap );
+GLAPI void APIENTRY glEnableClientState( GLenum cap );
+GLAPI void APIENTRY glDisableClientState( GLenum cap );
+GLAPI void APIENTRY glBufferAddressRangeNV(GLenum pname, GLuint index, GLuint64 address, GLsizeiptr length);
+GLAPI void APIENTRY glVertexFormatNV(GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glNormalFormatNV(GLenum type, GLsizei stride);
+GLAPI void APIENTRY glColorFormatNV(GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glIndexFormatNV(GLenum type, GLsizei stride);
+GLAPI void APIENTRY glTexCoordFormatNV(GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glEdgeFlagFormatNV(GLsizei stride);
+GLAPI void APIENTRY glSecondaryColorFormatNV(GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glFogCoordFormatNV(GLenum type, GLsizei stride);
+GLAPI void APIENTRY glVertexAttribFormatNV(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
+GLAPI void APIENTRY glVertexAttribIFormatNV(GLuint index, GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glGetIntegerui64i_vNV(GLenum value, GLuint index, GLuint64 result[]);
#endif
+/* No need for explicit function pointer: we force generation of ProcAddress .. */
+#endif
+
+
#ifndef GL_APPLE_float_pixels
#define GL_HALF_APPLE 0x140B