Rapid Render API
    Preparing search index...

    Class BaseTexture

    The underlying GPU resource holder for a texture. Implements simple reference counting.

    Index

    Constructors

    • Parameters

      • texture: WebGLTexture
      • width: number
      • height: number

      Returns BaseTexture

    Properties

    glTexture: WebGLTexture | null = null
    height: number
    refCount: number = 0
    uid?: string
    width: number

    Methods

    • Destroys the WebGL texture resource.

      Parameters

      • gl: WebGL2RenderingContext

        The WebGL rendering context.

      Returns void

    • Updates the content of the existing texture (e.g. for Video or dynamic Canvas). Uses texSubImage2D if dimensions haven't changed for better performance.

      Parameters

      • gl: WebGL2RenderingContext

        The WebGL rendering context.

      • source: Images

        The new image source.

      • options: ITextureOptions = {}

      Returns void