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

#include <glTexture.h>

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

Public Member Functions

 glTexture2DRGBA (std::filesystem::path imageFile)
 
 glTexture2DRGBA (std::vector< std::byte > data)
 
void create (int width, int height, int channels)
 
void upload (std::vector< std::byte > pixels)
 
- Public Member Functions inherited from jGL::GL::glTexture
 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
 

Additional Inherited Members

- Public Types inherited from jGL::Texture
enum class  Type { RGB , RGBA }
 
- Protected Member Functions inherited from jGL::GL::glTexture
std::vector< std::byte > load_image (std::filesystem::path imageFilePath)
 
std::vector< std::byte > load_image (std::vector< std::byte > imageFile)
 
- Protected Attributes inherited from jGL::GL::glTexture
GLuint id
 
unsigned textureUnit
 
- Protected Attributes inherited from jGL::Texture
int width
 
int height
 
int channels
 
Id id
 

Constructor & Destructor Documentation

◆ glTexture2DRGBA() [1/2]

jGL::GL::glTexture2DRGBA::glTexture2DRGBA ( std::filesystem::path  imageFile)
inline

◆ glTexture2DRGBA() [2/2]

jGL::GL::glTexture2DRGBA::glTexture2DRGBA ( std::vector< std::byte >  data)
inline

Member Function Documentation

◆ create()

void jGL::GL::glTexture2DRGBA::create ( int  width,
int  height,
int  channels 
)

◆ upload()

void jGL::GL::glTexture2DRGBA::upload ( std::vector< std::byte >  pixels)

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