jGL
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
jGL::GL::glTexture Class Reference

#include <glTexture.h>

Inheritance diagram for jGL::GL::glTexture:
Inheritance graph
[legend]
Collaboration diagram for jGL::GL::glTexture:
Collaboration graph
[legend]

Public Member Functions

 glTexture ()
 
 ~glTexture ()
 
virtual void upload (std::vector< std::byte > *data)
 
void bind ()
 
void unbind ()
 
void bind (unsigned binding)
 
void generateMipMaps ()
 
- Public Member Functions inherited from jGL::Texture
 Texture ()
 
virtual ~Texture ()=default
 
bool operator== (const Texture &rhs) const
 
const IdgetId () const
 
const glm::ivec3 size () const
 

Protected Member Functions

std::vector< std::byte > load_image (std::filesystem::path imageFilePath)
 
std::vector< std::byte > load_image (std::vector< std::byte > imageFile)
 

Protected Attributes

GLuint id
 
unsigned textureUnit
 
- Protected Attributes inherited from jGL::Texture
int width
 
int height
 
int channels
 
Id id
 

Additional Inherited Members

- Public Types inherited from jGL::Texture
enum class  Type { RGB , RGBA }
 

Constructor & Destructor Documentation

◆ glTexture()

jGL::GL::glTexture::glTexture ( )
inline

◆ ~glTexture()

jGL::GL::glTexture::~glTexture ( )
inline

Member Function Documentation

◆ bind() [1/2]

void jGL::GL::glTexture::bind ( )
inline

◆ bind() [2/2]

void jGL::GL::glTexture::bind ( unsigned  binding)
inlinevirtual

Implements jGL::Texture.

◆ generateMipMaps()

void jGL::GL::glTexture::generateMipMaps ( )
inline

◆ load_image() [1/2]

std::vector< std::byte > jGL::GL::glTexture::load_image ( std::filesystem::path  imageFilePath)
inlineprotected

◆ load_image() [2/2]

std::vector< std::byte > jGL::GL::glTexture::load_image ( std::vector< std::byte >  imageFile)
inlineprotected

◆ unbind()

void jGL::GL::glTexture::unbind ( )
inline

◆ upload()

virtual void jGL::GL::glTexture::upload ( std::vector< std::byte > *  data)
inlinevirtual

Member Data Documentation

◆ id

GLuint jGL::GL::glTexture::id
protected

◆ textureUnit

unsigned jGL::GL::glTexture::textureUnit
protected

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