|
| GLTexture (const std::string &name, Bitmap *bitmap) |
| Create a new GLTexture with the given name and bitmap. More...
|
|
void | init () |
| Upload the texture. More...
|
|
void | refresh () |
| Refresh (re-upload) the texture. More...
|
|
void | refresh (const Point2i &offset, const Vector2i &size) |
| Refresh (re-upload) a subregion of the texture. More...
|
|
void | cleanup () |
| Free the texture from GPU memory. More...
|
|
void | bind (int textureUnit=0, int textureIndex=0) const |
| Bind the texture and enable texturing. More...
|
|
void | download (Bitmap *bitmap=NULL) |
| Download the texture (only for render target textures) More...
|
|
void | unbind () const |
| Unbind the texture and disable texturing. More...
|
|
void | activateTarget () |
| Activate the render target. More...
|
|
void | activateSide (int side) |
| Activate a certain face of a cube map as render target. More...
|
|
void | setTargetRegion (const Point2i &offset, const Vector2i &size) |
| Restrict rendering to a sub-region of the texture. More...
|
|
void | releaseTarget () |
| Deactivate the render target. More...
|
|
void | blit (GPUTexture *target, int what) const |
| Blit a render buffer into another render buffer. More...
|
|
void | blit (GPUTexture *target, int what, const Point2i &sourceOffset, const Vector2i &sourceSize, const Point2i &destOffset, const Vector2i &destSize) const |
| Blit a render buffer into another render buffer. More...
|
|
void | clear () |
| Clear (assuming that this is a render buffer) More...
|
|
Color3 | getPixel (int x, int y) const |
| Assuming that this is a 2D RGB framebuffer, read a single pixel from the GPU. More...
|
|
virtual const Class * | getClass () const |
| Retrieve this object's class. More...
|
|
| GPUTexture (const std::string &name, Bitmap *bitmap) |
| Construct a new texture. More...
|
|
void | setName (const std::string &name) |
| Set the texture name. More...
|
|
const std::string & | getName () const |
| Get the texture name. More...
|
|
void | setType (ETextureType textureType) |
| Set the texture type. More...
|
|
ETextureType | getType () const |
| Return the texture type. More...
|
|
void | setPixelFormat (EPixelFormat fmt) |
| Set the pixel format of this texture. More...
|
|
EPixelFormat | getPixelFormat () const |
| Return the pixel format of this texture. More...
|
|
void | setComponentFormat (EComponentFormat fmt) |
| Set the component format of this texture. More...
|
|
EComponentFormat | getComponentFormat () const |
| Return the component format of this texture. More...
|
|
void | setFrameBufferType (EFrameBufferType frameBufferType) |
| Set the framebuffer type (applies only if type==EFrameBuffer) More...
|
|
EFrameBufferType | getFrameBufferType () const |
| Return the framebuffer type (applies only if type==EFrameBuffer) More...
|
|
void | setFilterType (EFilterType filterType) |
| Set the filter type. More...
|
|
EFilterType | getFilterType () const |
| Return the filter type. More...
|
|
void | setWrapType (EWrapType wrapType) |
| Set the wrap type. More...
|
|
void | setWrapTypeU (EWrapType wrapType) |
| Set the wrap type along the U axis. More...
|
|
EWrapType | getWrapTypeU () |
| Return the wrap type along the U axis. More...
|
|
void | setWrapTypeV (EWrapType wrapType) |
| Set the wrap type along the V axis. More...
|
|
EWrapType | getWrapTypeV () |
| Return the wrap type along the V axis. More...
|
|
Point3i | getSize () const |
| Return the size in pixels. More...
|
|
void | setSize (const Point3i &size) |
| Set the size in pixels. More...
|
|
Float | getMaxAnisotropy () const |
| Get the maximal anisotropy. More...
|
|
void | setMaxAnisotropy (Float maxAnisotropy) |
| Set the maximal anisotropy. More...
|
|
bool | isMipMapped () const |
| Return whether mipmapping is enabled. More...
|
|
void | setMipMapped (bool mipMapped) |
| Define whether mipmapping is enabled. More...
|
|
EDepthMode | getDepthMode () const |
| Return the depth map read mode. More...
|
|
void | setDepthMode (EDepthMode mode) |
| Set the depth map read mode. More...
|
|
void | setBitmap (unsigned int slot, Bitmap *bitmap) |
| Store a bitmap in a bitmap slot. More...
|
|
Bitmap * | getBitmap (unsigned int slot=EDefaultPosition) |
| Retrieve a bitmap from the given slot. More...
|
|
const Bitmap * | getBitmap (unsigned int slot=EDefaultPosition) const |
| Retrieve a bitmap from the given slot. More...
|
|
int | getBitmapCount () const |
| Return the number of stored bitmaps. More...
|
|
void | release () |
| Dereference the CPU bitmap associated with the texture. More...
|
|
void | initAndRelease () |
| Run init, followed by release. More...
|
|
const std::set< int > & | getTextureUnits () const |
| Return the texture units, to which this texture is currently bound. More...
|
|
void | setSampleCount (int samples) |
| Set the number of samples (for multisample color render targets) More...
|
|
int | getSampleCount () const |
| Return the number of samples (for multisample color render targets) More...
|
|
void | setBorderColor (const Color3 &borderColor) |
| Set the border color (applicable if wrapMode=EClamp/EClampToBorder ) More...
|
|
const Color3 & | getBorderColor () const |
| Return the border color. More...
|
|
std::string | toString () const |
| Return a string representation. More...
|
|
| Object () |
| Construct a new object. More...
|
|
int | getRefCount () const |
| Return the current reference count. More...
|
|
void | incRef () const |
| Increase the reference count of the object by one. More...
|
|
void | decRef (bool autoDeallocate=true) const |
| Decrease the reference count of the object and possibly deallocate it. More...
|
|
|
enum | ETextureType { ETexture1D = 0,
ETexture2D,
ETexture3D,
ETextureCubeMap
} |
| Available texture types. More...
|
|
enum | EFrameBufferType { ENone = 0x00,
EColorBuffer = 0x01,
EDepthBuffer = 0x02,
EColorAndDepthBuffer = 0x03
} |
| If the texture type is set to EFrameBuffer, the configuration must be one of the following constants. More...
|
|
enum | EComponentFormat {
EUInt8,
EUInt16,
EUInt32,
EFloat16,
EFloat32,
EFloat64
} |
| Supported per-component data formats. More...
|
|
enum | EPixelFormat {
EDepth = 0,
ELuminance,
ELuminanceAlpha,
ERGB,
ERGBA
} |
| Supported pixel format types. More...
|
|
enum | ETexturePosition {
EDefaultPosition = 0,
ECubeMapPositiveX = 0,
ECubeMapNegativeX,
ECubeMapPositiveY,
ECubeMapNegativeY,
ECubeMapPositiveZ,
ECubeMapNegativeZ,
ELastPosition
} |
| A texture has one more slots into which bitmaps can be placed. More...
|
|
enum | EWrapType {
EClamp = 0,
EClampToEdge,
EClampToBorder,
ERepeat,
EMirror
} |
| Texture wrapping mode when texture coordinates exit the [0, 1] range. More...
|
|
enum | EFilterType { ENearest = 0,
ELinear,
EMipMapNearest,
EMipMapLinear
} |
| The interpolation filter determines which texture pixels are considered when shading a fragment. More...
|
|
enum | EDepthMode { ENormal,
ECompare
} |
| When this texture contains a depth buffer, the following modes control the read behavior of the associated texture unit. 'ENormal' means that texture values are returned as with any other texture, whereas 'ECompare' causes a depth comparison to take place (this is the default). More...
|
|
static void | staticInitialization () |
| Initializes the built-in reference count debugger (if enabled) More...
|
|
static void | staticShutdown () |
| Free the memory taken by staticInitialization() More...
|
|
OpenGL-based GPUTexture implementation.