aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/userguide/index.html346
-rw-r--r--make/build.xml9
-rw-r--r--make/cg-common.cfg30
-rw-r--r--make/cgl-macosx.cfg8
-rw-r--r--make/gl-common.cfg32
-rw-r--r--make/jogl.properties11
-rw-r--r--make/stub_includes/macosx/window-system.c8
-rw-r--r--make/stub_includes/opengl/GL/glext.h672
-rw-r--r--make/stub_includes/opengl/GL/glxext.h27
-rw-r--r--make/stub_includes/opengl/GL/wglext.h19
-rw-r--r--src/native/jogl/MacOSXWindowSystemInterface.m312
-rw-r--r--src/net/java/games/cg/CgException.java2
-rw-r--r--src/net/java/games/gluegen/ArrayTypes.java2
-rw-r--r--src/net/java/games/gluegen/CMethodBindingEmitter.java6
-rw-r--r--src/net/java/games/gluegen/CMethodBindingImplEmitter.java2
-rw-r--r--src/net/java/games/gluegen/CodeGenUtils.java2
-rw-r--r--src/net/java/games/gluegen/CommentEmitter.java2
-rw-r--r--src/net/java/games/gluegen/DebugEmitter.java2
-rw-r--r--src/net/java/games/gluegen/FunctionEmitter.java2
-rw-r--r--src/net/java/games/gluegen/GlueEmitter.java2
-rw-r--r--src/net/java/games/gluegen/GlueEmitterControls.java2
-rw-r--r--src/net/java/games/gluegen/GlueGen.java2
-rw-r--r--src/net/java/games/gluegen/JavaConfiguration.java2
-rw-r--r--src/net/java/games/gluegen/JavaEmitter.java2
-rw-r--r--src/net/java/games/gluegen/JavaMethodBindingEmitter.java2
-rw-r--r--src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java2
-rw-r--r--src/net/java/games/gluegen/JavaType.java2
-rw-r--r--src/net/java/games/gluegen/MethodBinding.java2
-rw-r--r--src/net/java/games/gluegen/ReferencedStructs.java2
-rw-r--r--src/net/java/games/gluegen/StructLayout.java2
-rw-r--r--src/net/java/games/gluegen/TypeInfo.java2
-rw-r--r--src/net/java/games/gluegen/cgram/Define.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/ArrayType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/BitType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/CVAttributes.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/CompoundType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/CompoundTypeKind.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/DoubleType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/EnumType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/Field.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/FloatType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/FunctionSymbol.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/FunctionType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/IntType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/MachineDescription.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/MachineDescription32Bit.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/MachineDescription64Bit.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/PointerType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/PrimitiveType.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/Type.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/TypeDictionary.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/TypeVisitor.java2
-rw-r--r--src/net/java/games/gluegen/cgram/types/VoidType.java2
-rw-r--r--src/net/java/games/gluegen/opengl/BuildComposablePipeline.java11
-rw-r--r--src/net/java/games/gluegen/opengl/BuildStaticGLInfo.java2
-rw-r--r--src/net/java/games/gluegen/opengl/CGLPAWrapperEmitter.java2
-rw-r--r--src/net/java/games/gluegen/opengl/ConvertFromGL4Java.java2
-rw-r--r--src/net/java/games/gluegen/opengl/GLEmitter.java2
-rw-r--r--src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java2
-rw-r--r--src/net/java/games/gluegen/pcpp/PCPP.java2
-rw-r--r--src/net/java/games/gluegen/runtime/BufferFactory.java2
-rw-r--r--src/net/java/games/gluegen/runtime/ProcAddressHelper.java2
-rw-r--r--src/net/java/games/gluegen/runtime/StructAccessor.java2
-rw-r--r--src/net/java/games/jogl/Animator.java2
-rw-r--r--src/net/java/games/jogl/ComponentEvents.java2
-rw-r--r--src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java2
-rw-r--r--src/net/java/games/jogl/GLCanvas.java10
-rw-r--r--src/net/java/games/jogl/GLCapabilities.java2
-rw-r--r--src/net/java/games/jogl/GLCapabilitiesChooser.java16
-rw-r--r--src/net/java/games/jogl/GLContextHelper.java2
-rw-r--r--src/net/java/games/jogl/GLDrawable.java18
-rw-r--r--src/net/java/games/jogl/GLDrawableFactory.java2
-rw-r--r--src/net/java/games/jogl/GLEventListener.java17
-rw-r--r--src/net/java/games/jogl/GLException.java2
-rw-r--r--src/net/java/games/jogl/GLJPanel.java249
-rw-r--r--src/net/java/games/jogl/GLPbuffer.java25
-rw-r--r--src/net/java/games/jogl/Version.java6
-rwxr-xr-xsrc/net/java/games/jogl/impl/Debug.java2
-rw-r--r--src/net/java/games/jogl/impl/FunctionAvailabilityCache.java60
-rw-r--r--src/net/java/games/jogl/impl/GLContext.java48
-rw-r--r--src/net/java/games/jogl/impl/GLContextFactory.java2
-rwxr-xr-xsrc/net/java/games/jogl/impl/GLContextInitActionPair.java2
-rw-r--r--src/net/java/games/jogl/impl/GLContextShareSet.java2
-rwxr-xr-xsrc/net/java/games/jogl/impl/GLContextStack.java2
-rw-r--r--src/net/java/games/jogl/impl/GLDrawableHelper.java2
-rw-r--r--src/net/java/games/jogl/impl/GLPbufferImpl.java13
-rwxr-xr-xsrc/net/java/games/jogl/impl/GLUquadricImpl.java2
-rw-r--r--src/net/java/games/jogl/impl/InternalBufferUtils.java2
-rw-r--r--src/net/java/games/jogl/impl/JAWT_PlatformInfo.java2
-rw-r--r--src/net/java/games/jogl/impl/NativeLibLoader.java2
-rwxr-xr-xsrc/net/java/games/jogl/impl/Project.java2
-rwxr-xr-xsrc/net/java/games/jogl/impl/SingleThreadedWorkaround.java2
-rwxr-xr-xsrc/net/java/games/jogl/impl/Util.java2
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXDummyGLContext.java8
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java31
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXGLContextFactory.java2
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java6
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXOnscreenGLContext.java9
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXPbufferGLContext.java53
-rw-r--r--src/net/java/games/jogl/impl/mipmap/BuildMipmap.java5
-rw-r--r--src/net/java/games/jogl/impl/mipmap/Mipmap.java95
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsGLContext.java82
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java10
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java10
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java8
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java92
-rw-r--r--src/net/java/games/jogl/impl/x11/X11GLContext.java19
-rw-r--r--src/net/java/games/jogl/impl/x11/X11GLContextFactory.java68
-rw-r--r--src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java10
-rw-r--r--src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java8
-rw-r--r--src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java29
-rwxr-xr-xsrc/net/java/games/jogl/impl/x11/X11SunJDKReflection.java2
-rw-r--r--src/net/java/games/jogl/util/BitmapCharRec.java2
-rw-r--r--src/net/java/games/jogl/util/BitmapFontRec.java2
-rw-r--r--src/net/java/games/jogl/util/BufferUtils.java2
-rw-r--r--src/net/java/games/jogl/util/CoordRec.java2
-rw-r--r--src/net/java/games/jogl/util/GLUT.java14
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmap8x13.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmap9x15.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmapHelvetica10.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmapHelvetica12.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmapHelvetica18.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmapTimesRoman10.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTBitmapTimesRoman24.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTStrokeMonoRoman.java2
-rw-r--r--src/net/java/games/jogl/util/GLUTStrokeRoman.java2
-rw-r--r--src/net/java/games/jogl/util/StrokeCharRec.java2
-rw-r--r--src/net/java/games/jogl/util/StrokeFontRec.java2
-rw-r--r--src/net/java/games/jogl/util/StrokeRec.java2
-rw-r--r--www/index.html236
-rw-r--r--www/webstart/jogl-natives-linux.jarbin293968 -> 307266 bytes
-rw-r--r--www/webstart/jogl-natives-macosx.jarbin142648 -> 150318 bytes
-rw-r--r--www/webstart/jogl-natives-solsparc.jarbin258269 -> 274499 bytes
-rw-r--r--www/webstart/jogl-natives-win32.jarbin58220 -> 61542 bytes
-rw-r--r--www/webstart/jogl.jarbin1111928 -> 1172426 bytes
-rw-r--r--www/webstart/jogl.jnlp6
136 files changed, 2112 insertions, 816 deletions
diff --git a/doc/userguide/index.html b/doc/userguide/index.html
index d9468ea6d..58b8b3e29 100644
--- a/doc/userguide/index.html
+++ b/doc/userguide/index.html
@@ -15,8 +15,11 @@
<LI> Creating a GLDrawable
<LI> Writing a GLEventListener
<LI> Using the Composable Pipeline
+ <LI> Heavyweight and Lightweight Issues
<LI> Multithreading Issues
<LI> Pbuffers
+ <LI> GLU
+ <LI> More Resources
<LI> Platform notes
<UL>
<LI> All Platforms
@@ -24,6 +27,7 @@
<LI> Solaris, Linux (X11 platforms)
<LI> Macintosh OS X
</UL>
+ <LI> Version History
</UL>
@@ -36,7 +40,7 @@ API. It supports integration with the Java platform's AWT and Swing
widget sets while providing a minimal and easy-to-use API that handles
many of the issues associated with building multithreaded OpenGL
applications. Jogl provides access to the latest OpenGL routines
-(OpenGL 1.4 with vendor extensions) as well as platform-independent
+(OpenGL 2.0 with vendor extensions) as well as platform-independent
access to hardware-accelerated offscreen rendering ("pbuffers"). Jogl
also provides some of the most popular features introduced by other
Java bindings for OpenGL like GL4Java, LWJGL and Magician, including a
@@ -79,14 +83,16 @@ Jogl provides two basic widgets into which OpenGL rendering can be
performed. The GLCanvas is a heavyweight AWT widget which supports
hardware acceleration and which is intended to be the primary widget
used by applications. The GLJPanel is a fully Swing-compatible
-lightweight widget which currently does not support hardware
-acceleration but which is intended to provide 100% correct Swing
-integration in the rare circumstances where a GLCanvas can not be
-used. See <a href =
+lightweight widget which supports hardware acceleration but which is
+not as fast as the GLCanvas because it reads back the frame buffer in
+order to draw it using Java2D. The GLJPanel is intended to provide
+100% correct Swing integration in the circumstances where a GLCanvas
+can not be used. See <a href =
"http://java.sun.com/products/jfc/tsc/articles/mixing/">this
article</a> on <a href = "http://java.sun.com/products/jfc/tsc/">The
Swing Connection</a> for more information about mixing lightweight and
-heavyweight widgets.
+heavyweight widgets. See also the section on "Heavyweight and
+Lightweight Issues" below.
</P>
<P>
@@ -124,8 +130,10 @@ changes. The GLDrawable interface provides
GLCanvas and GLJPanel instances are created using the factory methods
in GLDrawableFactory. These factory methods allow the user to request
a certain set of OpenGL parameters in the form of a GLCapabilities
-object as well as optionally customize the format selection algorithm
-by specifying a GLCapabilitiesChooser.
+object, to customize the format selection algorithm by specifying a
+GLCapabilitiesChooser, to share textures and display lists with other
+GLDrawables, and to specify the display device on which the GLDrawable
+will be created.
</P>
<P>
@@ -144,10 +152,23 @@ An application can override the default pixel format selection
algorithm by providing a GLCapabilitiesChooser to the
GLDrawableFactory. The chooseCapabilities method will be called with
all of the available pixel formats as an array of GLCapabilities
-objects; it should return an integer index into this array. The
-DefaultGLCapabilitiesChooser attempts to provide a better
-cross-platform selection algorithm than the WGL and GLX pixel format
-selection algorithms.
+objects, as well as the index indicating the window system's
+recommended choice; it should return an integer index into this
+array. The DefaultGLCapabilitiesChooser uses the window system's
+recommendation when it is available, and otherwise attempts to use a
+platform-independent selection algorithm.
+
+</P>
+<P>
+
+The GLJPanel can be made non-opaque according to Swing's rendering
+model, so it can act as an overlay to other Swing or Java2D drawing.
+In order to enable this, set up your GLCapabilities object with a
+non-zero alpha depth (a common value is 8 bits) and call
+setOpaque(false) on the GLJPanel once it has been created. Java2D
+rendering underneath it will then show through areas where OpenGL has
+produced an alpha value less than 1.0. See the JGears and JRefract
+demos for examples of how to use this functionality.
</P>
@@ -164,16 +185,20 @@ begins to perform rendering.
</P>
<P>
-The <CODE>init()</CODE> method is called upon OpenGL context creation.
-Any display lists or textures used during the application's normal
-rendering loop can be safely initialized in <CODE>init()</CODE>.
-Because the underlying AWT window may be destroyed and recreated while
+The <CODE>init()</CODE> method is called when a new OpenGL context is
+created for the given GLDrawable. Any display lists or textures used
+during the application's normal rendering loop can be safely
+initialized in <CODE>init()</CODE>. It is important to note that
+because the underlying AWT window may be destroyed and recreated while
using the same GLCanvas and GLEventListener, the GLEventListener's
<CODE>init()</CODE> method may be called more than once during the
-lifetime of the application. It is the responsibility of the
-application to understand its sharing of textures and display lists
-between multiple OpenGL contexts and reinitialize them when the
-<CODE>init()</CODE> callback is entered if necessary.
+lifetime of the application. The init() method should therefore be
+kept as short as possible and only contain the OpenGL initialization
+required for the <CODE>display()</CODE> method to run properly. It is
+the responsibility of the application to keep track of how its various
+OpenGL contexts share display lists, textures and other OpenGL objects
+so they can be either be reinitialized or so that reinitialization can
+be skipped when the <CODE>init()</CODE> callback is called.
</P>
<P>
@@ -238,6 +263,94 @@ class MyListener implements GLEventListener {
</P>
+<H2> Heavyweight and Lightweight Issues </H2>
+
+<P>
+
+As mentioned above, JOGL supplies both a heavyweight (GLCanvas) and a
+lightweight (GLJPanel) widget to be able to provide the fastest
+possible performance for applications which need it as well as 100%
+correct Swing integration, again for applications which need it. The
+GLCanvas provides much higher performance than the GLJPanel in nearly
+all situations and can be used in almost every kind of application
+except those using JInternalFrames. Please see the Swing Connection
+article mentioned above for details on mixing heavyweight and
+lightweight widgets. A couple of common pitfalls are described here.
+
+</P>
+<P>
+
+When using JPopupMenus or Swing tool tips in conjunction with the
+GLCanvas, it is necessary to disable the use of lightweight widgets
+for the popups. See the methods
+<CODE>ToolTipManager.setLightWeightPopupEnabled</CODE>,
+<CODE>JPopupMenu.setLightWeightPopupEnabled</CODE>, and
+<CODE>JPopupMenu.setDefaultLightWeightPopupEnabled</CODE>.
+
+</P>
+<P>
+
+There are occasionally problems with certain LayoutManagers and
+component configurations where if a GLCanvas is placed in the middle
+of a set of lightweight widgets then it may only grow and never
+shrink. These issues are documented somewhat in <a href =
+"https://jogl.dev.java.net/issues/show_bug.cgi?id=135">JOGL Issue
+135</a> and most recently in the thread <a
+href="http://192.18.37.44/forums/index.php?topic=8699.0">"Resize
+behaviour"</a> in the JOGL forum. The root cause is behavior of the
+Canvas, and in particular its ComponentPeer. The implementation of
+getPreferredSize() calls getMinimumSize() and getMinimumSize() turns
+around and calls Component.getSize(). This effectively means that the
+Canvas will report its preferred size as being as large as the
+component has ever been. For some layout managers this doesn't seem to
+matter, but for others like the BoxLayout it does. See the test case
+attached to Issue 135 for an example. Replacing the GLCanvas with an
+ordinary Canvas yields the same behavior.
+
+</P>
+<P>
+
+One suggestion was to override getPreferredSize() so that if a
+preferred size has not been set by the user, to default to (0,
+0). This works fine for some test cases but breaks all of the other
+JOGL demos because they use a different LayoutManager. There appear to
+be a lot of interactions between heavyweight vs. lightweight widgets
+and layout managers. One experiment which was done was to override
+setSize() in GLCanvas to update the preferred size. This works down
+to the size specified by the user; if the window is resized any
+smeller the same problem appears. If reshape() (the base routine of
+setSize(), setBounds(), etc.) is changed to do the same thing, the
+demo breaks in the same way it originally did. Therefore this solution
+is fragile because it isn't clear which of these methods are used
+internally by the AWT and for what purposes.
+
+</P>
+<P>
+
+There are two possible solutions, both application-specific. The best
+and most portable appears to be to put the GLCanvas into a JPanel and
+set the JPanel's preferred size to (0, 0). The JPanel will cause this
+constraint to be enforced on its contained GLCanvas. The other
+workaround is to call <CODE>setPreferredSize(new Dimension(0,
+0))</CODE> on a newly-created GLCanvas; this method is new in 1.5.
+
+</P>
+<P>
+
+Another issue that occasionally arises on Windows is flickering during
+live resizing of a GLCanvas. This is caused by the AWT's repainting
+the background of the Canvas and can not be overridden on a per-Canvas
+basis, for example when subclassing Canvas into GLCanvas. The
+repainting of the background of Canvases on Windows can be disabled by
+specifying the system property
+<CODE>-Dsun.awt.noerasebackground=true</CODE>. Whether to specify this
+flag depends on the application and should not be done universally,
+but instead on a case-by-case basis. Some more detail is in the thread
+<a href="http://192.18.37.44/forums/index.php?topic=8770.0">"TIP: JOGL
++ Swing flicker"</a> in the JOGL forum.
+
+</P>
+
<H2> Multithreading Issues </H2>
<P>
@@ -322,7 +435,7 @@ date.
</P>
<P>
-Prior to JOGL 1.1 b10, the JOGL library attempted to give applications
+Prior to Jogl 1.1 b10, the Jogl library attempted to give applications
strict control over which thread or threads performed OpenGL
rendering. The <CODE>setRenderingThread()</CODE>,
<CODE>setNoAutoRedrawMode()</CODE> and <CODE>display()</CODE> APIs
@@ -330,22 +443,19 @@ were originally designed to allow the application to create its own
animation thread and avoid OpenGL context switching on platforms that
supported it. Unfortunately, serious stability issues caused by
multithreading bugs in either vendors' OpenGL drivers or in the Java
-platform implementation have arisen on three of JOGL's major supported
-platforms: Windows, Linux and Mac OS X. A detailed description of
-these issues can be found on <a
-href="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1109286717">this
-thread</a> in the <a
-href="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl">JOGL
-forums</a>. In order to address these bugs, the threading model in
-JOGL 1.1 b10 and later has changed.
+platform implementation have arisen on three of Jogl's major supported
+platforms: Windows, Linux and Mac OS X. In order to address these
+bugs, the threading model in Jogl 1.1 b10 and later has changed.
</P>
<P>
All GLEventListener callbacks and other internal OpenGL context
-management are now performed on one thread: the AWT event queue
-thread. This is a thread internal to the implementation of the AWT and
-is always present when the AWT is being used. When the
+management are now performed on one thread. (In the current
+implementation, this thread is the AWT event queue thread, which is a
+thread internal to the implementation of the AWT and which is always
+present when the AWT is being used. Future versions of Jogl may change
+the thread on which the OpenGL work is performed.) When the
<CODE>GLDrawable.display()</CODE> method is called from user code, it
now performs the work synchronously on the AWT event queue thread,
even if the calling thread is a different thread. The
@@ -358,8 +468,8 @@ useful for working around certain kinds of OpenGL driver bugs.)
</P>
<P>
-Most JOGL applications will not see a change in behavior from this
-change in the JOGL implementation. Applications which use thread-local
+Most applications will not see a change in behavior from this change
+in the Jogl implementation. Applications which use thread-local
storage or complex multithreading and synchronization may see a change
in their control flow requiring code changes. While it is strongly
recommended to change such applications to work under the new
@@ -390,11 +500,14 @@ the future.
To create a pbuffer, create a GLCanvas and (assuming it reports that
it can create an offscreen drawable) make a pbuffer using the
<CODE>createOffscreenDrawable</CODE> API. Because of the multithreaded
-nature of the AWT, the pbuffer is actually created lazily. For this
-reason the application's main loop typically needs to detect when the
-init() methods of all of the GLEventListeners for all of the offscreen
-surfaces have been called. See the demonstrations such as the
-ProceduralTexturePhysics demo for an example of this.
+nature of the AWT, the pbuffer is actually created lazily. However,
+even if multiple pbuffers are created, and the order in which they are
+rendered is significant, handling the lazy instantiation can be
+straightforward: the display(GLDrawable) method of one pbuffer's
+GLEventListener can directly call another pbuffer's display() method.
+See the source code for the Jogl demonstrations such as the
+ProceduralTexturePhysics demo and the HDR demo for examples of this
+usage.
</P>
<P>
@@ -413,8 +526,86 @@ A pbuffer is used by calling its display() method. Rendering, as
always, occurs while the pbuffer's OpenGL context is current. There
are render-to-texture options that can be specified in the
GLCapabilities for the pbuffer which can make it easier to operate
-upon the resulting pixels. These APIs are however extremely
-experimental and not yet implemented on all platforms.
+upon the resulting pixels. These APIs are however highly experimental
+and not yet implemented on all platforms.
+
+</P>
+
+<H2> GLU </H2>
+
+<P>
+
+Jogl contains support for the GLU (OpenGL Utility Library) version
+1.3. Jogl originally supported GLU by wrapping the C version of the
+APIs, but over time, and thanks to the contributions of several
+individuals, it now uses a pure-Java version of SGI's GLU library. The
+pure Java port is enabled by default, and addresses stability issues
+on certain Linux distributions as well as the lack of native GLU 1.3
+support on the Windows platform. In case of problems with the Java
+port, the C version of the GLU library may be used by specifying the
+system property <CODE>-Djogl.glu.nojava</CODE> on the command
+line. All of the same functionality is exposed with both the Java and
+C versions of the GLU library; currently NURBS support is the only
+missing feature on both sides. If you run into problems with the Java
+port of the GLU library please file a bug using the Issue Tracker on
+the Jogl home page.
+
+</P>
+
+<H2> More Resources </H2>
+
+<P>
+
+The <A HREF="http://192.18.37.44/forums/index.php?board=25.0">JOGL
+forum</A> on <A HREF="http://javagaming.org/">javagaming.org</A> is
+the best place to ask questions about the library. Many users, as well
+as the Jogl developers, read this forum frequently, and the archived
+threads contain a lot of useful information (which still needs to be
+distilled into documentation).
+
+</P>
+<P>
+
+The <A HREF="http://jogl-demos.dev.java.net/">JOGL demos</A> provide
+several examples of usage of the library.
+
+</P>
+<P>
+
+Pepijn Van Eeckhoudt has done <A
+HREF="http://pepijn.fab4.be/nehe/">JOGL ports of many of the the NeHe
+demos</A>. These are small examples of various pieces of OpenGL
+functionality. See also the <A HREF="http://nehe.gamedev.net/">NeHe
+web site</A>.
+
+</P>
+<P>
+
+Pepijn also did a <A
+HREF="http://www.glexcess.com/files/glexcess.jar">JOGL port</a> of
+Paolo Martella's <A HREF="http://www.glexcess.com/">GLExcess</A>
+demo. To see the news update about this port, go to the main GLExcess
+site and scroll down.
+
+</P>
+<P>
+
+Gregory Pierce's <A
+HREF="http://192.18.37.44/forums/index.php?topic=1474.0">introduction
+to JOGL</a> is a useful tutorial on starting to use the JOGL library.
+
+</P>
+<P>
+
+For release information about the JOGL library, please see the <A
+HREF="http://192.18.37.44/forums/index.php?topic=1596.0">JOGL Release
+Information</A> thread on the JOGL forum on javagaming.org.
+
+</P>
+<P>
+
+Please post on the JOGL forum if you have a resource you'd like to add
+to this documentation.
</P>
@@ -438,7 +629,46 @@ The following issues, among others, are outstanding on all platforms:
<P>
-No outstanding issues at this time.
+For correct operation, it is necessary to specify the system property
+<CODE>-Dsun.java2d.noddraw=true</CODE> when running JOGL applications
+on Windows; this system property disables the use of DirectDraw by
+Java2D. There are driver-level incompatibilities between DirectDraw
+and OpenGL which manifest themselves as application crashes, poor
+performance, bad flickering, and other artifacts. This poor behavior
+may exhibit itself when OpenGL and DirectDraw are simply used in the
+same application, not even just in the same window, so disabling
+Java2D's DirectDraw pipeline and forcing it to use its GDI pipeline is
+the only way to work around these issues. Java Web Start applications
+may set this system property by adding the following line to the
+<CODE>&lt;resources&gt;</CODE> section of the JNLP file: <PRE>
+&lt;property name="sun.java2d.noddraw" value="true"/&gt; </PRE>
+
+</P>
+<P>
+
+JOGL currently does not interoperate well with the OpenGL pipeline for
+Java2D available in JDK 5.0 and later. We will address this in a
+future JOGL release and plan to have better interoperability by the
+time JDK 6.0 is shipped.
+
+</P>
+<P>
+
+There is a serious memory leak in ATI's OpenGL drivers which is
+exhibited on Windows XP on Mobility Radeon 9700 hardware. It's
+possible it will be present on other hardware as well though it was
+not reproducible at the time of this writing on desktop Radeon
+hardware or older ATI mobile chips. The bug is documented in <A
+HREF="https://jogl.dev.java.net/issues/show_bug.cgi?id=166">JOGL Issue
+166</A> and a bug has been filed with ATI. You can confirm the
+presence of the bug either with the test case in that bug report or by
+simply running the Gears demo; if the process size grows over time in
+the Task Manager, the memory leak is present on your hardware. For the
+time being, you can work around this memory leak by specifying the
+system property <CODE>-Djogl.GLContext.nofree</CODE> on the command
+line when launching your JOGL applications. There is no good
+general-purpose workaround for this bug which behaves well on all
+hardware.
</P>
@@ -454,6 +684,16 @@ No outstanding issues at this time.
<P>
+There are some problems with visual artifacts and stability problems
+with some of the Jogl demos on Mac OS X. It appears that at least some
+of these problems are due to bugs in Apple's OpenGL support. Bugs have
+been filed about these problems and it is hoped they will be addressed
+in the near future.
+
+</P>
+
+<P>
+
The Mac OS X port of Jogl, in particular the GL interface and its
implementation, can be used either with the provided GLCanvas widget
or with the Cocoa NSOpenGLView. In order to use it with Cocoa the
@@ -488,17 +728,25 @@ The following issues remain with the Mac OS X port:
<LI> Due to the mechanism by which the Cocoa graphics system selects
OpenGL pixel formats, the GLCapabilitiesChooser mechanism can not be
-implemented on Mac OS X as on other platforms. In the future, the
-chooser will be used and the capabilities array will contain exactly
-the requested capablities. The underlying Cocoa pixel format selection
-algorithm will then run to choose the best-fit visual. Currently the
-capabilities of the underlying context are hardcoded.
-
-<LI> Pbuffers are supported in Jogl on Mac OS X 10.3 and later.
+implemented on Mac OS X as on other platforms. Currently the
+underlying Cocoa pixel format selection is used on an
+NSOpenGLPixelFormat derived from the settings in the GLCapabilities,
+and the GLCapabilitiesChooser is ignored.
</UL>
</P>
+<H2> Version History </H2>
+
+<P>
+
+JOGL's version history can be found online in the <a
+href="http://192.18.37.44/forums/index.php?topic=1596.0">"JOGL Release
+Information"</a> thread in the JOGL forum. Comments about the 1.1
+release train are in the thread <a
+href="http://192.18.37.44/forums/index.php?topic=4217.0">"JOGL 1.1
+released"</a>.
+
</BODY>
</HTML>
diff --git a/make/build.xml b/make/build.xml
index 604c33849..f707e43d7 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -176,7 +176,7 @@
<include name="${stub.includes.dir}/x11/**" />
<include name="${stub.includes.dir}/common/**" />
<include name="*.cfg" />
- <include name="*.java" />
+ <include name="gl*.java" />
<include name="*.c" />
<exclude name="cg-common.cfg" />
</fileset>
@@ -191,6 +191,7 @@
<fileset id="stub.includes.cg.dependencies.fileset" dir=".">
<include name="${stub.includes.dir}/cg/**" />
<include name="cg-common.cfg" />
+ <include name="cg-common-CustomJavaCode.java" />
</fileset>
<property name="java.includes.dir" value="${java.home.dir}/include" /> <!-- NOTE: this MUST be relative for FileSet -->
@@ -1013,11 +1014,9 @@
<jar destfile="${jogl.dist.dir}/jogl-natives-solsparc.jar"
basedir="${jogl.dist.dir}/jogl-solsparc"
includes="libjogl.so" />
- <!-- Note: Solaris/x86 elided for now as it requires Mesa to
- be installed -->
- <!-- jar destfile="${jogl.dist.dir}/jogl-natives-solx86.jar"
+ <jar destfile="${jogl.dist.dir}/jogl-natives-solx86.jar"
basedir="${jogl.dist.dir}/jogl-solx86"
- includes="libjogl.so" -->
+ includes="libjogl.so" />
<!-- Build a source archive as well -->
<zip destfile="${jogl.dist.dir}/jogl-src.zip"
basedir="../.."
diff --git a/make/cg-common.cfg b/make/cg-common.cfg
index 275d9941d..246492a1f 100644
--- a/make/cg-common.cfg
+++ b/make/cg-common.cfg
@@ -11,7 +11,16 @@ HierarchicalNativeOutput false
# Generate "flattened" NIO variants for routines taking C primitive
# pointers that aren't of type void*
NioMode ALL_POINTERS
-FlattenNIOVariants true
+
+# Comment out FlattenNIOVariants since default is true
+# FlattenNIOVariants true
+
+# Generate Java primitive arrays for all C pointers, including void *
+PrimitiveArrayExpansionMode ALL_POINTERS
+
+# For expansion of C void* pointers, expand into the following Java
+# primitive types: short, int, float, byte, double
+VoidPointerExpansion short int float byte double
#
# Map const char* return values to Java strings for these functions
@@ -74,21 +83,4 @@ RuntimeExceptionType CgException
CustomCCode #include <stdlib.h>
CustomCCode #include <Cg/cgGL.h>
-CustomJavaCode CgGL static {
-CustomJavaCode CgGL AccessController.doPrivileged(new PrivilegedAction() {
-CustomJavaCode CgGL public Object run() {
-CustomJavaCode CgGL try {
-CustomJavaCode CgGL // Workaround so that these don't need to be in the system
-CustomJavaCode CgGL // path but can be referenced from java.library.path
-CustomJavaCode CgGL // (this is intended to help with Webstarted applications)
-CustomJavaCode CgGL System.loadLibrary("cg");
-CustomJavaCode CgGL System.loadLibrary("cgGL");
-CustomJavaCode CgGL } catch (UnsatisfiedLinkError e) {
-CustomJavaCode CgGL // Consider this non-fatal
-CustomJavaCode CgGL }
-CustomJavaCode CgGL // Load the actual Cg binding
-CustomJavaCode CgGL System.loadLibrary("jogl_cg");
-CustomJavaCode CgGL return null;
-CustomJavaCode CgGL }
-CustomJavaCode CgGL });
-CustomJavaCode CgGL }
+IncludeAs CustomJavaCode CgGL cg-common-CustomJavaCode.java
diff --git a/make/cgl-macosx.cfg b/make/cgl-macosx.cfg
index dab1ec206..1a963f135 100644
--- a/make/cgl-macosx.cfg
+++ b/make/cgl-macosx.cfg
@@ -17,6 +17,7 @@ CustomCCode #include </usr/include/machine/types.h>
CustomCCode extern void* createContext(void* shareContext, void* nsView,
CustomCCode int doubleBuffer,
+CustomCCode int stereo,
CustomCCode int redBits,
CustomCCode int greenBits,
CustomCCode int blueBits,
@@ -28,7 +29,10 @@ CustomCCode int accumGreenBits,
CustomCCode int accumBlueBits,
CustomCCode int accumAlphaBits,
CustomCCode int sampleBuffers,
-CustomCCode int numSamples);
+CustomCCode int numSamples,
+CustomCCode int pbuffer,
+CustomCCode int floatingPoint,
+CustomCCode int* viewNotReady);
CustomCCode extern Bool makeCurrentContext(void* nsContext, void* nsView);
CustomCCode extern Bool clearCurrentContext(void* nsContext, void* nsView);
CustomCCode extern Bool deleteContext(void* nsContext, void* nsView);
@@ -38,7 +42,7 @@ CustomCCode extern void updateContext(void* nsContext, void* nsView);
CustomCCode extern void* updateContextRegister(void* nsContext, void* nsView);
CustomCCode extern void updateContextUnregister(void* nsContext, void* nsView, void* updater);
-CustomCCode extern void* createPBuffer(int renderTarget, int width, int height);
+CustomCCode extern void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
CustomCCode extern Bool destroyPBuffer(void* nsContext, void* pBuffer);
CustomCCode extern void setContextPBuffer(void* nsContext, void* pBuffer);
CustomCCode extern void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
diff --git a/make/gl-common.cfg b/make/gl-common.cfg
index b817732a6..32a471f68 100644
--- a/make/gl-common.cfg
+++ b/make/gl-common.cfg
@@ -63,6 +63,8 @@ Ignore glGetBufferPointerv
Ignore glGetBufferPointervARB
Ignore glGetPointerv
Ignore glGetPointervEXT
+Ignore glGetTexParameterPointervAPPLE
+Ignore glGetVertexAttribPointerv
Ignore glGetVertexAttribPointervARB
Ignore glGetVertexAttribPointervNV
Ignore glTracePointerRangeMESA
@@ -206,19 +208,29 @@ ArgumentIsString glGetAttribLocationARB 1
# Javadoc for the GL class
ClassJavadoc GL /**
ClassJavadoc GL * <P> The basic interface to OpenGL, providing access to core
-ClassJavadoc GL * functionality up through the OpenGL 1.4 specification as well as
+ClassJavadoc GL * functionality up through the OpenGL 2.0 specification as well as
ClassJavadoc GL * all vendor extensions. </P>
ClassJavadoc GL *
ClassJavadoc GL * <P> While the APIs for vendor extensions are unconditionally
ClassJavadoc GL * exposed, the underlying functions may not be present. The method
ClassJavadoc GL * {@link #isFunctionAvailable} should be used to query the
ClassJavadoc GL * availability of any non-core function before it is used for the
-ClassJavadoc GL * first time. On certain platforms (Windows in particular), the most
-ClassJavadoc GL * "core" functionality is only OpenGL 1.1, so in theory any routines
-ClassJavadoc GL * first exposed in OpenGL 1.2, 1.3, and 1.4 as well as vendor
+ClassJavadoc GL * first time; for example,
+ClassJavadoc GL * <code>gl.isFunctionAvailable("glProgramStringARB")</code>. On
+ClassJavadoc GL * certain platforms (Windows in particular), the most "core"
+ClassJavadoc GL * functionality is only OpenGL 1.1, so in theory any routines first
+ClassJavadoc GL * exposed in OpenGL 1.2, 1.3, and 1.4, 1.5, or 2.0 as well as vendor
ClassJavadoc GL * extensions should all be queried. Calling an unavailable function
ClassJavadoc GL * will cause a {@link GLException} to be raised. </P>
ClassJavadoc GL *
+ClassJavadoc GL * {@link #isExtensionAvailable} may also be used to determine whether
+ClassJavadoc GL * a specific extension is available before calling the routines or
+ClassJavadoc GL * using the functionality it exposes: for example,
+ClassJavadoc GL * <code>gl.isExtensionAvailable("GL_ARB_vertex_program");</code>.
+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
@@ -240,11 +252,11 @@ ClassJavadoc GL * #isFunctionAvailable} will translate an argument of
ClassJavadoc GL * "glAllocateMemoryNV" or "glFreeMemoryNV" into the appropriate
ClassJavadoc GL * window system-specific name. </P>
ClassJavadoc GL *
-ClassJavadoc GL * <LI> WGL_ARB_pbuffer and WGL_ARB_pixel_format; these extensions have been
-ClassJavadoc GL * exposed with the names "GL_ARB_pbuffer" and "GL_ARB_pixel_format" for
-ClassJavadoc GL * platform independence. When pbuffer support is added to the X11 port of
-ClassJavadoc GL * Jogl, the semantics of querying for these platform-independent extension
-ClassJavadoc GL * names will be preserved.
+ClassJavadoc GL * <LI> WGL_ARB_pbuffer, WGL_ARB_pixel_format, and other
+ClassJavadoc GL * platform-specific pbuffer functionality; the availability of
+ClassJavadoc GL * pbuffers can be queried on Windows, X11 and Mac OS X platforms by
+ClassJavadoc GL * querying {@link #isExtensionAvailable} with an argument of
+ClassJavadoc GL * "GL_ARB_pbuffer" or "GL_ARB_pixel_format".
ClassJavadoc GL *
ClassJavadoc GL * </UL> <P>
ClassJavadoc GL *
@@ -333,7 +345,7 @@ CustomJavaCode GL * used successfully through this GL instance given the curr
CustomJavaCode GL * <i>client</i>) and display (OpenGL <i>server</i>) configuration.<P>
CustomJavaCode GL *
CustomJavaCode GL * @param glExtensionName the name of the OpenGL extension (e.g.,
-CustomJavaCode GL * "GL_VERTEX_PROGRAM_ARB").
+CustomJavaCode GL * "GL_ARB_vertex_program").
CustomJavaCode GL */
CustomJavaCode GL public boolean isExtensionAvailable(String glExtensionName);
diff --git a/make/jogl.properties b/make/jogl.properties
index 8c945540d..85816f0d0 100644
--- a/make/jogl.properties
+++ b/make/jogl.properties
@@ -39,11 +39,14 @@
vc6.root=C:/Program Files/Microsoft Visual Studio/VC98
#
-# If you are building on Windows with Visual C++ 7.0 and have installed
-# the compiler in somewhere other than the default location, modify this
-# to point to the absolute path of the VC98 directory
+# If you are building on Windows with Visual C++ 7.0 or later and have
+# installed the compiler in somewhere other than the default location,
+# modify this to point to the absolute path of the parent directory of
+# the "lib" directory
+#
+# NOTE: this has been customized for VS.NET 2003
#
-vc7.root=C:/Program Files/Microsoft Visual Studio .NET/Vc7
+vc7.root=C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK
#
# If you are building the Cg binding (by specifying -Djogl.cg=1 to the
diff --git a/make/stub_includes/macosx/window-system.c b/make/stub_includes/macosx/window-system.c
index b30c252f3..e53300830 100644
--- a/make/stub_includes/macosx/window-system.c
+++ b/make/stub_includes/macosx/window-system.c
@@ -5,6 +5,7 @@ typedef int Bool;
void* createContext(void* shareContext, void* nsView,
int doubleBuffer,
+ int stereo,
int redBits,
int greenBits,
int blueBits,
@@ -16,7 +17,10 @@ void* createContext(void* shareContext, void* nsView,
int accumBlueBits,
int accumAlphaBits,
int sampleBuffers,
- int numSamples);
+ int numSamples,
+ int pbuffer,
+ int floatingPoint,
+ int* viewNotReady);
Bool makeCurrentContext(void* nsContext, void* nsView);
Bool clearCurrentContext(void* nsContext, void* nsView);
Bool deleteContext(void* nsContext, void* nsView);
@@ -26,7 +30,7 @@ void updateContext(void* nsContext, void* nsView);
void* updateContextRegister(void* nsContext, void* nsView);
void updateContextUnregister(void* nsContext, void* nsView, void* updater);
-void* createPBuffer(int renderTarget, int width, int height);
+void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
Bool destroyPBuffer(void* nsContext, void* pBuffer);
void setContextPBuffer(void* nsContext, void* pBuffer);
void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
diff --git a/make/stub_includes/opengl/GL/glext.h b/make/stub_includes/opengl/GL/glext.h
index 36b31d51b..8d79e907a 100644
--- a/make/stub_includes/opengl/GL/glext.h
+++ b/make/stub_includes/opengl/GL/glext.h
@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2004/7/26 */
+/* glext.h last updated 2005/03/17 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define GL_GLEXT_VERSION 24
+#define GL_GLEXT_VERSION 27
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -372,6 +372,93 @@ extern "C" {
#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
#endif
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_POINT_SPRITE 0x8861
+#define GL_COORD_REPLACE 0x8862
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_COORDS 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_DELETE_STATUS 0x8B80
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#endif
+
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -825,6 +912,48 @@ extern "C" {
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
#endif
+#ifndef GL_ARB_color_buffer_float
+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
+#define GL_CLAMP_READ_COLOR_ARB 0x891C
+#define GL_FIXED_ONLY_ARB 0x891D
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_HALF_FLOAT_ARB 0x140B
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
+#define GL_RGBA32F_ARB 0x8814
+#define GL_RGB32F_ARB 0x8815
+#define GL_ALPHA32F_ARB 0x8816
+#define GL_INTENSITY32F_ARB 0x8817
+#define GL_LUMINANCE32F_ARB 0x8818
+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
+#define GL_RGBA16F_ARB 0x881A
+#define GL_RGB16F_ARB 0x881B
+#define GL_ALPHA16F_ARB 0x881C
+#define GL_INTENSITY16F_ARB 0x881D
+#define GL_LUMINANCE16F_ARB 0x881E
+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+#endif
+
#ifndef GL_EXT_abgr
#define GL_ABGR_EXT 0x8000
#endif
@@ -2693,8 +2822,10 @@ extern "C" {
#ifndef GL_APPLE_vertex_array_range
#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
-#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE 0x8520
#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define GL_STORAGE_PRIVATE_APPLE 0x85BD
#define GL_STORAGE_CACHED_APPLE 0x85BE
#define GL_STORAGE_SHARED_APPLE 0x85BF
#endif
@@ -2823,6 +2954,11 @@ extern "C" {
#ifndef GL_ATI_vertex_attrib_array_object
#endif
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
#ifndef GL_EXT_depth_bounds_test
#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
#define GL_DEPTH_BOUNDS_EXT 0x8891
@@ -2876,10 +3012,69 @@ extern "C" {
/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
#endif
+#ifndef GL_EXT_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENTS_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
+#define GL_FRAMEBUFFER_STATUS_ERROR_EXT 0x8CDE
+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
+#define GL_FRAMEBUFFER_EXT 0x8D40
+#define GL_RENDERBUFFER_EXT 0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX_EXT 0x8D45
+#define GL_STENCIL_INDEX1_EXT 0x8D46
+#define GL_STENCIL_INDEX4_EXT 0x8D47
+#define GL_STENCIL_INDEX8_EXT 0x8D48
+#define GL_STENCIL_INDEX16_EXT 0x8D49
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#endif
+
/*************************************************************/
#include <stddef.h>
+#ifndef GL_VERSION_2_0
+/* GL type for program/shader text */
+typedef char GLchar; /* native character */
+#endif
+
#ifndef GL_VERSION_1_5
/* GL types for handling large vertex buffer objects */
typedef ptrdiff_t GLintptr;
@@ -2893,11 +3088,16 @@ typedef ptrdiff_t GLsizeiptrARB;
#endif
#ifndef GL_ARB_shader_objects
-/* GL types for handling shader object handles and characters */
+/* GL types for handling shader object handles and program/shader text */
typedef char GLcharARB; /* native character */
typedef unsigned int GLhandleARB; /* shader object handle */
#endif
+/* GL types for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
#ifndef GL_NV_half_float
/* GL type for representing NVIDIA "half" floating point type in host memory */
typedef unsigned short GLhalfNV;
@@ -3223,6 +3423,198 @@ typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pn
typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
#endif
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
+GLAPI void APIENTRY glCompileShader (GLuint);
+GLAPI GLuint APIENTRY glCreateProgram (void);
+GLAPI GLuint APIENTRY glCreateShader (GLenum);
+GLAPI void APIENTRY glDeleteProgram (GLuint);
+GLAPI void APIENTRY glDeleteShader (GLuint);
+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
+GLAPI GLboolean APIENTRY glIsShader (GLuint);
+GLAPI void APIENTRY glLinkProgram (GLuint);
+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
+GLAPI void APIENTRY glUseProgram (GLuint);
+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform1i (GLint, GLint);
+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glValidateProgram (GLuint);
+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif
+
#ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -3782,6 +4174,26 @@ typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs)
#define GL_ARB_texture_rectangle 1
#endif
+#ifndef GL_ARB_color_buffer_float
+#define GL_ARB_color_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_ARB_half_float_pixel 1
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_ARB_texture_float 1
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_ARB_pixel_buffer_object 1
+#endif
+
#ifndef GL_EXT_abgr
#define GL_EXT_abgr 1
#endif
@@ -6006,6 +6418,10 @@ typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index,
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
#endif
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -6054,6 +6470,54 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLen
#define GL_NV_vertex_program3 1
#endif
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
+#endif
+
/*
* ------------------------------------------------
@@ -6111,131 +6575,87 @@ typedef GLuint (APIENTRY * PFNGLBUFFERREGIONENABLEDPROC) (GLvoid);
#endif
/*
- * Note: (kbr) manually created this definition from the spec at http://www.opengl.org/documentation/extensions/EXT_framebuffer_object.txt
+ * Note: (kbr) imported these extensions from Apple's glext.h
*/
-#ifndef GL_EXT_framebuffer_object
-#define GL_FRAMEBUFFER_EXT 0x8D40
-#define GL_RENDERBUFFER_EXT 0x8D41
-#define GL_STENCIL_INDEX_EXT 0x8D45
-#define GL_STENCIL_INDEX1_EXT 0x8D46
-#define GL_STENCIL_INDEX4_EXT 0x8D47
-#define GL_STENCIL_INDEX8_EXT 0x8D48
-#define GL_STENCIL_INDEX16_EXT 0x8D49
-#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
-#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
-#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
-#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
-#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
-#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
-#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
-#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
-#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
-#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
-#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
-#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
-#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
-#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
-#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
-#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
-#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
-#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
-#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
-#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
-#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
-#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
-#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
-#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
-#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
-#define GL_FRAMEBUFFER_STATUS_ERROR_EXT 0x8CDE
-#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
-#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
-#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
-#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
-#endif
-
-#ifndef GL_EXT_framebuffer_object
-#define GL_EXT_framebuffer_object 1
+#ifndef GL_APPLE_texture_range
+#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
+#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
+#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
+#define GL_TEXTURE_MINIMIZE_STORAGE_APPLE 0x85B6
+#endif
+#ifndef GL_APPLE_texture_range
+#define GL_APPLE_texture_range 1
#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glIsRenderbufferEXT(GLuint renderbuffer);
-GLAPI void APIENTRY glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
-GLAPI void APIENTRY glDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers);
-GLAPI void APIENTRY glGenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers);
-
-GLAPI void APIENTRY glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
- GLsizei width, GLsizei height);
-
-GLAPI void APIENTRY glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint* params);
-
-GLAPI GLboolean APIENTRY glIsFramebufferEXT(GLuint framebuffer);
-GLAPI void APIENTRY glBindFramebufferEXT(GLenum target, GLuint framebuffer);
-GLAPI void APIENTRY glDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers);
-GLAPI void APIENTRY glGenFramebuffersEXT(GLsizei n, GLuint *framebuffers);
-
-GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT(GLenum target);
-
-GLAPI void APIENTRY glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level);
-GLAPI void APIENTRY glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level);
-GLAPI void APIENTRY glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level, GLint zoffset);
-
-GLAPI void APIENTRY glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
- GLenum renderbuffertarget, GLuint renderbuffer);
-
-GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
- GLenum pname, GLint *params);
-
-GLAPI void APIENTRY glGenerateMipmapEXT(GLenum target);
+GLAPI void glTextureRangeAPPLE(GLenum target, GLsizei length, const GLvoid *pointer);
+GLAPI void glGetTexParameterPointervAPPLE(GLenum target, GLenum pname, GLvoid **params);
+#endif
+typedef void (APIENTRY * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer);
+typedef void (APIENTRY * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid **params);
+#endif
+
+#ifndef GL_APPLE_float_pixels
+#define GL_HALF_APPLE 0x140B
+#define GL_COLOR_FLOAT_APPLE 0x8A0F
+#define GL_RGBA_FLOAT32_APPLE 0x8814
+#define GL_RGB_FLOAT32_APPLE 0x8815
+#define GL_ALPHA_FLOAT32_APPLE 0x8816
+#define GL_INTENSITY_FLOAT32_APPLE 0x8817
+#define GL_LUMINANCE_FLOAT32_APPLE 0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
+#define GL_RGBA_FLOAT16_APPLE 0x881A
+#define GL_RGB_FLOAT16_APPLE 0x881B
+#define GL_ALPHA_FLOAT16_APPLE 0x881C
+#define GL_INTENSITY_FLOAT16_APPLE 0x881D
+#define GL_LUMINANCE_FLOAT16_APPLE 0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
+#endif
+
+#ifndef GL_APPLE_pixel_buffer
+#define GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE 0x8A10
+#endif
+
+#ifndef GL_APPLE_vertex_program_evaluators
+#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
+#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
+#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
+#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
+#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
+#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
+#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
+#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
+#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
+#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
+#endif
+#ifndef GL_APPLE_vertex_program_evaluators
+#define GL_APPLE_vertex_program_evaluators 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glEnableVertexAttribAPPLE(GLuint index, GLenum pname);
+GLAPI void APIENTRY glDisableVertexAttribAPPLE(GLuint index, GLenum pname);
+GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE(GLuint index, GLenum pname);
+GLAPI void APIENTRY glMapVertexAttrib1dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+GLAPI void APIENTRY glMapVertexAttrib1fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+GLAPI void APIENTRY glMapVertexAttrib2dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+GLAPI void APIENTRY glMapVertexAttrib2fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+#endif
+typedef void (APIENTRY * PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
+typedef void (APIENTRY * PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
+typedef GLboolean (APIENTRY * PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
+typedef void (APIENTRY * PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+typedef void (APIENTRY * PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+typedef void (APIENTRY * PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+typedef void (APIENTRY * PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+#endif
+
+#ifndef GL_APPLE_flush_render
+#define GL_APPLE_flush_render 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushRenderAPPLE(void);
+GLAPI void APIENTRY glFinishRenderAPPLE(void);
+GLAPI void APIENTRY glSwapAPPLE(void);
#endif
-typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
-typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
-
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat,
- GLsizei width, GLsizei height);
-
-typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
-
-typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
-typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
-typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
-typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
-
-typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
-
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level, GLint zoffset);
-
-typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment,
- GLenum renderbuffertarget, GLuint renderbuffer);
-
-typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment,
- GLenum pname, GLint *params);
-
-typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+typedef void (APIENTRY * PFNGLFLUSHRENDERAPPLEPROC) (void);
+typedef void (APIENTRY * PFNGLFINISHRENDERAPPLEPROC) (void);
+typedef void (APIENTRY * PFNGLSWAPAPPLEPROC) (void);
#endif
#ifdef __cplusplus
diff --git a/make/stub_includes/opengl/GL/glxext.h b/make/stub_includes/opengl/GL/glxext.h
index 32a55192a..b4f92e597 100644
--- a/make/stub_includes/opengl/GL/glxext.h
+++ b/make/stub_includes/opengl/GL/glxext.h
@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glxext.h last updated 2004/07/26 */
+/* glxext.h last updated 2005/04/28 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define GLX_GLXEXT_VERSION 6
+#define GLX_GLXEXT_VERSION 11
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -128,6 +128,11 @@ extern "C" {
#define GLX_SAMPLES_ARB 100001
#endif
+#ifndef GLX_ARB_fbconfig_float
+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
+#endif
+
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
@@ -282,7 +287,11 @@ extern "C" {
#ifndef GLX_OML_sync_control
#endif
-#ifndef GLX_SGIX_hyperpipe_group
+#ifndef GLX_NV_float_buffer
+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
+#endif
+
+#ifndef GLX_SGIX_hyperpipe
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
#define GLX_BAD_HYPERPIPE_SGIX 92
@@ -393,6 +402,10 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#define GLX_ARB_multisample 1
#endif
+#ifndef GLX_ARB_fbconfig_float
+#define GLX_ARB_fbconfig_float 1
+#endif
+
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif
@@ -618,8 +631,12 @@ typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, i
#endif /* STDC test */
#endif
-#ifndef GLX_SGIX_hyperpipe_group
-#define GLX_SGIX_hyperpipe_group 1
+#ifndef GLX_NV_float_buffer
+#define GLX_NV_float_buffer 1
+#endif
+
+#ifndef GLX_SGIX_hyperpipe
+#define GLX_SGIX_hyperpipe 1
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
diff --git a/make/stub_includes/opengl/GL/wglext.h b/make/stub_includes/opengl/GL/wglext.h
index 03895ea65..8397d0db9 100644
--- a/make/stub_includes/opengl/GL/wglext.h
+++ b/make/stub_includes/opengl/GL/wglext.h
@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number */
-/* wglext.h last updated 2004/07/26 */
+/* wglext.h last updated 2005/01/07 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define WGL_WGLEXT_VERSION 5
+#define WGL_WGLEXT_VERSION 6
#ifndef WGL_ARB_buffer_region
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
@@ -175,6 +175,10 @@ extern "C" {
#define WGL_AUX9_ARB 0x2090
#endif
+#ifndef WGL_ARB_pixel_format_float
+#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
+#endif
+
#ifndef WGL_EXT_make_current_read
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
#endif
@@ -405,6 +409,10 @@ typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
#endif
+#ifndef WGL_ARB_pixel_format_float
+#define WGL_ARB_pixel_format_float 1
+#endif
+
#ifndef WGL_EXT_display_color_table
#define WGL_EXT_display_color_table 1
#ifdef WGL_WGLEXT_PROTOTYPES
@@ -617,6 +625,9 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWO
#define WGL_ATI_pixel_format_float 1
#endif
+#ifndef WGL_NV_float_buffer
+#define WGL_NV_float_buffer 1
+#endif
/*
* -----------------------------------------------------------
@@ -626,10 +637,6 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWO
* -----------------------------------------------------------
*/
-#ifndef WGL_NV_float_buffer
-#define WGL_NV_float_buffer 1
-#endif
-
#ifndef WGL_NV_render_texture_rectangle
#define WGL_NV_render_texture_rectangle 1
#endif
diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m
index 6a5969fff..516bda0db 100644
--- a/src/native/jogl/MacOSXWindowSystemInterface.m
+++ b/src/native/jogl/MacOSXWindowSystemInterface.m
@@ -1,5 +1,6 @@
#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
+#import <OpenGL/CGLTypes.h>
#import <jni.h>
#import "ContextUpdater.h"
@@ -14,10 +15,9 @@
typedef int Bool;
-NSAutoreleasePool* gAutoreleasePool = NULL;
-
void* createContext(void* shareContext, void* view,
int doubleBuffer,
+ int stereo,
int redBits,
int greenBits,
int blueBits,
@@ -29,170 +29,173 @@ void* createContext(void* shareContext, void* view,
int accumBlueBits,
int accumAlphaBits,
int sampleBuffers,
- int numSamples)
+ int numSamples,
+ int pbuffer,
+ int floatingPoint,
+ int* viewNotReady)
{
- int colorSize = redBits + greenBits + blueBits;
- int accumSize = accumRedBits + accumGreenBits + accumBlueBits;
+ int colorSize = redBits + greenBits + blueBits;
+ int accumSize = accumRedBits + accumGreenBits + accumBlueBits;
- NSOpenGLContext *nsChareCtx = (NSOpenGLContext*)shareContext;
- NSView *nsView = (NSView*)view;
-
- if (nsView != NULL)
- {
- NSRect frame = [nsView frame];
- if ((frame.size.width == 0) || (frame.size.height == 0))
- {
- fprintf(stderr, "Error: view width or height == 0at \"%s:%s:%d\"\n", __FILE__, __FUNCTION__, __LINE__);
- // the view is not ready yet
- return NULL;
- }
- else if ([nsView lockFocusIfCanDraw] == NO)
- {
- fprintf(stderr, "Error: view not ready, cannot lock focus at \"%s:%s:%d\"\n", __FILE__, __FUNCTION__, __LINE__);
- // the view is not ready yet
- return NULL;
- }
- }
-
- if (gAutoreleasePool == NULL)
- {
- gAutoreleasePool = [[NSAutoreleasePool alloc] init];
- }
-
- NSOpenGLPixelFormatAttribute attribs[] =
- {
- NSOpenGLPFANoRecovery, YES,
- NSOpenGLPFAAccelerated, YES,
- NSOpenGLPFADoubleBuffer, YES,
- NSOpenGLPFAColorSize, colorSize,
- NSOpenGLPFAAlphaSize, alphaBits,
- NSOpenGLPFADepthSize, depthBits,
- NSOpenGLPFAStencilSize, stencilBits,
- NSOpenGLPFAAccumSize, accumSize,
- NSOpenGLPFASampleBuffers, sampleBuffers,
- NSOpenGLPFASamples, numSamples,
- 0
- };
-
-
-
- NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
-
- NSOpenGLContext* nsContext = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:nsChareCtx];
-
- [fmt release];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+
+ NSOpenGLContext *nsChareCtx = (NSOpenGLContext*)shareContext;
+ NSView *nsView = (NSView*)view;
+
+ if (nsView != NULL) {
+ if ([nsView lockFocusIfCanDraw] == NO) {
+ if (viewNotReady != NULL) {
+ *viewNotReady = 1;
+ }
+
+ // the view is not ready yet
+ [pool release];
+ return NULL;
+ }
+ }
+
+ NSOpenGLPixelFormatAttribute attribs[256];
+ int idx = 0;
+ if (pbuffer) attribs[idx++] = NSOpenGLPFAPixelBuffer;
+ // kCGLPFAColorFloat is equivalent to NSOpenGLPFAColorFloat, but the
+ // latter is only available on 10.4 and we need to compile under
+ // 10.3
+ if (floatingPoint) attribs[idx++] = kCGLPFAColorFloat;
+ if (doubleBuffer) attribs[idx++] = NSOpenGLPFADoubleBuffer;
+ if (stereo) attribs[idx++] = NSOpenGLPFAStereo;
+ attribs[idx++] = NSOpenGLPFAColorSize; attribs[idx++] = colorSize;
+ attribs[idx++] = NSOpenGLPFAAlphaSize; attribs[idx++] = alphaBits;
+ attribs[idx++] = NSOpenGLPFADepthSize; attribs[idx++] = depthBits;
+ attribs[idx++] = NSOpenGLPFAStencilSize; attribs[idx++] = stencilBits;
+ attribs[idx++] = NSOpenGLPFAAccumSize; attribs[idx++] = accumSize;
+ attribs[idx++] = NSOpenGLPFASampleBuffers; attribs[idx++] = sampleBuffers;
+ attribs[idx++] = NSOpenGLPFASamples; attribs[idx++] = numSamples;
+ attribs[idx++] = 0;
+
+ NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc]
+ initWithAttributes:attribs];
+ NSOpenGLContext* nsContext = [[NSOpenGLContext alloc]
+ initWithFormat:fmt
+ shareContext:nsChareCtx];
+ [fmt release];
- if (nsView != nil)
- {
- [nsContext setView:nsView];
-
- [nsView unlockFocus];
- }
-
- [nsContext retain];
-
-//fprintf(stderr, " nsContext=%p\n", nsContext);
- return nsContext;
+ if (nsView != nil) {
+ [nsContext setView:nsView];
+ [nsView unlockFocus];
+ }
+
+ [pool release];
+ return nsContext;
}
-Bool makeCurrentContext(void* context, void* view)
-{
-//fprintf(stderr, "makeCurrentContext context=%p, view=%p\n", context, view);
- NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+Bool makeCurrentContext(void* context, void* view) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
- [nsContext makeCurrentContext];
- return true;
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [nsContext makeCurrentContext];
+ [pool release];
+ return true;
}
-Bool clearCurrentContext(void* context, void* view)
-{
-//fprintf(stderr, "clearCurrentContext context=%p, view=%p\n", context, view);
- [NSOpenGLContext clearCurrentContext];
- return true;
+Bool clearCurrentContext(void* context, void* view) {
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [NSOpenGLContext clearCurrentContext];
+ [pool release];
+ return true;
}
-Bool deleteContext(void* context, void* view)
-{
-//fprintf(stderr, "deleteContext context=%p, view=%p\n", context, view);
- NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+Bool deleteContext(void* context, void* view) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
- [nsContext clearDrawable];
- [nsContext release];
- return true;
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [nsContext clearDrawable];
+ [nsContext release];
+ [pool release];
+ return true;
}
-Bool flushBuffer(void* context, void* view)
-{
-//fprintf(stderr, "flushBuffer context=%p, view=%p\n", context, view);
- NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+Bool flushBuffer(void* context, void* view) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
- [nsContext flushBuffer];
- return true;
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [nsContext flushBuffer];
+ [pool release];
+ return true;
}
-void updateContext(void* context, void* view)
-{
-//fprintf(stderr, "updateContext context=%p, view=%p\n", context, view);
- NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+void updateContext(void* context, void* view) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
- [nsContext update];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [nsContext update];
+ [pool release];
}
-void* updateContextRegister(void* context, void* view)
-{
-//fprintf(stderr, "updateContextRegister context=%p, view=%p\n", context, view);
- NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
- NSView *nsView = (NSView*)view;
+void* updateContextRegister(void* context, void* view) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+ NSView *nsView = (NSView*)view;
- ContextUpdater *contextUpdater = [[ContextUpdater alloc] init];
- [contextUpdater registerFor:nsContext with:nsView];
- return NULL;
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ ContextUpdater *contextUpdater = [[ContextUpdater alloc] init];
+ [contextUpdater registerFor:nsContext with:nsView];
+ [pool release];
+ return NULL;
}
-void updateContextUnregister(void* context, void* view, void* updater)
-{
-//fprintf(stderr, "updateContextUnregister context=%p, view=%p\n", context, view);
- ContextUpdater *contextUpdater = (ContextUpdater *)updater;
+void updateContextUnregister(void* context, void* view, void* updater) {
+ ContextUpdater *contextUpdater = (ContextUpdater *)updater;
- [contextUpdater release];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [contextUpdater release];
+ [pool release];
}
-void* createPBuffer(int renderTarget, int width, int height)
-{
- // fprintf(stderr, "createPBuffer renderTarget=%d width=%d height=%d\n", renderTarget, width, height);
-
- NSOpenGLPixelBuffer* pBuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:renderTarget textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height];
-
+void* createPBuffer(int renderTarget, int internalFormat, int width, int height) {
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ NSOpenGLPixelBuffer* pBuffer = [[NSOpenGLPixelBuffer alloc]
+ initWithTextureTarget:renderTarget
+ textureInternalFormat:internalFormat
+ textureMaxMipMapLevel:0
+ pixelsWide:width
+ pixelsHigh:height];
+ [pool release];
return pBuffer;
}
-Bool destroyPBuffer(void* context, void* buffer)
-{
-//fprintf(stderr, "destroyPBuffer context=%p, buffer=%p\n", context, buffer);
- NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
- NSOpenGLPixelBuffer *pBuffer = (NSOpenGLPixelBuffer*)buffer;
+Bool destroyPBuffer(void* context, void* buffer) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+ NSOpenGLPixelBuffer *pBuffer = (NSOpenGLPixelBuffer*)buffer;
- if (nsContext != NULL)
- {
- [nsContext clearDrawable];
- }
- [pBuffer release];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ if (nsContext != NULL) {
+ [nsContext clearDrawable];
+ }
+ [pBuffer release];
+ [pool release];
- return true;
+ return true;
}
void setContextPBuffer(void* context, void* buffer) {
NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
NSOpenGLPixelBuffer *pBuffer = (NSOpenGLPixelBuffer*)buffer;
- [nsContext setPixelBuffer: pBuffer cubeMapFace: 0 mipMapLevel: 0 currentVirtualScreen: [nsContext currentVirtualScreen]];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [nsContext setPixelBuffer: pBuffer
+ cubeMapFace: 0
+ mipMapLevel: 0
+ currentVirtualScreen: [nsContext currentVirtualScreen]];
+ [pool release];
}
void setContextTextureImageToPBuffer(void* context, void* buffer, int colorBuffer) {
NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
NSOpenGLPixelBuffer *pBuffer = (NSOpenGLPixelBuffer*)buffer;
- [nsContext setTextureImageToPixelBuffer: pBuffer colorBuffer: (unsigned long) colorBuffer];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [nsContext setTextureImageToPixelBuffer: pBuffer
+ colorBuffer: (unsigned long) colorBuffer];
+ [pool release];
}
#include <mach-o/dyld.h>
@@ -201,39 +204,34 @@ static char libGLStr[] = "/System/Library/Frameworks/OpenGL.framework/Libraries/
static char libGLUStr[] = "/System/Library/Frameworks/OpenGL.framework/Libraries/libGLU.dylib";
static const struct mach_header *libGLImage;
static const struct mach_header *libGLUImage;
-void* getProcAddress(const char *procname)
-{
- if (imagesInitialized == false)
- {
- imagesInitialized = true;
- unsigned long options = NSADDIMAGE_OPTION_RETURN_ON_ERROR;
- libGLImage = NSAddImage(libGLStr, options);
- libGLUImage = NSAddImage(libGLUStr, options);
- }
-
- unsigned long options = NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR;
- char underscoreName[512] = "_";
- strcat(underscoreName, procname);
-
- if (NSIsSymbolNameDefinedInImage(libGLImage, underscoreName) == YES)
- {
- NSSymbol sym = NSLookupSymbolInImage(libGLImage, underscoreName, options);
- return NSAddressOfSymbol(sym);
- }
-
- if (NSIsSymbolNameDefinedInImage(libGLUImage, underscoreName) == YES)
- {
- NSSymbol sym = NSLookupSymbolInImage(libGLUImage, underscoreName, options);
- return NSAddressOfSymbol(sym);
- }
-
- if (NSIsSymbolNameDefinedWithHint(underscoreName, "GL"))
- {
- NSSymbol sym = NSLookupAndBindSymbol(underscoreName);
- return NSAddressOfSymbol(sym);
- }
-
- return NULL;
+void* getProcAddress(const char *procname) {
+ if (imagesInitialized == false) {
+ imagesInitialized = true;
+ unsigned long options = NSADDIMAGE_OPTION_RETURN_ON_ERROR;
+ libGLImage = NSAddImage(libGLStr, options);
+ libGLUImage = NSAddImage(libGLUStr, options);
+ }
+
+ unsigned long options = NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR;
+ char underscoreName[512] = "_";
+ strcat(underscoreName, procname);
+
+ if (NSIsSymbolNameDefinedInImage(libGLImage, underscoreName) == YES) {
+ NSSymbol sym = NSLookupSymbolInImage(libGLImage, underscoreName, options);
+ return NSAddressOfSymbol(sym);
+ }
+
+ if (NSIsSymbolNameDefinedInImage(libGLUImage, underscoreName) == YES) {
+ NSSymbol sym = NSLookupSymbolInImage(libGLUImage, underscoreName, options);
+ return NSAddressOfSymbol(sym);
+ }
+
+ if (NSIsSymbolNameDefinedWithHint(underscoreName, "GL")) {
+ NSSymbol sym = NSLookupAndBindSymbol(underscoreName);
+ return NSAddressOfSymbol(sym);
+ }
+
+ return NULL;
}
void setSwapInterval(void* context, int interval) {
diff --git a/src/net/java/games/cg/CgException.java b/src/net/java/games/cg/CgException.java
index 68f281f55..341ba3dbf 100644
--- a/src/net/java/games/cg/CgException.java
+++ b/src/net/java/games/cg/CgException.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/ArrayTypes.java b/src/net/java/games/gluegen/ArrayTypes.java
index 908a3d765..1a75f7306 100644
--- a/src/net/java/games/gluegen/ArrayTypes.java
+++ b/src/net/java/games/gluegen/ArrayTypes.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/CMethodBindingEmitter.java b/src/net/java/games/gluegen/CMethodBindingEmitter.java
index 9156d68f8..0c41d3aa2 100644
--- a/src/net/java/games/gluegen/CMethodBindingEmitter.java
+++ b/src/net/java/games/gluegen/CMethodBindingEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -656,7 +656,7 @@ public class CMethodBindingEmitter extends FunctionEmitter
writer.print(" ");
emitGetStringUTFChars(writer,
"(jstring) _tmpObj",
- "(const char*)"+convName+"_copy[_copyIndex]");
+ convName+"_copy[_copyIndex]");
}
else if (isNIOBufferClass(subArrayElementJavaType))
{
@@ -838,7 +838,7 @@ public class CMethodBindingEmitter extends FunctionEmitter
}
// free the main array
- writer.print(" free(");
+ writer.print(" free((void*) ");
writer.print(convName+"_copy");
writer.println(");");
} // end of cleaning up copied data
diff --git a/src/net/java/games/gluegen/CMethodBindingImplEmitter.java b/src/net/java/games/gluegen/CMethodBindingImplEmitter.java
index 98c5c1b4a..2052bcf98 100644
--- a/src/net/java/games/gluegen/CMethodBindingImplEmitter.java
+++ b/src/net/java/games/gluegen/CMethodBindingImplEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/CodeGenUtils.java b/src/net/java/games/gluegen/CodeGenUtils.java
index d982f2390..b89994cdf 100644
--- a/src/net/java/games/gluegen/CodeGenUtils.java
+++ b/src/net/java/games/gluegen/CodeGenUtils.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/CommentEmitter.java b/src/net/java/games/gluegen/CommentEmitter.java
index 337161ce0..10256acba 100644
--- a/src/net/java/games/gluegen/CommentEmitter.java
+++ b/src/net/java/games/gluegen/CommentEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/DebugEmitter.java b/src/net/java/games/gluegen/DebugEmitter.java
index 8618e1576..c8e8b3869 100644
--- a/src/net/java/games/gluegen/DebugEmitter.java
+++ b/src/net/java/games/gluegen/DebugEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/FunctionEmitter.java b/src/net/java/games/gluegen/FunctionEmitter.java
index 9acde1211..77a79b6fc 100644
--- a/src/net/java/games/gluegen/FunctionEmitter.java
+++ b/src/net/java/games/gluegen/FunctionEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/GlueEmitter.java b/src/net/java/games/gluegen/GlueEmitter.java
index e816ffc9d..00147dfd2 100644
--- a/src/net/java/games/gluegen/GlueEmitter.java
+++ b/src/net/java/games/gluegen/GlueEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/GlueEmitterControls.java b/src/net/java/games/gluegen/GlueEmitterControls.java
index f4f48a399..15df83654 100644
--- a/src/net/java/games/gluegen/GlueEmitterControls.java
+++ b/src/net/java/games/gluegen/GlueEmitterControls.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/GlueGen.java b/src/net/java/games/gluegen/GlueGen.java
index 1197741cb..442f6405b 100644
--- a/src/net/java/games/gluegen/GlueGen.java
+++ b/src/net/java/games/gluegen/GlueGen.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/JavaConfiguration.java b/src/net/java/games/gluegen/JavaConfiguration.java
index e4bc0278b..e39a147f8 100644
--- a/src/net/java/games/gluegen/JavaConfiguration.java
+++ b/src/net/java/games/gluegen/JavaConfiguration.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/JavaEmitter.java b/src/net/java/games/gluegen/JavaEmitter.java
index cdf9b63b5..1203bd1fb 100644
--- a/src/net/java/games/gluegen/JavaEmitter.java
+++ b/src/net/java/games/gluegen/JavaEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/JavaMethodBindingEmitter.java b/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
index 59c862d67..993133d48 100644
--- a/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
+++ b/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java b/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
index d3fb88f93..1790207a8 100644
--- a/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
+++ b/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/JavaType.java b/src/net/java/games/gluegen/JavaType.java
index 03dd95a83..8917bede1 100644
--- a/src/net/java/games/gluegen/JavaType.java
+++ b/src/net/java/games/gluegen/JavaType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/MethodBinding.java b/src/net/java/games/gluegen/MethodBinding.java
index 2c0083b8f..11513ed36 100644
--- a/src/net/java/games/gluegen/MethodBinding.java
+++ b/src/net/java/games/gluegen/MethodBinding.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/ReferencedStructs.java b/src/net/java/games/gluegen/ReferencedStructs.java
index 4a7a8aadf..824346be8 100644
--- a/src/net/java/games/gluegen/ReferencedStructs.java
+++ b/src/net/java/games/gluegen/ReferencedStructs.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/StructLayout.java b/src/net/java/games/gluegen/StructLayout.java
index df612c3b5..77542b714 100644
--- a/src/net/java/games/gluegen/StructLayout.java
+++ b/src/net/java/games/gluegen/StructLayout.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/TypeInfo.java b/src/net/java/games/gluegen/TypeInfo.java
index 5df72e411..60146fa48 100644
--- a/src/net/java/games/gluegen/TypeInfo.java
+++ b/src/net/java/games/gluegen/TypeInfo.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/Define.java b/src/net/java/games/gluegen/cgram/Define.java
index 3ab7c9063..9fbd8636d 100644
--- a/src/net/java/games/gluegen/cgram/Define.java
+++ b/src/net/java/games/gluegen/cgram/Define.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/ArrayType.java b/src/net/java/games/gluegen/cgram/types/ArrayType.java
index 6394a39cb..1a73284e7 100644
--- a/src/net/java/games/gluegen/cgram/types/ArrayType.java
+++ b/src/net/java/games/gluegen/cgram/types/ArrayType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/BitType.java b/src/net/java/games/gluegen/cgram/types/BitType.java
index 48d81e933..915f847f8 100644
--- a/src/net/java/games/gluegen/cgram/types/BitType.java
+++ b/src/net/java/games/gluegen/cgram/types/BitType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/CVAttributes.java b/src/net/java/games/gluegen/cgram/types/CVAttributes.java
index e93d38cc5..481a7be00 100644
--- a/src/net/java/games/gluegen/cgram/types/CVAttributes.java
+++ b/src/net/java/games/gluegen/cgram/types/CVAttributes.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/CompoundType.java b/src/net/java/games/gluegen/cgram/types/CompoundType.java
index e57400e33..4c8c2d9ac 100644
--- a/src/net/java/games/gluegen/cgram/types/CompoundType.java
+++ b/src/net/java/games/gluegen/cgram/types/CompoundType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/CompoundTypeKind.java b/src/net/java/games/gluegen/cgram/types/CompoundTypeKind.java
index 9a1475d70..eedabfd2f 100644
--- a/src/net/java/games/gluegen/cgram/types/CompoundTypeKind.java
+++ b/src/net/java/games/gluegen/cgram/types/CompoundTypeKind.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/DoubleType.java b/src/net/java/games/gluegen/cgram/types/DoubleType.java
index 3c2869e58..3d0ca6fe1 100644
--- a/src/net/java/games/gluegen/cgram/types/DoubleType.java
+++ b/src/net/java/games/gluegen/cgram/types/DoubleType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/EnumType.java b/src/net/java/games/gluegen/cgram/types/EnumType.java
index f85f64e23..4ddd1e514 100644
--- a/src/net/java/games/gluegen/cgram/types/EnumType.java
+++ b/src/net/java/games/gluegen/cgram/types/EnumType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/Field.java b/src/net/java/games/gluegen/cgram/types/Field.java
index 1c6f6f8a0..a2ea44363 100644
--- a/src/net/java/games/gluegen/cgram/types/Field.java
+++ b/src/net/java/games/gluegen/cgram/types/Field.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/FloatType.java b/src/net/java/games/gluegen/cgram/types/FloatType.java
index 1ad28f1ba..8b81e0c3f 100644
--- a/src/net/java/games/gluegen/cgram/types/FloatType.java
+++ b/src/net/java/games/gluegen/cgram/types/FloatType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/FunctionSymbol.java b/src/net/java/games/gluegen/cgram/types/FunctionSymbol.java
index 491961c5b..ab72dfb83 100644
--- a/src/net/java/games/gluegen/cgram/types/FunctionSymbol.java
+++ b/src/net/java/games/gluegen/cgram/types/FunctionSymbol.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/FunctionType.java b/src/net/java/games/gluegen/cgram/types/FunctionType.java
index d84c49833..5d309a83f 100644
--- a/src/net/java/games/gluegen/cgram/types/FunctionType.java
+++ b/src/net/java/games/gluegen/cgram/types/FunctionType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/IntType.java b/src/net/java/games/gluegen/cgram/types/IntType.java
index 84f9b4c13..50223af11 100644
--- a/src/net/java/games/gluegen/cgram/types/IntType.java
+++ b/src/net/java/games/gluegen/cgram/types/IntType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/MachineDescription.java b/src/net/java/games/gluegen/cgram/types/MachineDescription.java
index 3db50d554..7acb919bc 100644
--- a/src/net/java/games/gluegen/cgram/types/MachineDescription.java
+++ b/src/net/java/games/gluegen/cgram/types/MachineDescription.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/MachineDescription32Bit.java b/src/net/java/games/gluegen/cgram/types/MachineDescription32Bit.java
index 337747047..fca7edce7 100644
--- a/src/net/java/games/gluegen/cgram/types/MachineDescription32Bit.java
+++ b/src/net/java/games/gluegen/cgram/types/MachineDescription32Bit.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/MachineDescription64Bit.java b/src/net/java/games/gluegen/cgram/types/MachineDescription64Bit.java
index fbfcfdfb7..4ef78639b 100644
--- a/src/net/java/games/gluegen/cgram/types/MachineDescription64Bit.java
+++ b/src/net/java/games/gluegen/cgram/types/MachineDescription64Bit.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/PointerType.java b/src/net/java/games/gluegen/cgram/types/PointerType.java
index 64acbade4..ffe369761 100644
--- a/src/net/java/games/gluegen/cgram/types/PointerType.java
+++ b/src/net/java/games/gluegen/cgram/types/PointerType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/PrimitiveType.java b/src/net/java/games/gluegen/cgram/types/PrimitiveType.java
index 7b41510df..405f1016d 100644
--- a/src/net/java/games/gluegen/cgram/types/PrimitiveType.java
+++ b/src/net/java/games/gluegen/cgram/types/PrimitiveType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/Type.java b/src/net/java/games/gluegen/cgram/types/Type.java
index 440a762e0..6c0ea9f79 100644
--- a/src/net/java/games/gluegen/cgram/types/Type.java
+++ b/src/net/java/games/gluegen/cgram/types/Type.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/TypeDictionary.java b/src/net/java/games/gluegen/cgram/types/TypeDictionary.java
index 14b313fbc..3909919aa 100644
--- a/src/net/java/games/gluegen/cgram/types/TypeDictionary.java
+++ b/src/net/java/games/gluegen/cgram/types/TypeDictionary.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/TypeVisitor.java b/src/net/java/games/gluegen/cgram/types/TypeVisitor.java
index e0bc57ed4..4679327d1 100644
--- a/src/net/java/games/gluegen/cgram/types/TypeVisitor.java
+++ b/src/net/java/games/gluegen/cgram/types/TypeVisitor.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/cgram/types/VoidType.java b/src/net/java/games/gluegen/cgram/types/VoidType.java
index 948c156c0..00130b708 100644
--- a/src/net/java/games/gluegen/cgram/types/VoidType.java
+++ b/src/net/java/games/gluegen/cgram/types/VoidType.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java b/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java
index 230add51a..eaed4a100 100644
--- a/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java
+++ b/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -302,6 +302,9 @@ public class BuildComposablePipeline
output.print( " public " + getPipelineName() + "(" + baseName + " ");
output.println(getDownstreamObjectName() + ")");
output.println(" {");
+ output.println(" if (" + getDownstreamObjectName() + " == null) {");
+ output.println(" throw new IllegalArgumentException(\"null " + getDownstreamObjectName() + "\");");
+ output.println(" }");
output.print( " this." + getDownstreamObjectName());
output.println(" = " + getDownstreamObjectName() + ";");
output.println(" }");
@@ -374,6 +377,7 @@ public class BuildComposablePipeline
output.println();
output.println(" // Loop repeatedly to allow for distributed GL implementations,");
output.println(" // as detailed in the glGetError() specification");
+ output.println(" int recursionDepth = 10;");
output.println(" do {");
output.println(" switch (err) {");
output.println(" case GL_INVALID_ENUM: buf.append(\"GL_INVALID_ENUM \"); break;");
@@ -385,7 +389,7 @@ public class BuildComposablePipeline
output.println(" case GL_NO_ERROR: throw new InternalError(\"Should not be treating GL_NO_ERROR as error\");");
output.println(" default: throw new InternalError(\"Unknown glGetError() return value: \" + err);");
output.println(" }");
- output.println( " } while ((err = " +
+ output.println(" } while ((--recursionDepth >= 0) && (err = " +
getDownstreamObjectName() +
".glGetError()) != GL_NO_ERROR);");
output.println(" throw new GLException(buf.toString());");
@@ -459,6 +463,9 @@ public class BuildComposablePipeline
output.print( " public " + getPipelineName() + "(" + getBaseInterfaceName() + " ");
output.println(getDownstreamObjectName() + ", PrintStream " + getOutputStreamName() + ")");
output.println(" {");
+ output.println(" if (" + getDownstreamObjectName() + " == null) {");
+ output.println(" throw new IllegalArgumentException(\"null " + getDownstreamObjectName() + "\");");
+ output.println(" }");
output.print( " this." + getDownstreamObjectName());
output.println(" = " + getDownstreamObjectName() + ";");
output.print( " this." + getOutputStreamName());
diff --git a/src/net/java/games/gluegen/opengl/BuildStaticGLInfo.java b/src/net/java/games/gluegen/opengl/BuildStaticGLInfo.java
index 338ae1d3f..e4a091946 100644
--- a/src/net/java/games/gluegen/opengl/BuildStaticGLInfo.java
+++ b/src/net/java/games/gluegen/opengl/BuildStaticGLInfo.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/opengl/CGLPAWrapperEmitter.java b/src/net/java/games/gluegen/opengl/CGLPAWrapperEmitter.java
index 82ba9f0f9..586641576 100644
--- a/src/net/java/games/gluegen/opengl/CGLPAWrapperEmitter.java
+++ b/src/net/java/games/gluegen/opengl/CGLPAWrapperEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/opengl/ConvertFromGL4Java.java b/src/net/java/games/gluegen/opengl/ConvertFromGL4Java.java
index c026dbd50..428aba110 100644
--- a/src/net/java/games/gluegen/opengl/ConvertFromGL4Java.java
+++ b/src/net/java/games/gluegen/opengl/ConvertFromGL4Java.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/opengl/GLEmitter.java b/src/net/java/games/gluegen/opengl/GLEmitter.java
index d30f145ab..f36d7b1ac 100644
--- a/src/net/java/games/gluegen/opengl/GLEmitter.java
+++ b/src/net/java/games/gluegen/opengl/GLEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java b/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java
index f45fcd3c7..951faf178 100644
--- a/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java
+++ b/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/pcpp/PCPP.java b/src/net/java/games/gluegen/pcpp/PCPP.java
index 585d0d9fa..0990bb155 100644
--- a/src/net/java/games/gluegen/pcpp/PCPP.java
+++ b/src/net/java/games/gluegen/pcpp/PCPP.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/runtime/BufferFactory.java b/src/net/java/games/gluegen/runtime/BufferFactory.java
index 52779cb60..3e51aad9a 100644
--- a/src/net/java/games/gluegen/runtime/BufferFactory.java
+++ b/src/net/java/games/gluegen/runtime/BufferFactory.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/runtime/ProcAddressHelper.java b/src/net/java/games/gluegen/runtime/ProcAddressHelper.java
index fec0eb366..f98ae0c2b 100644
--- a/src/net/java/games/gluegen/runtime/ProcAddressHelper.java
+++ b/src/net/java/games/gluegen/runtime/ProcAddressHelper.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/gluegen/runtime/StructAccessor.java b/src/net/java/games/gluegen/runtime/StructAccessor.java
index a5d1d1717..581eb7202 100644
--- a/src/net/java/games/gluegen/runtime/StructAccessor.java
+++ b/src/net/java/games/gluegen/runtime/StructAccessor.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/Animator.java b/src/net/java/games/jogl/Animator.java
index 4c50b9362..ebb6d9aed 100644
--- a/src/net/java/games/jogl/Animator.java
+++ b/src/net/java/games/jogl/Animator.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/ComponentEvents.java b/src/net/java/games/jogl/ComponentEvents.java
index fc3208024..e21441aeb 100644
--- a/src/net/java/games/jogl/ComponentEvents.java
+++ b/src/net/java/games/jogl/ComponentEvents.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java b/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
index 9cac4f83a..119007617 100644
--- a/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
+++ b/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/GLCanvas.java b/src/net/java/games/jogl/GLCanvas.java
index 17aed5bea..f73a006ae 100644
--- a/src/net/java/games/jogl/GLCanvas.java
+++ b/src/net/java/games/jogl/GLCanvas.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -59,6 +59,8 @@ import net.java.games.jogl.impl.*;
public final class GLCanvas extends Canvas implements GLDrawable {
+ protected static final boolean DEBUG = Debug.debug("GLCanvas");
+
private GLDrawableHelper drawableHelper = new GLDrawableHelper();
private GLContext context;
@@ -90,6 +92,9 @@ public final class GLCanvas extends Canvas implements GLDrawable {
public void addNotify() {
super.addNotify();
context.setRealized();
+ if (DEBUG) {
+ System.err.println("GLCanvas.addNotify()");
+ }
}
/** Overridden from Canvas; used to indicate that it's no longer
@@ -97,6 +102,9 @@ public final class GLCanvas extends Canvas implements GLDrawable {
public void removeNotify() {
context.destroy();
super.removeNotify();
+ if (DEBUG) {
+ System.err.println("GLCanvas.removeNotify()");
+ }
}
/** Overridden from Canvas; causes {@link GLDrawableHelper#reshape}
diff --git a/src/net/java/games/jogl/GLCapabilities.java b/src/net/java/games/jogl/GLCapabilities.java
index 794f152f6..d645a71a6 100644
--- a/src/net/java/games/jogl/GLCapabilities.java
+++ b/src/net/java/games/jogl/GLCapabilities.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/GLCapabilitiesChooser.java b/src/net/java/games/jogl/GLCapabilitiesChooser.java
index 78486f1e9..951dd52a1 100644
--- a/src/net/java/games/jogl/GLCapabilitiesChooser.java
+++ b/src/net/java/games/jogl/GLCapabilitiesChooser.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -40,7 +40,10 @@
package net.java.games.jogl;
/** Provides a mechanism by which applications can customize the
- window type selection for a given {@link GLCapabilities}. */
+ window type selection for a given {@link GLCapabilities}.
+ Developers can implement this interface and pass an instance into
+ the appropriate method of {@link GLDrawableFactory}; the chooser
+ will be called during the OpenGL context creation process. */
public interface GLCapabilitiesChooser {
/** Chooses the index (0..available.length - 1) of the {@link
@@ -50,7 +53,14 @@ public interface GLCapabilitiesChooser {
ignore these. The <em>windowSystemRecommendedChoice</em>
parameter may be provided to the chooser by the underlying
window system; if this index is valid, it is recommended, but
- not necessarily required, that the chooser select that entry. */
+ not necessarily required, that the chooser select that entry.
+
+ <P> <em>Note:</em> this method is called automatically by the
+ {@link GLDrawableFactory} when an instance of this class is
+ passed in to one of its factory methods. It should generally not
+ be invoked by users directly, unless it is desired to delegate
+ the choice to some other GLCapabilitiesChooser object.
+ */
public int chooseCapabilities(GLCapabilities desired,
GLCapabilities[] available,
int windowSystemRecommendedChoice);
diff --git a/src/net/java/games/jogl/GLContextHelper.java b/src/net/java/games/jogl/GLContextHelper.java
index d99e17d39..f4878a723 100644
--- a/src/net/java/games/jogl/GLContextHelper.java
+++ b/src/net/java/games/jogl/GLContextHelper.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/GLDrawable.java b/src/net/java/games/jogl/GLDrawable.java
index 7c671c0b2..9ca86ca79 100644
--- a/src/net/java/games/jogl/GLDrawable.java
+++ b/src/net/java/games/jogl/GLDrawable.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -94,10 +94,22 @@ public interface GLDrawable extends ComponentEvents {
Dimension is null a new one will be allocated and returned. */
public Dimension getSize(Dimension d);
- /** Returns the {@link GL} pipeline object this GLDrawable uses. */
+ /** Returns the {@link GL} pipeline object this GLDrawable uses. If
+ this method is called outside of the {@link GLEventListener}'s
+ callback methods (init, display, etc.) it may return null. Users
+ should not rely on the identity of the returned GL object; for
+ example, users should not maintain a hash table with the GL
+ object as the key. Additionally, the GL object should not be
+ cached in client code, but should be re-fetched from the
+ GLDrawable at the beginning of each call to init, display,
+ etc. */
public GL getGL();
- /** Sets the {@link GL} pipeline object this GLDrawable uses. */
+ /** Sets the {@link GL} pipeline object this GLDrawable uses. This
+ should only be called from within the GLEventListener's callback
+ methods, and usually only from within the init() method, in
+ order to install a composable pipeline. See the JOGL demos for
+ examples. */
public void setGL(GL gl);
/** Returns the {@link GLU} pipeline object this GLDrawable uses. */
diff --git a/src/net/java/games/jogl/GLDrawableFactory.java b/src/net/java/games/jogl/GLDrawableFactory.java
index 113453d54..8204fde7d 100644
--- a/src/net/java/games/jogl/GLDrawableFactory.java
+++ b/src/net/java/games/jogl/GLDrawableFactory.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/GLEventListener.java b/src/net/java/games/jogl/GLEventListener.java
index 8a768af87..0f345e6c7 100644
--- a/src/net/java/games/jogl/GLEventListener.java
+++ b/src/net/java/games/jogl/GLEventListener.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -48,8 +48,12 @@ import java.util.EventListener;
public interface GLEventListener extends EventListener {
/** Called by the drawable immediately after the OpenGL context is
- initialized for the first time. Can be used to perform one-time
- OpenGL initialization such as setup of lights and display lists.
+ initialized. Can be used to perform one-time OpenGL
+ initialization such as setup of lights and display lists. Note
+ that this method may be called more than once if the underlying
+ OpenGL context for the GLDrawable is destroyed and recreated,
+ for example if a GLCanvas is removed from the widget hierarchy
+ and later added again.
*/
public void init(GLDrawable drawable);
@@ -63,10 +67,9 @@ public interface GLEventListener extends EventListener {
component has been resized. The client can update the viewport
and view volume of the window appropriately, for example by a
call to {@link net.java.games.jogl.GL#glViewport}; note that for
- convenience the component has already called {@link
- net.java.games.jogl.GL#glViewport}(x, y, width, height) when this method
- is called, so the client may not have to do anything in this
- method.
+ convenience the component has already called <code>glViewport(x,
+ y, width, height)</code> when this method is called, so the
+ client may not have to do anything in this method.
*/
public void reshape(GLDrawable drawable, int x, int y, int width, int height);
diff --git a/src/net/java/games/jogl/GLException.java b/src/net/java/games/jogl/GLException.java
index 6e0d5965f..e814ecbc8 100644
--- a/src/net/java/games/jogl/GLException.java
+++ b/src/net/java/games/jogl/GLException.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/GLJPanel.java b/src/net/java/games/jogl/GLJPanel.java
index 9fe7ffa6c..87c9ee9b3 100644
--- a/src/net/java/games/jogl/GLJPanel.java
+++ b/src/net/java/games/jogl/GLJPanel.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -64,20 +64,38 @@ import net.java.games.jogl.impl.*;
use hardware-accelerated rendering via pbuffers and falls back on
to software rendering if problems occur. This class can not be
instantiated directly; use {@link GLDrawableFactory} to construct
- them. */
+ them. <P>
+
+ Note that because this component attempts to use pbuffers for
+ rendering, and because pbuffers can not be resized, somewhat
+ surprising behavior may occur during resize operations; the {@link
+ GLEventListener#init} method may be called multiple times as the
+ pbuffer is resized to be able to cover the size of the GLJPanel.
+ This behavior is correct, as the textures and display lists for
+ the GLJPanel will have been lost during the resize operation. The
+ application should attempt to make its GLEventListener.init()
+ methods as side-effect-free as possible.
+*/
public final class GLJPanel extends JPanel implements GLDrawable {
+ protected static final boolean DEBUG = Debug.debug("GLJPanel");
+
private GLDrawableHelper drawableHelper = new GLDrawableHelper();
+ private volatile boolean isInitialized;
// Data used for either pbuffers or pixmap-based offscreen surfaces
private GLCapabilities offscreenCaps;
private GLCapabilitiesChooser chooser;
private GLDrawable shareWith;
+ // This image is exactly the correct size to render into the panel
private BufferedImage offscreenImage;
- private int neededOffscreenImageWidth;
- private int neededOffscreenImageHeight;
- private DataBufferByte dbByte;
- private DataBufferInt dbInt;
+ // One of these is used to store the read back pixels before storing
+ // in the BufferedImage
+ private byte[] readBackBytes;
+ private int[] readBackInts;
+ private int readBackWidthInPixels;
+ private int readBackHeightInPixels;
+ // Width of the actual GLJPanel
private int panelWidth = 0;
private int panelHeight = 0;
private Updater updater;
@@ -114,11 +132,13 @@ public final class GLJPanel extends JPanel implements GLDrawable {
offscreenCaps.setDoubleBuffered(false);
this.chooser = chooser;
this.shareWith = shareWith;
-
- initialize();
}
public void display() {
+ if (!isInitialized) {
+ return;
+ }
+
if (EventQueue.isDispatchThread()) {
// Want display() to be synchronous, so call paintImmediately()
paintImmediately(0, 0, getWidth(), getHeight());
@@ -137,6 +157,10 @@ public final class GLJPanel extends JPanel implements GLDrawable {
GLEventListener#display}. Should not be invoked by applications
directly. */
public void paintComponent(Graphics g) {
+ if (!isInitialized) {
+ return;
+ }
+
updater.setGraphics(g);
if (!hardwareAccelerationDisabled) {
if (!pbufferInitializationCompleted) {
@@ -144,6 +168,9 @@ public final class GLJPanel extends JPanel implements GLDrawable {
heavyweight.display();
pbuffer.display();
} catch (GLException e) {
+ if (DEBUG) {
+ e.printStackTrace();
+ }
// We consider any exception thrown during updating of the
// heavyweight or pbuffer during the initialization phases
// to be an indication that there was a problem
@@ -161,6 +188,37 @@ public final class GLJPanel extends JPanel implements GLDrawable {
}
}
+ public void addNotify() {
+ super.addNotify();
+ initialize();
+ if (DEBUG) {
+ System.err.println("GLJPanel.addNotify()");
+ }
+ }
+
+ /** Overridden from JPanel; used to indicate that it's no longer
+ safe to have an OpenGL context for the component. */
+ public void removeNotify() {
+ if (DEBUG) {
+ System.err.println("GLJPanel.removeNotify()");
+ }
+ if (!hardwareAccelerationDisabled) {
+ if (pbuffer != null) {
+ pbuffer.destroy();
+ }
+ if (toplevel != null) {
+ toplevel.dispose();
+ }
+ pbuffer = null;
+ heavyweight = null;
+ toplevel = null;
+ } else {
+ offscreenContext.destroy();
+ }
+ isInitialized = false;
+ super.removeNotify();
+ }
+
/** Overridden from Canvas; causes {@link GLDrawableHelper#reshape}
to be called on all registered {@link GLEventListener}s. Called
automatically by the AWT; should not be invoked by applications
@@ -168,6 +226,10 @@ public final class GLJPanel extends JPanel implements GLDrawable {
public void reshape(int x, int y, int width, int height) {
super.reshape(x, y, width, height);
+ if (!isInitialized) {
+ return;
+ }
+
// Move all reshape requests onto AWT EventQueue thread
final int fx = x;
final int fy = y;
@@ -177,18 +239,31 @@ public final class GLJPanel extends JPanel implements GLDrawable {
Runnable r = new Runnable() {
public void run() {
GLContext context = null;
- neededOffscreenImageWidth = 0;
- neededOffscreenImageHeight = 0;
+ readBackWidthInPixels = 0;
+ readBackHeightInPixels = 0;
if (!hardwareAccelerationDisabled) {
- if (fwidth > pbufferWidth || fheight > pbufferHeight) {
+ // Use factor larger than 2 during shrinks for some hysteresis
+ float shrinkFactor = 2.5f;
+ if ((fwidth > pbufferWidth ) || (fheight > pbufferHeight) ||
+ (fwidth < (pbufferWidth / shrinkFactor)) || (fheight < (pbufferWidth / shrinkFactor))) {
+ if (DEBUG) {
+ System.err.println("Resizing pbuffer from (" + pbufferWidth + ", " + pbufferHeight + ") " +
+ " to fit (" + fwidth + ", " + fheight + ")");
+ }
// Must destroy and recreate pbuffer to fit
- pbuffer.destroy();
- if (fwidth > pbufferWidth) {
- pbufferWidth = getNextPowerOf2(fwidth);
+ if (pbuffer != null) {
+ pbuffer.destroy();
}
- if (fheight > pbufferHeight) {
- pbufferHeight = getNextPowerOf2(fheight);
+ if (toplevel != null) {
+ toplevel.dispose();
+ }
+ pbuffer = null;
+ isInitialized = false;
+ pbufferWidth = getNextPowerOf2(fwidth);
+ pbufferHeight = getNextPowerOf2(fheight);
+ if (DEBUG) {
+ System.err.println("New pbuffer size is (" + pbufferWidth + ", " + pbufferHeight + ")");
}
initialize();
}
@@ -201,18 +276,16 @@ public final class GLJPanel extends JPanel implements GLDrawable {
// bottleneck. Should probably make the size of the offscreen
// image be the exact size of the pbuffer to save some work on
// resize operations...
- neededOffscreenImageWidth = pbufferWidth;
- neededOffscreenImageHeight = fheight;
+ readBackWidthInPixels = pbufferWidth;
+ readBackHeightInPixels = fheight;
} else {
offscreenContext.resizeOffscreenContext(fwidth, fheight);
context = offscreenContext;
- neededOffscreenImageWidth = fwidth;
- neededOffscreenImageHeight = fheight;
+ readBackWidthInPixels = fwidth;
+ readBackHeightInPixels = fheight;
}
- if (offscreenImage != null &&
- (offscreenImage.getWidth() != neededOffscreenImageWidth ||
- offscreenImage.getHeight() != neededOffscreenImageHeight)) {
+ if (offscreenImage != null) {
offscreenImage.flush();
offscreenImage = null;
}
@@ -237,6 +310,16 @@ public final class GLJPanel extends JPanel implements GLDrawable {
}
}
+ public void setOpaque(boolean opaque) {
+ if (opaque != isOpaque()) {
+ if (offscreenImage != null) {
+ offscreenImage.flush();
+ offscreenImage = null;
+ }
+ }
+ super.setOpaque(opaque);
+ }
+
public void addGLEventListener(GLEventListener listener) {
drawableHelper.addGLEventListener(listener);
}
@@ -247,17 +330,27 @@ public final class GLJPanel extends JPanel implements GLDrawable {
public GL getGL() {
if (!hardwareAccelerationDisabled) {
+ if (pbuffer == null) {
+ return null;
+ }
return pbuffer.getGL();
} else {
+ if (offscreenContext == null) {
+ return null;
+ }
return offscreenContext.getGL();
}
}
public void setGL(GL gl) {
if (!hardwareAccelerationDisabled) {
- pbuffer.setGL(gl);
+ if (pbuffer != null) {
+ pbuffer.setGL(gl);
+ }
} else {
- offscreenContext.setGL(gl);
+ if (offscreenContext != null) {
+ offscreenContext.setGL(gl);
+ }
}
}
@@ -382,17 +475,21 @@ public final class GLJPanel extends JPanel implements GLDrawable {
pbufferInitializationCompleted = false;
if (firstTime) {
toplevel.add(heavyweight);
- toplevel.setSize(0, 0);
+ toplevel.setSize(1, 1);
}
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
toplevel.setVisible(true);
} catch (GLException e) {
+ if (DEBUG) {
+ e.printStackTrace();
+ }
disableHardwareRendering();
}
}
});
+ isInitialized = true;
return;
} else {
// If the heavyweight reports that it can't create an
@@ -415,6 +512,8 @@ public final class GLJPanel extends JPanel implements GLDrawable {
}
}, true, initAction);
}
+
+ isInitialized = true;
}
class Updater implements GLEventListener {
@@ -426,10 +525,16 @@ public final class GLJPanel extends JPanel implements GLDrawable {
public void init(GLDrawable drawable) {
if (!hardwareAccelerationDisabled) {
+ if (DEBUG) {
+ System.err.println("GLJPanel$Updater.init(): pbufferInitializationCompleted = true");
+ }
pbufferInitializationCompleted = true;
EventQueue.invokeLater(new Runnable() {
public void run() {
- toplevel.setVisible(false);
+ // Race conditions might dispose of this before now
+ if (toplevel != null) {
+ toplevel.setVisible(false);
+ }
}
});
}
@@ -451,25 +556,27 @@ public final class GLJPanel extends JPanel implements GLDrawable {
int awtFormat = 0;
int hwGLFormat = 0;
if (!hardwareAccelerationDisabled) {
- // Should be more flexible in these BufferedImage formats;
- // perhaps see what the preferred image types are on the
- // given platform
- awtFormat = BufferedImage.TYPE_INT_RGB;
-
// This seems to be a good choice on all platforms
hwGLFormat = GL.GL_UNSIGNED_INT_8_8_8_8_REV;
+ }
+
+ // Should be more flexible in these BufferedImage formats;
+ // perhaps see what the preferred image types are on the
+ // given platform
+ if (isOpaque()) {
+ awtFormat = BufferedImage.TYPE_INT_RGB;
} else {
- awtFormat = offscreenContext.getOffscreenContextBufferedImageType();
+ awtFormat = BufferedImage.TYPE_INT_ARGB;
}
- offscreenImage = new BufferedImage(neededOffscreenImageWidth,
- neededOffscreenImageHeight,
+ offscreenImage = new BufferedImage(panelWidth,
+ panelHeight,
awtFormat);
switch (awtFormat) {
case BufferedImage.TYPE_3BYTE_BGR:
glFormat = GL.GL_BGR;
glType = GL.GL_UNSIGNED_BYTE;
- dbByte = (DataBufferByte) offscreenImage.getRaster().getDataBuffer();
+ readBackBytes = new byte[readBackWidthInPixels * readBackHeightInPixels * 3];
break;
case BufferedImage.TYPE_INT_RGB:
@@ -478,7 +585,7 @@ public final class GLJPanel extends JPanel implements GLDrawable {
glType = (hardwareAccelerationDisabled
? offscreenContext.getOffscreenContextPixelDataType()
: hwGLFormat);
- dbInt = (DataBufferInt) offscreenImage.getRaster().getDataBuffer();
+ readBackInts = new int[readBackWidthInPixels * readBackHeightInPixels];
break;
default:
@@ -501,17 +608,17 @@ public final class GLJPanel extends JPanel implements GLDrawable {
gl.glGetIntegerv(GL.GL_PACK_ALIGNMENT, alignment, 0);
gl.glPixelStorei(GL.GL_PACK_SWAP_BYTES, GL.GL_FALSE);
- gl.glPixelStorei(GL.GL_PACK_ROW_LENGTH, offscreenImage.getWidth());
+ gl.glPixelStorei(GL.GL_PACK_ROW_LENGTH, readBackWidthInPixels);
gl.glPixelStorei(GL.GL_PACK_SKIP_ROWS, 0);
gl.glPixelStorei(GL.GL_PACK_SKIP_PIXELS, 0);
gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 1);
// Actually read the pixels.
gl.glReadBuffer(GL.GL_FRONT);
- if (dbByte != null) {
- gl.glReadPixels(0, 0, offscreenImage.getWidth(), offscreenImage.getHeight(), glFormat, glType, dbByte.getData(), 0);
- } else if (dbInt != null) {
- gl.glReadPixels(0, 0, offscreenImage.getWidth(), offscreenImage.getHeight(), glFormat, glType, dbInt.getData(), 0);
+ if (readBackBytes != null) {
+ gl.glReadPixels(0, 0, readBackWidthInPixels, readBackHeightInPixels, glFormat, glType, readBackBytes, 0);
+ } else if (readBackInts != null) {
+ gl.glReadPixels(0, 0, readBackWidthInPixels, readBackHeightInPixels, glFormat, glType, readBackInts, 0);
}
// Restore saved modes.
@@ -520,20 +627,46 @@ public final class GLJPanel extends JPanel implements GLDrawable {
gl.glPixelStorei(GL.GL_PACK_SKIP_ROWS, skiprows[0]);
gl.glPixelStorei(GL.GL_PACK_SKIP_PIXELS, skippixels[0]);
gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, alignment[0]);
-
- if (!hardwareAccelerationDisabled ||
- offscreenContext.offscreenImageNeedsVerticalFlip()) {
- // This performs reasonably well; the snippet below does not.
- // Should figure out if we need to set the image scaling
- // preference to FAST since it doesn't require subsampling
- // of pixels -- FIXME
- for (int i = 0; i < panelHeight; i++) {
- g.drawImage(offscreenImage,
- 0, i, panelWidth, i+1,
- 0, panelHeight - i - 1, panelWidth, panelHeight - i,
- GLJPanel.this);
+
+ if (readBackBytes != null || readBackInts != null) {
+ // Copy temporary data into raster of BufferedImage for faster
+ // blitting Note that we could avoid this copy in the cases
+ // where !offscreenContext.offscreenImageNeedsVerticalFlip(),
+ // but that's the software rendering path which is very slow
+ // anyway
+ Object src = null;
+ Object dest = null;
+ int srcIncr = 0;
+ int destIncr = 0;
+
+ if (readBackBytes != null) {
+ src = readBackBytes;
+ dest = ((DataBufferByte) offscreenImage.getRaster().getDataBuffer()).getData();
+ srcIncr = readBackWidthInPixels * 3;
+ destIncr = offscreenImage.getWidth() * 3;
+ } else {
+ src = readBackInts;
+ dest = ((DataBufferInt) offscreenImage.getRaster().getDataBuffer()).getData();
+ srcIncr = readBackWidthInPixels;
+ destIncr = offscreenImage.getWidth();
+ }
+
+ if (!hardwareAccelerationDisabled ||
+ offscreenContext.offscreenImageNeedsVerticalFlip()) {
+ int srcPos = 0;
+ int destPos = (offscreenImage.getHeight() - 1) * destIncr;
+ for (; destPos >= 0; srcPos += srcIncr, destPos -= destIncr) {
+ System.arraycopy(src, srcPos, dest, destPos, destIncr);
+ }
+ } else {
+ int srcPos = 0;
+ int destEnd = destIncr * offscreenImage.getHeight();
+ for (int destPos = 0; destPos < destEnd; srcPos += srcIncr, destPos += destIncr) {
+ System.arraycopy(src, srcPos, dest, destPos, destIncr);
+ }
}
- } else {
+
+ // Draw resulting image in one shot
g.drawImage(offscreenImage, 0, 0, offscreenImage.getWidth(), offscreenImage.getHeight(), GLJPanel.this);
}
}
@@ -577,6 +710,12 @@ public final class GLJPanel extends JPanel implements GLDrawable {
private PaintImmediatelyAction paintImmediatelyAction = new PaintImmediatelyAction();
private int getNextPowerOf2(int number) {
+ // Workaround for problems where 0 width or height are transiently
+ // seen during layout
+ if (number == 0) {
+ return 2;
+ }
+
if (((number-1) & number) == 0) {
//ex: 8 -> 0b1000; 8-1=7 -> 0b0111; 0b1000&0b0111 == 0
return number;
diff --git a/src/net/java/games/jogl/GLPbuffer.java b/src/net/java/games/jogl/GLPbuffer.java
index fe2c19974..b073388f5 100644
--- a/src/net/java/games/jogl/GLPbuffer.java
+++ b/src/net/java/games/jogl/GLPbuffer.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -42,10 +42,20 @@ package net.java.games.jogl;
/** Offscreen rendering support via pbuffers. This class adds very
little functionality over the GLDrawable class; the only methods
are those which allow access to the pbuffer's contents as a
- texture map. These methods are currently highly experimental and
- may be removed in a future release. */
+ texture map and which enable offscreen rendering to floating-point
+ buffers. These methods are currently highly experimental and may
+ be removed in a future release. */
public interface GLPbuffer extends GLDrawable {
+ /** Indicates the GL_APPLE_float_pixels extension is being used for this pbuffer. */
+ public static final int APPLE_FLOAT = 1;
+
+ /** Indicates the GL_ATI_texture_float extension is being used for this pbuffer. */
+ public static final int ATI_FLOAT = 2;
+
+ /** Indicates the GL_NV_float_buffer extension is being used for this pbuffer. */
+ public static final int NV_FLOAT = 3;
+
/** Binds this pbuffer to its internal texture target. Only valid to
call if offscreen render-to-texture has been specified in the
GLCapabilities for this GLPbuffer. If the
@@ -68,4 +78,13 @@ public interface GLPbuffer extends GLDrawable {
is not valid to call display() or any other routines on this
pbuffer after it has been destroyed. */
public void destroy();
+
+ /** Indicates which vendor's extension is being used to support
+ floating point channels in this pbuffer if that capability was
+ requested in the GLCapabilities during pbuffer creation. Returns
+ one of NV_FLOAT, ATI_FLOAT or APPLE_FLOAT, or throws GLException
+ if floating-point channels were not requested for this pbuffer.
+ This function may only be called once the init method for this
+ pbuffer's GLEventListener has been called. */
+ public int getFloatingPointMode();
}
diff --git a/src/net/java/games/jogl/Version.java b/src/net/java/games/jogl/Version.java
index 0d64614e2..7d28f7fc8 100644
--- a/src/net/java/games/jogl/Version.java
+++ b/src/net/java/games/jogl/Version.java
@@ -89,11 +89,11 @@ public final class Version {
/**
* Version string of this build.
*/
- private static final String version = "1.1.0-b11";
+ private static final String version = "1.1.1";
/**
- * Returns the verison string and build number of
- * this implementation. See the class descritpion
+ * Returns the version string and build number of
+ * this implementation. See the class description
* for the version string format.
*
* @return The version string of this implementation.
diff --git a/src/net/java/games/jogl/impl/Debug.java b/src/net/java/games/jogl/impl/Debug.java
index 0082899ac..164c5afbd 100755
--- a/src/net/java/games/jogl/impl/Debug.java
+++ b/src/net/java/games/jogl/impl/Debug.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
index a4b67b5e8..be5e26067 100644
--- a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
+++ b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -179,7 +179,7 @@ public final class FunctionAvailabilityCache {
catch (IllegalArgumentException e)
{
// funcCoreVersionString is not an OpenGL version identifier (i.e., not
- // of the form GL_VERSION_XXX).
+ // of the form GL_VERSION_XXX or X.Y).
//
// Since the association string returned from
// StaticGLInfo.getFunctionAssociation() was not null, this function
@@ -206,15 +206,19 @@ public final class FunctionAvailabilityCache {
// belongs.
if (actualVersion.compareTo(versionToCheck) <= 0)
{
- System.err.println(
- glFunctionName + " is in core OpenGL " + glVersionString +
- " because it is in OpenGL " + funcCoreVersionString);
+ if (DEBUG) {
+ System.err.println(
+ glFunctionName + " is in core OpenGL " + glVersionString +
+ " because it is in OpenGL " + funcCoreVersionString);
+ }
return true;
}
- System.err.println(
- glFunctionName + " is NOT a part of the OpenGL " + glVersionString + " core" +
- "; it is part of OpenGL " + funcCoreVersionString);
+ if (DEBUG) {
+ System.err.println(
+ glFunctionName + " is NOT a part of the OpenGL " + glVersionString + " core" +
+ "; it is part of OpenGL " + funcCoreVersionString);
+ }
return false;
}
@@ -256,33 +260,35 @@ public final class FunctionAvailabilityCache {
/**
* @param versionString must be of the form "GL_VERSION_X" or
- * "GL_VERSION_X_Y" or "GL_VERSION_X_Y_Z", where X, Y, and Z are integers.
+ * "GL_VERSION_X_Y" or "GL_VERSION_X_Y_Z" or "X.Y", where X, Y,
+ * and Z are integers.
*
* @exception IllegalArgumentException if the argument is not a valid
* OpenGL version identifier
*/
public Version(String versionString)
{
- if (! versionString.startsWith("GL_VERSION_"))
+ try
{
- // not a version string
- throw new IllegalArgumentException(
- "Illegal version identifier \"" + versionString +
- "\"; does not start with \"GL_VERSION_\"");
- }
-
- try
- {
- StringTokenizer tok = new StringTokenizer(versionString, "_");
+ if (versionString.startsWith("GL_VERSION_"))
+ {
+ StringTokenizer tok = new StringTokenizer(versionString, "_");
- tok.nextToken(); // GL_
- tok.nextToken(); // VERSION_
- if (!tok.hasMoreTokens()) { major = 0; return; }
- major = Integer.valueOf(tok.nextToken()).intValue();
- if (!tok.hasMoreTokens()) { minor = 0; return; }
- minor = Integer.valueOf(tok.nextToken()).intValue();
- if (!tok.hasMoreTokens()) { sub = 0; return; }
- sub = Integer.valueOf(tok.nextToken()).intValue();
+ tok.nextToken(); // GL_
+ tok.nextToken(); // VERSION_
+ if (!tok.hasMoreTokens()) { major = 0; return; }
+ major = Integer.valueOf(tok.nextToken()).intValue();
+ if (!tok.hasMoreTokens()) { minor = 0; return; }
+ minor = Integer.valueOf(tok.nextToken()).intValue();
+ if (!tok.hasMoreTokens()) { sub = 0; return; }
+ sub = Integer.valueOf(tok.nextToken()).intValue();
+ }
+ else
+ {
+ StringTokenizer tok = new StringTokenizer(versionString, ". ");
+ major = Integer.valueOf(tok.nextToken()).intValue();
+ minor = Integer.valueOf(tok.nextToken()).intValue();
+ }
}
catch (Exception e)
{
diff --git a/src/net/java/games/jogl/impl/GLContext.java b/src/net/java/games/jogl/impl/GLContext.java
index 318ff24a2..41fa98c4b 100644
--- a/src/net/java/games/jogl/impl/GLContext.java
+++ b/src/net/java/games/jogl/impl/GLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -45,6 +45,8 @@ import net.java.games.gluegen.runtime.*;
public abstract class GLContext {
protected static final boolean DEBUG = Debug.debug("GLContext");
+ protected static final boolean VERBOSE = Debug.verbose();
+ protected static final boolean NO_FREE = Debug.isPropertyDefined("jogl.GLContext.nofree");
static {
NativeLibLoader.load();
@@ -237,8 +239,8 @@ public abstract class GLContext {
if (mustDoMakeCurrent) {
if (curContext != null) {
- if (DEBUG) {
- System.err.println("Freeing context " + curContext + " due to recursive makeCurrent");
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": Freeing context " + curContext + " due to recursive makeCurrent");
}
curContext.free();
}
@@ -262,8 +264,8 @@ public abstract class GLContext {
}
return;
}
- if (DEBUG) {
- System.err.println("Making context " + this + " current");
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": Making context " + this + " current");
}
}
ctxStack.push(this, initAction);
@@ -314,8 +316,8 @@ public abstract class GLContext {
// Free the context unless the setRenderingThread optimization
// kicks in.
if (mustDoMakeCurrent && !mustSkipFreeForRenderingThread) {
- if (DEBUG) {
- System.err.println("Freeing context " + this);
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": Freeing context " + this);
}
try {
@@ -325,8 +327,8 @@ public abstract class GLContext {
}
if (curContext != null) {
- if (DEBUG) {
- System.err.println("Making context " + curContext + " current again");
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": Making context " + curContext + " current again");
}
try {
curContext.makeCurrent(curInitAction);
@@ -472,6 +474,13 @@ public abstract class GLContext {
pendingOffscreenHeight = newHeight;
}
+ /** Indicates which floating-point pbuffer implementation is in
+ use. Returns one of GLPbuffer.APPLE_FLOAT, GLPbuffer.ATI_FLOAT,
+ or GLPbuffer.NV_FLOAT. */
+ public int getFloatingPointMode() throws GLException {
+ throw new GLException("Not supported on non-pbuffer contexts");
+ }
+
/** Returns a non-null (but possibly empty) string containing the
space-separated list of available platform-dependent (e.g., WGL,
GLX) extensions. Can only be called while this context is
@@ -484,10 +493,16 @@ public abstract class GLContext {
* the definition of "available".
*/
protected void resetGLFunctionAvailability() {
+ // In order to be able to allow the user to uniformly install the
+ // debug and trace pipelines in their GLEventListener.init()
+ // method (for both GLCanvas and GLJPanel), we need to reset the
+ // actual GL object in the GLDrawable as well
+ setGL(createGL());
+
functionAvailability.flush();
if (!haveResetGLUProcAddressTable) {
if (DEBUG) {
- System.err.println("!!! Initializing GLU extension address table");
+ System.err.println(getThreadName() + ": !!! Initializing GLU extension address table");
}
resetProcAddressTable(gluProcAddressTable);
haveResetGLUProcAddressTable = true; // Only need to do this once globally
@@ -578,10 +593,6 @@ public abstract class GLContext {
requests. */
protected abstract boolean isOffscreen();
- /** Only called for offscreen contexts; returns the type of
- BufferedImage required for reading this context's pixels. */
- public abstract int getOffscreenContextBufferedImageType();
-
/** Only called for offscreen contexts; returns the buffer from
which to read pixels (GL.GL_FRONT or GL.GL_BACK). */
public abstract int getOffscreenContextReadBuffer();
@@ -633,7 +644,7 @@ public abstract class GLContext {
protected synchronized void setRealized(boolean realized) {
this.realized = realized;
if (DEBUG) {
- System.err.println("GLContext.setRealized(" + realized + ") for context " + this);
+ System.err.println(getThreadName() + ": GLContext.setRealized(" + realized + ") for context " + this);
}
}
@@ -649,6 +660,9 @@ public abstract class GLContext {
public synchronized void destroy() throws GLException {
if (getRenderingThread() != null &&
Thread.currentThread() != getRenderingThread()) {
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": Deferred destroy for context " + this);
+ }
deferredDestroy = true;
return;
}
@@ -743,4 +757,8 @@ public abstract class GLContext {
}
}
}
+
+ protected static String getThreadName() {
+ return Thread.currentThread().getName();
+ }
}
diff --git a/src/net/java/games/jogl/impl/GLContextFactory.java b/src/net/java/games/jogl/impl/GLContextFactory.java
index 4aa23c397..40a90f883 100644
--- a/src/net/java/games/jogl/impl/GLContextFactory.java
+++ b/src/net/java/games/jogl/impl/GLContextFactory.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/GLContextInitActionPair.java b/src/net/java/games/jogl/impl/GLContextInitActionPair.java
index ed2e78ac8..379dda3ee 100755
--- a/src/net/java/games/jogl/impl/GLContextInitActionPair.java
+++ b/src/net/java/games/jogl/impl/GLContextInitActionPair.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/GLContextShareSet.java b/src/net/java/games/jogl/impl/GLContextShareSet.java
index 73ee86499..60c6b7d59 100644
--- a/src/net/java/games/jogl/impl/GLContextShareSet.java
+++ b/src/net/java/games/jogl/impl/GLContextShareSet.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/GLContextStack.java b/src/net/java/games/jogl/impl/GLContextStack.java
index dd80b0804..089d53525 100755
--- a/src/net/java/games/jogl/impl/GLContextStack.java
+++ b/src/net/java/games/jogl/impl/GLContextStack.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/GLDrawableHelper.java b/src/net/java/games/jogl/impl/GLDrawableHelper.java
index 775fffdd6..dd5d7c17f 100644
--- a/src/net/java/games/jogl/impl/GLDrawableHelper.java
+++ b/src/net/java/games/jogl/impl/GLDrawableHelper.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/GLPbufferImpl.java b/src/net/java/games/jogl/impl/GLPbufferImpl.java
index be0f23398..7b17c3010 100644
--- a/src/net/java/games/jogl/impl/GLPbufferImpl.java
+++ b/src/net/java/games/jogl/impl/GLPbufferImpl.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -56,6 +56,7 @@ public class GLPbufferImpl implements GLPbuffer {
private GLContext context;
private GLDrawableHelper drawableHelper = new GLDrawableHelper();
private boolean isInitialized=false;
+ private int floatMode;
public GLPbufferImpl(GLContext context) {
this.context = context;
@@ -207,6 +208,13 @@ public class GLPbufferImpl implements GLPbuffer {
context.destroy();
}
+ public int getFloatingPointMode() {
+ if (floatMode == 0) {
+ throw new GLException("Pbuffer not initialized, or floating-point support not requested");
+ }
+ return floatMode;
+ }
+
//----------------------------------------------------------------------
// Internals only below this point
//
@@ -237,8 +245,9 @@ public class GLPbufferImpl implements GLPbuffer {
class InitAction implements Runnable {
public void run() {
- drawableHelper.init(GLPbufferImpl.this);
isInitialized=true;
+ floatMode = context.getFloatingPointMode();
+ drawableHelper.init(GLPbufferImpl.this);
}
}
private InitAction initAction = new InitAction();
diff --git a/src/net/java/games/jogl/impl/GLUquadricImpl.java b/src/net/java/games/jogl/impl/GLUquadricImpl.java
index cd5f3df36..dfc167dcb 100755
--- a/src/net/java/games/jogl/impl/GLUquadricImpl.java
+++ b/src/net/java/games/jogl/impl/GLUquadricImpl.java
@@ -89,7 +89,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/InternalBufferUtils.java b/src/net/java/games/jogl/impl/InternalBufferUtils.java
index 707ebbe93..7ae5efb0e 100644
--- a/src/net/java/games/jogl/impl/InternalBufferUtils.java
+++ b/src/net/java/games/jogl/impl/InternalBufferUtils.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/JAWT_PlatformInfo.java b/src/net/java/games/jogl/impl/JAWT_PlatformInfo.java
index 64da83ec4..55eb43d42 100644
--- a/src/net/java/games/jogl/impl/JAWT_PlatformInfo.java
+++ b/src/net/java/games/jogl/impl/JAWT_PlatformInfo.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/NativeLibLoader.java b/src/net/java/games/jogl/impl/NativeLibLoader.java
index 0c2420955..54d37f6ce 100644
--- a/src/net/java/games/jogl/impl/NativeLibLoader.java
+++ b/src/net/java/games/jogl/impl/NativeLibLoader.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/Project.java b/src/net/java/games/jogl/impl/Project.java
index e0bb03190..41cf9d45e 100755
--- a/src/net/java/games/jogl/impl/Project.java
+++ b/src/net/java/games/jogl/impl/Project.java
@@ -89,7 +89,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/SingleThreadedWorkaround.java b/src/net/java/games/jogl/impl/SingleThreadedWorkaround.java
index ff79b5c6e..f19c1fb67 100755
--- a/src/net/java/games/jogl/impl/SingleThreadedWorkaround.java
+++ b/src/net/java/games/jogl/impl/SingleThreadedWorkaround.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/Util.java b/src/net/java/games/jogl/impl/Util.java
index 1b2f9ed9f..712da596b 100755
--- a/src/net/java/games/jogl/impl/Util.java
+++ b/src/net/java/games/jogl/impl/Util.java
@@ -52,7 +52,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXDummyGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXDummyGLContext.java
index 9b8f02660..29a3ef63b 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXDummyGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXDummyGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -66,10 +66,6 @@ class MacOSXDummyGLContext extends MacOSXGLContext
return false;
}
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -106,7 +102,7 @@ class MacOSXDummyGLContext extends MacOSXGLContext
throw new GLException("Should not call this");
}
- protected void create() {
+ protected boolean create() {
throw new GLException("Should not call this");
}
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
index cfa5c3d99..ec58de9a6 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -93,10 +93,6 @@ public abstract class MacOSXGLContext extends GLContext
protected abstract boolean isOffscreen();
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -117,11 +113,15 @@ public abstract class MacOSXGLContext extends GLContext
throw new GLException("Should not call this");
}
+ protected boolean create() {
+ return create(false, false);
+ }
+
/**
* Creates and initializes an appropriate OpenGl nsContext. Should only be
* called by {@link makeCurrent(Runnable)}.
*/
- protected void create() {
+ protected boolean create(boolean pbuffer, boolean floatingPoint) {
MacOSXGLContext other = (MacOSXGLContext) GLContextShareSet.getShareContext(this);
long share = 0;
if (other != null) {
@@ -130,9 +130,11 @@ public abstract class MacOSXGLContext extends GLContext
throw new GLException("GLContextShareSet returned an invalid OpenGL context");
}
}
+ int[] viewNotReady = new int[1];
nsContext = CGL.createContext(share,
nsView,
capabilities.getDoubleBuffered() ? 1 : 0,
+ capabilities.getStereo() ? 1 : 0,
capabilities.getRedBits(),
capabilities.getGreenBits(),
capabilities.getBlueBits(),
@@ -144,18 +146,31 @@ public abstract class MacOSXGLContext extends GLContext
capabilities.getAccumBlueBits(),
capabilities.getAccumAlphaBits(),
capabilities.getSampleBuffers() ? 1 : 0,
- capabilities.getNumSamples());
+ capabilities.getNumSamples(),
+ (pbuffer ? 1 : 0),
+ (floatingPoint ? 1 : 0),
+ viewNotReady);
if (nsContext == 0) {
+ if (viewNotReady[0] == 1) {
+ if (DEBUG) {
+ System.err.println("!!! View not ready for " + getClass().getName());
+ }
+ // View not ready at the window system level -- this is OK
+ return false;
+ }
throw new GLException("Error creating nsContext");
}
//updater = CGL.updateContextRegister(nsContext, nsView); // gznote: not thread safe yet!
GLContextShareSet.contextCreated(this);
+ return true;
}
protected synchronized boolean makeCurrent(Runnable initAction) throws GLException {
boolean created = false;
if (nsContext == 0) {
- create();
+ if (!create()) {
+ return false;
+ }
if (DEBUG) {
System.err.println("!!! Created GL nsContext for " + getClass().getName());
}
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXGLContextFactory.java b/src/net/java/games/jogl/impl/macosx/MacOSXGLContextFactory.java
index 3e08c9b67..25f15b3f2 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXGLContextFactory.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXGLContextFactory.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
index 3ba7b108a..37b2302c0 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -59,10 +59,6 @@ public class MacOSXOffscreenGLContext extends MacOSXPbufferGLContext
return true;
}
- public int getOffscreenContextBufferedImageType() {
- return BufferedImage.TYPE_INT_ARGB;
- }
-
public int getOffscreenContextWidth() {
return initWidth;
}
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXOnscreenGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXOnscreenGLContext.java
index 401a657fe..ba4eee0ef 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXOnscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXOnscreenGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -70,10 +70,6 @@ public class MacOSXOnscreenGLContext extends MacOSXGLContext {
return false;
}
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -131,6 +127,9 @@ public class MacOSXOnscreenGLContext extends MacOSXGLContext {
(MacOSXPbufferGLContext) pbuffersToInstantiate.remove(pbuffersToInstantiate.size() - 1);
ctx.createPbuffer(nsView, nsContext);
}
+ } else {
+ // View might not have been ready
+ unlockSurface();
}
return ret;
} catch (RuntimeException e) {
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXPbufferGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXPbufferGLContext.java
index 8e65ce1f3..93bde269b 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXPbufferGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXPbufferGLContext.java
@@ -1,10 +1,27 @@
package net.java.games.jogl.impl.macosx;
+import java.security.*;
+import java.util.*;
+
import net.java.games.jogl.*;
import net.java.games.jogl.impl.*;
public class MacOSXPbufferGLContext extends MacOSXGLContext {
private static final boolean DEBUG = Debug.debug("MacOSXPbufferGLContext");
+ private static boolean isTigerOrLater;
+
+ static {
+ String osVersion =
+ (String) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return System.getProperty("os.version");
+ }
+ });
+ StringTokenizer tok = new StringTokenizer(osVersion, ". ");
+ int major = Integer.parseInt(tok.nextToken());
+ int minor = Integer.parseInt(tok.nextToken());
+ isTigerOrLater = ((major > 10) || (minor > 3));
+ }
protected int initWidth;
protected int initHeight;
@@ -64,14 +81,26 @@ public class MacOSXPbufferGLContext extends MacOSXGLContext {
height = getNextPowerOf2(initHeight);
renderTarget = GL.GL_TEXTURE_2D;
}
+
+ int internalFormat = GL.GL_RGBA;
+ if (capabilities.getOffscreenFloatingPointBuffers()) {
+ if (!gl.isExtensionAvailable("GL_APPLE_float_pixels")) {
+ throw new GLException("Floating-point support (GL_APPLE_float_pixels) not available");
+ }
+ switch (capabilities.getRedBits()) {
+ case 16: internalFormat = GL.GL_RGBA_FLOAT16_APPLE; break;
+ case 32: internalFormat = GL.GL_RGBA_FLOAT32_APPLE; break;
+ default: throw new GLException("Invalid floating-point bit depth (only 16 and 32 supported)");
+ }
+ }
- this.pBuffer = CGL.createPBuffer(renderTarget, width, height);
- if (this.pBuffer == 0) {
+ pBuffer = CGL.createPBuffer(renderTarget, internalFormat, width, height);
+ if (pBuffer == 0) {
throw new GLException("pbuffer creation error: CGL.createPBuffer() failed");
}
if (DEBUG) {
- System.err.println("Created pbuffer " + width + " x " + height);
+ System.err.println("Created pbuffer 0x" + Long.toHexString(pBuffer) + ", " + width + " x " + height + " for " + this);
}
}
@@ -79,6 +108,9 @@ public class MacOSXPbufferGLContext extends MacOSXGLContext {
created = false;
if (pBuffer == 0) {
+ if (DEBUG) {
+ System.err.println("Pbuffer not instantiated yet for " + this);
+ }
// pbuffer not instantiated yet
return false;
}
@@ -138,6 +170,10 @@ public class MacOSXPbufferGLContext extends MacOSXGLContext {
// FIXME: do we need to do anything if the pbuffer is double-buffered?
}
+ public int getFloatingPointMode() {
+ return GLPbuffer.APPLE_FLOAT;
+ }
+
private int getNextPowerOf2(int number) {
if (((number-1) & number) == 0) {
//ex: 8 -> 0b1000; 8-1=7 -> 0b0111; 0b1000&0b0111 == 0
@@ -151,10 +187,17 @@ public class MacOSXPbufferGLContext extends MacOSXGLContext {
return (1<<power);
}
- protected void create() {
- super.create();
+ protected boolean create() {
+ if (capabilities.getOffscreenFloatingPointBuffers() &&
+ !isTigerOrLater) {
+ throw new GLException("Floating-point pbuffers supported only on OS X 10.4 or later");
+ }
+ if (!super.create(true, capabilities.getOffscreenFloatingPointBuffers())) {
+ return false;
+ }
created = true;
// Must now associate the pbuffer with our newly-created context
CGL.setContextPBuffer(nsContext, pBuffer);
+ return true;
}
}
diff --git a/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java b/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java
index 6a8a0b08d..9c9c3122b 100644
--- a/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java
+++ b/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java
@@ -306,12 +306,13 @@ public class BuildMipmap {
if( baseLevel <= level && level <= maxLevel ) {
gl.glTexImage2D( target, level, internalFormat, width, height, 0, format, type, data );
}
- if( levels == 0 ) {
+ if( levels == 0 ) { /* we're done. clean up and return */
gl.glPixelStorei( GL.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() );
gl.glPixelStorei( GL.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() );
gl.glPixelStorei( GL.GL_UNPACK_SKIP_PIXELS, psm.getUnpackSkipPixels() );
gl.glPixelStorei( GL.GL_UNPACK_ROW_LENGTH, psm.getUnpackRowLength() );
gl.glPixelStorei( GL.GL_UNPACK_SWAP_BYTES, (psm.getUnpackSwapBytes() ? 1 : 0) );
+ return( 0 );
}
int nextWidth = newwidth / 2;
int nextHeight = newheight / 2;
@@ -1055,7 +1056,7 @@ public class BuildMipmap {
gl.glTexImage3D( target, level, internalFormat, width, height, depth,
0, format, type, usersImage );
}
- if( levels == 0 ) {
+ if( levels == 0 ) { /* we're done. clean up and return */
gl.glPixelStorei( GL.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() );
gl.glPixelStorei( GL.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() );
gl.glPixelStorei( GL.GL_UNPACK_SKIP_PIXELS, psm.getUnpackSkipPixels() );
diff --git a/src/net/java/games/jogl/impl/mipmap/Mipmap.java b/src/net/java/games/jogl/impl/mipmap/Mipmap.java
index 63cf760e2..052d39fa2 100644
--- a/src/net/java/games/jogl/impl/mipmap/Mipmap.java
+++ b/src/net/java/games/jogl/impl/mipmap/Mipmap.java
@@ -36,6 +36,7 @@ package net.java.games.jogl.impl.mipmap;
import net.java.games.jogl.GL;
import net.java.games.jogl.GLU;
+import net.java.games.jogl.GLException;
import java.nio.*;
/**
@@ -244,52 +245,60 @@ public class Mipmap {
int[] proxyWidth = new int[1];
boolean noProxyTextures = false;
- do {
- // compute level 1 width & height, clamping each at 1
- int widthAtLevelOne = ( ( width > 1 ) ? (widthPowerOf2 >> 1) : widthPowerOf2 );
- int heightAtLevelOne = ( ( height > 1 ) ? (heightPowerOf2 >> 1) : heightPowerOf2 );
- int proxyTarget;
+ // Some drivers (in particular, ATI's) seem to set a GL error
+ // when proxy textures are used even though this is in violation
+ // of the spec. Guard against this and interactions with the
+ // DebugGL by watching for GLException.
+ try {
+ do {
+ // compute level 1 width & height, clamping each at 1
+ int widthAtLevelOne = ( ( width > 1 ) ? (widthPowerOf2 >> 1) : widthPowerOf2 );
+ int heightAtLevelOne = ( ( height > 1 ) ? (heightPowerOf2 >> 1) : heightPowerOf2 );
+ int proxyTarget;
- assert( widthAtLevelOne > 0 );
- assert( heightAtLevelOne > 0 );
+ assert( widthAtLevelOne > 0 );
+ assert( heightAtLevelOne > 0 );
- // does width x height at level 1 & all their mipmaps fit?
- if( target == GL.GL_TEXTURE_2D || target == GL.GL_PROXY_TEXTURE_2D ) {
- proxyTarget = GL.GL_PROXY_TEXTURE_2D;
- gl.glTexImage2D( proxyTarget, 1, internalFormat, widthAtLevelOne,
- heightAtLevelOne, 0, format, type, (double[])null, 0);
- } else if( (target == GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB) ||
- (target == GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB) ||
- (target == GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB) ||
- (target == GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB) ||
- (target == GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB) ||
- (target == GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) ) {
- proxyTarget = GL.GL_PROXY_TEXTURE_CUBE_MAP_ARB;
- gl.glTexImage2D( proxyTarget, 1, internalFormat, widthAtLevelOne,
- heightAtLevelOne, 0, format, type, (double[])null , 0);
- } else {
- assert( target == GL.GL_TEXTURE_1D || target == GL.GL_PROXY_TEXTURE_1D );
- proxyTarget = GL.GL_PROXY_TEXTURE_1D;
- gl.glTexImage1D( proxyTarget, 1, internalFormat, widthAtLevelOne,
- 0, format, type, (double[])null, 0);
- }
- gl.glGetTexLevelParameteriv( proxyTarget, 1, GL.GL_TEXTURE_WIDTH, proxyWidth, 0 );
- // does it fit?
- if( proxyWidth[0] == 0 ) { // nope, so try again with theses sizes
- if( widthPowerOf2 == 1 && heightPowerOf2 == 1 ) {
- /* A 1x1 texture couldn't fit for some reason so break out. This
- * should never happen. But things happen. The disadvantage with
- * this if-statement is that we will never be aware of when this
- * happens since it will silently branch out.
- */
- noProxyTextures = true;
- break;
+ // does width x height at level 1 & all their mipmaps fit?
+ if( target == GL.GL_TEXTURE_2D || target == GL.GL_PROXY_TEXTURE_2D ) {
+ proxyTarget = GL.GL_PROXY_TEXTURE_2D;
+ gl.glTexImage2D( proxyTarget, 1, internalFormat, widthAtLevelOne,
+ heightAtLevelOne, 0, format, type, (double[])null, 0 );
+ } else if( (target == GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB) ||
+ (target == GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB) ||
+ (target == GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB) ||
+ (target == GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB) ||
+ (target == GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB) ||
+ (target == GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) ) {
+ proxyTarget = GL.GL_PROXY_TEXTURE_CUBE_MAP_ARB;
+ gl.glTexImage2D( proxyTarget, 1, internalFormat, widthAtLevelOne,
+ heightAtLevelOne, 0, format, type, (double[])null, 0 );
+ } else {
+ assert( target == GL.GL_TEXTURE_1D || target == GL.GL_PROXY_TEXTURE_1D );
+ proxyTarget = GL.GL_PROXY_TEXTURE_1D;
+ gl.glTexImage1D( proxyTarget, 1, internalFormat, widthAtLevelOne,
+ 0, format, type, (double[])null, 0 );
}
- widthPowerOf2 = widthAtLevelOne;
- heightPowerOf2 = heightAtLevelOne;
- }
- // else it doese fit
- } while( proxyWidth[0] == 0 );
+ gl.glGetTexLevelParameteriv( proxyTarget, 1, GL.GL_TEXTURE_WIDTH, proxyWidth, 0 );
+ // does it fit?
+ if( proxyWidth[0] == 0 ) { // nope, so try again with theses sizes
+ if( widthPowerOf2 == 1 && heightPowerOf2 == 1 ) {
+ /* A 1x1 texture couldn't fit for some reason so break out. This
+ * should never happen. But things happen. The disadvantage with
+ * this if-statement is that we will never be aware of when this
+ * happens since it will silently branch out.
+ */
+ noProxyTextures = true;
+ break;
+ }
+ widthPowerOf2 = widthAtLevelOne;
+ heightPowerOf2 = heightAtLevelOne;
+ }
+ // else it does fit
+ } while( proxyWidth[0] == 0 );
+ } catch (GLException e) {
+ noProxyTextures = true;
+ }
// loop must terminate
// return the width & height at level 0 that fits
if( !noProxyTextures ) {
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
index 37a3f5359..e838c68aa 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -106,8 +106,6 @@ public abstract class WindowsGLContext extends GLContext {
protected abstract boolean isOffscreen();
- public abstract int getOffscreenContextBufferedImageType();
-
public int getOffscreenContextWidth() {
throw new GLException("Should not call this");
}
@@ -135,17 +133,29 @@ public abstract class WindowsGLContext extends GLContext {
if (hglrc == 0) {
create();
if (DEBUG) {
- System.err.println("!!! Created GL context for " + getClass().getName());
+ System.err.println(getThreadName() + ": !!! Created GL context for " + getClass().getName());
}
created = true;
}
- if (!WGL.wglMakeCurrent(hdc, hglrc)) {
- throw new GLException("Error making context current: " + WGL.GetLastError());
- } else {
- if (DEBUG) {
- System.err.println("wglMakeCurrent(hdc " + hdcToString(hdc) +
- ", hglrc " + hdcToString(hglrc) + ") succeeded");
+ boolean skipMakeCurrent = false;
+ if (NO_FREE) {
+ if (WGL.wglGetCurrentContext() == hglrc) {
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": skipping wglMakeCurrent because context already current");
+ }
+ skipMakeCurrent = true;
+ }
+ }
+
+ if (!skipMakeCurrent) {
+ if (!WGL.wglMakeCurrent(hdc, hglrc)) {
+ throw new GLException("Error making context current: " + WGL.GetLastError());
+ } else {
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": wglMakeCurrent(hdc " + hdcToString(hdc) +
+ ", hglrc " + hdcToString(hglrc) + ") succeeded");
+ }
}
}
@@ -174,8 +184,10 @@ public abstract class WindowsGLContext extends GLContext {
}
protected synchronized void free() throws GLException {
- if (!WGL.wglMakeCurrent(0, 0)) {
- throw new GLException("Error freeing OpenGL context: " + WGL.GetLastError());
+ if (!NO_FREE) {
+ if (!WGL.wglMakeCurrent(0, 0)) {
+ throw new GLException("Error freeing OpenGL context: " + WGL.GetLastError());
+ }
}
}
@@ -185,7 +197,7 @@ public abstract class WindowsGLContext extends GLContext {
throw new GLException("Unable to delete OpenGL context");
}
if (DEBUG) {
- System.err.println("!!! Destroyed OpenGL context " + hglrc);
+ System.err.println(getThreadName() + ": !!! Destroyed OpenGL context " + hglrc);
}
hglrc = 0;
}
@@ -215,7 +227,7 @@ public abstract class WindowsGLContext extends GLContext {
protected void resetGLFunctionAvailability() {
super.resetGLFunctionAvailability();
if (DEBUG) {
- System.err.println("!!! Initializing OpenGL extension address table");
+ System.err.println(getThreadName() + ": !!! Initializing OpenGL extension address table");
}
resetProcAddressTable(getGLProcAddressTable());
}
@@ -284,8 +296,11 @@ public abstract class WindowsGLContext extends GLContext {
GraphicsConfiguration config = component.getGraphicsConfiguration();
GraphicsDevice device = config.getDevice();
// Produce a recommended pixel format selection for the GLCapabilitiesChooser.
- // Try to use wglChoosePixelFormatARB if we have it available
- GL dummyGL = WindowsGLContextFactory.getDummyGL(device);
+ // Use wglChoosePixelFormatARB if user requested multisampling and if we have it available
+ GL dummyGL = null;
+ if (capabilities.getSampleBuffers()) {
+ dummyGL = WindowsGLContextFactory.getDummyGL(device);
+ }
int recommendedPixelFormat = -1;
boolean haveWGLChoosePixelFormatARB = false;
boolean haveWGLARBMultisample = false;
@@ -306,7 +321,7 @@ public abstract class WindowsGLContext extends GLContext {
dc = WindowsGLContextFactory.getDummyGLContext( device ).hdc;
rc = WindowsGLContextFactory.getDummyGLContext( device ).hglrc;
if( !WGL.wglMakeCurrent( dc, rc ) ) {
- System.err.println("Error Making WGLC Current: " + WGL.GetLastError() );
+ System.err.println(getThreadName() + ": Error Making WGLC Current: " + WGL.GetLastError() );
} else {
freeWGLC = true;
}
@@ -389,18 +404,18 @@ public abstract class WindowsGLContext extends GLContext {
// Remove one-basing of pixel format (added on later)
recommendedPixelFormat = pformats[0] - 1;
if (DEBUG) {
- System.err.println("Used wglChoosePixelFormatARB to recommend pixel format " + recommendedPixelFormat);
+ System.err.println(getThreadName() + ": Used wglChoosePixelFormatARB to recommend pixel format " + recommendedPixelFormat);
}
}
} else {
if (DEBUG) {
- System.err.println("wglChoosePixelFormatARB failed: " + WGL.GetLastError() );
+ System.err.println(getThreadName() + ": wglChoosePixelFormatARB failed: " + WGL.GetLastError() );
Thread.dumpStack();
}
}
if (DEBUG) {
if (recommendedPixelFormat < 0) {
- System.err.print("wglChoosePixelFormatARB didn't recommend a pixel format");
+ System.err.print(getThreadName() + ": wglChoosePixelFormatARB didn't recommend a pixel format");
if (capabilities.getSampleBuffers()) {
System.err.print(" for multisampled GLCapabilities");
}
@@ -468,7 +483,11 @@ public abstract class WindowsGLContext extends GLContext {
if (!gotAvailableCaps) {
if (DEBUG) {
- System.err.println("Using ChoosePixelFormat because no wglChoosePixelFormatARB: dummyGL = " + dummyGL);
+ if (!capabilities.getSampleBuffers()) {
+ System.err.println(getThreadName() + ": Using ChoosePixelFormat because multisampling not requested");
+ } else {
+ System.err.println(getThreadName() + ": Using ChoosePixelFormat because no wglChoosePixelFormatARB: dummyGL = " + dummyGL);
+ }
}
pfd = glCapabilities2PFD(capabilities, onscreen);
// Remove one-basing of pixel format (added on later)
@@ -495,7 +514,7 @@ public abstract class WindowsGLContext extends GLContext {
(numFormats - 1) + ")");
}
if (DEBUG) {
- System.err.println("Chosen pixel format (" + pixelFormat + "):");
+ System.err.println(getThreadName() + ": Chosen pixel format (" + pixelFormat + "):");
System.err.println(availableCaps[pixelFormat]);
}
pixelFormat += 1; // one-base the index
@@ -512,15 +531,15 @@ public abstract class WindowsGLContext extends GLContext {
if (!WGL.SetPixelFormat(hdc, pixelFormat, pfd)) {
int lastError = WGL.GetLastError();
if (DEBUG) {
- System.err.println("SetPixelFormat failed: current context = " + WGL.wglGetCurrentContext() +
+ System.err.println(getThreadName() + ": SetPixelFormat failed: current context = " + WGL.wglGetCurrentContext() +
", current DC = " + WGL.wglGetCurrentDC());
- System.err.println("GetPixelFormat(hdc " + hdcToString(hdc) + ") returns " + WGL.GetPixelFormat(hdc));
+ System.err.println(getThreadName() + ": GetPixelFormat(hdc " + hdcToString(hdc) + ") returns " + WGL.GetPixelFormat(hdc));
}
throw new GLException("Unable to set pixel format " + pixelFormat + " for device context " + hdcToString(hdc) + ": error code " + lastError);
}
hglrc = WGL.wglCreateContext(hdc);
if (DEBUG) {
- System.err.println("!!! Created OpenGL context " + hglrc + " for device context " + hdcToString(hdc) + " using pixel format " + pixelFormat);
+ System.err.println(getThreadName() + ": !!! Created OpenGL context " + hglrc + " for device context " + hdcToString(hdc) + " using pixel format " + pixelFormat);
}
if (hglrc == 0) {
throw new GLException("Unable to create OpenGL context");
@@ -543,9 +562,6 @@ public abstract class WindowsGLContext extends GLContext {
WGL.PFD_GENERIC_ACCELERATED);
if (caps.getDoubleBuffered()) {
pfdFlags |= WGL.PFD_DOUBLEBUFFER;
- if (onscreen) {
- pfdFlags |= WGL.PFD_SWAP_EXCHANGE;
- }
}
if (onscreen) {
pfdFlags |= WGL.PFD_DRAW_TO_WINDOW;
@@ -558,7 +574,17 @@ public abstract class WindowsGLContext extends GLContext {
pfd.cRedBits ((byte) caps.getRedBits());
pfd.cGreenBits((byte) caps.getGreenBits());
pfd.cBlueBits ((byte) caps.getBlueBits());
+ pfd.cAlphaBits((byte) caps.getAlphaBits());
+ int accumDepth = (caps.getAccumRedBits() +
+ caps.getAccumGreenBits() +
+ caps.getAccumBlueBits());
+ pfd.cAccumBits ((byte) accumDepth);
+ pfd.cAccumRedBits ((byte) caps.getAccumRedBits());
+ pfd.cAccumGreenBits((byte) caps.getAccumGreenBits());
+ pfd.cAccumBlueBits ((byte) caps.getAccumBlueBits());
+ pfd.cAccumAlphaBits((byte) caps.getAccumAlphaBits());
pfd.cDepthBits((byte) caps.getDepthBits());
+ pfd.cStencilBits((byte) caps.getStencilBits());
pfd.iLayerType((byte) WGL.PFD_MAIN_PLANE);
return pfd;
}
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java
index 1c976c355..dd6f8daca 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -56,6 +56,9 @@ import net.java.games.jogl.*;
import net.java.games.jogl.impl.*;
public class WindowsGLContextFactory extends GLContextFactory {
+ private static final boolean DEBUG = Debug.debug("WindowsGLContextFactory");
+ private static final boolean VERBOSE = Debug.verbose();
+
// On Windows we want to be able to use some extension routines like
// wglChoosePixelFormatARB during the creation of the user's first
// GLContext. However, this and other routines' function pointers
@@ -174,6 +177,11 @@ public class WindowsGLContextFactory extends GLContextFactory {
*/
private static void checkForDummyContext( final GraphicsDevice device ) {
if (!pendingContextSet.contains(device) && !dummyContextMap.containsKey( device ) ) {
+ if (DEBUG) {
+ System.err.println("WindowsGLContextFactory.checkForDummyContext() called on thread " +
+ Thread.currentThread().getName());
+ }
+
pendingContextSet.add(device);
GraphicsConfiguration config = device.getDefaultConfiguration();
Rectangle rect = config.getBounds();
diff --git a/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java
index 5743253a0..c70607da7 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -65,14 +65,6 @@ public class WindowsOffscreenGLContext extends WindowsGLContext {
return true;
}
- public int getOffscreenContextBufferedImageType() {
- if (capabilities.getAlphaBits() > 0) {
- return BufferedImage.TYPE_INT_ARGB;
- } else {
- return BufferedImage.TYPE_INT_RGB;
- }
- }
-
public int getOffscreenContextWidth() {
return width;
}
diff --git a/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java
index de13be0a1..0dc1818fb 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -89,10 +89,6 @@ public class WindowsOnscreenGLContext extends WindowsGLContext {
return false;
}
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -185,7 +181,7 @@ public class WindowsOnscreenGLContext extends WindowsGLContext {
}
GLContextShareSet.contextDestroyed(this);
if (DEBUG) {
- System.err.println("!!! Destroyed OpenGL context " + hglrc + " due to JAWT_LOCK_SURFACE_CHANGED");
+ System.err.println(getThreadName() + ": !!! Destroyed OpenGL context " + hglrc + " due to JAWT_LOCK_SURFACE_CHANGED");
}
hglrc = 0;
}
diff --git a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java
index f0ce74d9d..1d5d78296 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -66,6 +66,7 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
private boolean rect; // render-to-texture-rectangle?
private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV
private int texture; // actual texture object
+ private int floatMode;
public WindowsPbufferGLContext(GLCapabilities capabilities, int initialWidth, int initialHeight) {
super(null, capabilities, null, null);
@@ -145,18 +146,57 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
rtt = capabilities.getOffscreenRenderToTexture();
rect = capabilities.getOffscreenRenderToTextureRectangle();
boolean useFloat = capabilities.getOffscreenFloatingPointBuffers();
+ boolean ati = false;
// Since we are trying to create a pbuffer, the pixel format we
// request (and subsequently use) must be "p-buffer capable".
iattributes[niattribs++] = GL.WGL_DRAW_TO_PBUFFER_ARB;
iattributes[niattribs++] = GL.GL_TRUE;
- if (!rtt) {
- // Currently we don't support non-truecolor visuals in the
- // GLCapabilities, so we don't offer the option of making
- // color-index pbuffers.
- iattributes[niattribs++] = GL.WGL_PIXEL_TYPE_ARB;
- iattributes[niattribs++] = GL.WGL_TYPE_RGBA_ARB;
+ if (rtt && !rect) {
+ throw new GLException("Render-to-texture-rectangle requires render-to-texture to be specified");
+ }
+
+ if (rect) {
+ if (!gl.isExtensionAvailable("GL_NV_texture_rectangle")) {
+ throw new GLException("Render-to-texture-rectangle requires GL_NV_texture_rectangle extension");
+ }
+ }
+
+ if (useFloat) {
+ if (!gl.isExtensionAvailable("WGL_ATI_pixel_format_float") &&
+ !gl.isExtensionAvailable("WGL_NV_float_buffer")) {
+ throw new GLException("Floating-point pbuffers not supported by this hardware");
+ }
+
+ // Prefer NVidia extension over ATI
+ if (gl.isExtensionAvailable("WGL_NV_float_buffer")) {
+ ati = false;
+ floatMode = GLPbuffer.NV_FLOAT;
+ } else {
+ ati = true;
+ floatMode = GLPbuffer.ATI_FLOAT;
+ }
+ if (DEBUG) {
+ System.err.println("Using " + (ati ? "ATI" : "NVidia") + " floating-point extension");
+ }
+ }
+
+ if (useFloat && ati) {
+ if (rtt) {
+ throw new GLException("Render-to-floating-point-texture not supported on ATI hardware");
+ } else {
+ iattributes[niattribs++] = GL.WGL_PIXEL_TYPE_ARB;
+ iattributes[niattribs++] = GL.WGL_TYPE_RGBA_FLOAT_ATI;
+ }
+ } else {
+ if (!rtt) {
+ // Currently we don't support non-truecolor visuals in the
+ // GLCapabilities, so we don't offer the option of making
+ // color-index pbuffers.
+ iattributes[niattribs++] = GL.WGL_PIXEL_TYPE_ARB;
+ iattributes[niattribs++] = GL.WGL_TYPE_RGBA_ARB;
+ }
}
iattributes[niattribs++] = GL.WGL_DOUBLE_BUFFER_ARB;
@@ -195,15 +235,17 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
iattributes[niattribs++] = GL.GL_TRUE;
}
- // FIXME: using NVidia-specific extensions and enums, as well as
- // confusing render-to-texture with render-to-texture-rectangle
- if (useFloat) {
+ if (useFloat && !ati) {
iattributes[niattribs++] = GL.WGL_FLOAT_COMPONENTS_NV;
iattributes[niattribs++] = GL.GL_TRUE;
}
if (rtt) {
if (useFloat) {
+ assert(!ati);
+ if (!rect) {
+ throw new GLException("Render-to-floating-point-texture only supported on NVidia hardware with render-to-texture-rectangle");
+ }
iattributes[niattribs++] = GL.WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV;
iattributes[niattribs++] = GL.GL_TRUE;
} else {
@@ -239,7 +281,7 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
iattributes[2] = GL.WGL_BLUE_BITS_ARB;
iattributes[3] = GL.WGL_ALPHA_BITS_ARB;
iattributes[4] = GL.WGL_DEPTH_BITS_ARB;
- iattributes[5] = GL.WGL_FLOAT_COMPONENTS_NV;
+ iattributes[5] = (useFloat ? (ati ? GL.WGL_PIXEL_TYPE_ARB : GL.WGL_FLOAT_COMPONENTS_NV) : GL.WGL_RED_BITS_ARB);
iattributes[6] = GL.WGL_SAMPLE_BUFFERS_EXT;
iattributes[7] = GL.WGL_SAMPLES_EXT;
iattributes[8] = GL.WGL_DRAW_TO_PBUFFER_ARB;
@@ -257,9 +299,20 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
System.err.print(" depth: " + ivalues[4]);
System.err.print(" multisample: " + ivalues[6]);
System.err.print(" samples: " + ivalues[7]);
- if (ivalues[5] != 0) {
- System.err.print(" [float]");
+ if (useFloat) {
+ if (ati) {
+ if (ivalues[5] == GL.WGL_TYPE_RGBA_FLOAT_ATI) {
+ System.err.print(" [ati float]");
+ } else if (ivalues[5] != GL.WGL_TYPE_RGBA_ARB) {
+ System.err.print(" [unknown pixel type " + ivalues[5] + "]");
+ }
+ } else {
+ if (ivalues[5] != 0) {
+ System.err.print(" [float]");
+ }
+ }
}
+
if (ivalues[8] != 0) {
System.err.print(" [pbuffer]");
}
@@ -402,10 +455,6 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
return false;
}
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -432,7 +481,10 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
if (hglrc != 0) {
super.destroyImpl();
// Must release DC and pbuffer
- GL gl = getGL();
+ // NOTE that since the context is not current, glGetError() can
+ // not be called here, so we skip the use of any composable
+ // pipelines
+ GL gl = createGL();
if (gl.wglReleasePbufferDCARB(buffer, hdc) == 0) {
throw new GLException("Error releasing pbuffer device context: error code " + WGL.GetLastError());
}
@@ -457,6 +509,10 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
}
}
+ public int getFloatingPointMode() {
+ return floatMode;
+ }
+
private String wglGetLastError() {
int err = WGL.GetLastError();
String detail = null;
diff --git a/src/net/java/games/jogl/impl/x11/X11GLContext.java b/src/net/java/games/jogl/impl/x11/X11GLContext.java
index 22d6c5237..837b7b791 100644
--- a/src/net/java/games/jogl/impl/x11/X11GLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11GLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -47,7 +47,6 @@ import net.java.games.jogl.*;
import net.java.games.jogl.impl.*;
public abstract class X11GLContext extends GLContext {
- private static JAWT jawt;
protected long display;
protected long drawable;
protected long visualID;
@@ -111,8 +110,6 @@ public abstract class X11GLContext extends GLContext {
protected abstract boolean isOffscreen();
- public abstract int getOffscreenContextBufferedImageType();
-
public int getOffscreenContextWidth() {
throw new GLException("Should not call this");
}
@@ -310,15 +307,7 @@ public abstract class X11GLContext extends GLContext {
//
protected JAWT getJAWT() {
- if (jawt == null) {
- JAWT j = new JAWT();
- j.version(JAWTFactory.JAWT_VERSION_1_4);
- if (!JAWTFactory.JAWT_GetAWT(j)) {
- throw new RuntimeException("Unable to initialize JAWT");
- }
- jawt = j;
- }
- return jawt;
+ return X11GLContextFactory.getJAWT();
}
protected XVisualInfo chooseVisual() {
@@ -412,10 +401,10 @@ public abstract class X11GLContext extends GLContext {
// These synchronization primitives prevent the AWT from making
// requests from the X server asynchronously to this code.
protected void lockAWT() {
- getJAWT().Lock();
+ X11GLContextFactory.lockAWT();
}
protected void unlockAWT() {
- getJAWT().Unlock();
+ X11GLContextFactory.unlockAWT();
}
}
diff --git a/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java b/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java
index 6d7d6f372..3be11c002 100644
--- a/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java
+++ b/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -61,23 +61,30 @@ public class X11GLContextFactory extends GLContextFactory {
// system's selection to the chooser as a hint
int[] attribs = glCapabilities2AttribList(capabilities, isMultisampleAvailable());
- long display = getDisplayConnection();
- XVisualInfo recommendedVis = GLX.glXChooseVisual(display, screen, attribs, 0);
+ XVisualInfo[] infos = null;
+ GLCapabilities[] caps = null;
int recommendedIndex = -1;
- int[] count = new int[1];
- XVisualInfo template = new XVisualInfo();
- template.screen(screen);
- XVisualInfo[] infos = GLX.XGetVisualInfo(display, GLX.VisualScreenMask, template, count, 0);
- if (infos == null) {
- throw new GLException("Error while enumerating available XVisualInfos");
- }
- GLCapabilities[] caps = new GLCapabilities[infos.length];
- for (int i = 0; i < infos.length; i++) {
- caps[i] = xvi2GLCapabilities(display, infos[i]);
- // Attempt to find the visual chosen by glXChooseVisual
- if (recommendedVis != null && recommendedVis.visualid() == infos[i].visualid()) {
- recommendedIndex = i;
+ lockAWT();
+ try {
+ long display = getDisplayConnection();
+ XVisualInfo recommendedVis = GLX.glXChooseVisual(display, screen, attribs, 0);
+ int[] count = new int[1];
+ XVisualInfo template = new XVisualInfo();
+ template.screen(screen);
+ infos = GLX.XGetVisualInfo(display, GLX.VisualScreenMask, template, count, 0);
+ if (infos == null) {
+ throw new GLException("Error while enumerating available XVisualInfos");
+ }
+ caps = new GLCapabilities[infos.length];
+ for (int i = 0; i < infos.length; i++) {
+ caps[i] = xvi2GLCapabilities(display, infos[i]);
+ // Attempt to find the visual chosen by glXChooseVisual
+ if (recommendedVis != null && recommendedVis.visualid() == infos[i].visualid()) {
+ recommendedIndex = i;
+ }
}
+ } finally {
+ unlockAWT();
}
int chosen = chooser.chooseCapabilities(capabilities, caps, recommendedIndex);
if (chosen < 0 || chosen >= caps.length) {
@@ -205,11 +212,38 @@ public class X11GLContextFactory extends GLContextFactory {
return res;
}
+ // JAWT access
+ private static JAWT jawt;
+ public static JAWT getJAWT() {
+ if (jawt == null) {
+ JAWT j = new JAWT();
+ j.version(JAWTFactory.JAWT_VERSION_1_4);
+ if (!JAWTFactory.JAWT_GetAWT(j)) {
+ throw new RuntimeException("Unable to initialize JAWT");
+ }
+ jawt = j;
+ }
+ return jawt;
+ }
+
+ public static void lockAWT() {
+ getJAWT().Lock();
+ }
+
+ public static void unlockAWT() {
+ getJAWT().Unlock();
+ }
+
// Display connection for use by visual selection algorithm and by all offscreen surfaces
private static long staticDisplay;
public static long getDisplayConnection() {
if (staticDisplay == 0) {
- staticDisplay = GLX.XOpenDisplay(null);
+ lockAWT();
+ try {
+ staticDisplay = GLX.XOpenDisplay(null);
+ } finally {
+ unlockAWT();
+ }
if (staticDisplay == 0) {
throw new GLException("Unable to open default display, needed for visual selection and offscreen surface handling");
}
diff --git a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java
index 343a69f07..2e30e2b18 100644
--- a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -65,14 +65,6 @@ public class X11OffscreenGLContext extends X11GLContext {
return true;
}
- public int getOffscreenContextBufferedImageType() {
- if (capabilities.getAlphaBits() > 0) {
- return BufferedImage.TYPE_INT_ARGB;
- } else {
- return BufferedImage.TYPE_INT_RGB;
- }
- }
-
public int getOffscreenContextWidth() {
return width;
}
diff --git a/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java b/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java
index 241a45dc9..2fd340d79 100644
--- a/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -70,10 +70,6 @@ public class X11OnscreenGLContext extends X11GLContext {
return false;
}
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -121,7 +117,7 @@ public class X11OnscreenGLContext extends X11GLContext {
while (!pbuffersToInstantiate.isEmpty()) {
X11PbufferGLContext ctx =
(X11PbufferGLContext) pbuffersToInstantiate.remove(pbuffersToInstantiate.size() - 1);
- ctx.createPbuffer(display, context);
+ ctx.createPbuffer(display, context, getGL());
}
}
return ret;
diff --git a/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java b/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
index 5e59329ca..7733472fb 100644
--- a/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -60,10 +60,6 @@ public class X11PbufferGLContext extends X11GLContext {
private static final int MAX_PFORMATS = 256;
private static final int MAX_ATTRIBS = 256;
- // FIXME: figure out how to support render-to-texture and
- // render-to-texture-rectangle (which appear to be supported, though
- // it looks like floating-point buffers are not)
-
public X11PbufferGLContext(GLCapabilities capabilities, int initialWidth, int initialHeight) {
super(null, capabilities, null, null);
this.initWidth = initialWidth;
@@ -94,7 +90,7 @@ public class X11PbufferGLContext extends X11GLContext {
throw new GLException("Not yet implemented");
}
- public void createPbuffer(long display, long parentContext) {
+ public void createPbuffer(long display, long parentContext, GL gl) {
if (display == 0) {
throw new GLException("Null display");
}
@@ -103,10 +99,6 @@ public class X11PbufferGLContext extends X11GLContext {
throw new GLException("Null parentContext");
}
- if (capabilities.getOffscreenFloatingPointBuffers()) {
- throw new GLException("Floating-point pbuffers not supported yet on X11");
- }
-
if (capabilities.getOffscreenRenderToTexture()) {
throw new GLException("Render-to-texture pbuffers not supported yet on X11");
}
@@ -166,6 +158,14 @@ public class X11PbufferGLContext extends X11GLContext {
iattributes[niattribs++] = capabilities.getAccumBlueBits();
}
+ if (capabilities.getOffscreenFloatingPointBuffers()) {
+ if (!gl.isExtensionAvailable("GLX_NV_float_buffer")) {
+ throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware");
+ }
+ iattributes[niattribs++] = GLX.GLX_FLOAT_COMPONENTS_NV;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ }
+
// FIXME: add FSAA support? Don't want to get into a situation
// where we have to retry the glXChooseFBConfig call if it fails
// due to a lack of an antialiased visual...
@@ -286,10 +286,6 @@ public class X11PbufferGLContext extends X11GLContext {
return false;
}
- public int getOffscreenContextBufferedImageType() {
- throw new GLException("Should not call this");
- }
-
public int getOffscreenContextReadBuffer() {
throw new GLException("Should not call this");
}
@@ -332,6 +328,11 @@ public class X11PbufferGLContext extends X11GLContext {
// FIXME: do we need to do anything if the pbuffer is double-buffered?
}
+ public int getFloatingPointMode() {
+ // Floating-point pbuffers currently require NVidia hardware on X11
+ return GLPbuffer.NV_FLOAT;
+ }
+
private int queryFBConfig(long display, GLXFBConfig fbConfig, int attrib) {
int[] tmp = new int[1];
if (GLX.glXGetFBConfigAttrib(display, fbConfig, attrib, tmp, 0) != 0) {
diff --git a/src/net/java/games/jogl/impl/x11/X11SunJDKReflection.java b/src/net/java/games/jogl/impl/x11/X11SunJDKReflection.java
index a59bf7137..59208e5a9 100755
--- a/src/net/java/games/jogl/impl/x11/X11SunJDKReflection.java
+++ b/src/net/java/games/jogl/impl/x11/X11SunJDKReflection.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/BitmapCharRec.java b/src/net/java/games/jogl/util/BitmapCharRec.java
index 5705cf1ec..642bbb465 100644
--- a/src/net/java/games/jogl/util/BitmapCharRec.java
+++ b/src/net/java/games/jogl/util/BitmapCharRec.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/BitmapFontRec.java b/src/net/java/games/jogl/util/BitmapFontRec.java
index bb2a40746..32ea9c183 100644
--- a/src/net/java/games/jogl/util/BitmapFontRec.java
+++ b/src/net/java/games/jogl/util/BitmapFontRec.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/BufferUtils.java b/src/net/java/games/jogl/util/BufferUtils.java
index 1962847e2..7c788100f 100644
--- a/src/net/java/games/jogl/util/BufferUtils.java
+++ b/src/net/java/games/jogl/util/BufferUtils.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/CoordRec.java b/src/net/java/games/jogl/util/CoordRec.java
index a99604a4e..661ed23ff 100644
--- a/src/net/java/games/jogl/util/CoordRec.java
+++ b/src/net/java/games/jogl/util/CoordRec.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUT.java b/src/net/java/games/jogl/util/GLUT.java
index 380b02b9f..aad01e13f 100644
--- a/src/net/java/games/jogl/util/GLUT.java
+++ b/src/net/java/games/jogl/util/GLUT.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
@@ -383,13 +383,17 @@ public class GLUT {
}
public int glutStrokeWidth (int font, char character) {
+ return (int) glutStrokeWidthf(font, character);
+ }
+
+ public float glutStrokeWidthf (int font, char character) {
StrokeFontRec fontinfo = getStrokeFont(font);
int c = character & 0xFFFF;
if (c < 0 || c >= fontinfo.num_chars)
return 0;
StrokeCharRec ch = fontinfo.ch[c];
if (ch != null)
- return (int) ch.right;
+ return ch.right;
else
return 0;
}
@@ -410,8 +414,12 @@ public class GLUT {
}
public int glutStrokeLength (int font, String string) {
+ return (int) glutStrokeLengthf(font, string);
+ }
+
+ public float glutStrokeLengthf (int font, String string) {
StrokeFontRec fontinfo = getStrokeFont(font);
- int length = 0;
+ float length = 0;
int len = string.length();
for (int i = 0; i < len; i++) {
char c = string.charAt(i);
diff --git a/src/net/java/games/jogl/util/GLUTBitmap8x13.java b/src/net/java/games/jogl/util/GLUTBitmap8x13.java
index ee2bf0561..caa007726 100644
--- a/src/net/java/games/jogl/util/GLUTBitmap8x13.java
+++ b/src/net/java/games/jogl/util/GLUTBitmap8x13.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTBitmap9x15.java b/src/net/java/games/jogl/util/GLUTBitmap9x15.java
index e2849193b..05aa2635b 100644
--- a/src/net/java/games/jogl/util/GLUTBitmap9x15.java
+++ b/src/net/java/games/jogl/util/GLUTBitmap9x15.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTBitmapHelvetica10.java b/src/net/java/games/jogl/util/GLUTBitmapHelvetica10.java
index a831ad253..d238d7d16 100644
--- a/src/net/java/games/jogl/util/GLUTBitmapHelvetica10.java
+++ b/src/net/java/games/jogl/util/GLUTBitmapHelvetica10.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTBitmapHelvetica12.java b/src/net/java/games/jogl/util/GLUTBitmapHelvetica12.java
index f4a0bebeb..fe29ab84f 100644
--- a/src/net/java/games/jogl/util/GLUTBitmapHelvetica12.java
+++ b/src/net/java/games/jogl/util/GLUTBitmapHelvetica12.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTBitmapHelvetica18.java b/src/net/java/games/jogl/util/GLUTBitmapHelvetica18.java
index 2d6ca178e..31fbda94c 100644
--- a/src/net/java/games/jogl/util/GLUTBitmapHelvetica18.java
+++ b/src/net/java/games/jogl/util/GLUTBitmapHelvetica18.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTBitmapTimesRoman10.java b/src/net/java/games/jogl/util/GLUTBitmapTimesRoman10.java
index 2d56cb899..175b857e0 100644
--- a/src/net/java/games/jogl/util/GLUTBitmapTimesRoman10.java
+++ b/src/net/java/games/jogl/util/GLUTBitmapTimesRoman10.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTBitmapTimesRoman24.java b/src/net/java/games/jogl/util/GLUTBitmapTimesRoman24.java
index cf89907b3..25684ceff 100644
--- a/src/net/java/games/jogl/util/GLUTBitmapTimesRoman24.java
+++ b/src/net/java/games/jogl/util/GLUTBitmapTimesRoman24.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTStrokeMonoRoman.java b/src/net/java/games/jogl/util/GLUTStrokeMonoRoman.java
index a3aec0211..f5d2ebcff 100644
--- a/src/net/java/games/jogl/util/GLUTStrokeMonoRoman.java
+++ b/src/net/java/games/jogl/util/GLUTStrokeMonoRoman.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/GLUTStrokeRoman.java b/src/net/java/games/jogl/util/GLUTStrokeRoman.java
index d5d8e9bf2..2755b8dfc 100644
--- a/src/net/java/games/jogl/util/GLUTStrokeRoman.java
+++ b/src/net/java/games/jogl/util/GLUTStrokeRoman.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/StrokeCharRec.java b/src/net/java/games/jogl/util/StrokeCharRec.java
index 742a305e3..7c961fb4d 100644
--- a/src/net/java/games/jogl/util/StrokeCharRec.java
+++ b/src/net/java/games/jogl/util/StrokeCharRec.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/StrokeFontRec.java b/src/net/java/games/jogl/util/StrokeFontRec.java
index 82734a6dd..133380a77 100644
--- a/src/net/java/games/jogl/util/StrokeFontRec.java
+++ b/src/net/java/games/jogl/util/StrokeFontRec.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/src/net/java/games/jogl/util/StrokeRec.java b/src/net/java/games/jogl/util/StrokeRec.java
index fa4837cb7..cc4571465 100644
--- a/src/net/java/games/jogl/util/StrokeRec.java
+++ b/src/net/java/games/jogl/util/StrokeRec.java
@@ -20,7 +20,7 @@
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
* ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
diff --git a/www/index.html b/www/index.html
index 882abc8b8..c87063d5d 100644
--- a/www/index.html
+++ b/www/index.html
@@ -17,7 +17,7 @@
<AREA SHAPE="rect" ALT="Projects" COORDS="356,7,440,23" HREF="https://games.dev.java.net" TARGET="_self">
<AREA SHAPE="rect" ALT="Wiki" COORDS="643,7,695,23" HREF="http://wiki.java.net/bin/view/Games">
<AREA SHAPE="rect" ALT="Weblogs" COORDS="562,7,624,23" HREF="http://weblogs.java.net/weblogs/project/games">
- <AREA SHAPE="rect" COORDS="463,7,541,23" HREF="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi" target="_top" ALT="Forums">
+ <AREA SHAPE="rect" COORDS="463,7,541,23" HREF="http://192.18.37.44/forums/index.php" target="_top" ALT="Forums">
<AREA SHAPE="rect" ALT="JavaGames Home" COORDS="147,7,334,23" HREF="http://community.java.net/games">
<AREA SHAPE="rect" ALT="Java.net" COORDS="21,7,128,23" HREF="http://www.java.net" TARGET="_self">
</MAP>
@@ -61,7 +61,7 @@ at Sun Microsystems.<br>
<p>JOGL provides full access to the APIs in the OpenGL
-1.5 specification as well as nearly all vendor extensions, and integrates
+2.0 specification as well as nearly all vendor extensions, and integrates
with the AWT and Swing widget sets.<br>
</p>
@@ -128,7 +128,7 @@ advanced OpenGL techniques now possible with the Java platform.<br>
<p>This project has been built in the following
environments. All require the <a
href="http://www.antlr.org/">ANTLR</a> parser generator and the <a
- href="http://ant.apache.org/">Ant</a> build system to be installed; please
+ href="http://ant.apache.org/">Ant</a> build system version 1.6 or later to be installed; please
see the <a
href="https://jogl.dev.java.net/unbranded-source/browse/*checkout*/jogl/doc/HowToBuild.html?rev=HEAD&amp;content-type=text/html">build
documentation</a> for details. </p>
@@ -139,16 +139,16 @@ documentation</a> for details. </p>
<ul>
<li> <a
- href="http://wwws.sun.com/software/solaris/index.html">Solaris
- 8 for SPARC</a> </li>
+ href="http://www.sun.com/software/solaris/">Solaris
+ 8 or later</a> </li>
<li> <a
- href="http://wwws.sun.com/software/sundev/suncc/index.html">Sun
- ONE Studio 8 Compiler Collection</a> </li>
+ href="http://www.sun.com/software/products/studio/">Sun
+ ONE Studio 8 Compiler Collection or later</a> </li>
<li> <a
- href="http://wwws.sun.com/software/graphics/opengl/index.html">Sun
- OpenGL for Solaris</a> </li>
+ href="http://www.sun.com/software/graphics/opengl/">Sun
+ OpenGL for Solaris</a> (or <a href="http://www.mesa3d.org/">Mesa</a> for Solaris 9 x86) </li>
<li> <a
- href="http://java.sun.com/j2se/1.4.2/">Sun J2SDK 1.4.2</a>
+ href="http://java.sun.com/j2se/1.4.2/">Sun J2SDK 1.4.2 or later</a>
</li>
@@ -158,10 +158,10 @@ documentation</a> for details. </p>
<ul>
- <li> Red Hat Linux 7.3 for x86 </li>
+ <li> Red Hat Linux 7.3 for x86 or later </li>
<li> GCC </li>
<li> <a
- href="http://java.sun.com/j2se/1.4.2/">Sun J2SDK 1.4.2</a>
+ href="http://java.sun.com/j2se/1.4.2/">Sun J2SDK 1.4.2 or later</a>
</li>
@@ -175,7 +175,7 @@ documentation</a> for details. </p>
will not work with earlier releases) </li>
<li> GCC </li>
<li> <a href="http://www.apple.com/java/">Java
- 1.4.2 for Mac OS X</a> </li>
+ 1.4.2 or later for Mac OS X</a> </li>
</ul>
@@ -184,12 +184,12 @@ documentation</a> for details. </p>
<ul>
- <li> Windows 2000 for x86 </li>
+ <li> Windows 2000 or later for x86 </li>
<li> Microsoft Visual C++
- 6.0, 7.0, or <a href="http://www.mingw.org/">MinGW</a> compilers
+ 6.0 or later, or <a href="http://www.mingw.org/">MinGW</a> compilers
</li>
<li> <a
- href="http://java.sun.com/j2se/1.4.2/">Sun J2SDK 1.4.2</a>
+ href="http://java.sun.com/j2se/1.4.2/">Sun J2SDK 1.4.2 or later</a>
</li>
@@ -247,7 +247,7 @@ documentation</a> for details. </p>
href="2125.pdf">JOGL
JavaOne 2003 Presentation Slides</a></li>
<li><a
- href="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl">JOGL
+ href="http://192.18.37.44/forums/index.php?board=25.0">JOGL
Forums</a></li>
<li><a
href="https://jogl.dev.java.net/unbranded-source/browse/*checkout*/jogl/doc/userguide/index.html?rev=HEAD&content-type=text/html">JOGL User's Guide</a></li>
@@ -305,6 +305,208 @@ documentation</a> for details. </p>
</tbody>
</table>
+
+<h3><a name="JavaOne_2005"></a>JavaOne 2005</h3>
+<p>Come see JOGL at the 2005 JavaOne conference from June 25 through
+June 30 in San Francisco, CA.<br>
+<br>
+</p>
+<p style="font-weight: bold;">JOGL Activities at JavaOne</p>
+<table style="text-align: left; width: 100%;" border="0" cellspacing="0"
+ cellpadding="4">
+ <tbody>
+ <tr>
+ <th style="vertical-align: middle;">Time/Date<br>
+ </th>
+
+ <th style="vertical-align: middle;">Location<br>
+ </th>
+ <th style="vertical-align: middle;">Event ID<br>
+ </th>
+ <th style="vertical-align: middle;">Description<br>
+ </th>
+ </tr>
+
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Mon&nbsp;(6/27)
+-
+Wed&nbsp;(6/29)<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Pavilion<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Pod-1208<br>
+
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Java&nbsp;3D,
+JAI and JOGL APIs
+(Demos)<br>
+ </td>
+ </tr>
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Mon
+(6/27)
+6:30-8:00&nbsp;PM </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Pavilion<br>
+
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Reception<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">&#8220;Ask
+the Experts&#8221;<br>
+ </td>
+ </tr>
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Tue&nbsp;(6/28)
+8:30-9:20&nbsp;PM<br>
+ </td>
+
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Marriott&nbsp;Hotel,
+Golden Gate Ballroom&nbsp;A1<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">BOF-9877
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Java
+Bindings for OpenGL<sup>&reg;</sup> (BOF)<br>
+ </td>
+
+ </tr>
+ </tbody>
+</table>
+<br>
+<p style="font-weight: bold;">Other Related Activities at JavaOne</p>
+<table cellpadding="4" cellspacing="0" border="0"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <th style="vertical-align: middle;">Time/Date<br>
+ </th>
+
+ <th style="vertical-align: middle;">Location<br>
+ </th>
+ <th style="vertical-align: middle;">Event ID<br>
+ </th>
+ <th style="vertical-align: middle;">Description<br>
+ </th>
+ </tr>
+
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Mon&nbsp;(6/27)
+-
+Wed&nbsp;(6/29)<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Pavilion<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Pod-1106<br>
+
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Project
+Looking Glass (Demos)<br>
+ </td>
+ </tr>
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Tue&nbsp;(6/28)
+7:30-8:20&nbsp;PM<br>
+
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Marriott&nbsp;Hotel,
+Golden Gate Ballroom&nbsp;A1<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">BOF-9723
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">The
+Java&nbsp;3D API (BOF)<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Wed
+(6/29)
+8:30-9:20&nbsp;PM<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Marriott&nbsp;Hotel,
+Golden Gate Ballroom&nbsp;A1<br>
+ </td>
+
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">BOF-9269
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Java
+Advanced Imaging (BOF)<br>
+ </td>
+ </tr>
+ <tr>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Wed
+(6/29)
+1:30-2:30&nbsp;PM<br>
+ </td>
+
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Moscone
+Hall E<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">TS-7992<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 159); vertical-align: middle;">Project
+Looking Glass (Technical Session w/
+Demos) </td>
+ </tr>
+ <tr>
+
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Wed
+(6/29)
+6:00-7:00&nbsp;PM<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Argent
+Hotel<br>
+ </td>
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Community<br>
+Event<br>
+ </td>
+
+ <td
+ style="background-color: rgb(255, 255, 207); vertical-align: middle;">Project
+Looking Glass (Community
+Event / BOF) </td>
+ </tr>
+ </tbody>
+</table>
+<p>Click here for more about <a
+ href="https://lg3d.dev.java.net/#JavaOne-2005-Activities">Project
+Looking Glass at JavaOne</a>.<br>
+</p>
+<p><br>
+</p>
+</p>
+
<br>
<br>
<br>
diff --git a/www/webstart/jogl-natives-linux.jar b/www/webstart/jogl-natives-linux.jar
index e15bde46c..06850ff8a 100644
--- a/www/webstart/jogl-natives-linux.jar
+++ b/www/webstart/jogl-natives-linux.jar
Binary files differ
diff --git a/www/webstart/jogl-natives-macosx.jar b/www/webstart/jogl-natives-macosx.jar
index 0576103a0..1823aacd6 100644
--- a/www/webstart/jogl-natives-macosx.jar
+++ b/www/webstart/jogl-natives-macosx.jar
Binary files differ
diff --git a/www/webstart/jogl-natives-solsparc.jar b/www/webstart/jogl-natives-solsparc.jar
index 236cb2990..b6aa71acc 100644
--- a/www/webstart/jogl-natives-solsparc.jar
+++ b/www/webstart/jogl-natives-solsparc.jar
Binary files differ
diff --git a/www/webstart/jogl-natives-win32.jar b/www/webstart/jogl-natives-win32.jar
index 0292c4a35..bb9b54b69 100644
--- a/www/webstart/jogl-natives-win32.jar
+++ b/www/webstart/jogl-natives-win32.jar
Binary files differ
diff --git a/www/webstart/jogl.jar b/www/webstart/jogl.jar
index a027016d4..e7a05b730 100644
--- a/www/webstart/jogl.jar
+++ b/www/webstart/jogl.jar
Binary files differ
diff --git a/www/webstart/jogl.jnlp b/www/webstart/jogl.jnlp
index cc438f8b8..70de4bbd9 100644
--- a/www/webstart/jogl.jnlp
+++ b/www/webstart/jogl.jnlp
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<jnlp spec="1.0.1"
- codebase="https://jogl.dev.java.net/webstart/"
+<jnlp codebase="https://jogl.dev.java.net/webstart/"
href="jogl.jnlp">
<information>
<title>JOGL</title>
@@ -23,6 +22,9 @@
<resources os="SunOS" arch="sparc">
<nativelib href = "jogl-natives-solsparc.jar" />
</resources>
+ <resources os="SunOS" arch="x86">
+ <nativelib href = "jogl-natives-solx86.jar" />
+ </resources>
<resources os="Linux">
<nativelib href = "jogl-natives-linux.jar" />
</resources>