Package com.jogamp.graph.curve.opengl
Class RenderState
java.lang.Object
com.jogamp.graph.curve.opengl.RenderState
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBitfield hint,if setstating enabledGL.GL_BLEND, otherwise disabled.static final intBitfield hint,if setstating globally enabledGL.GL_DEPTH_TEST, otherwise disabled. -
Method Summary
Modifier and TypeMethodDescriptionfinal RenderStatefinal voidclearHintMask(int mask) static RenderStatecreateRenderState(Vertex.Factory<? extends Vertex> pointFactory) static RenderStatecreateRenderState(Vertex.Factory<? extends Vertex> pointFactory, PMVMatrix pmvMatrix) voidfinal booleandetachFrom(GL2ES2 gl) final float[]getColorStatic(float[] rgbaColor) final PMVMatrixstatic final RenderStategetRenderState(GL2ES2 gl) final ShaderProgramfinal Vertex.Factory<? extends Vertex>final floatfinal intid()final booleanisHintMaskSet(int mask) final booleanstatic booleanisWeightValid(float v) final voidsetColorStatic(float r, float g, float b, float a) final voidsetHintMask(int mask) final booleansetShaderProgram(GL2ES2 gl, ShaderProgram spNext) Set aShaderProgramand enable it.final voidsetWeight(float v) toString()final booleanupdateAttributeLoc(GL2ES2 gl, boolean updateLocation, GLArrayDataServer data, boolean throwOnError) final booleanupdateUniformDataLoc(GL2ES2 gl, boolean updateLocation, boolean updateData, GLUniformData data, boolean throwOnError) final booleanupdateUniformLoc(GL2ES2 gl, boolean updateLocation, GLUniformData data, boolean throwOnError)
-
Field Details
-
BITHINT_BLENDING_ENABLED
public static final int BITHINT_BLENDING_ENABLEDBitfield hint,if setstating enabledGL.GL_BLEND, otherwise disabled.Shall be set via
setHintMask(int)and cleared viaclearHintMask(int).If set,
GLRegion's draw-methodwill set the properblend-functionand the clear-color to transparent-black in case ofmultipassFBO rendering.Shall be set by custom code, e.g. via
RegionRenderer's enable and disableRegionRenderer.GLCallbackas done inRegionRenderer.defaultBlendEnableandRegionRenderer.defaultBlendDisable.- See Also:
-
BITHINT_GLOBAL_DEPTH_TEST_ENABLED
public static final int BITHINT_GLOBAL_DEPTH_TEST_ENABLEDBitfield hint,if setstating globally enabledGL.GL_DEPTH_TEST, otherwise disabled.Shall be set via
setHintMask(int)and cleared viaclearHintMask(int).GLRegion's draw-methodmay toggle depth test, and reset it's state according to this hint.Shall be set by custom code, e.g. after
RenderStateorRegionRendererconstruction.- See Also:
-
-
Method Details
-
createRenderState
-
createRenderState
public static RenderState createRenderState(Vertex.Factory<? extends Vertex> pointFactory, PMVMatrix pmvMatrix) -
getRenderState
-
id
public final int id() -
getShaderProgram
-
isShaderProgramInUse
public final boolean isShaderProgramInUse() -
setShaderProgram
Set aShaderProgramand enable it. If the givenShaderProgramis new, method returns true, otherwise false.- Parameters:
gl-spNext-- Returns:
- true if a new shader program is being used and hence external uniform-data and -location, as well as the attribute-location must be updated, otherwise false.
-
getVertexFactory
-
getMatrix
-
isWeightValid
public static boolean isWeightValid(float v) -
getWeight
public final float getWeight() -
setWeight
public final void setWeight(float v) -
getColorStatic
public final float[] getColorStatic(float[] rgbaColor) -
setColorStatic
public final void setColorStatic(float r, float g, float b, float a) -
updateUniformLoc
public final boolean updateUniformLoc(GL2ES2 gl, boolean updateLocation, GLUniformData data, boolean throwOnError) - Parameters:
gl-updateLocation-data-throwOnError- TODO- Returns:
- true if no error occured, i.e. all locations found, otherwise false.
-
updateUniformDataLoc
public final boolean updateUniformDataLoc(GL2ES2 gl, boolean updateLocation, boolean updateData, GLUniformData data, boolean throwOnError) - Parameters:
gl-updateLocation-updateData- TODOdata-throwOnError- TODO- Returns:
- true if no error occured, i.e. all locations found, otherwise false.
-
updateAttributeLoc
public final boolean updateAttributeLoc(GL2ES2 gl, boolean updateLocation, GLArrayDataServer data, boolean throwOnError) - Parameters:
gl-data-throwOnError- TODO- Returns:
- true if no error occured, i.e. all locations found, otherwise false.
-
isHintMaskSet
public final boolean isHintMaskSet(int mask) -
setHintMask
public final void setHintMask(int mask) -
clearHintMask
public final void clearHintMask(int mask) -
destroy
-
attachTo
-
detachFrom
-
toString
-