TextureRender Class
TextureRender Class
Members
static TextureRender()
TextureRender constructor.void setColorTexture(int slot, Texture texture)
Sets a color texture.Arguments
- int slot - Color texture slot.
- Texture texture - Color texture.
void setColorTexture(int slot, Texture texture, int array_slice, int texture_slice, int mip_level)
Sets a color texture.Arguments
- int slot - Color texture slot.
- Texture texture - Color texture.
- int array_slice
- int texture_slice
- int mip_level
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(Texture texture)
Sets depth texture.Arguments
- Texture texture - Depth texture pointer.
void setDepthTexture(Texture texture, int array_slice, int texture_slice, int mip_level)
Sets a depth texture.Arguments
- Texture texture - Texture.
- int array_slice
- int texture_slice
- int mip_level - Mip level.
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.string getTypeName()
Gets the texture type name.Return value
Texture type name.void setUnorderedAccessBuffer(int slot, StructuredBuffer texture)
Sets an unordered access structured buffer.Arguments
- int slot - StructuredBuffer slot.
- StructuredBuffer texture - A pointer to StructuredBuffer.
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, Texture texture, int writeonly)
Sets an unordered access texture to the device.Arguments
- int slot - Texture slot.
- Texture texture - Texture.
- int writeonly - Sets a texture initializer in shader:
- 1 — use INIT_W_TEXTURE
- 0 — use INIT_RW_TEXTURE
Texture getUnorderedAccessTexture(int slot)
Returns an unordered access texture.Arguments
- int slot - Texture slot.
Return value
Texture.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.int TEXTURE_RENDER_COLOR_RGB565
int TEXTURE_RENDER_COLOR_RGBA16F
int TEXTURE_RENDER_COLOR_RGBA8
int TEXTURE_RENDER_DEPTH_16
int TEXTURE_RENDER_DEPTH_24
int TEXTURE_RENDER_DEPTH_24S8
int TEXTURE_RENDER_DISCARD_ALL
int TEXTURE_RENDER_DISCARD_COLOR
int TEXTURE_RENDER_DISCARD_DEPTH
int TEXTURE_RENDER_FILTER_BILINEAR
int TEXTURE_RENDER_FILTER_LINEAR
int TEXTURE_RENDER_FILTER_TRILINEAR
int TEXTURE_RENDER_MULTISAMPLE_16
int TEXTURE_RENDER_MULTISAMPLE_2
int TEXTURE_RENDER_MULTISAMPLE_4
int TEXTURE_RENDER_MULTISAMPLE_8
int TEXTURE_RENDER_TEXTURE_COLOR
int TEXTURE_RENDER_TEXTURE_DEPTH
int TEXTURE_RENDER_TEXTURE_RENDER_2D
int TEXTURE_RENDER_TEXTURE_RENDER_2D_ARRAY
int TEXTURE_RENDER_TEXTURE_RENDER_3D
int TEXTURE_RENDER_TEXTURE_RENDER_CUBE
int TEXTURE_RENDER_TEXTURE_RENDER_CUBE_ARRAY
int TEXTURE_RENDER_USAGE_COMPUTE
int TEXTURE_RENDER_WRAP_REPEAT
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)