From e3ee1e25276760cba5db0333301d3ba19d62dd69 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Fri, 12 Oct 2012 15:10:29 +0200
Subject: Enhance FixedFuncPipeline: Multi-Texture, Tex-Env, Alpha-Test,
 Lighting (fix, incomplete still), ShaderSelectionMode, Fix default values

Besides the above mentioned additional features towards completness of the FFP emu,
the ShaderSelectionMode allows fixating a shader program configuration,
i.e. AUTO switch (default) or choosing a static shader program to avoid heavy program switches
incl. uniform/attribute updates.
---
 .../javax/media/opengl/fixedfunc/GLPointerFuncUtil.java   | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java')

diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
index e52154c7d..79ec38e0c 100644
--- a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
@@ -40,6 +40,15 @@ public class GLPointerFuncUtil {
      * @return default fixed function array name 
      */
     public static String getPredefinedArrayIndexName(int glArrayIndex) {
+        return getPredefinedArrayIndexName(glArrayIndex, -1);
+    }
+    
+    /**
+     * @param glArrayIndex the fixed function array index
+     * @param multiTexCoordIndex index for multiTexCoordIndex  
+     * @return default fixed function array name 
+     */
+    public static String getPredefinedArrayIndexName(int glArrayIndex, int multiTexCoordIndex) {
         switch(glArrayIndex) {
             case GLPointerFunc.GL_VERTEX_ARRAY:
                 return mgl_Vertex;
@@ -48,7 +57,11 @@ public class GLPointerFuncUtil {
             case GLPointerFunc.GL_COLOR_ARRAY:
                 return mgl_Color;
             case GLPointerFunc.GL_TEXTURE_COORD_ARRAY:
-                return mgl_MultiTexCoord;
+                if(0<=multiTexCoordIndex) {
+                    return mgl_MultiTexCoord+multiTexCoordIndex;
+                } else {
+                    return mgl_MultiTexCoord+multiTexCoordIndex;
+                }
         }
         return null;
     }
-- 
cgit v1.2.3