Basic Image AlgorithmS Library
2.8.0
|
Convenience container for managing 2D textures. More...
#include <OpenGLFramework/Utils/Texture2DPool.hh>
Public Member Functions | |
void | Clear (const std::string &name) |
void | ClearAll () |
BIAS::glfTexture2D * | 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. More... | |
BIAS::glfTexture2D * | 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. More... | |
BIAS::glfTexture2D * | 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. More... | |
std::map< std::string, BIAS::glfTexture2D * > | GetTextureMap () |
BIAS::glfTexture2D * | operator[] (const std::string &name) |
Returns NULL if name is not found. More... | |
Texture2DPool () | |
BIAS::glfTexture2D * | 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) |
~Texture2DPool () | |
Terminates the lifecycle of all textures created in the pool! More... | |
Convenience container for managing 2D textures.
Definition at line 40 of file Texture2DPool.hh.
Texture2DPool::~Texture2DPool | ( | ) |
Terminates the lifecycle of all textures created in the pool!
Definition at line 30 of file Texture2DPool.cpp.
|
inline |
Definition at line 46 of file Texture2DPool.hh.
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().
|
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 |
||
) |
Definition at line 119 of file Texture2DPool.cpp.
References BIAS::glfTexture::Create(), BIAS::glfTexture2D::Set(), and BIAS::glfTexture2D::UploadImage().