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.

TextureRender Class

Interface for texture rendering.

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

TextureRender Class

Members


int createCubeArray (int width, int height, int num_layers, int flags = 0)

Creates Cube Array render texture.

Arguments

  • int width - Render texture width.
  • int height - Render texture height.
  • int num_layers - Render texture layers.
  • int flags - Render texture flags.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

int getWidth ()

Returns the render texture width.

Return value

Render rexture width.

int getType ()

Gets the texture type.

Return value

Texture type.

void setFace (int face)

Sets current rendering face.

Arguments

  • int face - Current rendering face.

int isEnabled ()

Checks render texture enabled status.

Return value

Returns 1 if the render texture is enabled.

void setLayer (int layer)

Sets current rendering layer.

Arguments

  • int layer - Current rendering layer.

void setDepthTexture (const Ptr<Texture> & texture)

Sets depth texture.

Arguments

  • const Ptr<Texture> & texture - Depth texture pointer.

Ptr<Texture> getDepthTexture ()

Gets depth texture.

Return value

Depth texture pointer.

Ptr<TextureRender> create ()

Render texture constructor.

Return value

Pointer to the created render texture.

int getLayer ()

Gets current rendering layer.

Return value

Current rendering layer.

int create2DArray (int width, int height, int num_layers, int flags = 0)

Creates 2D Array render texture.

Arguments

  • int width - Render texture width.
  • int height - Render texture height.
  • int num_layers - Render texture layers.
  • int flags - Render texture flags.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

void disable (int discard = 0)

Disables render texture.

Arguments

  • int discard - Discard flags.

int getDepth ()

Returns the render texture depth.

Return value

Render texture depth.

void clear ()

Clears render texture.

int create2D (int width, int height, int flags = 0)

Creates 2D render texture.

Arguments

  • int width - Render texture width.
  • int height - Render texture height.
  • int flags - Render texture flags.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

const char * getTypeName ()

Gets the texture type name.

Return value

Texture type name.

int getNumFaces ()

Returns a number of faces in the texture render.

Return value

Number of faces.

void enable (int discard = 0)

Enables render texture.

Arguments

  • int discard - Discard flags.

int getHeight ()

Returns the render texture height.

Return value

Render texture height.

int getNumLayers ()

Returns a number of layers in the texture render.

Return value

Number of layers.

void destroy ()

Destroys render texture.

Ptr<Texture> getColorTexture (int num)

Gets color texture.

Arguments

  • int num - Color texture number.

Return value

Color texture pointer.

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

Sets color texture.

Arguments

  • int num - Color texture number.
  • const Ptr<Texture> & texture - Color texture pointer.

int createCube (int width, int height, int flags = 0)

Creates Cube render texture.

Arguments

  • int width - Render texture width.
  • int height - Render texture height.
  • int flags - Render texture flags.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

int getFace ()

Gets current rendering face.

Return value

Current rendering face.

int create3D (int width, int height, int depth, int flags = 0)

Creates 3D render texture.

Arguments

  • int width - Render texture width.
  • int height - Render texture height.
  • int depth - Render texture depth.
  • int flags - Render texture flags.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

void flush ()

Flushes render texture.

int isCompleted ()

Checks render texture completed status.

Return value

Returns 1 if the render texture is completed.

int TEXTURE_RENDER_2D

int TEXTURE_RENDER_3D

int TEXTURE_RENDER_CUBE

int TEXTURE_RENDER_2D_ARRAY

int TEXTURE_RENDER_CUBE_ARRAY

int COLOR_RGB565

int COLOR_RGBA8

int COLOR_RGBA16F

int DEPTH_16

int DEPTH_24

int DEPTH_24S8

int MULTISAMPLE_2

int MULTISAMPLE_4

int MULTISAMPLE_8

int MULTISAMPLE_16

int TEXTURE_COLOR

int TEXTURE_DEPTH

int WRAP_REPEAT

int FILTER_LINEAR

int FILTER_BILINEAR

int FILTER_TRILINEAR

int DISCARD_COLOR

int DISCARD_DEPTH

int DISCARD_ALL

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