diff options
author | Sven Gothel <[email protected]> | 2014-04-04 02:30:00 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-04-04 02:30:00 +0200 |
commit | 9c71f276d1fcc87b69b413847fd1da34b30d0932 (patch) | |
tree | 71f738861036221827062450a9d7d4cff5a9f766 /src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java | |
parent | abc833631e0ab30a06c7aff47a39a551544fd735 (diff) |
Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + TextureSequence to Region (Demo: TextureButton)
Cleanup shader-program location/data update
- GLUniformData:
- Allow lazy data setup, as used for
RenderState.ProgramLocal, see below
- RenderState
- Separate data (pmv, weight, colorStatic) from
program-local uniforms -> add class ProgramLocal.
Reduces uniform location lookups, since
ProgramLocal is bound to Region impl.
- ProgramLocal.update(..) needs to write uniform data always,
since data is being used in multiple programs!
- No 'dirty' tracking possible, removed - see above.
- RegionRenderer
- Fix shader-selection: 2-pass programs differ from 1-pass!
- No shader-setup at init
+++
Add COLORTEXTURE + TextureSequence to Region
- Create color-texture coords in vertex-shader via region's bounding box (pass-1)
- Use color-texture unit in pass-1 if enabled (own shader program)
- Use TextureSequence in Region impl. providing all required data (unit + texture-name)
- Demo: TextureButton (a UIShape)
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java index f944843e9..aadbecc91 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java @@ -178,7 +178,7 @@ public class TextRegionUtil { final int special = 0; GLRegion region = getCachedRegion(font, str, pixelSize, special); if(null == region) { - region = GLRegion.create(renderModes); + region = GLRegion.create(renderModes, null); addStringToRegion(region, renderer.getRenderState().getVertexFactory(), font, pixelSize, str, rgbaColor, tempT1, tempT2); addCachedRegion(gl, font, str, pixelSize, special, region); } @@ -213,7 +213,7 @@ public class TextRegionUtil { if(!renderer.isInitialized()){ throw new GLException("TextRendererImpl01: not initialized!"); } - final GLRegion region = GLRegion.create(renderModes); + final GLRegion region = GLRegion.create(renderModes, null); addStringToRegion(region, renderer.getRenderState().getVertexFactory(), font, pixelSize, str, rgbaColor, temp1, temp2); region.draw(gl, renderer, sampleCount); region.destroy(gl); |