|
Beatmup
|
#include <texture_handler.h>
Public Types | |
| enum | TextureFormat { Rx8 , RGBx8 , RGBAx8 , Rx32f , RGBx32f , RGBAx32f , OES_Ext } |
| Texture format, specifies how the texture should be interpreted on the shader side. More... | |
Public Member Functions | |
| ~TextureHandler () | |
| virtual const int | getWidth () const =0 |
| Width of the texture in pixels. More... | |
| virtual const int | getHeight () const =0 |
| Height of the texture in pixels. More... | |
| virtual const int | getDepth () const =0 |
| Depth of the texture in pixels. More... | |
| float | getAspectRatio () const |
| Aspect ratio of the texture. More... | |
| float | getInvAspectRatio () const |
| Inverse of the aspect ratio of the texture. More... | |
| virtual const TextureFormat | getTextureFormat () const =0 |
| Returns the texture format specifying how the shader must interpret the data. More... | |
| const bool | isFloatingPoint () const |
| const int | getNumberOfChannels () const |
| Returns number of channels containing in the texture. More... | |
| bool | hasValidHandle () const |
Returns true if the texture handle points to a valid texture. More... | |
Public Member Functions inherited from Beatmup::Object | |
| virtual | ~Object () |
Static Public Member Functions | |
| static const char * | textureFormatToString (const TextureFormat &) |
Static Public Attributes | |
| static const int | TEXTURE_FORMAT_BYTES_PER_PIXEL [] |
| size of a texel in bytes for different texture formats More... | |
Protected Member Functions | |
| TextureHandler () | |
| virtual void | prepare (GraphicPipeline &gpu) |
| Prepares (eventually uploads) texture data on GPU. More... | |
| void | invalidate (RecycleBin &) |
| Forces disposing the texture data, e.g. More... | |
Protected Attributes | |
| handle_t | textureHandle |
Friends | |
| class | ::Beatmup::GraphicPipeline |
Definition at line 37 of file texture_handler.h.
Texture format, specifies how the texture should be interpreted on the shader side.
| Enumerator | |
|---|---|
| Rx8 | |
| RGBx8 | |
| RGBAx8 | |
| Rx32f | |
| RGBx32f | |
| RGBAx32f | |
| OES_Ext | external EGL image |
Definition at line 44 of file texture_handler.h.
|
protected |
Definition at line 58 of file texture_handler.cpp.
| TextureHandler::~TextureHandler | ( | ) |
Definition at line 63 of file texture_handler.cpp.
|
static |
Definition at line 35 of file texture_handler.cpp.
|
protectedvirtual |
Prepares (eventually uploads) texture data on GPU.
Called only by the context managing thread.
| [in] | gpu | Graphic pipeline instance |
Reimplemented in Beatmup::Android::ExternalBitmap, Beatmup::NNets::Storage::TextureHandler, Beatmup::GL::Vector, and Beatmup::AbstractBitmap.
Definition at line 69 of file texture_handler.cpp.
|
protected |
Forces disposing the texture data, e.g.
when it is not used any more
Definition at line 96 of file texture_handler.cpp.
|
pure virtual |
Width of the texture in pixels.
Implemented in Beatmup::Python::Bitmap, Beatmup::Android::ExternalBitmap, Beatmup::Android::Bitmap, Beatmup::NNets::Storage::TextureHandler, Beatmup::GL::Vector, Beatmup::GL::LinearMapping::Matrix, Beatmup::GDIBitmap, and Beatmup::InternalBitmap.
|
pure virtual |
Height of the texture in pixels.
Implemented in Beatmup::Python::Bitmap, Beatmup::Android::ExternalBitmap, Beatmup::Android::Bitmap, Beatmup::NNets::Storage::TextureHandler, Beatmup::GL::Vector, Beatmup::GL::LinearMapping::Matrix, Beatmup::GDIBitmap, and Beatmup::InternalBitmap.
|
pure virtual |
Depth of the texture in pixels.
Implemented in Beatmup::Android::ExternalBitmap, Beatmup::NNets::Storage::TextureHandler, Beatmup::GL::Vector, Beatmup::GL::LinearMapping::Matrix, and Beatmup::AbstractBitmap.
|
inline |
Aspect ratio of the texture.
Definition at line 96 of file texture_handler.h.
|
inline |
Inverse of the aspect ratio of the texture.
Definition at line 101 of file texture_handler.h.
|
pure virtual |
Returns the texture format specifying how the shader must interpret the data.
Implemented in Beatmup::Android::ExternalBitmap, Beatmup::NNets::Storage::TextureHandler, Beatmup::GL::Vector, Beatmup::GL::LinearMapping::Matrix, and Beatmup::AbstractBitmap.
|
inline |
Definition at line 108 of file texture_handler.h.
| const int TextureHandler::getNumberOfChannels | ( | ) | const |
Returns number of channels containing in the texture.
Definition at line 75 of file texture_handler.cpp.
|
inline |
Returns true if the texture handle points to a valid texture.
Definition at line 121 of file texture_handler.h.
|
friend |
Definition at line 38 of file texture_handler.h.
|
static |
size of a texel in bytes for different texture formats
Definition at line 54 of file texture_handler.h.
|
protected |
Definition at line 59 of file texture_handler.h.