Josh's Graphics Library
|
Represents texture data loaded on the GPU. Contains a handle that can be passed to OpenGL draw calls. More...
#include <Texture.h>
Public Member Functions | |
Texture (const std::string &file, TextureFilteringMode filtering_mode=TextureFilteringMode::BILINEAR, TextureWrappingMode wrapping_mode=TextureWrappingMode::CLAMP_TO_EDGE, const TextureFlag &flags=TextureFlag::INVERT_Y) | |
Load a texture from a file,. More... | |
Texture (Image *software_texture, const Vector2 &size, const TextureFormat &format, TextureFilteringMode filtering_mode, TextureWrappingMode wrapping_mode) | |
Texture (const Vector2 &size) | |
Texture (const Texture &rhs) | |
~Texture () | |
GLuint | GetGLTextureHandle () const |
Vector2 | GetDimensions () const |
TextureFilteringMode | GetFilteringMode () const |
TextureWrappingMode | GetWrappingMode () const |
TextureFlag | GetFlags () const |
TextureFormat | GetFormat () const |
std::vector< Color4 > | GetPixelData () const |
Protected Member Functions | |
void | load (Image *software_texture, const Vector2 &size, const TextureFormat &format, TextureFilteringMode filtering_mode, TextureWrappingMode wrapping_mode) |
Protected Attributes | |
GLuint | texture_handle = 0 |
Vector2 | texture_size = {0, 0} |
ReImage::TextureFlag | texture_flags |
ReImage::TextureFormat | texture_format |
TextureFilteringMode | texture_filtering_mode |
TextureWrappingMode | texture_wrapping_mode |
Represents texture data loaded on the GPU. Contains a handle that can be passed to OpenGL draw calls.
|
explicit |
Load a texture from a file,.
JGL::Texture::Texture | ( | Image * | software_texture, |
const Vector2 & | size, | ||
const TextureFormat & | format, | ||
TextureFilteringMode | filtering_mode, | ||
TextureWrappingMode | wrapping_mode | ||
) |
|
explicit |
JGL::Texture::Texture | ( | const Texture & | rhs | ) |
JGL::Texture::~Texture | ( | ) |
Vector2 JGL::Texture::GetDimensions | ( | ) | const |
TextureFilteringMode JGL::Texture::GetFilteringMode | ( | ) | const |
TextureFlag JGL::Texture::GetFlags | ( | ) | const |
TextureFormat JGL::Texture::GetFormat | ( | ) | const |
GLuint JGL::Texture::GetGLTextureHandle | ( | ) | const |
std::vector< Color4 > JGL::Texture::GetPixelData | ( | ) | const |
TextureWrappingMode JGL::Texture::GetWrappingMode | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |