This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Renderer Class

Unigine renderer.

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

Unigine::Renderer Class

Members


virtual ~Renderer ()

Virtual destructor.

virtual int isNode () const

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

Return value

Returns 1 if the node rendering is in process.

virtual int isStereo () const

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

Return value

Returns 1 if the stereo rendering is in process.

virtual int isViewport () const

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

Return value

Returns 1 if the viewport rendering is in process.

virtual int isReflection () const

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

Return value

Returns 1 if the reflection rendering is in process.

virtual int getViewportMask () const

Return current viewport mask.

Return value

Returns current viewport mask.

virtual int getReflectionMask () const

Return current reflection mask.

Return value

Returns current reflection mask.

virtual void saveState () const

Saves current renderer matrices.

virtual void restoreState () const

Restores current renderer matrices.

virtual void saveCamera () const

Saves current renderer camera.

virtual void restoreCamera () const

Restores current renderer camera.

virtual void setProjection (const mat4 & projection) const

Sets current projection matrix.

Arguments

  • const mat4 & projection - Projection matrix.

virtual void setSProjection (const mat4 & sprojection) const

Sets current shader projection matrix.

Arguments

  • const mat4 & sprojection - Shader projection matrix.

virtual void setModelview (const UNIGINE_MAT4 & modelview) const

Sets current modelview matrix.

Arguments

  • const UNIGINE_MAT4 & modelview - Modelview matrix.

virtual mat4 getProjection () const

Return current projection matrix.

Return value

Returns current projection matrix.

virtual mat4 getSProjection () const

Return current shader projection matrix.

Return value

Returns current shader projection matrix.

virtual UNIGINE_MAT4 getModelview () const

Return current modelview matrix.

Return value

Returns current modelview matrix.

virtual UNIGINE_MAT4 getIModelview () const

Return current inverse modelview matrix.

Return value

Returns current inverse modelview matrix.

virtual UNIGINE_VEC3 getCameraPosition () const

Return current camera position.

Return value

Returns current camera position.

virtual float getZNear () const

Return current near clipping plane.

Return value

Returns current near clipping plane.

virtual float getZFar () const

Return current far clipping plane.

Return value

Returns current far clipping plane.

virtual void setShader (int pass, const ShaderPtr & shader) const

Set shader and initialize all shader parameters.

Arguments

  • int pass - Rendering pass.
  • const ShaderPtr & shader - Shader smart pointer.

virtual void setMaterial (int pass, const MaterialPtr & material) const

Set material and initialize all material textures.

Arguments

  • int pass - Rendering pass.
  • const MaterialPtr & material - Material smart pointer.

virtual void setShaderMaterial (int pass, const ShaderPtr & shader, const MaterialPtr & material) const

Set shader and material and initialize all their rendering parameters.

Arguments

  • int pass - Rendering pass.
  • const ShaderPtr & shader - Shader smart pointer.
  • const MaterialPtr & material - Material smart pointer.

virtual void setObjectSurface (int pass, const ObjectPtr & object, int surface) const

Set shader and material and initialize all their rendering parameters.

Arguments

  • int pass - Rendering pass.
  • const ObjectPtr & object - Object smart pointer.
  • int surface - Surface number.

virtual void setObjectSurface (int pass, const ObjectPtr & object, int surface, const ShaderPtr & shader, const MaterialPtr & material) const

Set shader and material and initialize all their rendering parameters.

Arguments

  • int pass - Rendering pass.
  • const ObjectPtr & object - Object smart pointer.
  • int surface - Surface number.
  • const ShaderPtr & shader - Shader smart pointer.
  • const MaterialPtr & material - Material smart pointer.

virtual void beginDeferred ()

Engine calls this function on deferred buffer begin rendering.

virtual void endDeferred ()

Engine calls this function on deferred buffer end rendering.

virtual void beginDeferred (int group)

Engine calls this function on deferred buffer begin rendering.

Arguments

  • int group - Rendering group.

virtual void endDeferred (int group)

Engine calls this function on deferred buffer end rendering.

Arguments

  • int group - Rendering group.

virtual void beginAuxiliary ()

Engine calls this function on deferred refraction begin rendering.

virtual void endAuxiliary ()

Engine calls this function on deferred refraction end rendering.

virtual void beginAuxiliary (int group)

Engine calls this function on deferred refraction begin rendering.

Arguments

  • int group - Rendering group.

virtual void endAuxiliary (int group)

Engine calls this function on deferred refraction end rendering.

Arguments

  • int group - Rendering group.

virtual void beginRefraction ()

Engine calls this function on deferred refraction begin rendering.

virtual void endRefraction ()

Engine calls this function on deferred refraction end rendering.

virtual void beginVelocity ()

Engine calls this function on deferred velocity begin rendering.

virtual void endVelocity ()

Engine calls this function on deferred velocity end rendering.

virtual void beginVelocity (int group)

Engine calls this function on deferred velocity begin rendering.

Arguments

  • int group - Rendering group.

virtual void endVelocity (int group)

Engine calls this function on deferred velocity end rendering.

Arguments

  • int group - Rendering group.

virtual void beginDeferredLight ()

Engine calls this function on deferred light begin rendering.

virtual void endDeferredLight ()

Engine calls this function on deferred light end rendering.

virtual void beginSceneOpacity ()

Engine calls this function on opacity scene begin rendering.

virtual void endSceneOpacity ()

Engine calls this function on opacity scene end rendering.

virtual void beginSceneOpacity (int group)

Engine calls this function on opacity scene begin rendering.

Arguments

  • int group - Rendering group.

virtual void endSceneOpacity (int group)

Engine calls this function on opacity scene end rendering.

Arguments

  • int group - Rendering group.

virtual void beginSceneTransparent ()

Engine calls this function on transparent scene begin rendering.

virtual void endSceneTransparent ()

Engine calls this function on transparent scene end rendering.

virtual void beginSceneTransparent (int scattering)

Engine calls this function on scene begin rendering.

Arguments

  • int scattering - Post scattering rendering flag.

virtual void endSceneTransparent (int scattering)

Engine calls this function on scene end rendering.

Arguments

  • int scattering - Post scattering rendering flag.

virtual void beginSplash ()

Engine calls this function on splash screen begin rendering.

virtual void endSplash ()

Engine calls this function on splash screen end rendering.

virtual void getScreenshot ()

Engine calls this function on get screenshot.

static Renderer * get ()

Return a pointer to the existing renderer.

Return value

Pointer to the existing renderer.
Last update: 2017-07-03
Build: ()