Shader Tool
Small shader visualiser.
st::GLTexture Class Reference

#include <GLTexture.hpp>

Public Types

using handleType = std::unique_ptr< uint8_t[], void(*)(void *)>
 

Public Member Functions

 GLTexture ()=default
 
 GLTexture (const std::string &textureName)
 
 GLTexture (const std::string &textureName, GLint textureId)
 
 GLTexture (const GLTexture &other)=delete
 
 GLTexture (GLTexture &&other) noexcept
 
GLTextureoperator= (const GLTexture &other)=delete
 
GLTextureoperator= (GLTexture &&other) noexcept
 
 ~GLTexture () noexcept
 
GLuint texture () const
 
const std::string & textureName () const
 
GLuint load (const std::string &fileName)
 Load a file in memory and create an OpenGL texture. More...
 

Private Attributes

std::string mTextureName
 
GLuint mTextureId
 

Member Typedef Documentation

◆ handleType

using st::GLTexture::handleType = std::unique_ptr<uint8_t[], void(*)(void*)>

Constructor & Destructor Documentation

◆ GLTexture() [1/5]

st::GLTexture::GLTexture ( )
default

◆ GLTexture() [2/5]

st::GLTexture::GLTexture ( const std::string &  textureName)
inline

◆ GLTexture() [3/5]

st::GLTexture::GLTexture ( const std::string &  textureName,
GLint  textureId 
)
inline

◆ GLTexture() [4/5]

st::GLTexture::GLTexture ( const GLTexture other)
delete

◆ GLTexture() [5/5]

st::GLTexture::GLTexture ( GLTexture &&  other)
inlinenoexcept

◆ ~GLTexture()

st::GLTexture::~GLTexture ( )
inlinenoexcept

Member Function Documentation

◆ load()

GLuint st::GLTexture::load ( const std::string &  fileName)

Load a file in memory and create an OpenGL texture.

Returns a handle type (an std::unique_ptr) to the loaded pixels.

◆ operator=() [1/2]

GLTexture& st::GLTexture::operator= ( const GLTexture other)
delete

◆ operator=() [2/2]

GLTexture& st::GLTexture::operator= ( GLTexture &&  other)
inlinenoexcept

◆ texture()

GLuint st::GLTexture::texture ( ) const
inline

◆ textureName()

const std::string& st::GLTexture::textureName ( ) const
inline

Member Data Documentation

◆ mTextureId

GLuint st::GLTexture::mTextureId
private

◆ mTextureName

std::string st::GLTexture::mTextureName
private

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