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::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

Create 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

Create 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

Create 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

Create 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 void clear () const =0

Clear render texture.

virtual void destroy () const =0

Destroy render texture.

virtual int getType () const =0

Get the texture type.

Return value

Texture type.

virtual const char * getTypeName () const =0

Get the texture type name.

Return value

Texture type name.

virtual int getWidth () const =0

Return the render texture width.

Return value

Render rexture width.

virtual int getHeight () const =0

Return the render texture height.

Return value

Render texture height.

virtual int getDepth () const =0

Return the render texture depth.

Return value

Render texture depth.

virtual int getNumLayers () const =0

Return the render texture layer count.

Return value

Render texture layer count.

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

Set color texture.

Arguments

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

virtual TexturePtr getColorTexture (int num) const =0

Get color texture.

Arguments

  • int num - Color texture number.

Return value

Color texture pointer.

virtual void setDepthTexture (TexturePtr texture) const =0

Set depth texture.

Arguments

  • TexturePtr texture - Depth texture pointer.

virtual TexturePtr getDepthTexture () const =0

Get depth texture.

Return value

Depth texture pointer.

virtual void setLayer (int layer) const =0

Set current rendering layer.

Arguments

  • int layer - Current rendering layer.

virtual int getLayer () const =0

Get current rendering layer.

Return value

Current rendering layer.

virtual int isEnabled () const =0

Check render texture enabled status.

Return value

Returns 1 if the render texture is enabled.

virtual int isCompleted () const =0

Check render texture completed status.

Return value

Returns 1 if the render texture is completed.

virtual void enable (int discard) const =0

Enable render texture.

Arguments

  • int discard - Discard flags.

virtual void disable (int discard) const =0

Disable render texture.

Arguments

  • int discard - Discard flags.

virtual void flush () const =0

Flush render texture.

Unigine::TextureRender::anonymous_93 Enumeration

TEXTURE_RENDER_2D = 0
TEXTURE_RENDER_3D
TEXTURE_RENDER_CUBE
TEXTURE_RENDER_2D_ARRAY

Unigine::TextureRender::anonymous_94 Enumeration

COLOR_R5G6B5 = 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_95 Enumeration

DISCARD_COLOR = 1 << 0
DISCARD_DEPTH = 1 << 1
DISCARD_ALL = (DISCARD_COLOR | DISCARD_DEPTH)
Last update: 03.07.2017
Build: ()