summaryrefslogtreecommitdiffstats
path: root/src/demos/j2d
Commit message (Collapse)AuthorAgeFilesLines
* Copied JOGL_2_SANDBOX r350 on to trunk; JOGL_2_SANDBOX branch is now closedKenneth Russel2009-06-157-0/+1983
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@352 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Deleted obsolete source code in preparation for copying JOGL_2_SANDBOXKenneth Russel2009-06-157-1865/+0
| | | | | | | on to trunk git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@351 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Added flush() call to render loop needed for new TextRenderer. Added Kenneth Russel2007-11-031-1/+5
| | | | | | | implementation of new RenderDelegate.getBounds(GlyphVector, FontRenderContext). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@226 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Integrated John Burkey's new TextRenderer implementation using Kenneth Russel2007-10-092-0/+19
| | | | | | | | | | | | | | | | | | | | | glyph-by-glyph caching for most cases, with fallbacks to String-by-String caching for complete Unicode correctness. New implementation yields drastic performance improvements for applications displaying large amounts of dynamic text. Upgraded JOGL demos to work with new TextRenderer. This checkin fixes at least the following issues: Issue 261: Throttle shrinking of backing store texture for TextRenderer Issue 293: TextRenderer: width of strings with spaces not correct in RC4 Issue 294: TextRenderer: rendering stops when a string is wider than the maximum texture size Issue 304: TextRenderer rendering artifacts in 3D mode as well as outstanding performance issues with the current TextRenderer reported on the JOGL forum. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@221 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Added a markDirty() method to TextureRenderer and removed the sync() Kenneth Russel2007-03-272-4/+4
| | | | | | | | | | | method. markDirty() may be called at an arbitrary point (in particular, when no OpenGL context is current) and the union of the dirty regions is automatically synced with the underlying texture during the next getTexture() operation, at which point the dirty region is cleared. Adjusted Overlay and TextRenderer classes. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@210 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Added RenderDelegate mechanism to TextRenderer to provide more control Kenneth Russel2007-02-111-0/+409
| | | | | | | | where desired over the rendered text bitmap. Added CustomText demo to demonstrate its usage. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@206 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Made default size of demo window largerKenneth Russel2007-01-211-1/+8
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@202 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Added 3D rendering methods to TextureRenderer and TextRenderer on Kenneth Russel2007-01-203-55/+218
| | | | | | | | | | | | request of several people on javagaming.org forums. Refactored existing 2D rendering support in these classes in terms of the new 3D methods. Wrote new TextCube demo illustrating how to render 2D text in 3D using the TextRenderer. Factored out FPS counter rendering into new FPSCounter utility class and updated TestTextRenderer and FlyingText demos. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@201 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Robustness improvements to TextRenderer and underlying RectanglePacker. Kenneth Russel2007-01-131-0/+202
| | | | | | | | | | | | | | | Added ability to specify a maximum size to which the RectanglePacker can expand. Added preExpand method to BackingStoreManager to support early eviction of unused entries instead of always expanding the backing store, and additionFailed method used when the backing store can not expand further. Added more robust free list coalescing to Level. Added support for shrinking of backing store and for eager compaction when there is a lot of vertical dead space. Added TextFlow demo which shows how to do dynamic layout of text and which acts as a stress test for the TextRenderer. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@200 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Added new FlyingText demo to illustrate more advanced usage of the Kenneth Russel2007-01-071-0/+472
| | | | | | | | | | | TextRenderer class; displays dynamically rotated, translated and colored text. Changed how setSmoothing() is handled by the TextureRenderer and stopped disabling smoothing in the TextRenderer. For the time being, not exposing this flag in that class to keep the API simple. Changed TextRenderer to also push/pop the texture matrix. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@199 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* With help from Chris Campbell, fixed incredibly stupid bug on my part Kenneth Russel2007-01-063-9/+13
| | | | | | | | | | | | | | | | where the new Java 2D TextureRenderer was destroying and re-creating the OpenGL texture every frame. This was why the Java 2D Overlay class was so expensive, and why the TextRenderer wasn't as fast as it seemed it should be. Fixed bugs in all of the Java 2D demos which were covered up by this implicit sync, as well as in the TextRenderer class itself where it was missing a key sync operation. Added code to the Texture.updateSubImage() implementation to clip the incoming rectangle to the bounds of the input data and texture, to keep OpenGL from dropping almost-valid updates on the floor. Ran all of the Java 2D integration demos to verify these fixes. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@198 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Removed debugging codeKenneth Russel2007-01-041-69/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@197 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* With extensive help from Phil Race and Chris Campbell from the Java 2D Kenneth Russel2007-01-041-0/+246
| | | | | | | | | | | | | | | | | | | | | | team, added a TextRenderer class which enables high-performance rendering of bitmapped Java 2D fonts, with full Unicode support, into arbitrary OpenGL drawables using a simple API. Builds on top of the TextureRenderer class and its associated functionality; added createAlphaOnlyRenderer() and other methods to enable the TextRenderer. Caches rendering results on a string-by-string basis in an OpenGL texture using a fully automatic least-recently-used algorithm for good efficiency when rendering the same string or strings multiple times. Uses a rectangle packing algorithm, currently housed in com.sun.opengl.impl.packrect, for managing the positions of cached strings on a larger OpenGL texture to avoid OpenGL pipeline state changes. Added a TestTextRenderer demo which simply adds a moving text string and frames-per-second counter to the Gears demo; more sophisticated examples to come. (Some commented-out debugging code is being temporarily left in the new demo, to be removed in the next checkin, in order to have it in the version history.) git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@196 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Moved J2DTextureRenderer and J2DOverlay into their own sub-package and Kenneth Russel2007-01-042-13/+13
| | | | | | | | | dropped the prefixes on the suggestion of Chris Campbell. No other changes to these classes. Added com.sun.opengl.util.j2d to the javadoc generation. Updated demos. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@195 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* On request from James Gosling and others, added a J2DTextureRenderer Kenneth Russel2006-12-302-0/+407
class to com.sun.opengl.util to make it easier to render into OpenGL textures using Java 2D. Added convenience methods to this class to make it easy to draw sub-rectangles of the resulting texture to the screen. Added a J2DOverlay class which acts like a Java 2D-based heads-up display for an arbitrary GLDrawable, tracking its size and making it easier to render the entire contents of the HUD. There appear to be performance issues with the J2DOverlay class as the window gets large, at least on older hardware, as it allocates very large OpenGL textures internally. Added tests for both the J2DTextureRenderer and J2DOverlay classes which have similar functionality but different implementation approaches and different performance characteristics. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@194 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4