Gnash  0.8.10
Classes | Public Member Functions | Protected Attributes
gnash::GnashTexture Class Reference

OpenGL texture abstraction. More...

#include <GnashTexture.h>

Inheritance diagram for gnash::GnashTexture:
gnash::GnashVaapiTexture

List of all members.

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

Detailed Description

OpenGL texture abstraction.


Constructor & Destructor Documentation

gnash::GnashTexture::GnashTexture ( unsigned int  width,
unsigned int  height,
image::ImageType  type 
)

References D, and bug.

gnash::GnashTexture::~GnashTexture ( ) [virtual]

References D, and bug.


Member Function Documentation

bool gnash::GnashTexture::bind ( )
unsigned int gnash::GnashTexture::flags ( ) const [inline]

Return texture flags.

unsigned int gnash::GnashTexture::format ( ) const [inline]

Return GL format.

References _format.

Referenced by update().

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 ( )
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.

Parameters:
databuffer to copy data from.

References D, bug, bind(), 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: