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

Unigine::TextureRender Class

Interface for texture rendering.

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

Unigine::TextureRender Class

Members


virtual ~TextureRender ()

Virtual destructor.

static Ptr< TextureRender > create ()

Render texture constructor.

Return value

Pointer to the created render texture.

virtual int create2D (int width, int height, int flags) const =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.

virtual int create3D (int width, int height, int depth, int flags) const =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.

virtual int createCube (int width, int height, int flags) const =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.

virtual int create2DArray (int width, int height, int num_layers, int flags) const =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.

virtual int createCubeArray (int width, int height, int num_layers, int flags) const =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.

virtual void clear () const =0

Clears render texture.

virtual void destroy () const =0

Destroys render texture.

virtual int getType () const =0

Gets the texture type.

Return value

Texture type.

virtual const char * getTypeName () const =0

Gets the texture type name.

Return value

Texture type name.

virtual int getWidth () const =0

Returns the render texture width.

Return value

Render rexture width.

virtual int getHeight () const =0

Returns the render texture height.

Return value

Render texture height.

virtual int getDepth () const =0

Returns the render texture depth.

Return value

Render texture depth.

virtual int getNumLayers () const =0

Returns a number of layers in the texture render.

Return value

Number of layers.

virtual int getNumFaces () const =0

Returns a number of faces in the texture render.

Return value

Number of faces.

virtual void setColorTexture (int num, TexturePtr texture) const =0

Sets color texture.

Arguments

  • int num - Color texture number.
  • TexturePtr texture - Color texture pointer.

virtual TexturePtr getColorTexture (int num) const =0

Gets color texture.

Arguments

  • int num - Color texture number.

Return value

Color texture pointer.

virtual void setDepthTexture (TexturePtr texture) const =0

Sets depth texture.

Arguments

  • TexturePtr texture - Depth texture pointer.

virtual TexturePtr getDepthTexture () const =0

Gets depth texture.

Return value

Depth texture pointer.

virtual void setLayer (int layer) const =0

Sets current rendering layer.

Arguments

  • int layer - Current rendering layer.

virtual int getLayer () const =0

Gets current rendering layer.

Return value

Current rendering layer.

virtual void setFace (int layer) const =0

Sets current rendering face.

Arguments

  • int layer - Current rendering face.

virtual int getFace () const =0

Gets current rendering face.

Return value

Current rendering face.

virtual int isEnabled () const =0

Checks render texture enabled status.

Return value

Returns 1 if the render texture is enabled.

virtual int isCompleted () const =0

Checks render texture completed status.

Return value

Returns 1 if the render texture is completed.

virtual void enable (int discard) const =0

Enables render texture.

Arguments

  • int discard - Discard flags.

virtual void disable (int discard) const =0

Disables render texture.

Arguments

  • int discard - Discard flags.

virtual void flush () const =0

Flushes render texture.

Unigine::TextureRender::anonymous_108 Enumeration

TEXTURE_RENDER_2D = 0
TEXTURE_RENDER_3D
TEXTURE_RENDER_CUBE
TEXTURE_RENDER_2D_ARRAY
TEXTURE_RENDER_CUBE_ARRAY

Unigine::TextureRender::anonymous_109 Enumeration

COLOR_RGB565 = 1 << 0
COLOR_RGBA8 = 1 << 1
COLOR_RGBA16F = 1 << 2
DEPTH_16 = 1 << 3
DEPTH_24 = 1 << 4
DEPTH_24S8 = 1 << 5
MULTISAMPLE_2 = 1 << 6
MULTISAMPLE_4 = 1 << 7
MULTISAMPLE_8 = 1 << 8
MULTISAMPLE_16 = 1 << 9
TEXTURE_COLOR = 1 << 10
TEXTURE_DEPTH = 1 << 11
WRAP_REPEAT = 1 << 12
FILTER_LINEAR = 1 << 13
FILTER_BILINEAR = 1 << 14
FILTER_TRILINEAR = 1 << 15

Unigine::TextureRender::anonymous_110 Enumeration

DISCARD_COLOR = 1 << 0
DISCARD_DEPTH = 1 << 1
DISCARD_ALL = (DISCARD_COLOR | DISCARD_DEPTH)
Last update: 2017-07-03
Build: ()