Class FixedFuncUtil
- java.lang.Object
-
- com.jogamp.opengl.util.glsl.fixedfunc.FixedFuncUtil
-
public class FixedFuncUtil extends Object
Tool to pipeline GL2ES2 into a fixed function emulation implementing GL2ES1.
-
-
Field Summary
Fields Modifier and Type Field Description static String
mgl_Color
String name forstatic String
mgl_MultiTexCoord
String name forstatic String
mgl_Normal
String name forstatic String
mgl_Vertex
String name for
-
Constructor Summary
Constructors Constructor Description FixedFuncUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getPredefinedArrayIndexName(int glArrayIndex)
Mapping fixed function (client) array indices to GLSL array attribute names.static GL2ES1
wrapFixedFuncEmul(GL gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix)
static GL2ES1
wrapFixedFuncEmul(GL gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix, boolean force, boolean verbose)
-
-
-
Method Detail
-
wrapFixedFuncEmul
public static final GL2ES1 wrapFixedFuncEmul(GL gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix, boolean force, boolean verbose)
- Parameters:
gl
-mode
- one of theShaderSelectionMode
spmvMatrix
- optional pass through PMVMatrix for theFixedFuncHook
andFixedFuncPipeline
- Returns:
- If gl is a GL2ES1 and force is false, return the type cast object,
otherwise create a fixed function emulation pipeline using the given GL2ES2 impl
and hook it to the GLContext via
GLContext.setGL(GL)
. - Throws:
GLException
- if the GL object is neither GL2ES1 nor GL2ES2- See Also:
ShaderSelectionMode.AUTO
,ShaderSelectionMode.COLOR
,ShaderSelectionMode.COLOR_LIGHT_PER_VERTEX
,ShaderSelectionMode#COLOR_TEXTURE
,ShaderSelectionMode#COLOR_TEXTURE_LIGHT_PER_VERTEX
-
wrapFixedFuncEmul
public static final GL2ES1 wrapFixedFuncEmul(GL gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix)
- Parameters:
gl
-mode
- one of theShaderSelectionMode
spmvMatrix
- optional pass through PMVMatrix for theFixedFuncHook
andFixedFuncPipeline
- Returns:
- If gl is a GL2ES1, return the type cast object,
otherwise create a fixed function emulation pipeline using the GL2ES2 impl.
and hook it to the GLContext via
GLContext.setGL(GL)
. - Throws:
GLException
- if the GL object is neither GL2ES1 nor GL2ES2- See Also:
ShaderSelectionMode.AUTO
,ShaderSelectionMode.COLOR
,ShaderSelectionMode.COLOR_LIGHT_PER_VERTEX
,ShaderSelectionMode#COLOR_TEXTURE
,ShaderSelectionMode#COLOR_TEXTURE_LIGHT_PER_VERTEX
-
getPredefinedArrayIndexName
public static String getPredefinedArrayIndexName(int glArrayIndex)
Mapping fixed function (client) array indices to GLSL array attribute names. Useful for uniq mapping of canonical array index names as listed.- See Also:
mgl_Vertex
,GLPointerFunc.GL_VERTEX_ARRAY
,mgl_Normal
,GLPointerFunc.GL_NORMAL_ARRAY
,mgl_Color
,GLPointerFunc.GL_COLOR_ARRAY
,mgl_MultiTexCoord
,GLPointerFunc.GL_TEXTURE_COORD_ARRAY
,GLPointerFunc.glEnableClientState(int)
,GLPointerFunc.glVertexPointer(com.jogamp.opengl.GLArrayData)
,GLPointerFunc.glColorPointer(com.jogamp.opengl.GLArrayData)
,GLPointerFunc.glNormalPointer(com.jogamp.opengl.GLArrayData)
,GLPointerFunc.glTexCoordPointer(com.jogamp.opengl.GLArrayData)
-
-