This page has been translated automatically.
编程
Fundamentals
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
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::TextureRender Class

Header:#include <UnigineTextures.h>

A frame buffers abstraction.

TextureRender Class

Members


static TextureRenderPtr create()

TextureRender constructor.

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

Sets a color texture.

Arguments

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

void setColorTexture(int slot, const Ptr<Texture> & texture, int array_slice, int texture_slice, int mip_level)

Sets a color texture.

Arguments

  • int slot - Color texture slot.
  • const Ptr<Texture> & texture - Color texture pointer.
  • int array_slice
  • int texture_slice
  • int mip_level

Ptr<Texture> getColorTexture(int num)

Returns a color texture.

Arguments

  • int num - Color texture number.

Return value

Color texture pointer.

int isCompleted()

Checks render texture completed status.

Return value

Returns 1 if the render texture is completed.

int getDepth()

Returns the render texture depth.

Return value

Render texture depth.

void setDepthTexture(const Ptr<Texture> & texture)

Sets depth texture.

Arguments

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

void setDepthTexture(const Ptr<Texture> & texture, int array_slice, int texture_slice, int mip_level)

Sets a depth texture.

Arguments

  • const Ptr<Texture> & texture - Texture pointer.
  • int array_slice
  • int texture_slice
  • int mip_level - Mip level.

Ptr<Texture> getDepthTexture()

Returns a depth texture.

Return value

Depth texture pointer.

int isEnabled()

Checks render texture enabled status.

Return value

Returns 1 if the render texture is enabled.

int getHeight()

Returns the render texture height.

Return value

Render texture height.

int getNumFaces()

Returns a number of faces in the texture render.

Return value

Number of faces.

int getNumLayers()

Returns a number of layers in the texture render.

Return value

Number of layers.

int getType()

Gets the texture type.

Return value

Texture type.

const char * getTypeName()

Gets the texture type name.

Return value

Texture type name.

void setUnorderedAccessBuffer(int slot, const Ptr<StructuredBuffer> & texture)

Sets an unordered access structured buffer.

Arguments

  • int slot - StructuredBuffer slot.
  • const Ptr<StructuredBuffer> & texture - A pointer to StructuredBuffer.

Ptr<StructuredBuffer> getUnorderedAccessBuffer(int slot)

Returns an unordered access structured buffer.

Arguments

  • int slot - StructuredBuffer slot.

Return value

A pointer to StructuredBuffer.

void setUnorderedAccessTexture(int slot, const Ptr<Texture> & texture, int writeonly)

Sets an unordered access texture to the device.

Arguments

  • int slot - Texture slot.
  • const Ptr<Texture> & texture - Texture pointer.
  • int writeonly - Sets a texture initializer in shader:

Ptr<Texture> getUnorderedAccessTexture(int slot)

Returns an unordered access texture.

Arguments

  • int slot - Texture slot.

Return value

Texture pointer.

int getWidth()

Returns the render texture width.

Return value

Render rexture width.

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.

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.

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.

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

void destroy()

Destroys render texture.

void disable()

void enable(int flags = 0)

Enables render texture.

Arguments

  • int flags - Discard flags.

void flush()

Flushes render texture.

void unbindColorTexture(int slot = -1)

Unbinds a render target texture from a device by slot (if slot = -1 — unbinds all).

Arguments

  • int slot - Texture slot.

void unbindDepthTexture()

Unbinds a depth texture from a device.

void unbindUnorderedAccessBuffer(int slot = -1)

Unbinds an unordered access buffer from a device by slot (if slot = -1 — unbinds all).

Arguments

  • int slot - Texture slot.

void unbindUnorderedAccessTexture(int slot = -1)

Unbinds an unordered access texture from a device by slot (if slot = -1 — unset all).

Arguments

  • int slot - Texture slot.

int COLOR_RGB565

int COLOR_RGBA16F

int COLOR_RGBA8

int DEPTH_16

int DEPTH_24

int DEPTH_24S8

int DISCARD_ALL

int DISCARD_COLOR

int DISCARD_DEPTH

int FILTER_BILINEAR

int FILTER_LINEAR

int FILTER_TRILINEAR

int MULTISAMPLE_16

int MULTISAMPLE_2

int MULTISAMPLE_4

int MULTISAMPLE_8

int TEXTURE_COLOR

int TEXTURE_DEPTH

int TEXTURE_RENDER_2D

int TEXTURE_RENDER_2D_ARRAY

int TEXTURE_RENDER_3D

int TEXTURE_RENDER_CUBE

int TEXTURE_RENDER_CUBE_ARRAY

int USAGE_COMPUTE

int WRAP_REPEAT

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