rhodonite
    Preparing search index...

    Class Sampler

    Represents a texture sampler that defines how textures are sampled during rendering. A sampler encapsulates filtering and wrapping parameters for texture sampling operations.

    Index
    • Creates a new Sampler instance with the specified configuration.

      Parameters

      Returns Sampler

    • get _samplerResourceUid(): number
      Internal

      Gets the internal sampler resource handle used by the graphics API.

      Returns number

      The sampler resource UID

    • get created(): boolean

      Checks whether the sampler resource has been created.

      Returns boolean

      True if the sampler has been created, false otherwise

    • get magFilter(): TextureParameterEnum

      Gets the magnification filter mode used when the texture is scaled up.

      Returns TextureParameterEnum

      The magnification filter parameter

    • get minFilter(): TextureParameterEnum

      Gets the minification filter mode used when the texture is scaled down.

      Returns TextureParameterEnum

      The minification filter parameter

    • Gets the texture wrapping mode for the R (depth) coordinate.

      Returns TextureParameterEnum

      The R-coordinate wrapping parameter

    • Gets the texture wrapping mode for the S (horizontal) coordinate.

      Returns TextureParameterEnum

      The S-coordinate wrapping parameter

    • Gets the texture wrapping mode for the T (vertical) coordinate.

      Returns TextureParameterEnum

      The T-coordinate wrapping parameter

    • Creates the underlying graphics API sampler resource. This method must be called before the sampler can be used for rendering.

      Returns void

    • Internal

      Destroys the sampler resource and resets its internal state. This invalidates the sampler resource UID, allowing it to be recreated. Called from Engine.destroy() or texture cleanup

      Returns void