--- ---
|
TGUI
1.x-dev
|
Texture implementation that makes use of modern OpenGL. More...
#include <TGUI/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.hpp>
Public Member Functions | |
| ~BackendTextureOpenGL3 () override | |
| 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. | |
| void | setSmooth (bool smooth) override |
| Changes whether the smooth filter is enabled or not. | |
| TGUI_NODISCARD unsigned int | getInternalTexture () const |
| Returns the id of the OpenGL texture. | |
Public Member Functions inherited from tgui::BackendTexture | |
| BackendTexture (const BackendTexture &)=delete | |
| BackendTexture (BackendTexture &&)=delete | |
| BackendTexture & | operator= (const BackendTexture &)=delete |
| BackendTexture & | operator= (BackendTexture &&)=delete |
| BackendTexture ()=default | |
| Default constructor. | |
| 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. | |
| TGUI_NODISCARD Vector2u | getSize () const |
| Returns the size of the entire image. | |
| TGUI_NODISCARD bool | isSmooth () const |
| Returns whether the smooth filter is enabled or not. | |
| TGUI_NODISCARD bool | isTransparentPixel (Vector2u pixel) const |
| Checks if a certain pixel is transparent. | |
| TGUI_NODISCARD const std::uint8_t * | getPixels () const |
| Returns a pointer to the pixels (read-only) | |
Protected Attributes | |
| unsigned int | m_textureId = 0 |
Protected Attributes inherited from tgui::BackendTexture | |
| Vector2u | m_imageSize |
| std::unique_ptr< std::uint8_t[]> | m_pixels |
| bool | m_isSmooth = true |
Texture implementation that makes use of modern OpenGL.
| TGUI_NODISCARD unsigned int tgui::BackendTextureOpenGL3::getInternalTexture | ( | ) | const |
Returns the id of the OpenGL texture.
|
overridevirtual |
Loads the texture from an array of 32-bits RGBA pixels, but don't take ownership of the pixels.
| 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? |
Reimplemented from tgui::BackendTexture.
|
overridevirtual |
Changes whether the smooth filter is enabled or not.
| smooth | True if smoothing should be enabled, false if it should be disabled |
Reimplemented from tgui::BackendTexture.