diff options
author | Sven Gothel <[email protected]> | 2012-02-25 13:57:48 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-25 13:57:48 +0100 |
commit | 1c8f158c57a13274e3776d3ecb24cbd1c9765741 (patch) | |
tree | f9688983c920aef64827fb5b0346329b1d8f3cf6 /src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | |
parent | 49114a63102c745b3db204315ad9525d61767d57 (diff) |
Min. Graph Parameter type change: texSize/width/.. for multipass-renderer: int -> int[]
"texWidth desired texture width for multipass-rendering.
The actual used texture-width is written back when mp rendering is enabled, otherwise the store is untouched."
This allows the 'backend' to correct the texSize, ie in regards to GL_MAX_TEXTURE_SIZE .. etc.
Without this write-back, it would re-create the FBO for every frame.
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java index 86d962fd8..2f078d7bb 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java @@ -54,10 +54,11 @@ public abstract class RegionRenderer extends Renderer { * the triangles of the shapes will be generated, if not yet generated * @param region the OutlineShape to Render. * @param position the initial translation of the outlineShape. - * @param texSize texture size for multipass render + * @param texWidth desired texture width for multipass-rendering. + * The actual used texture-width is written back when mp rendering is enabled, otherwise the store is untouched. * @throws Exception if HwRegionRenderer not initialized */ - public final void draw(GL2ES2 gl, Region region, float[] position, int texSize) { + public final void draw(GL2ES2 gl, Region region, float[] position, int[/*1*/] texWidth) { if(!isInitialized()) { throw new GLException("RegionRenderer: not initialized!"); } @@ -65,14 +66,14 @@ public abstract class RegionRenderer extends Renderer { throw new GLException("Incompatible render modes, : region modes "+region.getRenderModes()+ " doesn't contain renderer modes "+this.getRenderModes()); } - drawImpl(gl, region, position, texSize); + drawImpl(gl, region, position, texWidth); } /** * Usually just dispatched the draw call to the Region's draw implementation, - * e.g. {@link com.jogamp.graph.curve.opengl.GLRegion#draw(GL2ES2, RenderState, int, int, int) GLRegion#draw(GL2ES2, RenderState, int, int, int)}. + * e.g. {@link com.jogamp.graph.curve.opengl.GLRegion#draw(GL2ES2, RenderState, int, int, int[]) GLRegion#draw(GL2ES2, RenderState, int, int, int[])}. */ - protected abstract void drawImpl(GL2ES2 gl, Region region, float[] position, int texSize); + protected abstract void drawImpl(GL2ES2 gl, Region region, float[] position, int[] texWidth); @Override protected void destroyImpl(GL2ES2 gl) { |