Visual Computing Library
Loading...
Searching...
No Matches
vcl::TextureUnit Class Reference

Public Member Functions

 TextureUnit ()=default
 Empty constructor.
 
 TextureUnit (const TextureUnit &other)=delete
 
 TextureUnit (TextureUnit &&other) noexcept
 Move constructor.
 
 ~TextureUnit ()
 Destructor.
 
TextureUnitoperator= (const TextureUnit &other)=delete
 
TextureUnitoperator= (TextureUnit &&other) noexcept
 Move assignment operator.
 
void swap (TextureUnit &other)
 Swap the content of this object with another TextureUnit object.
 
bool isValid () const
 Check if the TextureUnit is valid.
 
void set (const void *data, const vcl::Point2i &sizes, const std::string &samplerName, bool hasMips=false, bgfx::ReleaseFn releaseFn=nullptr)
 
void set (const bgfx::Memory *texture, const vcl::Point2i &sizes, const std::string &samplerName, bool hasMips, uint nLayers, bgfx::TextureFormat::Enum format=bgfx::TextureFormat::RGBA8, uint flags=BGFX_TEXTURE_NONE)
 
void bind (uint stage) const
 

Private Attributes

bgfx::TextureHandle mTextureHandle = BGFX_INVALID_HANDLE
 
bgfx::UniformHandle mUniformHandle = BGFX_INVALID_HANDLE
 

Friends

void swap (TextureUnit &a, TextureUnit &b)
 

Constructor & Destructor Documentation

◆ TextureUnit() [1/2]

vcl::TextureUnit::TextureUnit ( )
default

Empty constructor.

It creates an invalid TextureUnit object.

◆ TextureUnit() [2/2]

vcl::TextureUnit::TextureUnit ( TextureUnit &&  other)
inlinenoexcept

Move constructor.

The other TextureUnit is left in an invalid state.

Parameters
[in]otherthe other TextureUnit object.

◆ ~TextureUnit()

vcl::TextureUnit::~TextureUnit ( )
inline

Destructor.

It destroys the TextureUnit.

Member Function Documentation

◆ isValid()

bool vcl::TextureUnit::isValid ( ) const
inline

Check if the TextureUnit is valid.

Returns
true if the TextureUnit is valid, false otherwise.

◆ operator=()

TextureUnit & vcl::TextureUnit::operator= ( TextureUnit &&  other)
inlinenoexcept

Move assignment operator.

The other TextureUnit is left in an invalid state.

Parameters
[in]otherthe other TextureUnit object.
Returns
a reference to this object.

◆ swap()

void vcl::TextureUnit::swap ( TextureUnit other)
inline

Swap the content of this object with another TextureUnit object.

Parameters
[in]otherthe other TextureUnit object.

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