123 virtual void setNumMipmaps(
size_t num) {mNumRequestedMipmaps = mNumMipmaps = num;}
133 virtual float getGamma(
void)
const {
return mGamma; }
190 virtual size_t getHeight(
void)
const {
return mHeight; }
194 virtual size_t getWidth(
void)
const {
return mWidth; }
198 virtual size_t getDepth(
void)
const {
return mDepth; }
214 virtual void setHeight(
size_t h) { mHeight = mSrcHeight = h; }
218 virtual void setWidth(
size_t w) { mWidth = mSrcWidth = w; }
223 virtual void setDepth(
size_t d) { mDepth = mSrcDepth = d; }
252 virtual void createInternalResources(
void);
256 virtual void freeInternalResources(
void);
260 virtual void copyToTexture(
TexturePtr& target );
268 virtual void loadImage(
const Image &img );
299 return mDesiredFormat;
314 virtual bool hasAlpha(
void)
const;
321 virtual void setDesiredIntegerBitDepth(
ushort bits);
325 virtual ushort getDesiredIntegerBitDepth(
void)
const;
332 virtual void setDesiredFloatBitDepth(
ushort bits);
336 virtual ushort getDesiredFloatBitDepth(
void)
const;
340 virtual void setDesiredBitDepths(
ushort integerBits,
ushort floatBits);
344 virtual void setTreatLuminanceAsAlpha(
bool asAlpha);
348 virtual bool getTreatLuminanceAsAlpha(
void)
const;
353 virtual size_t getNumFaces()
const;
374 virtual void convertToImage(
Image& destImage,
bool includeMipMaps =
false);
413 size_t calculateSize(
void)
const;
418 virtual void createInternalResourcesImpl(
void) = 0;
422 virtual void freeInternalResourcesImpl(
void) = 0;
425 void unloadImpl(
void);
430 String getSourceFileType()
const;
465 if (pRep == static_cast<Texture*>(r.
getPointer()))
483 assert(r.
isNull() &&
"RHS must be null if it has no mutex!");
this texture will be a render target, i.e.
virtual void getCustomAttribute(const String &name, void *pData)
Retrieve a platform or API-specific piece of information from this texture.
TextureMipmap
Enum identifying special mipmap numbers.
virtual void setGamma(float g)
Sets the gamma adjustment factor applied to this texture on loading the data.
TexturePtr(const TexturePtr &r)
TexturePtr & operator=(const ResourcePtr &r)
Operator used to convert a ResourcePtr to a TexturePtr.
#define OGRE_MUTEX_CONDITIONAL(name)
size_t mNumRequestedMipmaps
virtual void setWidth(size_t w)
Set the width of the texture; can only do this before load();.
Combination of HBU_STATIC and HBU_WRITE_ONLY.
virtual PixelFormat getDesiredFormat(void) const
Returns the desired pixel format for the texture surface.
mipmaps will be automatically generated for this texture
virtual PixelFormat getSrcFormat(void) const
Returns the pixel format of the original input texture (may differ due to hardware requirements and p...
Indicates the application will never read the contents of the buffer back, it will only ever write da...
vector< const Image * >::type ConstImagePtrList
Interface describing a manual resource loader.
virtual int getUsage() const
Returns the TextureUsage indentifier for this Texture.
Combination of HBU_DYNAMIC, HBU_WRITE_ONLY and HBU_DISCARDABLE.
bool mMipmapsHardwareGenerated
virtual void setNumMipmaps(size_t num)
Sets the number of mipmaps to be used for this texture.
unsigned short mDesiredIntegerBitDepth
Indicates the application would like to modify this buffer with the CPU fairly often.
virtual void setFSAA(uint fsaa, const String &fsaaHint)
Set the level of multisample AA to be used if this texture is a rendertarget.
Static buffer which the application rarely modifies once created.
virtual void setHeight(size_t h)
Set the height of the texture; can only do this before load();.
virtual size_t getNumMipmaps(void) const
Gets the number of mipmaps to be used for this texture.
1D texture, used in combination with 1D texture coordinates
PixelFormat
The pixel format used for images, textures, and render surfaces.
Enums describing buffer usage; not mutually exclusive.
Combination of HBU_DYNAMIC and HBU_WRITE_ONLY.
bool mInternalResourcesCreated
Specialisation of SharedPtr to allow SharedPtr to be assigned to TexturePtr.
virtual size_t getWidth(void) const
Returns the width of the texture.
virtual uint getFSAA() const
Get the level of multisample AA to be used if this texture is a rendertarget.
virtual size_t getSrcHeight(void) const
Returns the height of the original input texture (may differ due to hardware requirements).
Shared pointer implementation used to share pixel buffers.
virtual bool isHardwareGammaEnabled() const
Gets whether this texture will be set up so that on sampling it, hardware gamma correction is applied...
Class representing an image file.
virtual void setUsage(int u)
Sets the TextureUsage indentifier for this Texture; only useful before load()
Abstract class representing a loadable resource (e.g.
unsigned long long int ResourceHandle
bool mTreatLuminanceAsAlpha
#define OGRE_LOCK_MUTEX(name)
virtual void setTextureType(TextureType ttype)
Sets the type of texture; can only be changed before load()
virtual void setHardwareGammaEnabled(bool enabled)
Sets whether this texture will be set up so that on sampling it, hardware gamma correction is applied...
virtual float getGamma(void) const
Returns the gamma adjustment factor applied to this texture on loading.
virtual size_t getSrcWidth(void) const
Returns the width of the original input texture (may differ due to hardware requirements).
TextureType
Enum identifying the texture type.
TexturePtr(const ResourcePtr &r)
Defines a generic resource handler.
unsigned int * useCountPointer() const
unsigned short mDesiredFloatBitDepth
2D texture, used in combination with 2D texture coordinates (default)
PixelFormat mDesiredFormat
Use TextureManager default.
virtual void setDepth(size_t d)
Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();...
virtual const String & getFSAAHint() const
Get the multisample AA hint if this texture is a rendertarget.
virtual size_t getSrcDepth(void) const
Returns the original depth of the input texture (only applicable for 3D textures).
default to automatic mipmap generation static textures
virtual size_t getDepth(void) const
Returns the depth of the texture (only applicable for 3D textures).
3D volume texture, used in combination with 3D texture coordinates
virtual bool getMipmapsHardwareGenerated(void) const
Are mipmaps hardware generated?
Generate mipmaps up to 1x1.
Abstract class representing a Texture resource.
virtual size_t getHeight(void) const
Returns the height of the texture.
virtual PixelFormat getFormat() const
Returns the pixel format for the texture surface.
3D cube map, used in combination with 3D texture coordinates
#define OGRE_COPY_AUTO_SHARED_MUTEX(from)
virtual TextureType getTextureType(void) const
Gets the type of texture.
TextureUsage
Enum identifying the texture usage.