RenderTexture.RenderTexture Manual     Reference     Scripting  
Scripting > Runtime Classes > RenderTexture
RenderTexture.RenderTexture

static function RenderTexture (width : int, height : int, depth : int, format : RenderTextureFormat, readWrite : RenderTextureReadWrite) : RenderTexture

Description

Creates a new RenderTexture object.

The render texture is created with width by height size, with a depth buffer of depth bits (depth can be 0, 16 or 24), and in format format and with sRGB read / write on or off.

Note that constructing a RenderTexture object does not create the hardware representation immediately. The actual render texture is created upon first use or when Create is called manually. So after constructing the render texture, it is possible to set additional variables, like format, isCubemap and so on.

See Also: format variable.

static function RenderTexture (width : int, height : int, depth : int, format : RenderTextureFormat) : RenderTexture

Description

Creates a new RenderTexture object.

The render texture is created with width by height size, with a depth buffer of depth bits (depth can be 0, 16 or 24), and in format format.

Note that constructing a RenderTexture object does not create the hardware representation immediately. The actual render texture is created upon first use or when Create is called manually. So after constructing the render texture, it is possible to set additional variables, like format, isCubemap and so on.

See Also: format variable.

static function RenderTexture (width : int, height : int, depth : int) : RenderTexture

Description

Creates a new RenderTexture object.

The render texture is created with width by height size, with a depth buffer of depth bits (depth can be 0, 16 or 24). The render texture is set to be in color format by default.

Note that constructing a RenderTexture object does not create the hardware representation immediately. The actual render texture is created upon first use or when Create is called manually. So after constructing the render texture, it is possible to set additional variables, like format, isCubemap and so on.

See Also: format variable.