RenderState Class
RenderState Class
Members
int getBlendDestFunc()
Returns the destination blending function.Return value
Destination blending function.void setBlendFunc(int src, int dest)
Sets blending function (use the BLEND_* variables).Arguments
- int src - Source blending function.
- int dest - Destination blending function.
int getBlendSrcFunc()
Returns the source blending function.Return value
Source blending function.void setBufferMask(int num, int mask)
Sets the buffer mask.Arguments
- int num - Buffer number.
- int mask - Buffer mask.
int getBufferMask(int num)
Returns buffer mask.Arguments
- int num - Buffer number.
Return value
Buffer mask.void setDepthFunc(int func)
Sets the depth function.Arguments
- int func - Depth function
int getDepthFunc()
Returns the current depth function.Return value
The depth function (one of the DEPTH_* variables).int getHeight()
Returns the viewport height.Return value
Viewport height.void setMaterial(Material material)
Sets the material.Arguments
- Material material - Material.
Material getMaterial()
Returns the current material.Return value
Material.float getPolygonBias()
Returns the polygon bias offset.void setPolygonCull(int cull)
Sets the polygon cull mode.Arguments
- int cull - The polygon cull mode (one of the CULL_* variables).
int getPolygonCull()
Returns the polygon cull mode.Return value
Polygon cull mode (one of the CULL_* variables).void setPolygonFill(int fill)
Arguments
- int fill - Polygon fill mode (one of the FILL_* variables).
int getPolygonFill()
Returns the polygon fill mode.Return value
Polygon fill mode.void setPolygonFront(int front)
Set the polygon mode to front.Arguments
- int front - 1 - enable the front mode; 0 - disable it.
int getPolygonFront()
Returns value indicating if the polygon front mode is set.Return value
1 if the polygon front mode is set; otherwise - 0.void setPolygonOffset(float bias, float offset)
Sets the polygon offset value.Arguments
- float bias - Polygon bias offset.
- float offset - Polygon slope offset.
float getPolygonSlope()
Returns the polygon slope offset.Return value
Polygon slope offset.void setScissorTest(float x, float y, float width, float height)
Sets scissor test.Arguments
- float x - The X coordinate.
- float y - The Y coordinate.
- float width - Viewport width.
- float height - Viewport height.
void setScissorTest(ivec4 rectangle)
Arguments
- ivec4 rectangle
void setScissorTest(vec4 rectangle)
Arguments
- vec4 rectangle
int getScissorTest()
Returns the scissors test status.Return value
Scissors test status.getScreenColorTexture()
Texture getScreenDepthTexture()
Returns the screen depth texture.Return value
Texture.void setShader(Shader shader)
Sets the shader.Arguments
- Shader shader - Shader.
Shader getShader()
void setStencilFunc(int func, int pass, int ref)
Sets the stencil function.Arguments
- int func - Stencil function.
- int pass - Stencil operation.
- int ref - Stencil reference value.
int getStencilFunc()
Returns the stencil function.Return value
Stencil function.int getStencilPass()
Returns the stencil mode.Return value
The stencil mode (one of the STENCIL_* variables.)int getStencilRef()
returns the stencil reference value.Return value
Stencil reference value.void setStructuredBuffer(int num, StructuredBuffer buffer)
Sets given StructuredBuffer to the render state.Arguments
- int num - StructuredBuffer unit number.
- StructuredBuffer buffer - A pointer to the StructuredBuffer.
void setTexture(int binding, int num, Texture texture)
Sets the texture.Arguments
- int binding - Binding.
- int num - Texture unit number.
- Texture texture - Texture.
Texture getTexture(int num)
Returns the current texture.Arguments
- int num
Return value
Texture.void setViewport(int x, int y, int width, int height)
Sets the viewport size and position.Arguments
- int x - The X coordinate.
- int y - The Y coordinate.
- int width - The width.
- int height - The height.
int getWidth()
Returns the viewport width.Return value
Viewport width.void clearBuffer(int buffer, vec4 color, float depth = 1.0f, int stencil = 0)
Clears the currently attached buffer.Arguments
- int buffer - Buffer mask.
- vec4 color - Color value to clear.
- float depth - Depth value to clear.
- int stencil - Stencil value to clear.
void clearStates()
Clears all states.void clearTextures()
void flushRender()
Flushes the render.void flushStates()
Flushes all states.void restoreState()
void saveState()
int RENDER_STATE_ALPHA_COVERAGE
int RENDER_STATE_ALPHA_NONE
int RENDER_STATE_BIND_ALL
int RENDER_STATE_BIND_FRAGMENT
int RENDER_STATE_BLEND_DEST_ALPHA
int RENDER_STATE_BLEND_DEST_COLOR
int RENDER_STATE_BLEND_NONE
int RENDER_STATE_BLEND_ONE
int RENDER_STATE_BLEND_ONE_MINUS_DEST_ALPHA
int RENDER_STATE_BLEND_ONE_MINUS_DEST_COLOR
int RENDER_STATE_BLEND_ONE_MINUS_SRC1_ALPHA
int RENDER_STATE_BLEND_ONE_MINUS_SRC1_COLOR
int RENDER_STATE_BLEND_ONE_MINUS_SRC_ALPHA
int RENDER_STATE_BLEND_ONE_MINUS_SRC_COLOR
int RENDER_STATE_BLEND_SRC1_ALPHA
int RENDER_STATE_BLEND_SRC1_COLOR
int RENDER_STATE_BLEND_SRC_ALPHA
int RENDER_STATE_BLEND_SRC_COLOR
int RENDER_STATE_BLEND_ZERO
int RENDER_STATE_BUFFER_ALL
int RENDER_STATE_BUFFER_ALPHA
int RENDER_STATE_BUFFER_BLUE
int RENDER_STATE_BUFFER_COLOR
int RENDER_STATE_BUFFER_DEPTH
int RENDER_STATE_BUFFER_DEPTH_STENCIL
int RENDER_STATE_BUFFER_GREEN
int RENDER_STATE_BUFFER_NONE
int RENDER_STATE_BUFFER_RED
int RENDER_STATE_BUFFER_STENCIL
int RENDER_STATE_CULL_BACK
int RENDER_STATE_CULL_FRONT
int RENDER_STATE_CULL_NONE
int RENDER_STATE_DEPTH_ALWAYS
int RENDER_STATE_DEPTH_EQUAL
int RENDER_STATE_DEPTH_GEQUAL
int RENDER_STATE_DEPTH_LEQUAL
int RENDER_STATE_DEPTH_NONE
int RENDER_STATE_FILL_SOLID
int RENDER_STATE_FILL_WIREFRAME
int RENDER_STATE_FRONT_CCW
int RENDER_STATE_FRONT_CW
int RENDER_STATE_FRONT_INVERT
int RENDER_STATE_STENCIL_ALWAYS
int RENDER_STATE_STENCIL_EQUAL
int RENDER_STATE_STENCIL_INCR
int RENDER_STATE_STENCIL_KEEP
int RENDER_STATE_STENCIL_NONE
int RENDER_STATE_STENCIL_REPLACE
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)