texture Class Reference

#include <texture.hpp>

Collaboration diagram for texture:

Collaboration graph
[legend]

List of all members.


Detailed Description

Texture class. This class uses an internal cache, so you can freely create and delete multiple instances of textures from the same file.

Definition at line 113 of file texture.hpp.


Public Member Functions

void bind (gsgl::flags_t render_flags=TEXTURE_NO_FLAGS)
 Bind the texture for use in OpenGL.
const int get_texture_unit () const
 texture (SDL_Surface *surface, const gsgl::flags_t flags=TEXTURE_NO_FLAGS, const texture_format &format=TEXTURE_COLORMAP, const gsgl::string &identifier=gsgl::string::EMPTY_STRING, const int &texture_unit=0)
 texture (const gsgl::string &fname, const gsgl::flags_t flags=TEXTURE_NO_FLAGS, const texture_format &format=TEXTURE_COLORMAP, const int &texture_unit=0)
 texture (const texture &tex)
void unbind ()
 Unbind the texture for use in OpenGL.
void unload ()
 Unload the texture from the video card.
void update ()
 Update the texture on the card from the memory buffer.
 ~texture ()

Static Public Member Functions

static gsgl::data_objectcreate_global_texture_cache ()

Private Member Functions

void assign_gl_modes ()

Private Attributes

gsgl::flags_t flags
int gl_env
int gl_filter
int gl_wrap
texture_implimpl

Constructor & Destructor Documentation

texture ( const texture tex  )  [explicit]

Definition at line 335 of file texture.cpp.

References shared_object::attach(), and texture::impl.

texture ( const gsgl::string fname,
const gsgl::flags_t  flags = TEXTURE_NO_FLAGS,
const texture_format format = TEXTURE_COLORMAP,
const int &  texture_unit = 0 
) [explicit]

texture ( SDL_Surface *  surface,
const gsgl::flags_t  flags = TEXTURE_NO_FLAGS,
const texture_format format = TEXTURE_COLORMAP,
const gsgl::string identifier = gsgl::string::EMPTY_STRING,
const int &  texture_unit = 0 
) [explicit]

~texture (  ) 

Definition at line 402 of file texture.cpp.

References shared_object::detach(), and texture::impl.


Member Function Documentation

void assign_gl_modes (  )  [private]

void bind ( gsgl::flags_t  render_flags = TEXTURE_NO_FLAGS  ) 

gsgl::data_object * create_global_texture_cache (  )  [static]

Definition at line 485 of file texture.cpp.

Referenced by application::application().

const int get_texture_unit (  )  const

Definition at line 408 of file texture.cpp.

References texture_impl::get_texture_unit(), and texture::impl.

void unbind (  ) 

Unbind the texture for use in OpenGL.

Definition at line 438 of file texture.cpp.

References assert, texture::impl, and texture_impl::unbind().

Referenced by simple_sphere::draw().

void unload (  ) 

Unload the texture from the video card.

Definition at line 452 of file texture.cpp.

References assert, texture::impl, and texture_impl::unload().

void update (  ) 

Update the texture on the card from the memory buffer.

Definition at line 445 of file texture.cpp.

References assert, texture::impl, and texture_impl::update().


Member Data Documentation

gsgl::flags_t flags [private]

Definition at line 117 of file texture.hpp.

Referenced by texture::assign_gl_modes(), and texture::bind().

int gl_env [private]

Definition at line 118 of file texture.hpp.

Referenced by texture::assign_gl_modes(), and texture::bind().

int gl_filter [private]

Definition at line 118 of file texture.hpp.

Referenced by texture::assign_gl_modes(), and texture::bind().

int gl_wrap [private]

Definition at line 118 of file texture.hpp.

Referenced by texture::assign_gl_modes(), and texture::bind().

texture_impl* impl [private]


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

Generated on Sat Mar 1 13:50:07 2008 for Periapsis Project by  doxygen 1.5.5