Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Graphics::ImageFileTexture Class Reference

Texture which is loaded from an image file. More...

#include <ImageFileTexture.h>

Inheritance diagram for Teddy::Graphics::ImageFileTexture:

Inheritance graph
[legend]
Collaboration diagram for Teddy::Graphics::ImageFileTexture:

Collaboration graph
[legend]
List of all members.

Public Methods

 ImageFileTexture (const std::string &fname, int mode=TEXTURE_MODE_COLOR, int flags=0)
 Constructor from file. More...


Static Public Attributes

const unsigned long TEXTURE_NO_SCALE = 1
const unsigned long TEXTURE_MODE_COLOR = 1
const unsigned long TEXTURE_MODE_ALPHA = 2

Protected Methods

void copySdlSurface (SDL_Surface *source, int mode, int flags)
 Copy SDL_Surface to texture. More...


Detailed Description

Texture which is loaded from an image file.

Definition at line 38 of file ImageFileTexture.h.


Constructor & Destructor Documentation

Teddy::Graphics::ImageFileTexture::ImageFileTexture const std::string &    fname,
int    mode = TEXTURE_MODE_COLOR,
int    flags = 0
 

Constructor from file.

Definition at line 61 of file ImageFileTexture.cpp.

References copySdlSurface, Teddy::SysSupport::emsg, Teddy::Graphics::Texture::is_good, load_gl_texture, and Teddy::SysSupport::M_MAT.


Member Function Documentation

void Teddy::Graphics::ImageFileTexture::copySdlSurface SDL_Surface *    source,
int    mode,
int    flags
[protected]
 

Copy SDL_Surface to texture.

Definition at line 83 of file ImageFileTexture.cpp.

References Teddy::Graphics::Texture::ENV_MODULATE, Teddy::Graphics::Texture::FILTER_LINEAR, Teddy::Graphics::Texture::FORMAT_RGB, Teddy::Graphics::Texture::FORMAT_RGBA, Teddy::Graphics::Texture::putData, Teddy::Graphics::Texture::setEnv, Teddy::Graphics::Texture::setFilter, Teddy::Graphics::Texture::setWrap, Teddy::Graphics::Texture::size, Vector2, and Teddy::Graphics::Texture::WRAP_REPEAT.

Referenced by ImageFileTexture.


Member Data Documentation

const unsigned long Teddy::Graphics::ImageFileTexture::TEXTURE_MODE_ALPHA = 2 [static]
 

Definition at line 57 of file ImageFileTexture.cpp.

const unsigned long Teddy::Graphics::ImageFileTexture::TEXTURE_MODE_COLOR = 1 [static]
 

Definition at line 56 of file ImageFileTexture.cpp.

const unsigned long Teddy::Graphics::ImageFileTexture::TEXTURE_NO_SCALE = 1 [static]
 

Definition at line 55 of file ImageFileTexture.cpp.


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