OpenGL texture abstraction.
More...
#include <GnashTexture.h>
List of all members.
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 |
Detailed Description
OpenGL texture abstraction.
Constructor & Destructor Documentation
gnash::GnashTexture::GnashTexture |
( |
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
image::ImageType |
type |
|
) |
| |
gnash::GnashTexture::~GnashTexture |
( |
| ) |
|
|
virtual |
Member Function Documentation
bool gnash::GnashTexture::bind |
( |
| ) |
|
Bind texture to a texturing target.
References ts.
Referenced by update().
unsigned int gnash::GnashTexture::flags |
( |
| ) |
const |
|
inline |
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.
Referenced by update().
unsigned int gnash::GnashTexture::texture |
( |
| ) |
const |
|
inline |
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.
- Parameters:
-
data | buffer to copy data from. |
References bind(), bug, D, format(), and release().
unsigned int gnash::GnashTexture::width |
( |
| ) |
const |
|
inline |
Return texture width.
References _width.
Member Data Documentation
unsigned int gnash::GnashTexture::_flags |
|
protected |
The documentation for this class was generated from the following files: