Gnash  0.8.11dev
Public Member Functions | Protected Attributes | List of all members
gnash::GnashTexture Class Reference

OpenGL texture abstraction. More...

#include <GnashTexture.h>

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

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
 

Detailed Description

OpenGL texture abstraction.

Constructor & Destructor Documentation

§ GnashTexture()

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

§ ~GnashTexture()

gnash::GnashTexture::~GnashTexture ( )
virtual

Member Function Documentation

§ bind()

bool gnash::GnashTexture::bind ( )

Bind texture to a texturing target.

References ts.

Referenced by update(), and ~GnashTexture().

§ flags()

unsigned int gnash::GnashTexture::flags ( ) const
inline

Return texture flags.

§ format()

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

Return GL format.

References data, and gnash::GnashTextureFormat::format().

Referenced by update(), and ~GnashTexture().

§ height()

unsigned int gnash::GnashTexture::height ( ) const
inline

Return texture height.

§ internal_format()

unsigned int gnash::GnashTexture::internal_format ( ) const
inline

Return GL internal format.

References gnash::GnashTextureFormat::internal_format().

Referenced by ~GnashTexture().

§ release()

void gnash::GnashTexture::release ( )

Release texture.

References ts.

Referenced by update(), and ~GnashTexture().

§ texture()

unsigned int gnash::GnashTexture::texture ( ) const
inline

Return GL texture.

Referenced by gnash::GnashVaapiTexture::GnashVaapiTexture().

§ update()

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.

Parameters
databuffer to copy data from.

References bind(), bug, D, format(), and release().

§ width()

unsigned int gnash::GnashTexture::width ( ) const
inline

Return texture width.

Member Data Documentation

§ _flags

unsigned int gnash::GnashTexture::_flags
protected

The documentation for this class was generated from the following files: