List of Variables:

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.

voidclearStates()

Clears rendering states and textures.

Notice

The shader will also be cleared.

voidclearShader()

Clears the shader.

voidsetBlendFunc(intpass, const Ptr<Material> &material)

Sets the light blending function for a given rendering pass and material.

boolhasGeodeticPivot()

Returns a value indicating if the rendering scene has a GeodeticPivot.

Return value

true if the rendering scene has a GeodeticPivot; otherwise, false.

intgetHeight()

Returns current screen height.

Return value

Screen height.

intgetWidth()

Returns current screen width.

Return value

Screen width.

Math::Mat4getIModelview()

Returns current inverse view matrix.

Return value

Returns current inverse view matrix.

voidsetMaterial(intpass, const Ptr<Material> &material)

Sets material and initialize all material textures.

Arguments

intpass - Rendering pass.

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

voidsetModelview(const Math::Mat4 &modelview)

Sets current view matrix.

Arguments

const Math::Mat4 &modelview - New view matrix to be set.

Math::Mat4getModelview()

Returns current view matrix.

Return value

Returns current view matrix.

boolisNode()

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

Return value

true if the node rendering is in process.

Vector< Ptr<Object> >getObjects()

Retrieves the list of all rendering scene objects and puts it to the buffer.

Return value

Buffer containing all scene objects.

voidsetObliqueFrustum(intenabled)

Enables or disables obliqueness of the viewing frustum.

Notice

It is recommended to set oblique viewing frustum using this method, as it doesn't affect the projection matrix. To specify the near clipping plane use the setObliqueFrustumPlane() method.

Arguments

intenabled - 1 to enable oblique viewing frustum; 0 to disable it.

intisObliqueFrustum()

Returns a value indicating if the viewing frustum is oblique.

Return value

1 if the viewing frustum is oblique; otherwise, 0.

voidsetObliqueFrustumPlane(const Math::Vec4 &clipping_plane)

Sets the oblique near clipping plane of the viewing frustum.

Notice

This method does not affect the projection matrix. To enable the oblique frustum use the setObliqueFrustum() method.

Arguments

const Math::Vec4 &clipping_plane - World coordinates of the oblique near clipping plane to set (Nx, Ny, Nz, D), where Nx, Ny, Nz - coordinates of the plane normal, D - distance from the origin to the plane.

Math::Vec4getObliqueFrustumPlane()

Returns the oblique near clipping plane of the viewing frustum.

Return value

World coordinates of the oblique near clipping plane to set (Nx, Ny, Nz, D), where Nx, Ny, Nz - coordinates of the plane normal, D - distance from the origin to the plane.

voidsetOldModelview(const Math::Mat4 &modelview)

Updates the old view matrix.

Arguments

const Math::Mat4 &modelview - Old view matrix to be set.

Math::Mat4getOldModelview()

Returns the old view matrix.

Return value

Old view matrix.

voidsetOldProjection(const Math::mat4 &projection)

Updates the old projection matrix.

Arguments

const Math::mat4 &projection - Old projection matrix to be set.

Math::mat4getOldProjection()

Returns the old projection matrix.

Return value

Old projection matrix.

voidsetPolygonCull(intpass, const Ptr<Material> &material)

Sets the polygon culling mode for a given rendering pass and material.

Notice

If the material is one-sided, the back-facing polygons will be culled; otherwise, polygon culling for the material will be disabled.

Arguments

Math::mat4getProjectionWithoutTAA()

Returns current projection matrix without TAA.

Return value

Projection matrix without TAA.

voidsetProjection(const Math::mat4 &projection)

Updates the current projection matrix.

Notice

It is not recommended to use this method for setting obliqueness of the near clipping plane of the frustum, as in this case a number of features (such as clouds, shadows, TAA, a number of engine optimizations, etc.) will not function properly. Please, use the setObliqueFrustum() method instead.

Ptr<Texture>getTextureGBufferShading()

Return value

Ptr<Texture>getTextureGBufferVelocity()

Return value

Gbuffer velocity texture.

Ptr<Texture>getTextureLights()

Returns the array texture storing contents of the deferred light map buffer and the deferred reflections buffer. The texture contains four RG11B10F textures: the first layer stores the diffuse light, the second layer stores the specular light, the third one is for the environment reflection color, and the fourth one is for the environment ambient light.

Return value

A texture storing contents of the deferred light map buffer and the deferred reflections buffer.