Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents an image stored on the graphics hardware. More...
#include <omGraphicsOpenGLTexture.h>
Public Member Functions | |
~OpenGLTexture () | |
Destroy a texture and all resources associated with it. More... | |
virtual Size | getDimensionCount () const |
Return the number of dimensions in this texture, usually 1, 2, or 3. More... | |
virtual Size | getSize (Index dimension) const |
Return the size of the texture along the specified dimension index. More... | |
virtual Size | getFaceCount () const |
Return the number of faces that this texture has. More... | |
virtual Bool | isCube () const |
Return whether or not this texture is a cube map texture. More... | |
virtual TextureFormat | getFormat () const |
Return a object that represents the internal storage format for the texture. More... | |
virtual Bool | getFace (Image &image, const PixelFormat &pixelType, TextureFace face=TextureFace::FRONT, Index mipmapLevel=0) const |
Get the texture's image data for the specified face index with the data in the specified pixel type. More... | |
virtual Bool | setFace (const Image &newImage, TextureFormat newTextureFormat, TextureFace face=TextureFace::FRONT, Index mipmapLevel=0) |
Replace the current contents of the texture with the specified image. More... | |
virtual Bool | updateFace (const Image &newImage, const Vector3i &position=Vector3i(), TextureFace face=TextureFace::FRONT, Index mipmapLevel=0) |
Update a region of the texture with the specified image. More... | |
virtual Bool | clearFace (Float channelColor, TextureFace face=TextureFace::FRONT, Index mipmapLevel=0) |
Clear this texture's image using the specified clear color component for the given face and mipmap level. More... | |
virtual TextureWrapType | getWrapType () const |
Return the type of texture wrapping to do when texture coordinates are outside of the range [0,1]. More... | |
virtual Bool | setWrapType (const TextureWrapType &newWrapType) |
Set the type of texture wrapping to do when texture coordinates are outside of the range [0,1]. More... | |
virtual TextureFilter | getDownsampleFilter () const |
Return the type of texture filtering that is used when the texture is reduced in size. More... | |
virtual Bool | setDownsampleFilter (const TextureFilter &newDownsampleFilter) |
Set the type of texture filtering that is used when the texture is reduced in size. More... | |
virtual TextureFilter | getUpsampleFilter () const |
Return the type of texture filtering that is used when the texture is increased in size. More... | |
virtual Bool | setUpsampleFilter (const TextureFilter &newUpsampleFilter) |
Set the type of texture filtering that is used when the texture is increased in size. More... | |
virtual Size | getMipmapCount () const |
Return the number of mipmap levels that this texture has. More... | |
virtual Bool | generateMipmaps () |
Generate smaller mipmaps of the texture from the largest texture image (level 0). More... | |
virtual Bool | isResident () const |
Return whether or not the texture is currently in memory on the GPU. More... | |
virtual Bool | isValid () const |
Return whether or not the state of this texture is valid and able to be used for rendering. More... | |
OpenGLID | getID () const |
Get a unique OpenGL integer identifier for this texture. More... | |
Public Member Functions inherited from om::graphics::textures::DeviceTexture | |
Bool | isValidFace (const TextureFace &face) const |
Return whether or not the specified face is valid for this texture. More... | |
Public Member Functions inherited from om::graphics::devices::DeviceResource | |
virtual | ~DeviceResource () |
Destroy a device object, releasing all internal state. More... | |
GraphicsContext * | getContext () const |
Return a pointer to the graphics context associated with this DeviceResource. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from om::graphics::textures::DeviceTexture | |
DeviceTexture (devices::GraphicsContext *context) | |
Create an empty texture for the given context with no face images. More... | |
Protected Member Functions inherited from om::graphics::devices::DeviceResource | |
DeviceResource (GraphicsContext *newContext) | |
Create a new device object that is associated with the specified graphics context. More... | |
A class that represents an image stored on the graphics hardware.
A texture can be either 1D, 2D, 3D, or a cube map (six 2D faces), with any common texture format (Alpha, Gray, RGB, RGBA, etc.).
om::graphics::devices::opengl::OpenGLTexture::~OpenGLTexture | ( | ) |
Destroy a texture and all resources associated with it.
|
virtual |
Return the number of dimensions in this texture, usually 1, 2, or 3.
Implements om::graphics::textures::DeviceTexture.
Return the size of the texture along the specified dimension index.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return the number of faces that this texture has.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return whether or not this texture is a cube map texture.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return a object that represents the internal storage format for the texture.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Get the texture's image data for the specified face index with the data in the specified pixel type.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Replace the current contents of the texture with the specified image.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Update a region of the texture with the specified image.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Clear this texture's image using the specified clear color component for the given face and mipmap level.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return the type of texture wrapping to do when texture coordinates are outside of the range [0,1].
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Set the type of texture wrapping to do when texture coordinates are outside of the range [0,1].
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return the type of texture filtering that is used when the texture is reduced in size.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Set the type of texture filtering that is used when the texture is reduced in size.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return the type of texture filtering that is used when the texture is increased in size.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Set the type of texture filtering that is used when the texture is increased in size.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return the number of mipmap levels that this texture has.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Generate smaller mipmaps of the texture from the largest texture image (level 0).
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return whether or not the texture is currently in memory on the GPU.
Implements om::graphics::textures::DeviceTexture.
|
virtual |
Return whether or not the state of this texture is valid and able to be used for rendering.
Implements om::graphics::devices::DeviceResource.
|
inline |
Get a unique OpenGL integer identifier for this texture.