Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and OpenGL 3 support for TextRenderer #47

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d18838b
Added testing utilities
adbrown85 Mar 13, 2012
aa1e74c
Added ShaderLoader
adbrown85 Mar 5, 2012
fdbb8d8
Can specify EXPANSION_FACTOR in RectanglePacker
adbrown85 Mar 5, 2012
a9d49fa
Added Glyph and glyph producers
adbrown85 Mar 6, 2012
24bcc4c
Added GlyphCache, TextureBackingStore, TextureBackingStoreManager
adbrown85 Mar 7, 2012
58c7272
Added QuadPipeline and GlyphRenderer
adbrown85 Mar 8, 2012
768c373
Added RasterTextRenderer
adbrown85 Mar 9, 2012
6d8a7c7
Renamed RasterTextRenderer to TextRenderer
adbrown85 Apr 5, 2012
8dee423
Fixed calling dispose instead of reshape in testing utilities
adbrown85 Apr 23, 2012
d86bc14
TextRendererTest disposes instances and stops animators
adbrown85 Apr 23, 2012
2812358
Fixed backing store disposal in GlyphCache
adbrown85 Apr 23, 2012
810d6fd
Added TextRenderer test case for setUseVertexArrays before beginRende…
adbrown85 Apr 23, 2012
8cb6753
Fixed TextRenderer#setUseVertexArrays before beginRendering
adbrown85 Apr 23, 2012
fb28b0b
Fixed possible exception in AbstractGlyphRenderer when changing pipel…
adbrown85 Apr 23, 2012
a52a493
GlyphRendererGL2 always checks useVertexArrays when creating quad pip…
adbrown85 Apr 23, 2012
3686ec9
Better error handling and documentation in AbstractGlyphRenderer#setP…
adbrown85 Apr 23, 2012
948976f
Fixed GlyphRendererGL2 needing context for setUseVertexArrays
adbrown85 Apr 23, 2012
5f4ee11
ShaderLoader#loadProgram takes GL
adbrown85 Apr 23, 2012
fb87306
ShaderLoader#loadProgram validates program
adbrown85 Apr 23, 2012
5b24cea
ShaderLoader uses ShaderUtil where appropriate
adbrown85 Apr 23, 2012
0337927
Removed check for OpenGL 1.2 (glPixelStorei parameters)
adbrown85 Apr 24, 2012
5709c69
Merged master from sgothel/jogl
adbrown85 Jul 3, 2015
ad20d53
Use GLExtensions#VERSION_1_5 in TextRenderer
adbrown85 Jul 3, 2015
93333ef
Cleaned up TextRenderer
adbrown85 Jul 5, 2015
b3f25e0
Moved TextRenderer files
adbrown85 Jul 8, 2015
fadcc11
Renamed some TextRenderer utilities
adbrown85 Jul 11, 2015
35d1c75
Moved TextRenderer files again
adbrown85 Jul 11, 2015
9385d72
TextRenderer uses Check utility
adbrown85 Jul 11, 2015
551cc58
Fixed TextRenderer shaders
adbrown85 Jul 12, 2015
b896bb3
Renamed tests for TextRenderer
adbrown85 Jul 14, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,760 changes: 944 additions & 1,816 deletions src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@
backing store, when necessary. */

public class RectanglePacker {

private static final float DEFAULT_EXPANSION_FACTOR = 0.5f;

private final BackingStoreManager manager;
private Object backingStore;
private LevelSet levels;
private static final float EXPANSION_FACTOR = 0.5f;
private final float EXPANSION_FACTOR;
private static final float SHRINK_FACTOR = 0.3f;

private final int initialWidth;
Expand All @@ -76,10 +79,18 @@ public boolean equals(final Object obj) {
public RectanglePacker(final BackingStoreManager manager,
final int initialWidth,
final int initialHeight) {
this(manager, initialWidth, initialHeight, DEFAULT_EXPANSION_FACTOR);
}

public RectanglePacker(final BackingStoreManager manager,
final int initialWidth,
final int initialHeight,
final float expansionFactor) {
this.manager = manager;
levels = new LevelSet(initialWidth, initialHeight);
this.initialWidth = initialWidth;
this.initialHeight = initialHeight;
EXPANSION_FACTOR = expansionFactor;
}

public Object getBackingStore() {
Expand Down
Loading