RSX Code Reference
    Preparing search index...
    • rsx
    • RenderTexture

    Class RenderTexture

    Render target specialization that allows you to render into one or multiple textures. Such textures can then be used in other operations as GPU program input.

    Sim thread only. Retrieve core implementation from GetCore() for core thread only functionality.

    Hierarchy (View Summary)

    Index
    • Creates a new 2D render texture.

      Parameters

      • format: EnumValue<PixelFormat>

        Pixel format of the texture. Format must be a valid uncompressed color format.

      • width: number

        Width of the texture in pixels.

      • height: number

        Height of the texture in pixels.

      • OptionalnumSamples: number

        Number of samples contained per pixel.

      • OptionalcreateFlags: EnumValue<RenderTextureCreateFlag>

        Flags using for controlling the creation of the render texture.

      • OptionaldepthStencilFormat: EnumValue<PixelFormat>

        Format of the depth/stencil buffer, if createDepth is enabled. Format must be a valid depth/stencil format.

      • OptionaldpiScale: number

        DPI scale of the device the texture will be displayed on.

      • OptionalisInternalConstructor: boolean

      Returns RenderTexture

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

      Parameters

      • colorSurface: Texture

        Color texture to render color data to.

      • OptionalisClearingOnCreate: boolean

        True if the render texture should be cleared immediately upon creation.

      • OptionaldpiScale: number

        DPI scale of the device the texture will be displayed on.

      Returns RenderTexture

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

      Parameters

      • colorSurface: Texture

        Color texture to render color data to.

      • depthStencilSurface: Texture

        Optional depth/stencil texture to render depth/stencil data to.

      • OptionalisClearingOnCreate: boolean

        True if the render texture should be cleared immediately upon creation.

      • OptionaldpiScale: number

        DPI scale of the device the texture will be displayed on.

      Returns RenderTexture

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

      Parameters

      • colorSurfaces: readonly Texture[]

        Color texture(s) to render color data to.

      • OptionalisClearingOnCreate: boolean

        True if the render texture should be cleared immediately upon creation.

      • OptionaldpiScale: number

        DPI scale of the device the texture will be displayed on.

      Returns RenderTexture

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

      Parameters

      • colorSurfaces: readonly Texture[]

        Color texture(s) to render color data to.

      • depthStencilSurface: Texture

        Optional depth/stencil texture to render depth/stencil data to.

      • OptionalisClearingOnCreate: boolean

        True if the render texture should be cleared immediately upon creation.

      • OptionaldpiScale: number

        DPI scale of the device the texture will be displayed on.

      Returns RenderTexture

    • get colorSurface(): Texture

      Returns the primary color surface that contains rendered color data.

      Returns Texture

    • get depthStencilSurface(): Texture

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

      Returns Texture

    • get dotsPerInch(): number

      Returns the DPI scale factor of the render texture.

      Returns number

    • get dpiScale(): number

      Returns the DPI scale factor of the render texture.

      Returns number

    • get gammaCorrection(): boolean

      Returns boolean

    • get height(): number

      Height of the render target, in pixels.

      Returns number

    • get isWindow(): boolean

      Returns true if the render target is a window.

      Returns boolean

    • get priority(): number

      Controls in what order is the render target rendered to compared to other render targets. Targets with higher priority will be rendered before ones with lower priority.

      Returns number

    • set priority(value: number): void

      Parameters

      • value: number

      Returns void

    • get sampleCount(): number

      Controls how many samples are used for multisampling. (0 or 1 if multisampling is not used).

      Returns number

    • get width(): number

      Width of the render target, in pixels.

      Returns number

    • Destroys the render target and unlinks its resources. Do not used the object after destruction.

      Returns void