Go to the documentation of this file.
136 virtual float getGamma(
void)
const {
return mGamma; }
255 virtual void createInternalResources(
void);
259 virtual void freeInternalResources(
void);
263 virtual void copyToTexture(
TexturePtr& target );
271 virtual void loadImage(
const Image &img );
302 return mDesiredFormat;
317 virtual bool hasAlpha(
void)
const;
324 virtual void setDesiredIntegerBitDepth(
ushort bits);
328 virtual ushort getDesiredIntegerBitDepth(
void)
const;
335 virtual void setDesiredFloatBitDepth(
ushort bits);
339 virtual ushort getDesiredFloatBitDepth(
void)
const;
343 virtual void setDesiredBitDepths(
ushort integerBits,
ushort floatBits);
347 virtual void setTreatLuminanceAsAlpha(
bool asAlpha);
351 virtual bool getTreatLuminanceAsAlpha(
void)
const;
356 virtual size_t getNumFaces()
const;
377 virtual void convertToImage(
Image& destImage,
bool includeMipMaps =
false);
416 size_t calculateSize(
void)
const;
421 virtual void createInternalResourcesImpl(
void) = 0;
425 virtual void freeInternalResourcesImpl(
void) = 0;
428 void unloadImpl(
void);
433 String getSourceFileType()
const;
unsigned long long int ResourceHandle
Abstract class representing a Texture resource.
Generate mipmaps up to 1x1.
virtual void getCustomAttribute(const String &name, void *pData)
Retrieve a platform or API-specific piece of information from this texture.
Class representing an image file.
TextureUsage
Enum identifying the texture usage.
Static buffer which the application rarely modifies once created.
virtual void setHeight(uint32 h)
Set the height of the texture; can only do this before load();.
3D cube map, used in combination with 3D texture coordinates
virtual uint32 getWidth(void) const
Returns the width of the texture.
PixelFormat mSrcFormat
Bit field, so this can't be TextureUsage.
Indicates the application would like to modify this buffer with the CPU fairly often.
virtual bool isHardwareGammaEnabled() const
Gets whether this texture will be set up so that on sampling it, hardware gamma correction is applied...
Use TextureManager default.
Combination of HBU_DYNAMIC and HBU_WRITE_ONLY.
virtual int getUsage() const
Returns the TextureUsage identifier for this Texture.
This texture will be a render target, i.e.
Combination of HBU_STATIC and HBU_WRITE_ONLY.
virtual void setHardwareGammaEnabled(bool enabled)
Sets whether this texture will be set up so that on sampling it, hardware gamma correction is applied...
1D texture, used in combination with 1D texture coordinates
virtual uint32 getSrcWidth(void) const
Returns the width of the original input texture (may differ due to hardware requirements).
unsigned short mDesiredIntegerBitDepth
virtual uint32 getSrcDepth(void) const
Returns the original depth of the input texture (only applicable for 3D textures).
virtual void setDepth(uint32 d)
Set the depth of the texture (only applicable for 3D textures); can only do this before load();.
Mipmaps will be automatically generated for this texture.
PixelFormat
The pixel format used for images, textures, and render surfaces.
virtual uint getFSAA() const
Get the level of multisample AA to be used if this texture is a rendertarget.
TextureMipmap
Enum identifying special mipmap numbers.
vector< const Image * >::type ConstImagePtrList
PixelFormat mDesiredFormat
virtual void setFSAA(uint fsaa, const String &fsaaHint)
Set the level of multisample AA to be used if this texture is a rendertarget.
virtual void setTextureType(TextureType ttype)
Sets the type of texture; can only be changed before load()
virtual void setWidth(uint32 w)
Set the width of the texture; can only do this before load();.
virtual float getGamma(void) const
Returns the gamma adjustment factor applied to this texture on loading.
virtual void setNumMipmaps(uint8 num)
Sets the number of mipmaps to be used for this texture.
Enums describing buffer usage; not mutually exclusive.
virtual TextureType getTextureType(void) const
Gets the type of texture.
virtual uint8 getNumMipmaps(void) const
Gets the number of mipmaps to be used for this texture.
Defines a generic resource handler.
Indicates the application will never read the contents of the buffer back, it will only ever write da...
virtual void setUsage(int u)
Sets the TextureUsage identifier for this Texture; only useful before load()
virtual PixelFormat getSrcFormat(void) const
Returns the pixel format of the original input texture (may differ due to hardware requirements and p...
unsigned short mDesiredFloatBitDepth
Abstract class representing a loadable resource (e.g.
virtual bool getMipmapsHardwareGenerated(void) const
Are mipmaps hardware generated?
virtual PixelFormat getFormat() const
Returns the pixel format for the texture surface.
virtual void setGamma(float g)
Sets the gamma adjustment factor applied to this texture on loading the data.
Combination of HBU_DYNAMIC, HBU_WRITE_ONLY and HBU_DISCARDABLE.
virtual const String & getFSAAHint() const
Get the multisample AA hint if this texture is a rendertarget.
Shared pointer implementation used to share pixel buffers.
bool mInternalResourcesCreated
uint8 mNumRequestedMipmaps
virtual PixelFormat getDesiredFormat(void) const
Returns the desired pixel format for the texture surface.
3D volume texture, used in combination with 3D texture coordinates
virtual uint32 getHeight(void) const
Returns the height of the texture.
TextureType
Enum identifying the texture type.
virtual uint32 getDepth(void) const
Returns the depth of the texture (only applicable for 3D textures).
virtual uint32 getSrcHeight(void) const
Returns the height of the original input texture (may differ due to hardware requirements).
2D non-square texture, used in combination with 2D texture coordinates
bool mTreatLuminanceAsAlpha
Interface describing a manual resource loader.
bool mMipmapsHardwareGenerated
2D texture, used in combination with 2D texture coordinates (default)
Default to automatic mipmap generation static textures.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.