Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::Texture2DPool Class Reference

Convenience container for managing 2D textures. More...

#include <OpenGLFramework/Utils/Texture2DPool.hh>

Public Member Functions

void Clear (const std::string &name)
 
void ClearAll ()
 
BIAS::glfTexture2DCreate (const std::string &name, int width, int height, GLenum internalFormat, GLenum minFilter=GL_NEAREST, GLenum magFilter=GL_NEAREST, GLenum wrapS=GL_CLAMP, GLenum wrapT=GL_CLAMP, int mipmap=0)
 Allocates an empty texture. More...
 
BIAS::glfTexture2DCreate (const std::string &name, const BIAS::ImageBase &img, GLenum minFilter=GL_NEAREST, GLenum magFilter=GL_NEAREST, GLenum wrapS=GL_CLAMP, GLenum wrapT=GL_CLAMP, GLenum internalFormat=0, int mipmap=0)
 Uploads BIAS image to texture space. More...
 
BIAS::glfTexture2DCreate (const std::string &name, int width, int height, ImageBase::EStorageType storageType, ImageBase::EColorModel colorModel, GLenum minFilter=GL_NEAREST, GLenum magFilter=GL_NEAREST, GLenum wrapS=GL_CLAMP, GLenum wrapT=GL_CLAMP, int mipmap=0)
 Allocates an empty texture. More...
 
std::map< std::string,
BIAS::glfTexture2D * > 
GetTextureMap ()
 
BIAS::glfTexture2Doperator[] (const std::string &name)
 Returns NULL if name is not found. More...
 
 Texture2DPool ()
 
BIAS::glfTexture2DUploadImage (const std::string &name, const BIAS::ImageBase &img, GLenum minFilter=GL_NEAREST, GLenum magFilter=GL_NEAREST, GLenum wrapS=GL_CLAMP, GLenum wrapT=GL_CLAMP, GLenum internalFormat=0, int mipmap=0)
 
 ~Texture2DPool ()
 Terminates the lifecycle of all textures created in the pool! More...
 

Detailed Description

Convenience container for managing 2D textures.

Author
bartczak 03/2009

Definition at line 40 of file Texture2DPool.hh.

Constructor & Destructor Documentation

Texture2DPool::~Texture2DPool ( )

Terminates the lifecycle of all textures created in the pool!

Definition at line 30 of file Texture2DPool.cpp.

BIAS::Texture2DPool::Texture2DPool ( )
inline

Definition at line 46 of file Texture2DPool.hh.

Member Function Documentation

void Texture2DPool::Clear ( const std::string &  name)

Definition at line 154 of file Texture2DPool.cpp.

void Texture2DPool::ClearAll ( )

Definition at line 142 of file Texture2DPool.cpp.

BIAS::glfTexture2D * Texture2DPool::Create ( const std::string &  name,
int  width,
int  height,
GLenum  internalFormat,
GLenum  minFilter = GL_NEAREST,
GLenum  magFilter = GL_NEAREST,
GLenum  wrapS = GL_CLAMP,
GLenum  wrapT = GL_CLAMP,
int  mipmap = 0 
)

Allocates an empty texture.

Definition at line 53 of file Texture2DPool.cpp.

References BIAS::glfTexture2D::Allocate(), BIAS::glfTexture::Create(), and BIAS::glfTexture2D::Set().

Referenced by BIAS::FramebufferSetupPool::Create().

BIAS::glfTexture2D * Texture2DPool::Create ( const std::string &  name,
const BIAS::ImageBase img,
GLenum  minFilter = GL_NEAREST,
GLenum  magFilter = GL_NEAREST,
GLenum  wrapS = GL_CLAMP,
GLenum  wrapT = GL_CLAMP,
GLenum  internalFormat = 0,
int  mipmap = 0 
)

Uploads BIAS image to texture space.

Definition at line 75 of file Texture2DPool.cpp.

References BIAS::glfTexture::Create(), BIAS::glfTexture2D::Set(), and BIAS::glfTexture2D::UploadImage().

glfTexture2D * Texture2DPool::Create ( const std::string &  name,
int  width,
int  height,
ImageBase::EStorageType  storageType,
ImageBase::EColorModel  colorModel,
GLenum  minFilter = GL_NEAREST,
GLenum  magFilter = GL_NEAREST,
GLenum  wrapS = GL_CLAMP,
GLenum  wrapT = GL_CLAMP,
int  mipmap = 0 
)

Allocates an empty texture.

Definition at line 98 of file Texture2DPool.cpp.

References BIAS::glfTexture2D::Allocate(), BIAS::glfTexture::Create(), and BIAS::glfTexture2D::Set().

std::map<std::string, BIAS::glfTexture2D*> BIAS::Texture2DPool::GetTextureMap ( )
inline

Definition at line 86 of file Texture2DPool.hh.

BIAS::glfTexture2D * Texture2DPool::operator[] ( const std::string &  name)

Returns NULL if name is not found.

Definition at line 36 of file Texture2DPool.cpp.

glfTexture2D * Texture2DPool::UploadImage ( const std::string &  name,
const BIAS::ImageBase img,
GLenum  minFilter = GL_NEAREST,
GLenum  magFilter = GL_NEAREST,
GLenum  wrapS = GL_CLAMP,
GLenum  wrapT = GL_CLAMP,
GLenum  internalFormat = 0,
int  mipmap = 0 
)

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