RenderTexture.RenderTexture 构造渲染纹理
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 a non-power of two texture and in color format by default.
渲染纹理使用width x height大小创建,带有一个depth位的深度缓存(深度可以是0、16或24)。渲染纹理可以设置为非2的幂纹理并使用默认的颜色格式。
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 isPowerOfTwo, format, isCubemap and so on.
注意,创建一个RenderTexture对象不会立即创建硬件表示。实际的渲染纹理是第一次使用时创建或当Create被手动调用时创建。因此在创建渲染纹理之后,你可以设置额外的变量,如 isPowerOfTwo, format, isCubemap等等。
参见: isPowerOfTwo variable, format variable.