ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
Loading...
Searching...
No Matches
Sampler Struct Reference

An SDL_GPUSampler describing texture filter and address modes. More...

#include <Sampler.h>

Inheritance diagram for Sampler:

Public Member Functions

SamplerinitWithDevice (Sampler *self, RenderDevice *device, const SDL_GPUSamplerCreateInfo *info)
 Initializes this Sampler, creating its SDL_GPUSampler.
 
Class * _Sampler (void)
 The Sampler archetype.
 

Data Fields

Object object
 The superclass.
 
SDL_GPUSampler * sampler
 The underlying SDL sampler.
 
ident data
 User data.
 

Protected Attributes

SamplerInterface * interface
 The interface.
 

Detailed Description

An SDL_GPUSampler describing texture filter and address modes.

Sampler owns its underlying SDL_GPUSampler and releases it in dealloc, so a Sampler is freed with release like any other Objectively object, including ones returned by RenderDevice's createSampler* convenience constructors for common filter/address-mode presets.

Member Function Documentation

◆ _Sampler()

Class * _Sampler ( void  )

The Sampler archetype.

Returns
The Sampler Class.

◆ initWithDevice()

Sampler * initWithDevice ( Sampler self,
RenderDevice device,
const SDL_GPUSamplerCreateInfo *  info 
)

Initializes this Sampler, creating its SDL_GPUSampler.

This is the designated initializer.

Parameters
selfThe Sampler.
deviceThe RenderDevice used to create and release the sampler. Retained.
infoSampler creation parameters (filters, mip mode, address modes, anisotropy, etc.).
Returns
The initialized Sampler, or NULL on failure.

Field Documentation

◆ data

ident Sampler::data

User data.

◆ interface

SamplerInterface* Sampler::interface
protected

The interface.

◆ object

Object Sampler::object

The superclass.

◆ sampler

SDL_GPUSampler* Sampler::sampler

The underlying SDL sampler.


The documentation for this struct was generated from the following files: