| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
on to trunk
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1958 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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 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 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1231 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
TextureRenderer's orthographic rendering methods based on feedback
from Dave Collins from NASA World Wind project
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1160 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
| |
Added code to restore current text drawing color when backing store is
resized. Fixed NullPointerException in RectanglePacker during deletion
if no backing store was allocated.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1156 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed problem where during resizing of backing store for TextRenderer
we were neglecting to unbind the old texture and bind the new one.
This caused attempts to render with an invalid texture, which was
probably the cause of crashes and definitely the cause of rendering
artifacts. Fixed by calling endRendering() / beginRendering()
appropriately on the underlying TextureRenderer during resizing of the
backing store of the TextRenderer.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1148 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
| |
Moved setColor() implementation from TextRenderer to TextureRenderer
and reimplemented TextRenderer's methods in terms of it.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1143 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
| |
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/trunk@1128 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1127 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1126 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
| |
pushed / popped by TextureRenderer on suggestion of Tom Gaskins and
Chris Campbell
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1104 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1103 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/trunk@1092 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/trunk@1083 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
| |
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/trunk@1073 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/trunk@1071 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/trunk@1067 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
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/trunk@1066 232f8b59-042b-4e1e-8c03-345bb8c30851
|