diff options
author | Sven Gothel <[email protected]> | 2012-10-12 15:10:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-12 15:10:29 +0200 |
commit | e3ee1e25276760cba5db0333301d3ba19d62dd69 (patch) | |
tree | 0d7a01e14de75132856e77b619837b1887d5456a /src/jogl/classes/javax | |
parent | da258d10d4e929bb2993e7a0329ad32d079fd731 (diff) |
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.
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java | 15 |
1 files changed, 14 insertions, 1 deletions
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; } |