This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Utility Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

RenderState Class

RenderState Class

Members


int getWidth ()

Returns the viewport width.

Return value

Viewport width.

void setPolygonFront (int front)

Set the polygon mode to front.

Arguments

  • int front - 1 - enable the front mode; 0 - disable it.

Texture getScreenDepthTexture ()

Returns the screen depth texture.

Return value

Texture.

getScreenColorTexture ()

int getBlendSrcFunc ()

Returns the source blending function.

Return value

Source blending function.

Texture getDeferredSpecularTexture ()

Returns the current specular part of the G-buffer that have been rendered.

Return value

Texture.

int getStencilFunc ()

Returns the stencil function.

Return value

Stencil function.

void setTexture (int binding, int num, Texture texture)

Sets the texture.

Arguments

  • int binding - Binding.
  • int num - Texture unit number.
  • Texture texture - Texture.Texture smart pointer.

void setPolygonOffset (float bias, float offset)

Sets the polygon offset value.

Arguments

  • float bias - Polygon bias offset.
  • float offset - Polygon slope offset.

void flushStates ()

Flushes all states.

void clearStates ()

Clears all states.

void setDepthFunc (int func)

Sets the depth function.

Arguments

  • int func - Depth function

int getPolygonFill ()

Returns the polygon fill mode.

Return value

Polygon fill mode.

void clearTextures ()

void setPolygonFill (int fill)

Arguments

  • int fill - Polygon fill mode (one of the FILL_* variables).

Texture getDeferredTextureDecalMask ()

Returns the decal mask that have been rendered in the G-buffer.

Return value

Texture.

Texture getDeferredVelocityTexture ()

Returns the current velocity part of the G-buffer that have been rendered.

Return value

Texture.

float getPolygonBias ()

Returns the polygon bias offset.

Return value

void setPolygonCull (int cull)

Sets the polygon cull mode.

Arguments

  • int cull - The polygon cull mode (one of the CULL_* variables).

int getHeight ()

Returns the viewport height.

Return value

Viewport height.

void setShader (Shader shader)

Sets the shader.

Arguments

  • Shader shader - Shader.

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.

void setMaterial (Material material)

Sets the material.

Arguments

  • Material material - Material.

Texture getTexture (int num)

Returns the current texture.

Arguments

  • int num

Return value

Texture.

Texture getDeferredDepthTexture ()

Returns the current depth part of the G-buffer that have been rendered.

Return value

Texture.

int getStencilPass ()

Returns the stencil mode.

Return value

The stencil mode (one of the STENCIL_* variables.)

int getPolygonFront ()

Returns value indicating if the polygon front mode is set.

Return value

1 if the polygon front mode is set; otherwise - 0.

int getDepthFunc ()

Returns the current depth function.

Return value

The depth function (one of the DEPTH_* variables).

void flushRender ()

Flushes the render.

int getScissorTest ()

Returns the scissors test status.

Return value

Scissors test status.

Texture getDeferredDiffuseTexture ()

Returns the current diffuse part of the G-buffer that have been rendered.

Return value

Texture.

int getBufferMask (int num)

Returns buffer mask.

Arguments

  • int num - Buffer number.

Return value

Buffer mask.

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.

Texture getDeferredReflectionTexture ()

Returns the current reflection part of the G-buffer that have been rendered.

Return value

Texture.

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.

Shader getShader ()

Return value

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.

Material getMaterial ()

Returns the current material.

Return value

Material.

int getPolygonCull ()

Returns the polygon cull mode.

Return value

Polygon cull mode (one of the CULL_* variables).

Texture getDeferredLightTexture ()

Returns the current light part of the G-buffer that have been rendered.

Return value

Texture.

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 getBlendDestFunc ()

Returns the destination blending function.

Return value

Destination blending function.

Texture getDeferredOcclusionTexture ()

Returns the current occlusion part of the G-buffer that have been rendered.

Return value

Texture.

float getPolygonSlope ()

Returns the polygon slope offset.

Return value

Polygon slope offset.

int getStencilRef ()

returns the stencil reference value.

Return value

Stencil reference value.

Texture getDeferredNormalTexture ()

Returns the current normal part of the G-buffer that have been rendered.

Return value

Texture.

void setBufferMask (int num, int mask)

Sets the buffer mask.

Arguments

  • int num - Buffer number.
  • int mask - Buffer mask.

int RENDER_STATE_BUFFER_NONE

int RENDER_STATE_BUFFER_RED

int RENDER_STATE_BUFFER_GREEN

int RENDER_STATE_BUFFER_BLUE

int RENDER_STATE_BUFFER_ALPHA

int RENDER_STATE_BUFFER_DEPTH

int RENDER_STATE_BUFFER_STENCIL

int RENDER_STATE_BUFFER_COLOR

int RENDER_STATE_BUFFER_DEPTH_STENCIL

int RENDER_STATE_BUFFER_ALL

int RENDER_STATE_DEPTH_NONE

int RENDER_STATE_DEPTH_EQUAL

int RENDER_STATE_DEPTH_LEQUAL

int RENDER_STATE_DEPTH_GEQUAL

int RENDER_STATE_DEPTH_ALWAYS

int RENDER_STATE_STENCIL_NONE

int RENDER_STATE_STENCIL_EQUAL

int RENDER_STATE_STENCIL_ALWAYS

int RENDER_STATE_STENCIL_KEEP

int RENDER_STATE_STENCIL_INCR

int RENDER_STATE_STENCIL_REPLACE

int RENDER_STATE_BLEND_NONE

int RENDER_STATE_BLEND_ZERO

int RENDER_STATE_BLEND_ONE

int RENDER_STATE_BLEND_SRC_COLOR

int RENDER_STATE_BLEND_ONE_MINUS_SRC_COLOR

int RENDER_STATE_BLEND_SRC_ALPHA

int RENDER_STATE_BLEND_ONE_MINUS_SRC_ALPHA

int RENDER_STATE_BLEND_DEST_COLOR

int RENDER_STATE_BLEND_ONE_MINUS_DEST_COLOR

int RENDER_STATE_BLEND_DEST_ALPHA

int RENDER_STATE_BLEND_ONE_MINUS_DEST_ALPHA

int RENDER_STATE_BLEND_SRC1_COLOR

int RENDER_STATE_BLEND_ONE_MINUS_SRC1_COLOR

int RENDER_STATE_BLEND_SRC1_ALPHA

int RENDER_STATE_BLEND_ONE_MINUS_SRC1_ALPHA

int RENDER_STATE_ALPHA_NONE

int RENDER_STATE_ALPHA_COVERAGE

int RENDER_STATE_FRONT_CCW

int RENDER_STATE_FRONT_CW

int RENDER_STATE_FRONT_INVERT

int RENDER_STATE_CULL_NONE

int RENDER_STATE_CULL_BACK

int RENDER_STATE_CULL_FRONT

int RENDER_STATE_FILL_SOLID

int RENDER_STATE_FILL_WIREFRAME

int RENDER_STATE_BIND_ALL

int RENDER_STATE_BIND_FRAGMENT

Last update: 2017-07-03
Build: ()