class RenderTextureEx

Extension class for RenderTexture, for adding additional functionality for the script interface.

Public

Methods

staticCreate

static SPtr<RenderTexture> Create(PixelFormat format, int width, int height, int numSamples = 1, bool gammaCorrection = false, bool createDepth = false, PixelFormat depthStencilFormat = PF_D32)

Creates a new 2D render texture.

format
Pixel format of the texture. Format must be a valid uncompressed color format.
width
Width of the texture in pixels.
height
Height of the texture in pixels.
numSamples
Number of samples contained per pixel.
gammaCorrection
Determines should the pixels written on the texture be gamma corrected.
createDepth
Should the render texture also contain a depth/stencil buffer.
depthStencilFormat
Format of the depth/stencil buffer, if is enabled. Format must be a valid depth/stencil format.

staticCreate

static SPtr<RenderTexture> Create(const HTexture &colorSurface)

Creates a new 2D render texture using an existing color texture, and no depth-stencil texture.

colorSurface
Color texture to render color data to.

staticCreate

static SPtr<RenderTexture> Create(const HTexture &colorSurface, const HTexture &depthStencilSurface)

Creates a new 2D render texture using existing textures as render destinations.

colorSurface
Color texture to render color data to.
depthStencilSurface
Optional depth/stencil texture to render depth/stencil data to.

staticCreate

static SPtr<RenderTexture> Create(const Vector<HTexture> &colorSurface)

Creates a new 2D render texture using one or multiple color textures and no depth-stencil texture.

colorSurface
Color texture(s) to render color data to.

staticCreate

static SPtr<RenderTexture> Create(const Vector<HTexture> &colorSurface, const HTexture &depthStencilSurface)

Creates a new 2D render texture using one or multiple color textures and a depth/stencil texture.

colorSurface
Color texture(s) to render color data to.
depthStencilSurface
Optional depth/stencil texture to render depth/stencil data to.

staticGetColorSurface

static HTexture GetColorSurface(const SPtr<RenderTexture> &thisPtr)

Returns the primary color surface that contains rendered color data.

staticGetColorSurfaces

static Vector<HTexture> GetColorSurfaces(const SPtr<RenderTexture> &thisPtr)

Returns all the color surfaces.

staticGetDepthStencilSurface

static HTexture GetDepthStencilSurface(const SPtr<RenderTexture> &thisPtr)

Returns the depth/stencil surface that contains rendered depth and stencil data.