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
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Renderer Class

Unigine renderer.

To use this class, include the UnigineRenderer.h file.

Renderer Class

Members


void setProjection (const Math::mat4 & projection)

Sets current projection matrix.

Arguments

  • const Math::mat4 & projection - Projection matrix.

void saveState ()

Saves current renderer matrices.

float getZFar ()

Return current far clipping plane.

Return value

Returns current far clipping plane.

void setModelview (const Math::Mat4 & modelview)

Sets current modelview matrix.

Arguments

  • const Math::Mat4 & modelview - Modelview matrix.

void setObjectSurface (int pass, const Ptr<Object> & object, int surface, const Ptr<Shader> & shader, const Ptr<Material> & material)

Set shader and material and initialize all their rendering parameters.

Arguments

  • int pass - Rendering pass.
  • const Ptr<Object> & object - Object smart pointer.
  • int surface - Surface number.
  • const Ptr<Shader> & shader - Shader smart pointer.
  • const Ptr<Material> & material - Material smart pointer.

int getReflectionMask ()

Return current reflection mask.

Return value

Returns current reflection mask.

int isNode ()

Return a value indicates that the node rendering is in process.

Return value

Returns 1 if the node rendering is in process.

void setMaterial (int pass, const Ptr<Material> & material)

Set material and initialize all material textures.

Arguments

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

Math::mat4 getProjection ()

Return current projection matrix.

Return value

Returns current projection matrix.

int getViewportMask ()

Return current viewport mask.

Return value

Returns current viewport mask.

Math::Vec3 getCameraPosition ()

Return current camera position.

Return value

Returns current camera position.

Math::Mat4 getIModelview ()

Return current inverse modelview matrix.

Return value

Returns current inverse modelview matrix.

Math::Mat4 getModelview ()

Return current modelview matrix.

Return value

Returns current modelview matrix.

float getZNear ()

Return current near clipping plane.

Return value

Returns current near clipping plane.

void restoreState ()

Restores current renderer matrices.

void setShader (int pass, const Ptr<Shader> & shader, bool screen_space = false)

Set shader and initialize all shader parameters.

Arguments

  • int pass
  • const Ptr<Shader> & shader
  • bool screen_space

void setObjectSurface (int pass, const Ptr<Object> & object, int surface)

Set shader and material and initialize all their rendering parameters.

Arguments

  • int pass - Rendering pass.
  • const Ptr<Object> & object - Object smart pointer.
  • int surface - Surface number.

void setShaderMaterial (int pass, const Ptr<Shader> & shader, const Ptr<Material> & material)

Set shader and material and initialize all their rendering parameters.

Arguments

  • int pass - Rendering pass.
  • const Ptr<Shader> & shader - Shader smart pointer.
  • const Ptr<Material> & material - Material smart pointer.

int isReflection ()

Return a value indicates that the reflection rendering is in process.

Return value

Returns 1 if the reflection rendering is in process.
Last update: 03.07.2017
Build: ()