Beatmup
|
TextureHandler representation of a pack of 4 channels from a non-empty View. More...
#include <storage.h>
Public Member Functions | |
TextureHandler (const View &, int channel) | |
~TextureHandler () | |
const int | getWidth () const |
Width of the texture in pixels. More... | |
const int | getHeight () const |
Height of the texture in pixels. More... | |
const int | getDepth () const |
Depth of the texture in pixels. More... | |
const GL::TextureHandler::TextureFormat | getTextureFormat () const |
Returns the texture format specifying how the shader must interpret the data. More... | |
Public Member Functions inherited from Beatmup::GL::TextureHandler | |
~TextureHandler () | |
float | getAspectRatio () const |
Aspect ratio of the texture. More... | |
float | getInvAspectRatio () const |
Inverse of the aspect ratio of the texture. 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 () |
Private Member Functions | |
void | prepare (GraphicPipeline &gpu) |
Prepares (eventually uploads) texture data on GPU. More... | |
Private Attributes | |
const int | width |
const int | height |
Additional Inherited Members | |
Public Types inherited from Beatmup::GL::TextureHandler | |
enum | TextureFormat { Rx8 , RGBx8 , RGBAx8 , Rx32f , RGBx32f , RGBAx32f , OES_Ext } |
Texture format, specifies how the texture should be interpreted on the shader side. More... | |
Static Public Member Functions inherited from Beatmup::GL::TextureHandler | |
static const char * | textureFormatToString (const TextureFormat &) |
Static Public Attributes inherited from Beatmup::GL::TextureHandler | |
static const int | TEXTURE_FORMAT_BYTES_PER_PIXEL [] |
size of a texel in bytes for different texture formats More... | |
Protected Member Functions inherited from Beatmup::GL::TextureHandler | |
TextureHandler () | |
void | invalidate (RecycleBin &) |
Forces disposing the texture data, e.g. More... | |
Protected Attributes inherited from Beatmup::GL::TextureHandler | |
handle_t | textureHandle |
TextureHandler representation of a pack of 4 channels from a non-empty View.
Does not copy any data, only stores a reference to an existing texture.
Storage::TextureHandler::TextureHandler | ( | const View & | view, |
int | channel | ||
) |
Definition at line 519 of file storage.cpp.
Storage::TextureHandler::~TextureHandler | ( | ) |
Definition at line 532 of file storage.cpp.
|
privatevirtual |
Prepares (eventually uploads) texture data on GPU.
Called only by the context managing thread.
[in] | gpu | Graphic pipeline instance |
Reimplemented from Beatmup::GL::TextureHandler.
Definition at line 538 of file storage.cpp.
|
inlinevirtual |
Width of the texture in pixels.
Implements Beatmup::GL::TextureHandler.
Definition at line 410 of file storage.h.
|
inlinevirtual |
Height of the texture in pixels.
Implements Beatmup::GL::TextureHandler.
Definition at line 411 of file storage.h.
|
inlinevirtual |
Depth of the texture in pixels.
Implements Beatmup::GL::TextureHandler.
|
inlinevirtual |
Returns the texture format specifying how the shader must interpret the data.
Implements Beatmup::GL::TextureHandler.
|
private |
|
private |