From 1c8f158c57a13274e3776d3ecb24cbd1c9765741 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Sat, 25 Feb 2012 13:57:48 +0100
Subject: 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.
---
 src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java')

diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
index 749c7ef65..63713887b 100755
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
@@ -114,14 +114,16 @@ public abstract class GLRegion extends Region {
      * current width/hight of window for multi pass rendering
      * of the region.
      * @param matrix current {@link PMVMatrix}.
+     * @param rs the RenderState to be used
      * @param vp_width current screen width
      * @param vp_height current screen height
-     * @param width texture width for mp rendering
+     * @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.
      */
-    public final void draw(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width) {
+    public final void draw(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int[/*1*/] texWidth) {
         update(gl, rs);
-        drawImpl(gl, rs, vp_width, vp_height, width);
+        drawImpl(gl, rs, vp_width, vp_height, texWidth);
     }
     
-    protected abstract void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width);
+    protected abstract void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int[/*1*/] texWidth);
 }
-- 
cgit v1.2.3