galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::Sampler Class Referencefinal

Texture sampler definitions. More...

#include <Sampler.hpp>

+ Collaboration diagram for galaxy::Sampler:

Public Member Functions

 Sampler () noexcept
 Constructor.
 
 Sampler (Sampler &&) noexcept
 Move constructor.
 
Sampleroperator= (Sampler &&) noexcept
 Move assignment operator.
 
 ~Sampler () noexcept
 Destructor.
 
void set (const unsigned int param, const int value) const
 Set a sampler field.
 
void setf (const unsigned int param, const float value) const
 Set a float sampler field.
 
void bind (const unsigned int texture_unit) const
 Bind sampler.
 
void unbind (const unsigned int texture_unit) const
 Unbind sampler.
 
unsigned int id () const noexcept
 Get program id.
 

Private Member Functions

 Sampler (const Sampler &)=delete
 Copy constructor.
 
Sampleroperator= (const Sampler &)=delete
 Copy assignment operator.
 

Private Attributes

unsigned int m_id
 OpenGL handle.
 

Detailed Description

Texture sampler definitions.

Definition at line 16 of file Sampler.hpp.

Constructor & Destructor Documentation

◆ Sampler() [1/3]

galaxy::Sampler::Sampler ( )
noexcept

Constructor.

Definition at line 14 of file Sampler.cpp.

◆ Sampler() [2/3]

galaxy::Sampler::Sampler ( Sampler && s)
noexcept

Move constructor.

Definition at line 20 of file Sampler.cpp.

◆ ~Sampler()

galaxy::Sampler::~Sampler ( )
noexcept

Destructor.

Definition at line 47 of file Sampler.cpp.

◆ Sampler() [3/3]

galaxy::Sampler::Sampler ( const Sampler & )
privatedelete

Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

Sampler & galaxy::Sampler::operator= ( Sampler && s)
noexcept

Move assignment operator.

Definition at line 31 of file Sampler.cpp.

◆ set()

void galaxy::Sampler::set ( const unsigned int param,
const int value ) const

Set a sampler field.

Parameters
paramTexture parameter sampler name.
valueValue of the parameter.

Definition at line 52 of file Sampler.cpp.

+ Here is the caller graph for this function:

◆ setf()

void galaxy::Sampler::setf ( const unsigned int param,
const float value ) const

Set a float sampler field.

Parameters
paramTexture parameter sampler name.
valueValue of the parameter.

Definition at line 57 of file Sampler.cpp.

+ Here is the caller graph for this function:

◆ bind()

void galaxy::Sampler::bind ( const unsigned int texture_unit) const

Bind sampler.

Not required with bindless textures.

Parameters
texture_unitTexture at the texture unit to bind to.

Definition at line 62 of file Sampler.cpp.

+ Here is the caller graph for this function:

◆ unbind()

void galaxy::Sampler::unbind ( const unsigned int texture_unit) const

Unbind sampler.

Not required with bindless textures.

Parameters
texture_unitTexture at the texture unit to unbind from.

Definition at line 67 of file Sampler.cpp.

+ Here is the caller graph for this function:

◆ id()

unsigned int galaxy::Sampler::id ( ) const
nodiscardnoexcept

Get program id.

Returns
unsigned int.

Definition at line 72 of file Sampler.cpp.

+ Here is the caller graph for this function:

◆ operator=() [2/2]

Sampler & galaxy::Sampler::operator= ( const Sampler & )
privatedelete

Copy assignment operator.

Member Data Documentation

◆ m_id

unsigned int galaxy::Sampler::m_id
private

OpenGL handle.

Definition at line 96 of file Sampler.hpp.


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