aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes
Commit message (Collapse)AuthorAgeFilesLines
* Addendum to fix for Issue 344: Serious TextRenderer problems involving large ↵Kenneth Russel2008-02-191-1/+1
| | | | | | | | | | | | fonts & unicode characters Fixed off-by-one error in computation of needsAdvance bit for high Unicode strings pointed out by spiraljetty on JOGL forum. Added test case for this. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1538 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added table of Porter-Duff compositing rules in the face of Kenneth Russel2008-02-181-0/+22
| | | | | | | | premultiplied alpha based on some code from the Java 2D OpenGL pipeline git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1535 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 344: Serious TextRenderer problems involving large fonts & ↵Kenneth Russel2008-02-181-476/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unicode characters The glyph-based rendering algorithm for the TextRenderer was performing rendering in two steps: glyph preparation and upload, and rendering. This structure doesn't work in the context of the RectanglePacker, which can reorganize the backing store during any upload. Restructured the glyph cache in the TextRenderer in terms of flyweight Glyph objects which know how to upload and render themselves. During any upload, the outstanding glyphs not yet rendered to the screen may thereby be flushed. Improved the code path which falls back to the string-by-string algorithm for complex Unicode characters so that incoming strings can be segmented into multiple parts which are rendered either using the glyph cache or the string-by-string algorithm. Also tinkered with the bounds of glyphs and strings on the backing store to try to more definitively eliminate bleed-over between adjacent characters on the backing store, and to ensure that all of the pixels of glyphs are drawn. Some heuristics are unfortunately involved but the new code appears to work well with both very large and very small fonts. Added a few more test cases for the TextRenderer based on the bug report. Tested with the previous test cases as well. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1533 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 342: demos/j2d/TextFlow (TextRenderer) demo gives fuzzy text Kenneth Russel2008-02-161-7/+32
| | | | | | | | Added setSmoothing / getSmoothing to TextRenderer API to offer control over filtering mode of the TextureRenderer backing store. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1528 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 339: Add system properties to turn off VAs/VBOs in TextRenderer Kenneth Russel2008-02-161-17/+80
| | | | | | | | | Incorporated patch from emzic, slightly modified, to add set/getUseVertexArrays() as concession to graphics cards which do not perform well with small vertex arrays. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1527 232f8b59-042b-4e1e-8c03-345bb8c30851
* Removed incorrect statements from TextureIO class about certain Kenneth Russel2008-01-161-8/+4
| | | | | | | | | methods not automatically generating mipmaps which appear to have been vestigial comments from the original checkin of this code; errors pointed out by Tom Gaskins of NASA World Wind Java project git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1500 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 332: TextRenderer depends on OpenGL 1.3 glClientActiveTexture Kenneth Russel2007-11-151-1/+0
| | | | | | | | | | | Removed call to glClientActiveTexture, which was incorrect as written since the texture object was being bound to the current texture unit and then the active texture unit forced to GL_TEXTURE0 just before setting up the texture coordinate pointer. Tested with text demos in jogl-demos workspace. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1440 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 326: TextRenderer corruption with certain text Kenneth Russel2007-11-091-6/+19
| | | | | | | | | | | | | | | | | Fixed four issues: - Regression in new segmenting and punting code causing ArrayIndexOutOfBoundsException due to not resetting the glyph uploader during punt. - Issue in same code where length and total advance were not being reset properly. - Incorrect handling in glyph-by-glyph rendering when backing store was using NPOT texture and GL_ARB_texture_rectangle. - Failure to punt when glyph code was out of bounds. Checked in two regression tests for these issues. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1434 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added RenderDelegate.getBounds(GlyphVector, FontRenderContext) and Kenneth Russel2007-11-031-6/+12
| | | | | | | | delegated to it in glyph-by-glyph renderer in order to support advanced RenderDelegates. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1424 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixes from John Burkey: Kenneth Russel2007-11-031-53/+117
| | | | | | | | | | | 1) Add segmenting for runs of glyphs that are going to blow the cache (we track upload size) a) upload handling b) glyph run segmenting 2) Fix incorrect assumption that the glyph cached didn't change size. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1423 232f8b59-042b-4e1e-8c03-345bb8c30851
* Whitespace changes only; for consistency, processed with Jalopy and Kenneth Russel2007-11-031-1457/+1491
| | | | | | | then re-indented with emacs git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1422 232f8b59-042b-4e1e-8c03-345bb8c30851
* Made TextRenderer.DefaultRenderDelegate public and static on request Kenneth Russel2007-10-191-1/+1
| | | | | | | from emzic on JOGL forum git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1409 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 316: Multi-Head issues, identical to issue 241 Kenneth Russel2007-10-191-1/+112
| | | | | | | Applied patch from submitter. Thanks for the excellent patch. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1408 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 324: Rendering artifacts with glyph-based TextRenderer Kenneth Russel2007-10-171-1/+1
| | | | | | | | Changed from using getVisualBounds() to the more accurate getPixelBounds() when computing bounding box for individual glyphs. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1406 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 323: TextRenderer leaves VBOs bound Kenneth Russel2007-10-171-14/+39
| | | | | | | | | | | | | Manually unbound VBOs because it appears that some graphics drivers do not push and pop the GL_ARRAY_BUFFER_BINDING and other state during glPushClientAttrib / glPopClientAttrib. This is an area where the OpenGL specification is ambiguous. Added a non-VBO code path using normal vertex arrays for graphics cards that don't support VBOs. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1404 232f8b59-042b-4e1e-8c03-345bb8c30851
* Undid last checkin as it appears the current glPushClientAttrib / Kenneth Russel2007-10-131-6/+0
| | | | | | | | glPopClientAttrib in the TextRenderer are sufficient. Reverted back to nightly build numbering scheme; 1.1.1-rc6 version number not yet used. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1398 232f8b59-042b-4e1e-8c03-345bb8c30851
* Pre-emptively added clearing out of the GL_ARRAY_BUFFER binding after Kenneth Russel2007-10-121-0/+6
| | | | | | | | | doing glPopClientAttrib since it isn't clear according to the OpenGL specification whether this binding is part of the client-side state. Bumped build number to 1.1.1-rc6. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1396 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed problems causing breakage of NASA's World Wind Java. Added need Kenneth Russel2007-10-101-0/+19
| | | | | | | | | glPush/PopClientAttrib due to modification of vertex array enable states and vertex buffer object bindings. Fixed bug in setColor() where flushing was not occurring every time it needed to. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1393 232f8b59-042b-4e1e-8c03-345bb8c30851
* Integration of Tomas Hrasky's port of basic GLU NURBS functionality Kenneth Russel2007-10-0956-3595/+7673
| | | | | | | | | | | | | | | | | | | from C++ to Java, plus example applications, done as part of his Bachelor of Science degree at the University of Hradec Králové, Faculty of Informatics and Management. Current state of code is documented in src/classes/com/sun/opengl/impl/nurbs/README.txt. Example applications require Java 1.5 and are not currently built by default. Specify -Djogl.nurbs=1 during jogl-demos build with a 1.5 javac on the PATH to build them. Dependent jars are copied to build output directory. Deleted old partially-complete GLU NURBS port. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1389 232f8b59-042b-4e1e-8c03-345bb8c30851
* Integrated John Burkey's new TextRenderer implementation using Kenneth Russel2007-10-091-172/+853
| | | | | | | | | | | | | | | | | | | | | 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/trunk@1388 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 317: GLJPanel handleReshape bug Kenneth Russel2007-10-021-1/+1
| | | | | | | Fixed obvious bug in algorithm as per submitter's comment. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1381 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added support for loading non-mipmapped, non-power-of-two compressed Kenneth Russel2007-09-042-5/+75
| | | | | | | | | | | textures on pre-OpenGL 2.0 hardware by first loading an "empty" compressed texture and then updating a sub-rectangle of its image. Straightforward port of this code to the mipmapped case did not work; added error checking for this case and throwing of GLException. Bug pointed out by Dave Collins from NASA World Wind Java project. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1354 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 307: Rectangular (but still pow2) dds textures with mipmaps ↵Kenneth Russel2007-08-061-6/+6
| | | | | | | | | | | incorrectly loaded Clamped several divisions of width and height to 1 as per bug description. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1328 232f8b59-042b-4e1e-8c03-345bb8c30851
* Incorporated fix from Justin Couch about using the default screen forKenneth Russel2007-07-241-1/+1
| | | | | | | the current display for pbuffer rendering rather than screen "0" git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1313 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added workaround for running in headless mode while still retainingKenneth Russel2007-07-241-5/+22
| | | | | | | | | pbuffer support and incorporated suggestion from Justin Couch for working around Mesa pbuffer bug where GLX_STEREO specification (even to "false") would cause glXChooseFBConfig to fail git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1312 232f8b59-042b-4e1e-8c03-345bb8c30851
* Synced loadLibraryInternal implementation with JNLPAppletLauncher's Kenneth Russel2007-07-211-1/+12
| | | | | | | recommended code git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1307 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed issues pointed out by Justin Couch with Java2D class while Kenneth Russel2007-07-191-116/+127
| | | | | | | running in headless mode git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1306 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed regression pointed out by Tom Gaskins where Kenneth Russel2007-07-121-7/+21
| | | | | | | | getEstimatedMemorySize() was returning 0 due to the lazier initialization of the data buffer in the custom image conversion case git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1299 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added support for the new JNLPAppletLauncher ↵Kenneth Russel2007-06-281-2/+38
| | | | | | (http://applet-launcher.dev.java.net/) git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1281 232f8b59-042b-4e1e-8c03-345bb8c30851
* Cleaner version of previous fix. Clarified documentation, made the Kenneth Russel2007-05-171-13/+12
| | | | | | | | | default Composite SrcOver, and now save and restore the Composite just to avoid destroying any RenderDelegate's Composite unnecessarily (although there is no guarantee it will be preserved). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1249 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed problem in TextRenderer where custom render delegates would Kenneth Russel2007-05-171-0/+8
| | | | | | | | | result in corrupted backing store due to semantics of Graphics.copyArea() paying attention to transparent pixels; need to clear out the destination rectangle first git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1248 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed problems in TextureIO classes where they did not work with Kenneth Russel2007-05-072-15/+73
| | | | | | | | OpenGL 1.1. Added logic to back off from using OpenGL 1.2 image types by using same code paths as for custom BufferedImage types. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1238 232f8b59-042b-4e1e-8c03-345bb8c30851
* More changes to make GLCanvas work better in NetBeans GUI builder on Kenneth Russel2007-05-071-5/+14
| | | | | | | X11 platforms git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1237 232f8b59-042b-4e1e-8c03-345bb8c30851
* More changes to make the GLCanvas work more reliably in the NetBeans Kenneth Russel2007-05-061-27/+41
| | | | | | | GUI builder git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1235 232f8b59-042b-4e1e-8c03-345bb8c30851
* Changes to make GLCanvas and GLJPanel work better in NetBeans GUI Kenneth Russel2007-05-052-0/+46
| | | | | | | builder based on suggestions from Josh Marinacci git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1234 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added note on usage of TextRenderer with TileRendererKenneth Russel2007-05-041-0/+9
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1231 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 296: TextureIO cube map support brokenKenneth Russel2007-04-212-36/+56
| | | | | | | | | | | | | Fixed code paths supporting cube maps. As a positive side-effect, the VertexProgRefract demo's cube map is now rendered completely correctly; inversion of the positive and negative Y images, and the negative Y scale factor on the texture matrix, are no longer needed, and the seams around the top image are gone. Fixed code relating to automatic mipmap generation in the presence of only GL_ARB_texture_rectangle and not GL_ARB_texture_non_power_of_two. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1212 232f8b59-042b-4e1e-8c03-345bb8c30851
* Re-fixed Issue 226: JOGL seg faulting on Solaris AMD64Kenneth Russel2007-04-211-17/+1
| | | | | | | | | | | The autogenerated GLX_JNI.c was not receiving a prototype for glXGetProcAddressARB and so was receiving the implicit one returning an int, which is obviously wrong on 64-bit architectures. Re-fixed this bug by providing a prototype; removed the workaround in X11GLDrawableFactory. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1211 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 226: JOGL seg faulting on Solaris AMD64Kenneth Russel2007-04-201-6/+6
| | | | | | | | | | | | The implementation of glXGetProcAddressARB on Solaris/AMD64 had a similar problem to that seen on Linux/AMD64 distributions: internally the return value is being cast to a 32-bit value and then sign-extended back to 64 bits, causing the high half of its function pointer return values to be lost. Worked around by using dlsym() for lookup on this OS as well as on Linux/AMD64. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1210 232f8b59-042b-4e1e-8c03-345bb8c30851
* Updated link to most recent archived JNLP to 1.1.0, Javadoc windowKenneth Russel2007-04-191-5/+4
| | | | | | | title, and version history in spec overview; minor Javadoc fixes git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1208 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed several more places in code with same error as in Issue 292Kenneth Russel2007-04-191-12/+12
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1203 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 292: gluScaleImage does not scale correctly Kenneth Russel2007-04-192-27/+27
| | | | | | | | Conversion scale factors for x and y dimensions were flipped. Also adjusted Image.fill_image() so code does not assert. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1202 232f8b59-042b-4e1e-8c03-345bb8c30851
* Reverted TextRenderer back to not tokenizing strings as that wasn't Kenneth Russel2007-04-181-6/+6
| | | | | | | producing identical rendering results git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1200 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 290: GLJPanel throws NullPointerExceptions with Java 2D/JOGL bridge Kenneth Russel2007-04-171-2/+10
| | | | | | | | | | Fixed NPEs in setAutoSwapBufferMode and swapBuffers if Java 2D / JOGL bridge is enabled. These methods are essentially no-ops on the GLJPanel anyway because of how the copying to the Swing rendering area (be it a BufferedImage or the Swing back buffer) is done. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1199 232f8b59-042b-4e1e-8c03-345bb8c30851
* More fully debugged tokenized rendering of strings and turned it on by Kenneth Russel2007-04-081-13/+19
| | | | | | | | default. Can be disabled by specifying -Djogl.TextRenderer.nosplit. Exposed getSpaceWidth() on request of emzic on javagaming.org forums. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1195 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added automatic mipmap generation support via GL_GENERATE_MIPMAP Kenneth Russel2007-04-083-22/+179
| | | | | | | | | | texture parameter to Texture class. Exposed this support up through the TextureRenderer and TextRenderer classes. Tested by temporarily enabling mipmap support for TextCube demo; no visual improvement, however, so left it disabled for now. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1194 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed problem pointed out by user operator on JOGL forum where chosen Kenneth Russel2007-04-071-1/+16
| | | | | | | | GLCapabilities on Windows was returning null for pixel formats using full-scene antialiasing git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1193 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added TextureIO.setTexRectEnabled() and isTexRectEnabled() based onKenneth Russel2007-04-032-1/+38
| | | | | | | | discussions with Chris Campbell of the Java 2D team, and changed Texture implementation to respect it git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1190 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added a markDirty() method to TextureRenderer and removed the sync() Kenneth Russel2007-03-273-25/+62
| | | | | | | | | | | 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/trunk@1182 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added Texture.getAspectRatio().Kenneth Russel2007-03-211-0/+13
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1177 232f8b59-042b-4e1e-8c03-345bb8c30851