Xrb::GLTexture Class Reference

Texture object which can be used directly to render using OpenGL. More...

#include <xrb_gltexture.hpp>

List of all members.

Public Member Functions

 ~GLTexture ()
 Destructor.
GLuint Handle () const
 Returns the OpenGL texture handle for this texture.
ScreenCoordVector2 const & Size () const
 Returns the size vector of the texture.
ScreenCoord Width () const
 Returns the width of the texture.
ScreenCoord Height () const
 Returns the height of the texture.

Static Public Member Functions

static GLTextureCreate (std::string const &path)
 Create a new GLTexture object from a texture loaded from the given path.
static GLTextureCreate (Texture *texture)
 Create a new GLTexture object from an already-loaded Texture object.


Detailed Description

Texture object which can be used directly to render using OpenGL.

Creating a texture using this class will load the texture data into the texture memory using OpenGL, and provide a texture handle, with which the texture will be referred to when rendering it.

Definition at line 39 of file xrb_gltexture.hpp.


Constructor & Destructor Documentation

Xrb::GLTexture::~GLTexture (  ) 

Destructor.

Causes the texture to be unloaded from texture memory.

Definition at line 23 of file xrb_gltexture.cpp.


Member Function Documentation

GLTexture * Xrb::GLTexture::Create ( std::string const &  path  )  [static]

Create a new GLTexture object from a texture loaded from the given path.

Loads the image given by the path into a Texture object, creates the OpenGL mipmaps and gets a handle to the OpenGL texture.

Definition at line 28 of file xrb_gltexture.cpp.

References GenerateTexture().

Referenced by Xrb::GL::Initialize(), Xrb::WidgetSkin::SetTexturePath(), Xrb::WidgetBackgroundStylized::WidgetBackgroundStylized(), and Xrb::WidgetBackgroundTextured::WidgetBackgroundTextured().

GLTexture * Xrb::GLTexture::Create ( Texture texture  )  [static]

Create a new GLTexture object from an already-loaded Texture object.

Loads the image given by the path into a Texture object, creates the OpenGL mipmaps and gets a handle to the OpenGL texture.

Definition at line 43 of file xrb_gltexture.cpp.

References GenerateTexture().

GLuint Xrb::GLTexture::Handle (  )  const [inline]

Returns the OpenGL texture handle for this texture.

This will be used to return the handle when specifying the texture to bind to GL_TEXTURE_2D when rendering textures.

Definition at line 65 of file xrb_gltexture.hpp.

Referenced by Xrb::Render::DrawScreenRectTexture().


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8