Texture implementation that makes use of modern OpenGL ES.
More...
#include <TGUI/Backend/Renderer/GLES2/BackendTextureGLES2.hpp>
|
| ~BackendTextureGLES2 () |
| Destructor.
|
|
bool | loadTextureOnly (Vector2u size, const std::uint8_t *pixels, bool smooth) override |
| Loads the texture from an array of 32-bits RGBA pixels, but don't take ownership of the pixels. More...
|
|
void | setSmooth (bool smooth) override |
| Changes whether the smooth filter is enabled or not. More...
|
|
unsigned int | getInternalTexture () const |
| Returns the id of the OpenGL texture. More...
|
|
virtual | ~BackendTexture ()=default |
| Virtual destructor.
|
|
bool | load (Vector2u size, std::unique_ptr< std::uint8_t[]> pixels, bool smooth) |
| Loads the texture from an array of 32-bits RGBA pixels. More...
|
|
virtual bool | loadTextureOnly (Vector2u size, const std::uint8_t *pixels, bool smooth) |
| Loads the texture from an array of 32-bits RGBA pixels, but don't take ownership of the pixels. More...
|
|
Vector2u | getSize () const |
| Returns the size of the entire image. More...
|
|
virtual void | setSmooth (bool smooth) |
| Changes whether the smooth filter is enabled or not. More...
|
|
bool | isSmooth () const |
| Returns whether the smooth filter is enabled or not. More...
|
|
bool | isTransparentPixel (Vector2u pixel) const |
| Checks if a certain pixel is transparent. More...
|
|
|
unsigned int | m_textureId = 0 |
|
Vector2u | m_imageSize |
|
std::unique_ptr< std::uint8_t[]> | m_pixels |
|
bool | m_isSmooth = true |
|
Texture implementation that makes use of modern OpenGL ES.
◆ getInternalTexture()
unsigned int tgui::BackendTextureGLES2::getInternalTexture |
( |
| ) |
const |
Returns the id of the OpenGL texture.
- Returns
- Texture id
◆ loadTextureOnly()
bool tgui::BackendTextureGLES2::loadTextureOnly |
( |
Vector2u |
size, |
|
|
const std::uint8_t * |
pixels, |
|
|
bool |
smooth |
|
) |
| |
|
overridevirtual |
Loads the texture from an array of 32-bits RGBA pixels, but don't take ownership of the pixels.
- Parameters
-
size | Width and height of the image to create |
pixels | Pointer to array of size.x*size.y*4 bytes with RGBA pixels, or nullptr to create an empty texture |
smooth | Should the smooth filter be enabled or not? |
- Warning
- Unlike the load function, loadTextureOnly won't store the pixels and isTransparentPixel thus won't work
Reimplemented from tgui::BackendTexture.
◆ setSmooth()
void tgui::BackendTextureGLES2::setSmooth |
( |
bool |
smooth | ) |
|
|
overridevirtual |
Changes whether the smooth filter is enabled or not.
- Parameters
-
smooth | True if smoothing should be enabled, false if it should be disabled |
Reimplemented from tgui::BackendTexture.
The documentation for this class was generated from the following file: