Programming
Fundamentals
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
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes

Unigine::Renderer Class

Header:#include <UnigineRender.h>

A basic interface for setting a renderer state (changing rendering passes parameters): pass shader uniforms, set modelview and projection matrices, etc. This class is used for rendering custom nodes (for example, a node inherited from ObjectExtern).

Renderer Class

Members


Renderer * get()

Returns a Renderer instance.

Return value

Renderer instance.

Math::Vec3 getCameraPosition()

Returns current camera position.

Return value

Returns current camera position.

Math::Mat4 getIModelview()

Returns current inverse modelview matrix.

Return value

Returns current inverse modelview matrix.

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

Sets material and initialize all material textures.

Arguments

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

void setModelview(const Math::Mat4 & modelview)

Sets current modelview matrix.

Arguments

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

Math::Mat4 getModelview()

Returns current modelview matrix.

Return value

Returns current modelview matrix.

int isNode()

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

Return value

Returns 1 if the node rendering is in process.

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

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

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

Sets 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 setProjection(const Math::mat4 & projection)

Sets current projection matrix.

Arguments

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

Math::mat4 getProjection()

Returns current projection matrix.

Return value

Returns current projection matrix.

int isReflection()

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

Return value

Returns 1 if the reflection rendering is in process.

int getReflectionMask()

Returns current reflection mask.

Return value

Returns current reflection mask.

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

Sets shader and initialize all shader parameters.

Arguments

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

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

Sets 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 getViewportMask()

Returns current viewport mask.

Return value

Returns current viewport mask.

float getZFar()

Return current far clipping plane.

Return value

Returns current far clipping plane.

float getZNear()

Returns current near clipping plane.

Return value

Returns current near clipping plane.

void restoreState()

Restores current renderer matrices.
Warning
This function is deprecated and will be removed in the next release.

void saveState()

Saves current renderer matrices.
Warning
This function is deprecated and will be removed in the next release.
Last update: 2017-07-03