summaryrefslogtreecommitdiffstats
path: root/make/gl-common.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'make/gl-common.cfg')
-rw-r--r--make/gl-common.cfg304
1 files changed, 232 insertions, 72 deletions
diff --git a/make/gl-common.cfg b/make/gl-common.cfg
index 515b3726c..ab8af9e09 100644
--- a/make/gl-common.cfg
+++ b/make/gl-common.cfg
@@ -7,13 +7,13 @@ RuntimeExceptionType GLException
# Imports needed by all glue code
Import java.nio.*
Import java.util.*
-Import net.java.games.jogl.*
-Import net.java.games.jogl.impl.*
+Import javax.media.opengl.*
+Import com.sun.opengl.impl.*
-# Generate "flattened" NIO variants for routines taking C primitive
-# pointers that aren't of type void*
-NioMode ALL_POINTERS
-FlattenNIOVariants true
+# Inform the glue code generator of the association between #defines
+# and functions and the extensions in which they are defined
+GLHeader GL/gl.h
+GLHeader GL/glext.h
# Don't output #defines of GL version identifier strings as constants,
# because we don't need them java-side.
@@ -74,14 +74,6 @@ Ignore glUnmapObjectBufferATI
# Ignore some GL functions that have outgoing void** parameters; we cannot yet deal with them
Ignore glGetVariantPointervEXT
-# Some GL functions have multiple void* arguments but require them to
-# contain data of the same type; make sure that when bindings are
-# expanded those arguments have the same type.
-MirrorExpandedBindingArgs glSeparableFilter2D 6 7
-MirrorExpandedBindingArgs glSeparableFilter2DEXT 6 7
-MirrorExpandedBindingArgs glGetSeparableFilter 3 4
-MirrorExpandedBindingArgs glGetSeparableFilterEXT 3 4
-
# FIXME: these extensions require either a handle to a device context
# or take void** parameters or both. Until we think through the
# semantics of each of these individually we need to disable them.
@@ -120,6 +112,67 @@ Ignore wglAssociateImageBufferEventsI3D
Ignore wglReleaseImageBufferEventsI3D
#
+# IgnoreExtension directives
+#
+
+# Ignore extensions requiring persistent pointer-to-pointer storage as
+# there is no such thing as a direct "BufferBuffer"
+IgnoreExtension GL_IBM_vertex_array_lists
+IgnoreExtension GL_INTEL_parallel_arrays
+IgnoreExtension GL_SUN_triangle_list
+
+# Ignore extensions never approved by the ARB
+IgnoreExtension GL_EXT_coordinate_frame
+
+# Ignore discontinued extensions
+IgnoreExtension GL_NV_element_array
+
+# Ignore extensions subsumed in OpenGL 1.1 (from OpenGL 1.1 spec, Appendix C)
+IgnoreExtension GL_EXT_vertex_array
+IgnoreExtension GL_EXT_blend_logic_op
+IgnoreExtension GL_EXT_copy_texture
+IgnoreExtension GL_EXT_polygon_offset
+IgnoreExtension GL_EXT_subtexture
+IgnoreExtension GL_EXT_texture
+IgnoreExtension GL_EXT_texture_object
+
+# Ignore extensions subsumed in OpenGL 1.2 and 1.2.1 (from OpenGL 1.2.1 spec, Appendix D)
+IgnoreExtension GL_EXT_bgra
+IgnoreExtension GL_EXT_blend_color
+IgnoreExtension GL_EXT_blend_minmax
+IgnoreExtension GL_EXT_blend_subtract
+IgnoreExtension GL_EXT_color_subtable
+IgnoreExtension GL_EXT_convolution
+IgnoreExtension GL_EXT_draw_range_elements
+IgnoreExtension GL_EXT_histogram
+IgnoreExtension GL_EXT_packed_pixels
+# FIXME: is GL_EXT_paletted_texture also obsolete?
+IgnoreExtension GL_EXT_rescale_normal
+IgnoreExtension GL_EXT_separate_specular_color
+IgnoreExtension GL_EXT_texture3D
+IgnoreExtension GL_HP_convolution_border_modes
+IgnoreExtension GL_SGI_color_matrix
+IgnoreExtension GL_SGI_color_table
+IgnoreExtension GL_SGIS_texture_edge_clamp
+IgnoreExtension GL_SGIS_texture_lod
+
+# Ignore extensions subsumed in OpenGL 1.3 (from OpenGL 1.3 spec, Appendix F)
+IgnoreExtension GL_ARB_multisample
+IgnoreExtension GL_ARB_multitexture
+IgnoreExtension GL_ARB_texture_compression
+IgnoreExtension GL_ARB_texture_cube_map
+IgnoreExtension GL_ARB_texture_border_clamp
+IgnoreExtension GL_ARB_texture_env_add
+IgnoreExtension GL_ARB_texture_env_combine
+IgnoreExtension GL_ARB_texture_env_dot3
+IgnoreExtension GL_ARB_transpose_matrix
+IgnoreExtension GL_EXT_texture_cube_map
+IgnoreExtension GL_EXT_texture_env_add
+IgnoreExtension GL_EXT_texture_env_combine
+IgnoreExtension GL_EXT_texture_env_dot3
+IgnoreExtension GL_SGIS_texture_border_clamp
+
+#
# Opaques and other directives for platform-independent routines
#
@@ -127,51 +180,50 @@ Opaque boolean GLboolean
ReturnsString glGetString
#
-# NIOOnly directives for vertex arrays and other core routines
+# NIODirectOnly directives for vertex arrays and other core routines
#
-NIOOnly glColorPointer
-NIOOnly glEdgeFlagPointer
-NIOOnly glFeedbackBuffer
-NIOOnly glIndexPointer
-NIOOnly glNormalPointer
-NIOOnly glSelectBuffer
-NIOOnly glTexCoordPointer
-NIOOnly glVertexPointer
+NIODirectOnly glColorPointer
+NIODirectOnly glEdgeFlagPointer
+NIODirectOnly glFeedbackBuffer
+NIODirectOnly glIndexPointer
+NIODirectOnly glNormalPointer
+NIODirectOnly glSelectBuffer
+NIODirectOnly glTexCoordPointer
+NIODirectOnly glVertexPointer
#
# FIXME: we should probably be ignoring the "EXT" variants of these
#
-NIOOnly glColorPointerEXT
-NIOOnly glEdgeFlagPointerEXT
-NIOOnly glIndexPointerEXT
-NIOOnly glNormalPointerEXT
-NIOOnly glTexCoordPointerEXT
-NIOOnly glVertexPointerEXT
+NIODirectOnly glColorPointerEXT
+NIODirectOnly glEdgeFlagPointerEXT
+NIODirectOnly glIndexPointerEXT
+NIODirectOnly glNormalPointerEXT
+NIODirectOnly glTexCoordPointerEXT
+NIODirectOnly glVertexPointerEXT
#
-# NIOOnly directives for other extensions
+# NIODirectOnly directives for other extensions
#
-NIOOnly glBinormalPointerEXT
-NIOOnly glGetBufferSubDataARB
+NIODirectOnly glBinormalPointerEXT
+NIODirectOnly glGetBufferSubDataARB
# FIXME: should add way to restrict argument to be a direct ByteBuffer
-NIOOnly glGetProgramStringARB
-NIOOnly glElementPointerATI
-NIOOnly glElementPointerNV
-NIOOnly glFogCoordPointer
-NIOOnly glFogCoordPointerEXT
-NIOOnly glMatrixIndexPointerARB
-# NIOOnly glNewObjectBufferATI # FIXME: look up semantics of this routine
-NIOOnly glPixelDataRangeNV
-NIOOnly glSecondaryColorPointer
-NIOOnly glSecondaryColorPointerEXT
-NIOOnly glTangentPointerEXT
-# NIOOnly glUpdateObjectBufferATI # FIXME: look up semantics of this routine
-# NIOOnly glVariantPointerEXT # FIXME: look up semantics of this routine
-NIOOnly glVertexArrayRangeNV
-NIOOnly glVertexAttribPointerARB
-NIOOnly glVertexAttribPointerNV
-NIOOnly glVertexWeightPointerEXT
-NIOOnly glWeightPointerARB
-NIOOnly wglFreeMemoryNV
-NIOOnly glXFreeMemoryNV
+NIODirectOnly glGetProgramStringARB
+NIODirectOnly glElementPointerATI
+NIODirectOnly glElementPointerNV
+NIODirectOnly glElementPointerAPPLE
+NIODirectOnly glFogCoordPointer
+NIODirectOnly glFogCoordPointerEXT
+NIODirectOnly glMatrixIndexPointerARB
+NIODirectOnly glPixelDataRangeNV
+NIODirectOnly glSecondaryColorPointer
+NIODirectOnly glSecondaryColorPointerEXT
+NIODirectOnly glTangentPointerEXT
+NIODirectOnly glVertexArrayRangeNV
+NIODirectOnly glVertexArrayRangeApple
+NIODirectOnly glVertexAttribPointerARB
+NIODirectOnly glVertexAttribPointerNV
+NIODirectOnly glVertexWeightPointerEXT
+NIODirectOnly glWeightPointerARB
+NIODirectOnly wglFreeMemoryNV
+NIODirectOnly glXFreeMemoryNV
# Capacity of wglAllocateMemoryNV/glXAllocateMemoryNV return value is
# same as value of first argument
@@ -189,11 +241,96 @@ ArgumentIsString glProgramNamedParameter4fvNV 2
ArgumentIsString glProgramNamedParameter4dvNV 2
ArgumentIsString glGetProgramNamedParameterfvNV 2
ArgumentIsString glGetProgramNamedParameterdvNV 2
+ArgumentIsString glShaderSource 2
ArgumentIsString glShaderSourceARB 2
+ArgumentIsString glGetUniformLocation 1
ArgumentIsString glGetUniformLocationARB 1
+ArgumentIsString glBindAttribLocation 2
ArgumentIsString glBindAttribLocationARB 2
+ArgumentIsString glGetAttribLocation 1
ArgumentIsString glGetAttribLocationARB 1
+#
+# Directives for Vertex Buffer Object and Pixel Buffer Object checking
+#
+# NOTE: we currently don't emit glue code for some of these but
+# include them for completeness.
+#
+# FIXME: what about glMultiDrawElements? Do we want to add a VBO
+# variant for that, or simply add checks to the top of the current
+# implementation?
+#
+JavaPrologue glBegin inBeginEndPair = true;
+JavaEpilogue glEnd inBeginEndPair = false;
+BufferObjectKind UnpackPixel glBitmap
+BufferObjectKind UnpackPixel glColorTable
+BufferObjectKind UnpackPixel glColorSubTable
+BufferObjectKind UnpackPixel glCompressedTexImage1D
+BufferObjectKind UnpackPixel glCompressedTexImage1DARB
+BufferObjectKind UnpackPixel glCompressedTexImage2D
+BufferObjectKind UnpackPixel glCompressedTexImage2DARB
+BufferObjectKind UnpackPixel glCompressedTexImage3D
+BufferObjectKind UnpackPixel glCompressedTexImage3DARB
+BufferObjectKind UnpackPixel glCompressedTexSubImage1D
+BufferObjectKind UnpackPixel glCompressedTexSubImage1DARB
+BufferObjectKind UnpackPixel glCompressedTexSubImage2D
+BufferObjectKind UnpackPixel glCompressedTexSubImage2DARB
+BufferObjectKind UnpackPixel glCompressedTexSubImage3D
+BufferObjectKind UnpackPixel glCompressedTexSubImage3DARB
+BufferObjectKind UnpackPixel glConvolutionFilter1D
+BufferObjectKind UnpackPixel glConvolutionFilter2D
+BufferObjectKind UnpackPixel glDrawPixels
+BufferObjectKind UnpackPixel glPixelMapfv
+BufferObjectKind UnpackPixel glPixelMapuiv
+BufferObjectKind UnpackPixel glPixelMapusv
+BufferObjectKind UnpackPixel glPolygonStipple
+BufferObjectKind UnpackPixel glSeparableFilter2D
+BufferObjectKind UnpackPixel glTexImage1D
+BufferObjectKind UnpackPixel glTexImage2D
+BufferObjectKind UnpackPixel glTexImage3D
+BufferObjectKind UnpackPixel glTexSubImage1D
+BufferObjectKind UnpackPixel glTexSubImage2D
+BufferObjectKind UnpackPixel glTexSubImage3D
+
+BufferObjectKind PackPixel glGetColorTable
+BufferObjectKind PackPixel glGetCompressedTexImage
+BufferObjectKind PackPixel glGetCompressedTexImageARB
+BufferObjectKind PackPixel glGetConvolutionFilter
+BufferObjectKind PackPixel glGetHistogram
+BufferObjectKind PackPixel glGetMinmax
+BufferObjectKind PackPixel glGetPixelMapfv
+BufferObjectKind PackPixel glGetPixelMapuiv
+BufferObjectKind PackPixel glGetPixelMapusv
+BufferObjectKind PackPixel glGetPolygonStipple
+BufferObjectKind PackPixel glGetSeparableFilter
+BufferObjectKind PackPixel glGetTexImage
+BufferObjectKind PackPixel glReadPixels
+
+BufferObjectKind Array glColorPointer
+BufferObjectKind Array glEdgeFlagPointer
+BufferObjectKind Array glElementPointerATI
+BufferObjectKind Array glFogCoordPointer
+BufferObjectKind Array glFogCoordPointerEXT
+# The next one is problematic. It isn't discussed by the specs and
+# doesn't have any associated state.
+BufferObjectKind Array glInterleavedArrays
+BufferObjectKind Array glMatrixIndexPointerARB
+BufferObjectKind Array glNormalPointer
+BufferObjectKind Array glSecondaryColorPointer
+BufferObjectKind Array glSecondaryColorPointerEXT
+BufferObjectKind Array glTexCoordPointer
+BufferObjectKind Array glVariantPointerEXT
+BufferObjectKind Array glVertexPointer
+BufferObjectKind Array glVertexAttribPointer
+BufferObjectKind Array glVertexAttribPointerARB
+BufferObjectKind Array glVertexAttribPointerNV
+BufferObjectKind Array glVertexWeightPointerEXT
+BufferObjectKind Array glWeightPointerARB
+
+BufferObjectKind Element glDrawElements
+BufferObjectKind Element glDrawRangeElements
+BufferObjectKind Element glDrawRangeElementsEXT
+
# Javadoc for the GL class
ClassJavadoc GL /**
ClassJavadoc GL * <P> The basic interface to OpenGL, providing access to core
@@ -220,25 +357,16 @@ ClassJavadoc GL * However, in this case it is up to the end user to know which
ClassJavadoc GL * routines or functionality are associated with which OpenGL
ClassJavadoc GL * extensions.
ClassJavadoc GL *
-ClassJavadoc GL * <P> Access to window system-specific extensions is provided through
-ClassJavadoc GL * the {@link WGL} and {@link GLX} interfaces. However, most of these
-ClassJavadoc GL * extensions require access to low-level window system data
-ClassJavadoc GL * structures which are not exposed by this binding, and are therefore
-ClassJavadoc GL * not useful. Calling one particular window system's extension on
-ClassJavadoc GL * another platform will cause a {@link GLException} to be raised
-ClassJavadoc GL * indicating the routine is unimplemented on the current platform.
-ClassJavadoc GL * </P>
-ClassJavadoc GL *
ClassJavadoc GL * <P> Exceptions to the window system extension naming rules:
ClassJavadoc GL *
ClassJavadoc GL * <UL>
ClassJavadoc GL *
-ClassJavadoc GL * <LI> The NVidia vertex_array_range (VAR) extension, in particular {@link
-ClassJavadoc GL * WGL#wglAllocateMemoryNV} / {@link GLX#glXAllocateMemoryNV} and
-ClassJavadoc GL * associated routines. {@link #glAllocateMemoryNV} has been provided
-ClassJavadoc GL * for window system-independent access to VAR. {@link
-ClassJavadoc GL * #isFunctionAvailable} will translate an argument of
-ClassJavadoc GL * "glAllocateMemoryNV" or "glFreeMemoryNV" into the appropriate
+ClassJavadoc GL * <LI> The memory allocators for the NVidia vertex_array_range (VAR)
+ClassJavadoc GL * extension, in particular <code>wglAllocateMemoryNV</code> /
+ClassJavadoc GL * <code>glXAllocateMemoryNV</code> and associated routines. {@link
+ClassJavadoc GL * #glAllocateMemoryNV} has been provided for window system-independent
+ClassJavadoc GL * access to VAR. {@link #isFunctionAvailable} will translate an argument
+ClassJavadoc GL * of "glAllocateMemoryNV" or "glFreeMemoryNV" into the appropriate
ClassJavadoc GL * window system-specific name. </P>
ClassJavadoc GL *
ClassJavadoc GL * <LI> WGL_ARB_pbuffer, WGL_ARB_pixel_format, and other
@@ -320,11 +448,11 @@ CustomJavaCode GL * depth of the display). Any application that is concerned
CustomJavaCode GL * these situations correctly should confirm availability after a display
CustomJavaCode GL * change before calling a questionable OpenGL function. To detect a change in
CustomJavaCode GL * the display device, please see {@link
-CustomJavaCode GL * GLEventListener#displayChanged(GLDrawable,boolean,boolean)}.
+CustomJavaCode GL * GLEventListener#displayChanged(GLAutoDrawable,boolean,boolean)}.
CustomJavaCode GL *
CustomJavaCode GL * @param glFunctionName the name of the OpenGL function (e.g., use
-CustomJavaCode GL * "glPolygonOffsetEXT" to check if the {@link
-CustomJavaCode GL * #glPolygonOffsetEXT(float,float)} is available).
+CustomJavaCode GL * "glBindRenderbufferEXT" to check if {@link
+CustomJavaCode GL * #glBindRenderbufferEXT(int,int)} is available).
CustomJavaCode GL */
CustomJavaCode GL public boolean isFunctionAvailable(String glFunctionName);
@@ -339,8 +467,8 @@ CustomJavaCode GL */
CustomJavaCode GL public boolean isExtensionAvailable(String glExtensionName);
CustomJavaCode GL /**
-CustomJavaCode GL * Provides platform-independent access to the {@link WGL#wglAllocateMemoryNV} /
-CustomJavaCode GL * {@link GLX#glXAllocateMemoryNV} extension.
+CustomJavaCode GL * Provides platform-independent access to the <code>wglAllocateMemoryNV</code> /
+CustomJavaCode GL * <code>glXAllocateMemoryNV</code> extension.
CustomJavaCode GL */
CustomJavaCode GL public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3);
@@ -354,6 +482,38 @@ CustomJavaCode GL have an effect, and in particular only affects heavyweig
CustomJavaCode GL onscreen components. */
CustomJavaCode GL public void setSwapInterval(int interval);
+CustomJavaCode GL /**
+CustomJavaCode GL * Returns an object through which platform-specific OpenGL extensions
+CustomJavaCode GL * (WGL, GLX, etc.) may be accessed. The data type of the returned
+CustomJavaCode GL * object and its associated capabilities are undefined. Most
+CustomJavaCode GL * applications will never need to call this method. It is highly
+CustomJavaCode GL * recommended that any applications which do call this method perform
+CustomJavaCode GL * all accesses on the returned object reflectively to guard
+CustomJavaCode GL * themselves against changes to the implementation.
+CustomJavaCode GL */
+CustomJavaCode GL public Object getPlatformGLExtensions();
+
+CustomJavaCode GL /**
+CustomJavaCode GL * Returns an object providing access to the specified OpenGL
+CustomJavaCode GL * extension. This is intended to provide a mechanism for vendors who
+CustomJavaCode GL * which to provide access to new OpenGL extensions without changing
+CustomJavaCode GL * the public API of the core package. For example, a user may request
+CustomJavaCode GL * access to extension "GL_VENDOR_foo" and receive back an object
+CustomJavaCode GL * which implements a vendor-specified interface which can call the
+CustomJavaCode GL * OpenGL extension functions corresponding to that extension. It is
+CustomJavaCode GL * up to the vendor to specify both the extension name and Java API
+CustomJavaCode GL * for accessing it, including which class or interface contains the
+CustomJavaCode GL * functions.
+CustomJavaCode GL *
+CustomJavaCode GL * <P>
+CustomJavaCode GL *
+CustomJavaCode GL * Note: it is the intent to add new extensions as quickly as possible
+CustomJavaCode GL * to the core GL API. Therefore it is unlikely that most vendors will
+CustomJavaCode GL * use this extension mechanism, but it is being provided for
+CustomJavaCode GL * completeness.
+CustomJavaCode GL */
+CustomJavaCode GL public Object getExtension(String extensionName);
+
#
# Directives needed when processing wglext.h on Windows and other platforms
#