Gnash
0.8.11dev
|
OpenGL texture abstraction. More...
#include <GnashTexture.h>
Public Member Functions | |
GnashTexture (unsigned int width, unsigned int height, image::ImageType type) | |
virtual | ~GnashTexture () |
unsigned int | flags () const |
Return texture flags. More... | |
unsigned int | width () const |
Return texture width. More... | |
unsigned int | height () const |
Return texture height. More... | |
unsigned int | texture () const |
Return GL texture. More... | |
unsigned int | internal_format () const |
Return GL internal format. More... | |
unsigned int | format () const |
Return GL format. More... | |
bool | bind () |
Bind texture to a texturing target. More... | |
void | release () |
Release texture. More... | |
void | update (const std::uint8_t *data) |
Copy texture data from a buffer. More... | |
Protected Attributes | |
unsigned int | _flags |
OpenGL texture abstraction.
gnash::GnashTexture::GnashTexture | ( | unsigned int | width, |
unsigned int | height, | ||
image::ImageType | type | ||
) |
|
virtual |
bool gnash::GnashTexture::bind | ( | ) |
|
inline |
Return texture flags.
|
inline |
Return GL format.
References data, and gnash::GnashTextureFormat::format().
Referenced by update(), and ~GnashTexture().
|
inline |
Return texture height.
|
inline |
Return GL internal format.
References gnash::GnashTextureFormat::internal_format().
Referenced by ~GnashTexture().
void gnash::GnashTexture::release | ( | ) |
|
inline |
Return GL texture.
Referenced by gnash::GnashVaapiTexture::GnashVaapiTexture().
void gnash::GnashTexture::update | ( | const std::uint8_t * | data | ) |
Copy texture data from a buffer.
Note that this buffer MUST have the same _pitch, or unexpected things will happen. In general, it is only safe to copy from another GnashImage (or derivative thereof) or unexpected things will happen.
data | buffer to copy data from. |
|
inline |
Return texture width.
|
protected |
Referenced by gnash::GnashVaapiTexture::GnashVaapiTexture().