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
Core Library
Containers
Engine Classes
Node-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-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.

Ptr<Texture> getScreenDepthTexture ()

Returns the screen depth texture.

Return value

Texture smart pointer.

int getBlendSrcFunc ()

Returns the source blending function.

Return value

Source blending function.

Ptr<Texture> getDeferredSpecularTexture ()

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

Return value

Texture smart pointer.

int getStencilFunc ()

Returns the stencil function.

Return value

Stencil function.

void setTexture (int binding, int num, const Ptr<Texture> & texture)

Sets the texture.

Arguments

  • int binding - Binding.
  • int num - Texture unit number.
  • const Ptr<Texture> & texture

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

Ptr<Texture> getDeferredTextureDecalMask ()

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

Return value

Texture smart pointer.

Ptr<Texture> getDeferredVelocityTexture ()

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

Return value

Texture smart pointer.

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 (const Ptr<Shader> & shader)

Sets the shader.

Arguments

  • const Ptr<Shader> & shader - Shader smart pointer.

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 (const Ptr<Material> & material)

Sets the material.

Arguments

  • const Ptr<Material> & material - Material smart pointer..

Ptr<Texture> getTexture (int num)

Returns the current texture.

Arguments

  • int num

Return value

Texture smart pointer.

Ptr<Texture> getDeferredDepthTexture ()

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

Return value

Texture smart pointer.

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.

Ptr<Texture> getDeferredDiffuseTexture ()

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

Return value

Texture smart pointer.

int getBufferMask (int num)

Returns buffer mask.

Arguments

  • int num - Buffer number.

Return value

Buffer mask.

void clearBuffer (int buffer, const Math::vec4 & color, float depth = 1.0f, int stencil = 0)

Clears the currently attached buffer.

Arguments

  • int buffer - Buffer mask.
  • const Math::vec4 & color - Color value to clear.
  • float depth - Depth value to clear.
  • int stencil - Stencil value to clear.

Ptr<Texture> getDeferredReflectionTexture ()

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

Return value

Texture smart pointer.

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.

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

Ptr<Material> getMaterial ()

Returns the current material.

Return value

Material smart pointer.

int getPolygonCull ()

Returns the polygon cull mode.

Return value

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

Ptr<Texture> getDeferredLightTexture ()

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

Return value

Texture smart pointer.

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.

Ptr<Texture> getDeferredOcclusionTexture ()

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

Return value

Texture smart pointer.

float getPolygonSlope ()

Returns the polygon slope offset.

Return value

Polygon slope offset.

int getStencilRef ()

returns the stencil reference value.

Return value

Stencil reference value.

Ptr<Texture> getDeferredNormalTexture ()

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

Return value

Texture smart pointer.

void setBufferMask (int num, int mask)

Sets the buffer mask.

Arguments

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

int BUFFER_NONE

int BUFFER_RED

int BUFFER_GREEN

int BUFFER_BLUE

int BUFFER_ALPHA

int BUFFER_DEPTH

int BUFFER_STENCIL

int BUFFER_COLOR

int BUFFER_DEPTH_STENCIL

int BUFFER_ALL

int DEPTH_NONE

int DEPTH_EQUAL

int DEPTH_LEQUAL

int DEPTH_GEQUAL

int DEPTH_ALWAYS

int STENCIL_NONE

int STENCIL_EQUAL

int STENCIL_ALWAYS

int STENCIL_KEEP

int STENCIL_INCR

int STENCIL_REPLACE

int BLEND_NONE

int BLEND_ZERO

int BLEND_ONE

int BLEND_SRC_COLOR

int BLEND_ONE_MINUS_SRC_COLOR

int BLEND_SRC_ALPHA

int BLEND_ONE_MINUS_SRC_ALPHA

int BLEND_DEST_COLOR

int BLEND_ONE_MINUS_DEST_COLOR

int BLEND_DEST_ALPHA

int BLEND_ONE_MINUS_DEST_ALPHA

int BLEND_SRC1_COLOR

int BLEND_ONE_MINUS_SRC1_COLOR

int BLEND_SRC1_ALPHA

int BLEND_ONE_MINUS_SRC1_ALPHA

int ALPHA_NONE

int ALPHA_COVERAGE

int FRONT_CCW

int FRONT_CW

int FRONT_INVERT

int CULL_NONE

int CULL_BACK

int CULL_FRONT

int FILL_SOLID

int FILL_WIREFRAME

int BIND_ALL

int BIND_FRAGMENT

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