diff options
author | Sven Gothel <[email protected]> | 2008-07-04 23:08:49 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-07-04 23:08:49 +0000 |
commit | 37208ef3dcf1a12468838106d578e6abbf3dda9b (patch) | |
tree | a6a9205f77f8b8489d662e1cbbb265cd3383c67a | |
parent | f08608ab753588728f1ee9d3d2d3920087107b98 (diff) |
GL Unification 2nd round.
Terminology:
ARB Extensions: "GL2", "ARB", "OES", "OML"
Vendor Extensions: "EXT", "NV", "ATI", "SGI", "SGIS", "SGIX", "HP", "IBM", "WIN"
Pass-1 Unify ARB extensions with the same value
Pass-2 Unify vendor extensions,
if exist as an ARB extension with the same value.
Pass-3 Emit
Done:
- Unification of GL enumerates
- Unification of GL functions
- dynamic extension lookup
- ..
TODO:
- Break down GL.java: GL + GL2ES1ES2 (for future GL3, etc)
- Add a GL2 small implementation, to only support the GL2ES2 subset,
'GL2SubES2' ..
+++
- Fixed X11 build breakage of 'jawt' linkage.
- Fixed NEWT native code mouse- and keyevent id's,
missed sync while moving them from the bitfield notation.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1708 232f8b59-042b-4e1e-8c03-345bb8c30851
29 files changed, 104 insertions, 157 deletions
diff --git a/make/build.xml b/make/build.xml index af5c27f21..1e6875ffb 100644 --- a/make/build.xml +++ b/make/build.xml @@ -1194,7 +1194,7 @@ <attribute name="compiler.cfg.id" /> <attribute name="linker.cfg.id" /> <attribute name="output.lib.name" /> - <attribute name="c.compiler.use-jawt" default="false" /> + <attribute name="c.compiler.use-jawt" default="false"/> <sequential> <echo message="Output lib name = @{output.lib.name}" /> @@ -1205,18 +1205,19 @@ <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition> - <condition property="useJAWT"> - <and> + <!-- since properties are immutable, we need one for each target --> + <condition property="@{output.lib.name}.useLibJAWT"> <istrue value="@{c.compiler.use-jawt}" /> - </and> </condition> + <echo message="c.compiler.use-jawt @{c.compiler.use-jawt}"/> + <echo message="@{output.lib.name}.useLibJAWT ${@{output.lib.name}.useLibJAWT}"/> - <condition property="c.compiler.needs-libjvm"> + <condition property="@{output.lib.name}.useLibJVM"> <and> <isset property="isHPUX"/> - <isset property="useJAWT"/> + <isset property="@{output.lib.name}.useLibJAWT"/> </and> - </condition> + </condition> <patternset id="c.src.files.jogl.awt"> <include name="${rootrel.src.c.jogl}/JAWT*.c"/> @@ -1322,8 +1323,8 @@ </compiler> <linker extends="@{linker.cfg.id}"> - <syslibset dir="${java.lib.dir.platform}" libs="jawt" if="useJAWT"/> - <syslibset dir="${java.lib.dir.platform}/server" libs="jvm" if="c.compiler.needs-libjvm"/> + <syslibset dir="${java.lib.dir.platform}" libs="jawt" if="@{output.lib.name}.useLibJAWT"/> + <syslibset dir="${java.lib.dir.platform}/server" libs="jvm" if="@{output.lib.name}.useLibJVM"/> </linker> </cc> diff --git a/make/egl.cfg b/make/egl.cfg index 494567545..96b70f1ab 100755 --- a/make/egl.cfg +++ b/make/egl.cfg @@ -12,7 +12,7 @@ HierarchicalNativeOutput false Include gl-common.cfg # There are a few routines we don't handle yet -Ignore glGetBufferPointervOES +Ignore glGetBufferPointerv # Use a ProcAddressTable so we dynamically look up the routines EmitProcAddressTable true @@ -85,7 +85,7 @@ Include intptr.cfg CustomJavaCode EGL private static EGLProcAddressTable _table = new EGLProcAddressTable(); CustomJavaCode EGL public static void resetProcAddressTable(DynamicLookupHelper lookup) { -CustomJavaCode EGL ProcAddressHelper.resetProcAddressTable(_table, lookup); +CustomJavaCode EGL GLProcAddressHelper.resetProcAddressTable(_table, lookup); CustomJavaCode EGL } # There are some #defines in egl.h that GlueGen and PCPP don't currently handle @@ -95,3 +95,5 @@ CustomJavaCode EGL public static final long EGL_NO_DISPLAY = 0; CustomJavaCode EGL public static final long EGL_NO_SURFACE = 0; CustomJavaCode EGL public static final int EGL_DONT_CARE = -1; CustomJavaCode EGL public static final int EGL_UNKNOWN = -1; + +Import com.sun.gluegen.runtime.opengl.GLProcAddressHelper diff --git a/make/gl-common-extensions.cfg b/make/gl-common-extensions.cfg index da5542cb4..21ed7ad2c 100644 --- a/make/gl-common-extensions.cfg +++ b/make/gl-common-extensions.cfg @@ -1,62 +1,21 @@ # There are a few routines we don't handle yet Ignore glGetBufferPointerivNV -Ignore glGetBufferPointervOES - -# multiple function entries (extension and clean) -Ignore glClearDepthfOES -Ignore glClipPlanefOES -Ignore glDepthRangefOES -Ignore glFrustumfOES -Ignore glOrthofOES -Ignore glMapBufferARB -Ignore glUnmapBufferARB -Ignore GL_RGB8_OES -Ignore GL_RGBA8_OES -Ignore GL_RGB8 -Ignore GL_RGBA8 +Ignore glGetBufferPointerv # normalise extensions RenameJavaMethod glBindFramebufferEXT glBindFramebuffer -RenameJavaMethod glBindFramebufferOES glBindFramebuffer RenameJavaMethod glBindRenderbufferEXT glBindRenderbuffer -RenameJavaMethod glBindRenderbufferOES glBindRenderbuffer -RenameJavaMethod glBlendEquationOES glBlendEquation -RenameJavaMethod glBlendEquationSeparateOES glBlendEquationSeparate -RenameJavaMethod glBlendFuncSeparateOES glBlendFuncSeparate RenameJavaMethod glCheckFramebufferStatusEXT glCheckFramebufferStatus -RenameJavaMethod glCheckFramebufferStatusOES glCheckFramebufferStatus -RenameJavaMethod glClipPlanefOES glClipPlanef RenameJavaMethod glDeleteFramebuffersEXT glDeleteFramebuffers -RenameJavaMethod glDeleteFramebuffersOES glDeleteFramebuffers RenameJavaMethod glDeleteRenderbuffersEXT glDeleteRenderbuffers -RenameJavaMethod glDeleteRenderbuffersOES glDeleteRenderbuffers RenameJavaMethod glFramebufferRenderbufferEXT glFramebufferRenderbuffer -RenameJavaMethod glFramebufferRenderbufferOES glFramebufferRenderbuffer RenameJavaMethod glFramebufferTexture2DEXT glFramebufferTexture2D -RenameJavaMethod glFramebufferTexture2DOES glFramebufferTexture2D RenameJavaMethod glGenerateMipmapEXT glGenerateMipmap -RenameJavaMethod glGenerateMipmapOES glGenerateMipmap RenameJavaMethod glGenFramebuffersEXT glGenFramebuffers -RenameJavaMethod glGenFramebuffersOES glGenFramebuffers RenameJavaMethod glGenRenderbuffersEXT glGenRenderbuffers -RenameJavaMethod glGenRenderbuffersOES glGenRenderbuffers RenameJavaMethod glGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv -RenameJavaMethod glGetFramebufferAttachmentParameterivOES glGetFramebufferAttachmentParameteriv RenameJavaMethod glGetRenderbufferParameterivEXT glGetRenderbufferParameteriv -RenameJavaMethod glGetRenderbufferParameterivOES glGetRenderbufferParameteriv -RenameJavaMethod glGetTexGenfvOES glGetTexGenfv -RenameJavaMethod glGetTexGenivOES glGetTexGeniv RenameJavaMethod glIsFramebufferEXT glIsFramebuffer -RenameJavaMethod glIsFramebufferOES glIsFramebuffer RenameJavaMethod glIsRenderbufferEXT glIsRenderbuffer -RenameJavaMethod glIsRenderbufferOES glIsRenderbuffer RenameJavaMethod glMatrixIndexPointerARB glMatrixIndexPointer -RenameJavaMethod glMatrixIndexPointerOES glMatrixIndexPointer RenameJavaMethod glRenderbufferStorageEXT glRenderbufferStorage -RenameJavaMethod glRenderbufferStorageOES glRenderbufferStorage -RenameJavaMethod glTexGenfOES glTexGenf -RenameJavaMethod glTexGenfvOES glTexGenfv -RenameJavaMethod glTexGeniOES glTexGeni -RenameJavaMethod glTexGenivOES glTexGeniv -RenameJavaMethod glMapBufferOES glMapBuffer -RenameJavaMethod glUnmapBufferOES glUnmapBuffer diff --git a/make/gl-common.cfg b/make/gl-common.cfg index 56939cd89..362d27bb5 100644 --- a/make/gl-common.cfg +++ b/make/gl-common.cfg @@ -1,8 +1,11 @@ # This .cfg file provides common options used among all glue code # generated for Jogl on all platforms. - Include gl-common-extensions.cfg +# There are a few routines we don't handle yet +Ignore glGetBufferPointerivNV +Ignore glGetBufferPointerv + # Raise GLException instead of RuntimeException in glue code RuntimeExceptionType GLException @@ -53,12 +56,10 @@ Ignore GL_KTX_buffer_region # Ignore GL functions that deal with explicit pointer values in such a # way that we cannot implement the functionality in Java Ignore glGetBufferPointerv -Ignore glGetBufferPointervARB Ignore glGetPointerv Ignore glGetPointervEXT Ignore glGetTexParameterPointervAPPLE Ignore glGetVertexAttribPointerv -Ignore glGetVertexAttribPointervARB Ignore glGetVertexAttribPointervNV Ignore glTracePointerRangeMESA @@ -80,10 +81,10 @@ Ignore glGetVariantPointervEXT # or take void** parameters or both. Until we think through the # semantics of each of these individually we need to disable them. # WGL_ARB_buffer_region -Ignore wglCreateBufferRegionARB -Ignore wglDeleteBufferRegionARB -Ignore wglSaveBufferRegionARB -Ignore wglRestoreBufferRegionARB +Ignore wglCreateBufferRegion +Ignore wglDeleteBufferRegion +Ignore wglSaveBufferRegion +Ignore wglRestoreBufferRegion Ignore wglGetSyncValuesOML Ignore wglGetMscRateOML Ignore wglSwapBuffersMscOML diff --git a/make/gl-if-gl.cfg b/make/gl-if-gl.cfg index 6c312ba2a..8f04cf4a4 100755 --- a/make/gl-if-gl.cfg +++ b/make/gl-if-gl.cfg @@ -19,8 +19,6 @@ Ignore ^gl.*x Ignore ^gl.*xOES Ignore glEGL.* -CustomJavaCode GL public static final int GL_RGB8 = 0x8051; -CustomJavaCode GL public static final int GL_RGBA8 = 0x8058; CustomJavaCode GL public String toString(); CustomJavaCode GL public GLContext getContext(); CustomJavaCode GL public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; diff --git a/make/gl-if-gl2_es1.cfg b/make/gl-if-gl2_es1.cfg index 73b2d2510..b4d450def 100755 --- a/make/gl-if-gl2_es1.cfg +++ b/make/gl-if-gl2_es1.cfg @@ -12,11 +12,9 @@ JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl # Ignore all ES 1.X only stuff to GL2 -Ignore glWeightPointerOES -Ignore glUnmapBufferOES -Ignore glPointSizePointerOES -Ignore glGetFixedvOES -Ignore glDrawTex.*OES +Ignore glPointSizePointer +Ignore glGetFixedv +Ignore glDrawTex.* #heavy float/double array diff to GL2 Ignore glClipPlanef diff --git a/make/gl-ignore-gl2_es-enums.cfg b/make/gl-ignore-gl2_es-enums.cfg index c208cad3d..394d113bd 100644 --- a/make/gl-ignore-gl2_es-enums.cfg +++ b/make/gl-ignore-gl2_es-enums.cfg @@ -1,3 +1,7 @@ +Ignore GL_NONE +Ignore GL_RGB565 +Ignore GL_RGB5_A1 +Ignore GL_RGBA4 Ignore GL_ACTIVE_TEXTURE Ignore GL_ALIASED_LINE_WIDTH_RANGE Ignore GL_ALIASED_POINT_SIZE_RANGE @@ -30,6 +34,7 @@ Ignore GL_CW Ignore GL_DECR Ignore GL_DEPTH_BITS Ignore GL_DEPTH_BUFFER_BIT +Ignore GL_DEPTH_COMPONENT16 Ignore GL_DEPTH_CLEAR_VALUE Ignore GL_DEPTH_FUNC Ignore GL_DEPTH_RANGE @@ -220,4 +225,5 @@ Ignore GL_RENDERBUFFER_INTERNAL_FORMAT.* Ignore GL_RENDERBUFFER_RED_SIZE.* Ignore GL_RENDERBUFFER_STENCIL_SIZE.* Ignore GL_RENDERBUFFER_WIDTH.* +Ignore GL_MAX_RENDERBUFFER_SIZE diff --git a/make/gl-ignore-gl2_es1-enums.cfg b/make/gl-ignore-gl2_es1-enums.cfg index 06b55b511..0f8267762 100644 --- a/make/gl-ignore-gl2_es1-enums.cfg +++ b/make/gl-ignore-gl2_es1-enums.cfg @@ -364,13 +364,8 @@ Ignore ^GL_FUNC_REVERSE_SUBTRACT_OES Ignore ^GL_ETC1_RGB8_OES Ignore ^GL_TEXTURE_CROP_RECT_OES Ignore ^GL_FIXED_OES -Ignore ^GL_NONE_OES Ignore ^GL_FRAMEBUFFER_OES Ignore ^GL_RENDERBUFFER_OES -Ignore ^GL_RGBA4_OES -Ignore ^GL_RGB5_A1_OES -Ignore ^GL_RGB565_OES -Ignore ^GL_DEPTH_COMPONENT16_OES Ignore ^GL_RENDERBUFFER_WIDTH_OES Ignore ^GL_RENDERBUFFER_HEIGHT_OES Ignore ^GL_RENDERBUFFER_INTERNAL_FORMAT_OES @@ -395,7 +390,6 @@ Ignore ^GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES Ignore ^GL_FRAMEBUFFER_UNSUPPORTED_OES Ignore ^GL_FRAMEBUFFER_BINDING_OES Ignore ^GL_RENDERBUFFER_BINDING_OES -Ignore ^GL_MAX_RENDERBUFFER_SIZE_OES Ignore ^GL_INVALID_FRAMEBUFFER_OPERATION_OES Ignore ^GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES Ignore ^GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES diff --git a/make/gl-ignore-gl2_es12-special.cfg b/make/gl-ignore-gl2_es12-special.cfg index addcace1b..af9b2c117 100644 --- a/make/gl-ignore-gl2_es12-special.cfg +++ b/make/gl-ignore-gl2_es12-special.cfg @@ -1,5 +1,6 @@ -Ignore GL_3DC_X_AMD -Ignore GL_3DC_XY_AMD +Ignore GL.+_NV +Ignore GL.+_ATI +Ignore GL.+_AMD Ignore GL_ACTIVE_ATTRIBUTE_MAX_LENGTH Ignore GL_ACTIVE_ATTRIBUTES Ignore GL_ACTIVE_UNIFORM_MAX_LENGTH @@ -12,21 +13,14 @@ Ignore GL_ALPHA_TEST_FUNC Ignore GL_ALPHA_TEST_REF Ignore GL_AMBIENT Ignore GL_AMBIENT_AND_DIFFUSE -Ignore GL_AMD_compressed_3DC_texture -Ignore GL_AMD_compressed_ATC_texture Ignore GL_AND Ignore GL_AND_INVERTED Ignore GL_AND_REVERSE -Ignore GL_ATC_RGBA_EXPLICIT_ALPHA_AMD -Ignore GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD -Ignore GL_ATC_RGB_AMD Ignore GL_ATTACHED_SHADERS Ignore GL_BLEND_COLOR Ignore GL_BLEND_DST Ignore GL_BLEND_DST_ALPHA -Ignore GL_BLEND_DST_ALPHA_OES Ignore GL_BLEND_DST_RGB -Ignore GL_BLEND_DST_RGB_OES Ignore GL_BLEND_EQUATION Ignore GL_BLEND_EQUATION_ALPHA Ignore GL_BLEND_EQUATION_ALPHA_OES @@ -70,15 +64,6 @@ Ignore GL_CONSTANT_COLOR Ignore GL_COORD_REPLACE_OES Ignore GL_COPY Ignore GL_COPY_INVERTED -Ignore GL_COVERAGE_ALL_FRAGMENTS_NV -Ignore GL_COVERAGE_ATTACHMENT_NV -Ignore GL_COVERAGE_AUTOMATIC_NV -Ignore GL_COVERAGE_BUFFER_BIT_NV -Ignore GL_COVERAGE_BUFFERS_NV -Ignore GL_COVERAGE_COMPONENT4_NV -Ignore GL_COVERAGE_COMPONENT_NV -Ignore GL_COVERAGE_EDGE_FRAGMENTS_NV -Ignore GL_COVERAGE_SAMPLES_NV Ignore GL_CURRENT_COLOR Ignore GL_CURRENT_NORMAL Ignore GL_CURRENT_PALETTE_MATRIX_OES @@ -90,8 +75,6 @@ Ignore GL_DECR_WRAP Ignore GL_DECR_WRAP_OES Ignore GL_DELETE_STATUS Ignore GL_DEPTH_COMPONENT -Ignore GL_DEPTH_COMPONENT16 -Ignore GL_DEPTH_COMPONENT16_OES Ignore GL_DEPTH_COMPONENT24_OES Ignore GL_DEPTH_COMPONENT32_OES Ignore GL_DIFFUSE @@ -177,8 +160,6 @@ Ignore GL_MAX_LIGHTS Ignore GL_MAX_MODELVIEW_STACK_DEPTH Ignore GL_MAX_PALETTE_MATRICES_OES Ignore GL_MAX_PROJECTION_STACK_DEPTH -Ignore GL_MAX_RENDERBUFFER_SIZE -Ignore GL_MAX_RENDERBUFFER_SIZE_OES Ignore GL_MAX_TEXTURE_IMAGE_UNITS Ignore GL_MAX_TEXTURE_STACK_DEPTH Ignore GL_MAX_TEXTURE_UNITS @@ -198,8 +179,6 @@ Ignore GL_MODELVIEW_STACK_DEPTH Ignore GL_MODULATE Ignore GL_MULTISAMPLE Ignore GL_NAND -Ignore GL_NONE -Ignore GL_NONE_OES Ignore GL_NOOP Ignore GL_NOR Ignore GL_NORMAL_ARRAY @@ -210,7 +189,6 @@ Ignore GL_NORMAL_ARRAY_TYPE Ignore GL_NORMALIZE Ignore GL_NORMAL_MAP_OES Ignore GL_NUM_SHADER_BINARY_FORMATS -Ignore GL_NVIDIA_PLATFORM_BINARY_NV Ignore GL_OES_blend_equation_separate Ignore GL_OES_blend_func_separate Ignore GL_OES_blend_subtract @@ -288,12 +266,6 @@ Ignore GL_QUADRATIC_ATTENUATION Ignore GL_R11F_G11F_B10F_EXT Ignore GL_REFLECTION_MAP_OES Ignore GL_RESCALE_NORMAL -Ignore GL_RGB565 -Ignore GL_RGB565_OES -Ignore GL_RGB5_A1 -Ignore GL_RGB5_A1_OES -Ignore GL_RGBA4 -Ignore GL_RGBA4_OES Ignore GL_RGBA_SIGNED_COMPONENTS_EXT Ignore GL_RGB_SCALE Ignore GL_SAMPLE_ALPHA_TO_ONE @@ -354,7 +326,6 @@ Ignore GL_TEXTURE_GEN_MODE_OES Ignore GL_TEXTURE_GEN_STR_OES Ignore GL_TEXTURE_MATRIX Ignore GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES -Ignore GL_TEXTURE_MAX_LEVEL_NV Ignore GL_TEXTURE_RECTANGLE_NV_OES Ignore GL_TEXTURE_STACK_DEPTH Ignore GL_UNSIGNED_INT @@ -369,7 +340,6 @@ Ignore GL_VERTEX_ARRAY_TYPE Ignore GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING Ignore GL_VERTEX_ATTRIB_ARRAY_ENABLED Ignore GL_VERTEX_ATTRIB_ARRAY_NORMALIZED -Ignore GL_VERTEX_ATTRIB_ARRAY_NV Ignore GL_VERTEX_ATTRIB_ARRAY_POINTER Ignore GL_VERTEX_ATTRIB_ARRAY_SIZE Ignore GL_VERTEX_ATTRIB_ARRAY_STRIDE @@ -383,8 +353,6 @@ Ignore GL_WEIGHT_ARRAY_STRIDE_OES Ignore GL_WEIGHT_ARRAY_TYPE_OES Ignore GL_WRITE_ONLY_OES Ignore GL_XOR -Ignore GL_.+_NV -Ignore GL_.+_ATI Ignore glIsFramebuffer Ignore glIsFramebufferOES Ignore glIsProgram @@ -592,7 +560,7 @@ Ignore glPointParameterxv Ignore glPointParameterxvOES Ignore glPointParameterxvOES Ignore glPointSize -Ignore glPointSizePointerOES +Ignore glPointSizePointer Ignore glReleaseShaderCompiler Ignore glRenderbufferStorage Ignore glRenderbufferStorageOES diff --git a/make/gl-ignore-gl2_es2-enums.cfg b/make/gl-ignore-gl2_es2-enums.cfg index b576c8538..893075c6d 100644 --- a/make/gl-ignore-gl2_es2-enums.cfg +++ b/make/gl-ignore-gl2_es2-enums.cfg @@ -4,7 +4,6 @@ Ignore ^GL_STENCIL_BUFFER_BIT Ignore ^GL_COLOR_BUFFER_BIT Ignore ^GL_FALSE Ignore ^GL_TRUE -Ignore ^GL_NONE Ignore ^GL_POINTS Ignore ^GL_LINES Ignore ^GL_LINE_LOOP @@ -272,10 +271,6 @@ Ignore ^GL_MEDIUM_INT Ignore ^GL_HIGH_INT Ignore ^GL_FRAMEBUFFER Ignore ^GL_RENDERBUFFER -Ignore ^GL_RGBA4 -Ignore ^GL_RGB5_A1 -Ignore ^GL_RGB565 -Ignore ^GL_DEPTH_COMPONENT16 Ignore ^GL_STENCIL_INDEX Ignore ^GL_STENCIL_INDEX8 Ignore ^GL_RENDERBUFFER_WIDTH diff --git a/make/gl-impl-CustomJavaCode-gl2.java b/make/gl-impl-CustomJavaCode-gl2.java index 6a075a33c..a9f4c6331 100644 --- a/make/gl-impl-CustomJavaCode-gl2.java +++ b/make/gl-impl-CustomJavaCode-gl2.java @@ -310,7 +310,8 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); /** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ public java.nio.ByteBuffer glMapBuffer(int target, int access) { - final long __addr_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; + // FIXME JAU: final long __addr_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; + final long __addr_ = 0; if (__addr_ == 0) { throw new GLException("Method \"glMapBuffer\" not available"); } diff --git a/make/gl-impl-CustomJavaCode-gles1.java b/make/gl-impl-CustomJavaCode-gles1.java index b50ae9eb2..2bb652a0e 100755 --- a/make/gl-impl-CustomJavaCode-gles1.java +++ b/make/gl-impl-CustomJavaCode-gles1.java @@ -236,7 +236,8 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); /** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ public java.nio.ByteBuffer glMapBuffer(int target, int access) { - final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBufferOES; + // FIXME JAU: final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; + final long __addr_ = 0; if (__addr_ == 0) { throw new GLException("Method \"glMapBuffer\" not available"); } diff --git a/make/gl-impl-CustomJavaCode-gles2.java b/make/gl-impl-CustomJavaCode-gles2.java index 3441b6e63..9e13dffe8 100755 --- a/make/gl-impl-CustomJavaCode-gles2.java +++ b/make/gl-impl-CustomJavaCode-gles2.java @@ -225,7 +225,8 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); /** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ public java.nio.ByteBuffer glMapBuffer(int target, int access) { - final long __addr_ = ((GLES2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBufferOES; + // FIXME JAU: final long __addr_ = ((GLES2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; + final long __addr_ = 0; if (__addr_ == 0) { throw new GLException("Method \"glMapBuffer\" not available"); } diff --git a/make/glu-CustomJavaCode-gl2.java b/make/glu-CustomJavaCode-gl2.java index df76f715e..9eedf6395 100644 --- a/make/glu-CustomJavaCode-gl2.java +++ b/make/glu-CustomJavaCode-gl2.java @@ -1387,7 +1387,7 @@ private static final GLUgl2ProcAddressTable getGLUProcAddressTable() { } if (gluProcAddressTable == null) { GLUgl2ProcAddressTable tmp = new GLUgl2ProcAddressTable(); - ProcAddressHelper.resetProcAddressTable(tmp, GLDrawableFactoryImpl.getFactoryImpl()); + GLProcAddressHelper.resetProcAddressTable(tmp, GLDrawableFactoryImpl.getFactoryImpl()); gluProcAddressTable = tmp; } return gluProcAddressTable; diff --git a/make/glu-CustomJavaCode-gles1.java b/make/glu-CustomJavaCode-gles1.java index 197e7d7f1..067ec2f2e 100755 --- a/make/glu-CustomJavaCode-gles1.java +++ b/make/glu-CustomJavaCode-gles1.java @@ -356,7 +356,7 @@ private static GLUProcAddressTable getGLUProcAddressTable() { } if (gluProcAddressTable == null) { GLUProcAddressTable tmp = new GLUProcAddressTable(); - ProcAddressHelper.resetProcAddressTable(tmp, GLDrawableFactoryImpl.getFactoryImpl()); + GLProcAddressHelper.resetProcAddressTable(tmp, GLDrawableFactoryImpl.getFactoryImpl()); gluProcAddressTable = tmp; } return gluProcAddressTable; diff --git a/make/glu-gl2.cfg b/make/glu-gl2.cfg index d34511a5d..ae0ae088b 100755 --- a/make/glu-gl2.cfg +++ b/make/glu-gl2.cfg @@ -49,6 +49,7 @@ Import com.sun.opengl.impl.glu.nurbs.* Import com.sun.opengl.impl.glu.gl2.* Import com.sun.opengl.impl.glu.gl2.nurbs.* Import com.sun.opengl.impl.glu.mipmap.Mipmap +Import com.sun.gluegen.runtime.opengl.GLProcAddressHelper Import java.security.* # diff --git a/make/jogl.compiler.xml b/make/jogl.compiler.xml index 10e066748..4b86a6cd7 100644 --- a/make/jogl.compiler.xml +++ b/make/jogl.compiler.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project name="JOGL" basedir="." default="all"> -<target name="c.configure" depends="gluegen.cpptasks.configure.compiler"> +<target name="c.configure.1" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler"> <linker id="linker.cfg.linux.jogl.x11" extends="linker.cfg.linux"> <syslibset dir="/devtools/i686-unknown-linux-gnu/xfree86-4.3.0-linux-ix86-glibc23/lib" libs="X11"/> <syslibset dir="/devtools/i686-unknown-linux-gnu/xfree86-4.3.0-linux-ix86-glibc23/lib" libs="Xxf86vm"/> diff --git a/make/lsGL2ES1ES2_common_enums.sh b/make/lsGL2ES1ES2_common_enums.sh new file mode 100644 index 000000000..f6ce3dad4 --- /dev/null +++ b/make/lsGL2ES1ES2_common_enums.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +idir=../build/gensrc/classes/javax/media/opengl + +sort $idir/GL.java $idir/GL2ES1.java $idir/GL2ES2.java | uniq -d | grep GL_ | awk ' { print $5 } ' +#sort $idir/GL.java | grep GL_ | awk ' { print $5 } ' diff --git a/make/lsGL2ES1_common_enums.sh b/make/lsGL2ES1_common_enums.sh new file mode 100644 index 000000000..20b0bce72 --- /dev/null +++ b/make/lsGL2ES1_common_enums.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +idir=../build/gensrc/classes/javax/media/opengl + +sort $idir/GL.java $idir/GL2ES1.java | uniq -d | grep GL_ | awk ' { print $5 } ' +#sort $idir/GL.java | grep GL_ | awk ' { print $5 } ' diff --git a/make/lsGL2ES2_common_enums.sh b/make/lsGL2ES2_common_enums.sh new file mode 100644 index 000000000..8b9be3094 --- /dev/null +++ b/make/lsGL2ES2_common_enums.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +idir=../build/gensrc/classes/javax/media/opengl + +sort $idir/GL.java $idir/GL2ES2.java | uniq -d | grep GL_ | awk ' { print $5 } ' +#sort $idir/GL.java | grep GL_ | awk ' { print $5 } ' diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh index 556224d4c..f538018be 100644 --- a/make/make.jogl.all.linux-x86.sh +++ b/make/make.jogl.all.linux-x86.sh @@ -2,7 +2,7 @@ . ../../setenv-build-jogl.sh -ant \ +ant -v \ -Dgluegen.cpptasks.detected.os=true \ -DisUnix=true \ -DisLinux=true \ diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java index fd3b73b42..ffdf81f1a 100644 --- a/src/classes/com/sun/opengl/impl/GLContextImpl.java +++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java @@ -44,6 +44,7 @@ import java.lang.reflect.*; import javax.media.opengl.*; import com.sun.gluegen.runtime.*; +import com.sun.gluegen.runtime.opengl.*; public abstract class GLContextImpl extends GLContext { protected GLContextLock lock = new GLContextLock(); @@ -302,7 +303,7 @@ public abstract class GLContextImpl extends GLContext { /** Helper routine which resets a ProcAddressTable generated by the GLEmitter by looking up anew all of its function pointers. */ protected void resetProcAddressTable(Object table) { - ProcAddressHelper.resetProcAddressTable(table, (GLDrawableFactoryImpl)getGLDrawable().getFactory()); + GLProcAddressHelper.resetProcAddressTable(table, (GLDrawableFactoryImpl)getGLDrawable().getFactory()); } /** Indicates whether the underlying OpenGL context has been diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java index f6be43f57..429f67abd 100644 --- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java +++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java @@ -68,7 +68,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { WGLExt wglExt = getWGLExt(); gl.glBindTexture(textureTarget, texture); if (rtt && hasRTT) { - if (!wglExt.wglBindTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT)) { + if (!wglExt.wglBindTexImage(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT)) { throw new GLException("Binding of pbuffer to texture failed: " + wglGetLastError()); } } @@ -84,7 +84,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { } if (rtt && hasRTT) { WGLExt wglExt = getWGLExt(); - if (!wglExt.wglReleaseTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT)) { + if (!wglExt.wglReleaseTexImage(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT)) { throw new GLException("Releasing of pbuffer from texture failed: " + wglGetLastError()); } } diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java index 0cc8133d8..cda810d86 100644 --- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java @@ -88,11 +88,11 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { // not be called here, so we skip the use of any composable // pipelines (see WindowsOnscreenWGLContext.makeCurrentImpl) WGLExt wglExt = cachedWGLExt; - if (wglExt.wglReleasePbufferDCARB(buffer, nw.getSurfaceHandle()) == 0) { + if (wglExt.wglReleasePbufferDC(buffer, nw.getSurfaceHandle()) == 0) { throw new GLException("Error releasing pbuffer device context: error code " + WGL.GetLastError()); } nw.setSurfaceHandle(0); - if (!wglExt.wglDestroyPbufferARB(buffer)) { + if (!wglExt.wglDestroyPbuffer(buffer)) { throw new GLException("Error destroying pbuffer: error code " + WGL.GetLastError()); } buffer = 0; @@ -177,13 +177,13 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { int[] pformats = new int[MAX_PFORMATS]; int nformats; int[] nformatsTmp = new int[1]; - if (!wglExt.wglChoosePixelFormatARB(parentHdc, + if (!wglExt.wglChoosePixelFormat(parentHdc, iattributes, 0, fattributes, 0, MAX_PFORMATS, pformats, 0, nformatsTmp, 0)) { - throw new GLException("pbuffer creation error: wglChoosePixelFormatARB() failed"); + throw new GLException("pbuffer creation error: wglChoosePixelFormat() failed"); } nformats = nformatsTmp[0]; if (nformats <= 0) { @@ -206,7 +206,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { iattributes[8] = WGLExt.WGL_DRAW_TO_PBUFFER; int[] ivalues = new int[9]; for (int i = 0; i < nformats; i++) { - if (!wglExt.wglGetPixelFormatAttribivARB(parentHdc, pformats[i], 0, 9, iattributes, 0, ivalues, 0)) { + if (!wglExt.wglGetPixelFormatAttribiv(parentHdc, pformats[i], 0, 9, iattributes, 0, ivalues, 0)) { throw new GLException("Error while querying pixel format " + pformats[i] + "'s (index " + i + "'s) capabilities for debugging"); } @@ -270,7 +270,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { iattributes[niattribs++] = 0; - tmpBuffer = wglExt.wglCreatePbufferARB(parentHdc, format, getWidth(), getHeight(), iattributes, 0); + tmpBuffer = wglExt.wglCreatePbuffer(parentHdc, format, getWidth(), getHeight(), iattributes, 0); if (tmpBuffer != 0) { // Done break; @@ -278,14 +278,14 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { } if (tmpBuffer == 0) { - throw new GLException("pbuffer creation error: wglCreatePbufferARB() failed: tried " + nformats + + throw new GLException("pbuffer creation error: wglCreatePbuffer() failed: tried " + nformats + " pixel formats, last error was: " + wglGetLastError()); } // Get the device context. - long tmpHdc = wglExt.wglGetPbufferDCARB(tmpBuffer); + long tmpHdc = wglExt.wglGetPbufferDC(tmpBuffer); if (tmpHdc == 0) { - throw new GLException("pbuffer creation error: wglGetPbufferDCARB() failed"); + throw new GLException("pbuffer creation error: wglGetPbufferDC() failed"); } NullWindow nw = (NullWindow) getNativeWindow(); @@ -317,16 +317,16 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER; int[] ivalues = new int[niattribs]; // FIXME: usually prefer to throw exceptions, but failure here is not critical - if (wglExt.wglGetPixelFormatAttribivARB(parentHdc, pformats[whichFormat], 0, niattribs, iattributes, 0, ivalues, 0)) { + if (wglExt.wglGetPixelFormatAttribiv(parentHdc, pformats[whichFormat], 0, niattribs, iattributes, 0, ivalues, 0)) { setChosenGLCapabilities(iattributes2GLCapabilities(iattributes, niattribs, ivalues, false)); } } // Determine the actual width and height we were able to create. int[] tmp = new int[1]; - wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_WIDTH, tmp, 0 ); + wglExt.wglQueryPbuffer( buffer, WGLExt.WGL_PBUFFER_WIDTH, tmp, 0 ); width = tmp[0]; - wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_HEIGHT, tmp, 0 ); + wglExt.wglQueryPbuffer( buffer, WGLExt.WGL_PBUFFER_HEIGHT, tmp, 0 ); height = tmp[0]; nw.setSize(width, height); } finally { diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java index 3b69ad3a2..2e6d03e93 100644 --- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java @@ -163,12 +163,12 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl { null)) { int[] pformats = new int[MAX_PFORMATS]; int[] numFormatsTmp = new int[1]; - if (dummyWGLExt.wglChoosePixelFormatARB(hdc, - iattributes, 0, - fattributes, 0, - MAX_PFORMATS, - pformats, 0, - numFormatsTmp, 0)) { + if (dummyWGLExt.wglChoosePixelFormat(hdc, + iattributes, 0, + fattributes, 0, + MAX_PFORMATS, + pformats, 0, + numFormatsTmp, 0)) { numFormats = numFormatsTmp[0]; if (numFormats > 0) { // Remove one-basing of pixel format (added on later) @@ -204,7 +204,7 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl { // window, to a pbuffer, or to a pixmap) int niattribs = 0; iattributes[0] = WGLExt.WGL_NUMBER_PIXEL_FORMATS; - if (dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, iattributes, 0, iresults, 0)) { + if (dummyWGLExt.wglGetPixelFormatAttribiv(hdc, 0, 0, 1, iattributes, 0, iresults, 0)) { numFormats = iresults[0]; if (DEBUG) { @@ -238,7 +238,7 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl { availableCaps = new GLCapabilities[numFormats]; for (int i = 0; i < numFormats; i++) { - if (!dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, i+1, 0, niattribs, iattributes, 0, iresults, 0)) { + if (!dummyWGLExt.wglGetPixelFormatAttribiv(hdc, i+1, 0, niattribs, iattributes, 0, iresults, 0)) { throw new GLException("Error getting pixel format attributes for pixel format " + (i + 1) + " of device context"); } availableCaps[i] = iattributes2GLCapabilities(iattributes, niattribs, iresults, true); diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java index e9e4fc055..3ba3f060f 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -41,6 +41,7 @@ import java.security.*; import java.util.*; import javax.media.opengl.*; import com.sun.gluegen.runtime.*; +import com.sun.gluegen.runtime.opengl.*; import com.sun.opengl.impl.*; import com.sun.opengl.impl.x11.*; @@ -97,7 +98,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { super(); // Must initialize GLX support eagerly in case a pbuffer is the // first thing instantiated - ProcAddressHelper.resetProcAddressTable(GLX.getGLXProcAddressTable(), this); + GLProcAddressHelper.resetProcAddressTable(GLX.getGLXProcAddressTable(), this); } private static final int MAX_ATTRIBS = 128; diff --git a/src/classes/javax/media/opengl/GLProfile.java b/src/classes/javax/media/opengl/GLProfile.java index c2c82f018..21dccc8ed 100644 --- a/src/classes/javax/media/opengl/GLProfile.java +++ b/src/classes/javax/media/opengl/GLProfile.java @@ -64,8 +64,9 @@ public class GLProfile { throw new GLException("com.sun.opengl.impl.egl.EGLDrawableFactory not available"); } } - } catch (Exception e) { - System.out.println("Profile: "+profile+" not available"); + } catch (Throwable e) { + System.out.println("Profile: "+profile+" not available."); + System.out.println("\t"+e); profile=null; } } diff --git a/src/native/newt/KeyEvent.h b/src/native/newt/KeyEvent.h index fed4636b1..8f032a182 100644 --- a/src/native/newt/KeyEvent.h +++ b/src/native/newt/KeyEvent.h @@ -2,9 +2,9 @@ #ifndef _KEY_EVENT_H_ #define _KEY_EVENT_H_ -#define EVENT_KEY_PRESSED (1 << 0) -#define EVENT_KEY_RELEASED (1 << 1) -// Send by Java: EVENT_KEY_TYPED (1 << 2) +#define EVENT_KEY_PRESSED 300 +#define EVENT_KEY_RELEASED 301 +// Send by Java: EVENT_KEY_TYPED 302 #endif diff --git a/src/native/newt/MouseEvent.h b/src/native/newt/MouseEvent.h index 13e805028..37157808b 100644 --- a/src/native/newt/MouseEvent.h +++ b/src/native/newt/MouseEvent.h @@ -2,12 +2,12 @@ #ifndef _MOUSE_EVENT_H_ #define _MOUSE_EVENT_H_ -// Generated by Java: EVENT_MOUSE_CLICKED -#define EVENT_MOUSE_ENTERED (1 << 1) -#define EVENT_MOUSE_EXITED (1 << 2) -#define EVENT_MOUSE_PRESSED (1 << 3) -#define EVENT_MOUSE_RELEASED (1 << 4) -#define EVENT_MOUSE_MOVED (1 << 5) -// Generated by Java: EVENT_MOUSE_DRAGGED (1 << 6) +// Generated by Java: EVENT_MOUSE_CLICKED = 200; +#define EVENT_MOUSE_ENTERED 201 +#define EVENT_MOUSE_EXITED 202 +#define EVENT_MOUSE_PRESSED 203 +#define EVENT_MOUSE_RELEASED 204 +#define EVENT_MOUSE_MOVED 205 +// Generated by Java: EVENT_MOUSE_DRAGGED = 206; #endif |