Top Description Fields Constructors Methods
com.jogamp.opengl.util.glsl.fixedfunc

public Class FixedFuncUtil

extends Object
Class Inheritance
Imports
com.jogamp.opengl.GL, .GL2ES1, .GL2ES2, .GLContext, .GLException, com.jogamp.opengl.fixedfunc.GLPointerFuncUtil, jogamp.opengl.util.glsl.fixedfunc.FixedFuncHook, .FixedFuncImpl, .FixedFuncPipeline, com.jogamp.opengl.util.PMVMatrix

Tool to pipeline GL2ES2 into a fixed function emulation implementing GL2ES1.

Field Summary

Modifier and TypeField and Description
public static final String
mgl_Color

String name for

public static final String
mgl_MultiTexCoord

String name for

public static final String
mgl_Normal

String name for

public static final String
mgl_Vertex

String name for

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String
getPredefinedArrayIndexName(final int glArrayIndex)

Mapping fixed function (client) array indices to GLSL array attribute names.

public static final GL2ES1

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).
wrapFixedFuncEmul
(final GL gl, final ShaderSelectionMode mode, final PMVMatrix
optional pass through PMVMatrix for the FixedFuncHook and FixedFuncPipeline
pmvMatrix
,
final boolean force, final boolean verbose)

public static final GL2ES1

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).
wrapFixedFuncEmul
(final GL gl, final ShaderSelectionMode mode, final PMVMatrix
optional pass through PMVMatrix for the FixedFuncHook and FixedFuncPipeline
pmvMatrix
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mgl_Colorback to summary
public static final String mgl_Color

String name for

See Also
com.jogamp.opengl.GL2#GL_COLOR_ARRAY
mgl_MultiTexCoordback to summary
public static final String mgl_MultiTexCoord

String name for

See Also
com.jogamp.opengl.GL2#GL_TEXTURE_COORD_ARRAY
mgl_Normalback to summary
public static final String mgl_Normal

String name for

See Also
com.jogamp.opengl.GL2#GL_NORMAL_ARRAY
mgl_Vertexback to summary
public static final String mgl_Vertex

String name for

See Also
com.jogamp.opengl.GL2#GL_VERTEX_ARRAY

Constructor Detail

FixedFuncUtilback to summary
public FixedFuncUtil()

Method Detail

getPredefinedArrayIndexNameback to summary
public static String getPredefinedArrayIndexName(final 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, com.jogamp.opengl.fixedfunc.GLPointerFunc#GL_VERTEX_ARRAY, mgl_Normal, com.jogamp.opengl.fixedfunc.GLPointerFunc#GL_NORMAL_ARRAY, mgl_Color, com.jogamp.opengl.fixedfunc.GLPointerFunc#GL_COLOR_ARRAY, mgl_MultiTexCoord, com.jogamp.opengl.fixedfunc.GLPointerFunc#GL_TEXTURE_COORD_ARRAY, com.jogamp.opengl.fixedfunc.GLPointerFunc#glEnableClientState, com.jogamp.opengl.fixedfunc.GLPointerFunc#glVertexPointer, com.jogamp.opengl.fixedfunc.GLPointerFunc#glColorPointer, com.jogamp.opengl.fixedfunc.GLPointerFunc#glNormalPointer, com.jogamp.opengl.fixedfunc.GLPointerFunc#glTexCoordPointer
wrapFixedFuncEmulback to summary
public static final GL2ES1 wrapFixedFuncEmul(final GL gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix, final boolean force, final boolean verbose)
Parameters
mode:ShaderSelectionMode

one of the ShaderSelectionModes

pmvMatrix:PMVMatrix

optional pass through PMVMatrix for the FixedFuncHook and FixedFuncPipeline

Returns:GL2ES1

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).

Exceptions
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
wrapFixedFuncEmulback to summary
public static final GL2ES1 wrapFixedFuncEmul(final GL gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix)
Parameters
mode:ShaderSelectionMode

one of the ShaderSelectionModes

pmvMatrix:PMVMatrix

optional pass through PMVMatrix for the FixedFuncHook and FixedFuncPipeline

Returns:GL2ES1

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).

Exceptions
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