Class Sampler

Inheritance Relationships

Derived Type

Class Documentation

class Sampler

Immutable sampling object retained independently of pixel contents.

See also

Rendering guide

Subclassed by CE::Rendering::OpenGL::Sampler

Public Functions

virtual ~Sampler() = default

Release logical sampler ownership; native cleanup follows the backend retirement contract.

inline const Options &options() const noexcept

Declaration: [[nodiscard]]

Returns:

Immutable requested options borrowed from this sampler; retain it while using the reference.

inline float effective_anisotropy() const noexcept

Declaration: [[nodiscard]]

Returns:

Resolved backend anisotropy factor; 1 denotes isotropic filtering, including unsupported MaximumSupported requests.

virtual void bind(std::uint32_t unit) const = 0

Apply sampling to a zero-based texture unit on the live backend owner/current context.

Parameters:

unit – Unit supported by that backend. Retain this sampler and its original domain through use; binding does not replace image pixels or select a material.

Protected Functions

Sampler(Options options, float effective_anisotropy)

Initialize immutable requested and resolved sampling metadata for an adapter.

Parameters:
  • options – Valid sampling request.

  • effective_anisotropy – Finite backend result at least 1; Disabled requires exactly 1. Malformed options or effective factors throw invalid_args before returning a sampler.