state
Tag: state
Parent tag:
Attributes: name (string)
Child tags:
ORDER(int) – materials with lower order numbers are drawn first. Default is 0. Materials with negative orders are not drawn.DEPTH_TEST(bool) – enable/disable depth testingDEPTH_FUNC(enum) – {LESS(default),NEVER, ALWAYS, LEQUAL, EQUAL, GEQUAL, GREATER, NOT_EQUAL}DEPTH_MASK(bool) – enable/disable depth writingCULL_FACE(bool) – enable/disable cullingCULL_TYPE(enum) – {BACK(default),FRONT, FRONT_AND_BACK}COLOR_MASK(bvec4) – enable/disable writing in the individual color channelsBLEND(bool) – enable/disable blendingBLEND_SRC, BLEND_DST(enum) – {ONE(default forBLEND_SRC),ZERO (default for}BLEND_DST), SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR, SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, SRC_ALPHA_SATURATE, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, ONE_MINUS_CONSTANT_ALPHABLEND_EQUATION(enum) – {ADD(default),SUBTRACT, REVERSE_SUBTRACT, MIN, MAX}BLEND_COLOR(vec4) – the constant blend color mentioned inBLEND_SRCandBLEND_DST
This tag defines a state that can later be used in a material.
All tags, except ORDER should be clear to OpenGL developers. ORDER specifies the rendering order and can be useful to guarantee that materials with transparency are drawn last.
Example:
<state > <ORDER value="2" /> <BLEND value="TRUE" /> <BLEND_SRC value="SRC_ALPHA" /> <BLEND_DST value="ONE_MINUS_SRC_ALPHA" /> </state>