summaryrefslogtreecommitdiffstats
path: root/src/demos/vertexArrayRange/VertexArrayRange.java
Commit message (Collapse)AuthorAgeFilesLines
* Changed GLU to be a single class rather than a separate interface and Kenneth Russel2005-09-251-2/+1
| | | | | | | | | | | | | | | | | | | implementing class. Broke dependence from GLContext and GLAutoDrawable down to GLU package; removed getGLU()/setGLU() routines. A GLU object may now be instantiated via "new GLU()" at any point in the program. When routines on it are called which require an OpenGL context, the GLU implementation fetches the current GLContext and the GL object from within it to do its work via the new public API GLU.getCurrentGL(). This avoids needing to pass down a GL object everywhere or to tie the GLU object to a particular GL object. Restructured GLUT implementation similarly so GL and GLU objects do not need to be passed to it as arguments any more. Restructured all demos to conform to new APIs. Fixed bugs in GlueGen around new functionality of being able to emit only an implementing class with no associated interface. Deleted obsolete GLU-related .cfg files. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@135 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Moved GLU-related classes into javax.media.opengl.glu package. Still Kenneth Russel2005-09-111-0/+1
| | | | | | | | | | | | | | | need to break dependence from GLContext / GLAutoDrawable classes' getGLU() method down into this new package; should make GLU a class rather than an interface and probably make it instantiatable with a target GL object in the constructor. Should also make GLU and GLUT interfaces look similar (i.e., probably accept GL and GLU objects in constructor of GLUT rather than taking them as arguments on each method call). Ignored GLUnurbs data type from glue code generation. Updated demos for new location of GLU. Fixed broken package of Version class. Minor javadoc cleanups. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@129 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Refactored demos to mostly subclass common Demo superclass providing Kenneth Russel2005-09-091-9/+5
| | | | | | | | | | | | | shutdown capabilities. Moved DemoListener to demos.common package. Added ManipManager removal code to demos using manipulators or ExaminerViewer to fix memory leak when run in JRefract harness. Added workaround for another seeming memory leak when run under current JDK 1.6 due to java.awt.Component now being finalizable and keeping data alive longer than previously. Made ManipManager.unregisterWindow more lenient with respect to null or invalid arguments. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@122 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Renamed all files to intended destination packages for JSR-231. The Kenneth Russel2005-08-301-2/+3
| | | | | | | | | | | only package specified by the JSR is "javax.media.opengl". The utility package com.sun.opengl.utils is Sun-specific and optional. The Cg binding has been moved into com.sun.opengl.cg. Moved Animator and FPSAnimator to com.sun.opengl.utils. Updated and tested demos with new source code locations. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@118 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Restructured generation of MethodBindings and emitters to more closely Kenneth Russel2005-08-291-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | match desired new code generation style of mapping void* to Buffer and to support non-direct Buffers. Removed expansion of void* to multiple primitive array types. Primitive-type C pointers (such as int*) are now exposed as IntBuffer and (optionally) int[], if NioDirectOnly has not been specified. The int[] variant is a simple wrapper around the indirect buffer implementation. If desired, expansion of void* to other array types could be layered on this new support. Rewrote and simplified expandMethodBinding and split up creation of emitters into generatePublicEmitters and generatePrivateEmitters. Deleted JavaMethodBindingImplEmitter and CMethodBindingImplEmitter and folded their functionality into their superclasses, controlled under flags, which makes it more straightforward to tweak a given emitter to produce correct glue code. Restructured OpenGL-specific JavaGLPAWrapperEmitter and CGLPAWrapperEmitter and how they are created by the GLEmitter; these classes are now much simpler than before. Changed how data types are passed from MethodBindings to Emitters. Generally only two MethodBindings will be created, one which maps types like int* to IntBuffer and one which maps it to int[]. The version taking Buffers will be the only one for which glue code will be generated; the one taking int[] will call the native code for the indirect buffer case for the one taking Buffers. Compound types (representing C structs) and compound type arrays (represending arrays of C structs) are no longer mapped to NIO ByteBuffers and arrays of NIO ByteBuffers by the MethodBinding; erasure and lowering of types is now handled by the Emitters, to preserve more type information during the code generation process. It is unclear whether this is in the end a simplification or just pushing code around, but it does help reduce confusion over the number of MethodBindings floating around in the system and what purpose they served. Restructured cure JOGL code and demos to work with new APIs, in particular new glTexImage*D, glDrawElements, and glReadPixels Buffer arguments. Fixed performance problem in new Animator which occurred with VertexArrayRange demo. Added new gluPickMatrix entry point to be able to implement NIO variant in generated signatures. Some further simplifications of the new code may be possible (i.e., some new flags in JavaMethodBindingEmitter and MethodBinding removed) and it is possible more unused code remains to be deleted. As it stands the new GL.java is significantly smaller than before, as all of the expansions of void* to primitive arrays are gone, several areas of GlueGen are easier to understand, and while some functionality has been lost, the autogenerated APIs are basically in the final form specified by JSR-231. Tested with the JOGL demos on Windows and Linux. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@116 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Missed new DemoListener.repaint() in a few placesKenneth Russel2005-08-061-0/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@109 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Refactored nearly all demos as GLEventListeners and imported most into Kenneth Russel2005-08-061-408/+392
| | | | | | | JRefract framework. Deleted duplicate Gears code in fullscreen demos. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@107 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Initial set of context-related changes for the JSR-231 API. GLContext Kenneth Russel2005-07-101-4/+4
| | | | | | | | | | | | | | | has been exposed in the public API. The GLEventListener callback mechanism has been removed from the core GLContext implementation and moved up to a higher level. GLAutoDrawable now contains the GLEventListener-related methods, and the GLEventListener's methods now receive a GLAutoDrawable as argument. All JOGL demos have been updated for the new APIs. Many FIXMEs and much unimplemented functionality remain. There is slightly different initialization behavior for the demos containing pbuffers, and the deferring of reshape callbacks needs to be rethought. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@100 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed Windows port after changes to GlueGen to include array offsets. Kenneth Russel2005-07-081-9/+9
| | | | | | | | | | | Ported all demos to new API. Temporarily added back in GLU entry points taking primitive arrays as the underlying APIs (in particular, glTexImage2D) do not yet support non-direct Buffers. Changed C code generation to only add in array offset if array is non-null. Fixed bug in GLU tesselator demo's vertex callback. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@99 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Merged with main trunk (tag JOGL_PRE_1_1_1)Kenneth Russel2005-07-071-9/+4
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@98 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* This commit was manufactured by cvs2svn to create branch 'JSR-231'.First Last2005-06-161-4/+9
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@93 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed Issue 151: starting up the Animator before the GLJPanel has been shown ↵Kenneth Russel2005-05-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result in an error The root cause of this error was the fact that WindowsPbufferGLContext.destroyImpl() uses WGL extensions to clean up resources associated with the pbuffer. Because these extensions are in the public WGL interface, they are wrapped by the DebugGL. However, an OpenGL context is not current at the time these routines are called, and it is illegal to call glGetError() at those points. The DebugGL pipeline was implicitly calling glGetError() after each of those calls, leading to the failure. This bug unmasked a couple of others. The code in the DebugGL needed a recursion count to make sure that glGetError() didn't get called in an infinite loop. Also, as a side effect of the fix for Issue 160, calling getGL() on the GLJPanel outside of GLEventListener.init() was causing a NullPointerException to be thrown. The GLJPanel has been fixed to return null in this case, and the specification of GLDrawable.getGL() has been improved. In order to make the behavior between the GLCanvas and GLJPanel similar, the GL object is now reset in the GLDrawable each time the underlying OpenGL context is recreated. This allows end users to set up e.g. the DebugGL unconditionally in their GLEventListener.init() method. The JOGL demos have been changed to reflect this. The test case in the bug report will be updated with code similar to the originally submitted test case (i.e., the Animator is started early) but which now works. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@71 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Added gl.setSwapInterval(0) callKenneth Russel2005-05-051-7/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@70 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed problem in demos introduced in 1.1 b08 where windowClosing Kenneth Russel2005-02-141-2/+9
| | | | | | | events were not properly waiting for the Animator to stop. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@55 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed bug in Animator where it would hang upon stopping if exceptionKenneth Russel2003-07-151-18/+26
| | | | | | | | | was thrown during init(). Fixed build.xml files to get javac to produce source file and line number information. Fixed demos to pop up a dialog box if an extension they need is unsupported. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@12 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Split up net.java.games.util; moved GLUT and BufferUtils intoKenneth Russel2003-06-251-0/+729
net.java.games.jogl.util, and moved demo-specific utility classes into jogl-demos project under demos.util. Added nearly all JavaOne demos into jogl-demos project; rewrote where necessary to use ClassLoader.getResourceAsStream() instead of flat files, put into packages and added to Makefile. Added gleem to jogl-demos project. Added jogl.jar build rule. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@3 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4