From d6f9dbc493df725d3d574403549de142c5e1222a Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 24 Oct 2005 19:21:03 +0000 Subject: Merged JSR-231 branch on to the main JOGL trunk. The main trunk now contains the evolving JSR-231 Reference Implementation and the JSR-231 branch is permanently closed. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@401 232f8b59-042b-4e1e-8c03-345bb8c30851 --- make/gl-common.cfg | 304 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 232 insertions(+), 72 deletions(-) (limited to 'make/gl-common.cfg') 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. @@ -119,6 +111,67 @@ Ignore wglDestroyImageBufferI3D 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 *

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 *

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 *

-ClassJavadoc GL * ClassJavadoc GL *

Exceptions to the window system extension naming rules: ClassJavadoc GL * ClassJavadoc GL *