#include <StkTexture.h>
|
enum | LoadState { INITIAL
, LOADING
, LOADED
, FAILED
} |
|
|
| Texture (TextureManager *tex_mgr, int texture_unit=0) |
|
| Texture (int texture_unit=0) |
|
GLuint | getHandle () const |
|
virtual void | activate ()=0 |
|
virtual void | upload ()=0 |
|
void | deactivate (GLenum target) |
|
void | unload (GLenum target) |
|
void | setHorizontalWrap (GLenum wrap) |
|
void | setVerticalWrap (GLenum wrap) |
|
void | setAnisotropy (float anisotropy) |
|
float | getAnisotropy () const |
|
GLenum | getHorizontalWrap () const |
|
GLenum | getVerticalWrap () const |
|
void | setMinFilter (GLenum min) |
|
void | setMagFilter (GLenum mag) |
|
GLenum | getMinFilter () const |
|
GLenum | getMagFilter () const |
|
int | getTextureUnit () const |
|
void | setTextureUnit (int texture_unit) |
|
void | setStatus (LoadState state) |
|
LoadState | getStatus () const |
|
void | clear () |
|
int64_t | getTimestamp () const |
|
|
static int | getNumActiveTextures () |
|
|
void | applyTextureParameters (GLenum target) |
|
void | getGLFormat (Image::Format fmt, GLenum &int_fmt, GLenum &data_fmt, GLenum &data_type) |
|
void | uploadTexture (const STK::Image &img, GLenum target) |
|
virtual bool | loadInternal ()=0 |
|
|
TextureManager * | tex_mgr_ |
|
GLuint | handle_ |
|
int | texture_unit_ |
|
GLenum | vertical_wrap_ |
|
GLenum | horizontal_wrap_ |
|
GLenum | mag_filter_ |
|
GLenum | min_filter_ |
|
GLfloat | anisotropy_ |
|
int64_t | timestamp_ |
|
int | memsize_ |
|
std::atomic< int > | load_state_ |
|
|
static int | s_numActiveTextures = 0 |
|
Texture - Short description. Detailed description.
◆ activate()
virtual void STK::Texture::activate |
( |
| ) |
|
|
pure virtual |
◆ deactivate()
void Texture::deactivate |
( |
GLenum |
target | ) |
|
Deactivates the currently bound texture. Does not delete any resources, simply unbinds the current texture handle.
◆ loadInternal()
virtual bool STK::Texture::loadInternal |
( |
| ) |
|
|
protectedpure virtual |
◆ setHorizontalWrap()
void STK::Texture::setHorizontalWrap |
( |
GLenum |
wrap | ) |
|
|
inline |
Set horizontal wrapping type.
- Note
- This parameter must be set before the texture is activated for the first time, else you must unload the texture and upload it again.
◆ setVerticalWrap()
void STK::Texture::setVerticalWrap |
( |
GLenum |
wrap | ) |
|
|
inline |
Set vertical wrapping type.
- Note
- This parameter must be set before the texture is activated for the first time, else you must unload the texture and upload it again.
◆ unload()
void Texture::unload |
( |
GLenum |
target | ) |
|
Unload the texure from OpenGL. This method will unload all the texture resources related to this texture object from OpenGL.
◆ upload()
virtual void STK::Texture::upload |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following files:
- Native/SilentToolkit/StkScene/StkTexture.h
- Native/SilentToolkit/StkScene/StkTexture.cpp