Gnash
0.8.10
|
OpenGL texture abstraction. More...
#include <GnashTexture.h>
Classes | |
struct | TextureState |
OpenGL texture state. More... | |
Public Member Functions | |
GnashTexture (unsigned int width, unsigned int height, image::ImageType type) | |
virtual | ~GnashTexture () |
unsigned int | flags () const |
Return texture flags. | |
unsigned int | width () const |
Return texture width. | |
unsigned int | height () const |
Return texture height. | |
unsigned int | texture () const |
Return GL texture. | |
unsigned int | internal_format () const |
Return GL internal format. | |
unsigned int | format () const |
Return GL format. | |
bool | bind () |
Bind texture to a texturing target. | |
void | release () |
Release texture. | |
void | update (const boost::uint8_t *data) |
Copy texture data from a buffer. | |
Protected Attributes | |
unsigned int | _flags |
OpenGL texture abstraction.
gnash::GnashTexture::GnashTexture | ( | unsigned int | width, |
unsigned int | height, | ||
image::ImageType | type | ||
) |
bool gnash::GnashTexture::bind | ( | ) |
Bind texture to a texturing target.
References ts, gnash::GnashTexture::TextureState::old_texture, gnash::GnashTexture::TextureState::was_bound, and gnash::GnashTexture::TextureState::was_enabled.
Referenced by update().
unsigned int gnash::GnashTexture::flags | ( | ) | const [inline] |
Return texture flags.
unsigned int gnash::GnashTexture::format | ( | ) | const [inline] |
unsigned int gnash::GnashTexture::height | ( | ) | const [inline] |
Return texture height.
References _height.
unsigned int gnash::GnashTexture::internal_format | ( | ) | const [inline] |
Return GL internal format.
References _format.
void gnash::GnashTexture::release | ( | ) |
Release texture.
References ts, gnash::GnashTexture::TextureState::was_bound, gnash::GnashTexture::TextureState::old_texture, and gnash::GnashTexture::TextureState::was_enabled.
Referenced by update().
unsigned int gnash::GnashTexture::texture | ( | ) | const [inline] |
Return GL texture.
Referenced by gnash::GnashVaapiTexture::GnashVaapiTexture().
void gnash::GnashTexture::update | ( | const boost::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. |
unsigned int gnash::GnashTexture::width | ( | ) | const [inline] |
Return texture width.
References _width.
unsigned int gnash::GnashTexture::_flags [protected] |
Referenced by gnash::GnashVaapiTexture::GnashVaapiTexture().