#include <OgreD3D7Texture.h>
Inheritance diagram for Ogre::D3DTexture:

Public Member Functions | |||||
| D3DTexture (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, IDirect3DDevice7 *lpDirect3dDevice) | |||||
| virtual | ~D3DTexture () | ||||
| virtual void | loadImage (const Image &img) | ||||
| Loads the data from an image. | |||||
| virtual void | loadImage3D (const Image imgs[]) | ||||
| virtual void | copyToTexture (TexturePtr &target) | ||||
| Copies (and maybe scales to fit) the contents of this texture to another texture. | |||||
| LPDIRECTDRAWSURFACE7 | getDDSurface (void) | ||||
| D3D-specific member that returns the underlying surface. | |||||
| HardwarePixelBufferSharedPtr | getBuffer (size_t face, size_t mipmap) | ||||
This buffer can then be used to copy data from and to a particular level of the texture.
| |||||
| void | restoreFromLostDevice (void) | ||||
| Restore this texture from a lost device. | |||||
| virtual void | setTextureType (TextureType ttype) | ||||
| Sets the type of texture; can only be changed before load(). | |||||
| virtual TextureType | getTextureType (void) const | ||||
| Gets the type of texture. | |||||
| virtual size_t | getNumMipmaps (void) const | ||||
| Gets the number of mipmaps to be used for this texture. | |||||
| virtual void | setNumMipmaps (size_t num) | ||||
| Sets the number of mipmaps to be used for this texture. | |||||
| virtual bool | getMipmapsHardwareGenerated (void) const | ||||
| Are mipmaps hardware generated? | |||||
| virtual float | getGamma (void) const | ||||
| Returns the gamma adjustment factor applied to this texture. | |||||
| virtual void | setGamma (float g) | ||||
| Sets the gamma adjustment factor applied to this texture. | |||||
| virtual unsigned int | getHeight (void) const | ||||
| Returns the height of the texture. | |||||
| virtual unsigned int | getWidth (void) const | ||||
| Returns the width of the texture. | |||||
| virtual unsigned int | getDepth (void) const | ||||
| Returns the depth of the texture (only applicable for 3D textures). | |||||
| virtual unsigned int | getSrcHeight (void) const | ||||
| Returns the height of the original input texture (may differ due to hardware requirements). | |||||
| virtual unsigned int | getSrcWidth (void) const | ||||
| Returns the width of the original input texture (may differ due to hardware requirements). | |||||
| virtual unsigned int | getSrcDepth (void) const | ||||
| Returns the original depth of the input texture (only applicable for 3D textures). | |||||
| virtual void | setHeight (unsigned int h) | ||||
| Set the height of the texture; can only do this before load();. | |||||
| virtual void | setWidth (unsigned int w) | ||||
| Set the width of the texture; can only do this before load();. | |||||
| virtual void | setDepth (unsigned int d) | ||||
| Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();. | |||||
| virtual int | getUsage () const | ||||
| Returns the TextureUsage indentifier for this Texture. | |||||
| virtual void | setUsage (int u) | ||||
| Sets the TextureUsage indentifier for this Texture; only useful before load(). | |||||
| virtual void | createInternalResources (void) | ||||
| Creates the internal texture resources for this texture. | |||||
| virtual void | freeInternalResources (void) | ||||
| Frees internal texture resources for this texture. | |||||
| virtual void | loadRawData (DataStreamPtr &stream, ushort uWidth, ushort uHeight, PixelFormat eFormat) | ||||
| Loads the data from a raw stream. | |||||
| virtual void | enable32Bit (bool setting=true) | ||||
| virtual PixelFormat | getFormat () const | ||||
| Returns the pixel format for the texture surface. | |||||
| virtual void | setFormat (PixelFormat pf) | ||||
| Sets the pixel format for the texture surface; can only be set before load(). | |||||
| virtual bool | hasAlpha (void) const | ||||
| Returns true if the texture has an alpha layer. | |||||
| virtual size_t | getNumFaces () const | ||||
| Return the number of faces this texture has. | |||||
| virtual void | load (void) | ||||
| Loads the resource, if it is not already. | |||||
| virtual void | reload (void) | ||||
| Reloads the resource, if it is already loaded. | |||||
| bool | isReloadable (void) const | ||||
| Returns true if the Resource is reloadable, false otherwise. | |||||
| bool | isManuallyLoaded (void) const | ||||
| Is this resource manually loaded? | |||||
| virtual void | unload (void) | ||||
| Unloads the resource; this is not permanent, the resource can be reloaded later if required. | |||||
| size_t | getSize (void) const | ||||
| Retrieves info about the size of the resource. | |||||
| virtual void | touch (void) | ||||
| 'Touches' the resource to indicate it has been used. | |||||
| const String & | getName (void) const | ||||
| Gets resource name. | |||||
| ResourceHandle | getHandle (void) const | ||||
| bool | isLoaded (void) const | ||||
| Returns true if the Resource has been loaded, false otherwise. | |||||
| const String & | getGroup (void) | ||||
| Gets the group which this resource is a member of. | |||||
| ResourceManager * | getCreator (void) | ||||
| Gets the manager which created this resource. | |||||
| const String & | getOrigin (void) const | ||||
| Get the origin of this resource, e.g. | |||||
| void | _notifyOrigin (const String &origin) | ||||
| Notify this resource of it's origin. | |||||
| ParamDictionary * | getParamDictionary (void) | ||||
| Retrieves the parameter dictionary for this class. | |||||
| const ParamDictionary * | getParamDictionary (void) const | ||||
| const ParameterList & | getParameters (void) const | ||||
| Retrieves a list of parameters valid for this object. | |||||
| virtual bool | setParameter (const String &name, const String &value) | ||||
| Generic parameter setting method. | |||||
| virtual void | setParameterList (const NameValuePairList ¶mList) | ||||
| Generic multiple parameter setting method. | |||||
| virtual String | getParameter (const String &name) const | ||||
| Generic parameter retrieval method. | |||||
| virtual void | copyParametersTo (StringInterface *dest) const | ||||
| Method for copying this object's parameters to another object. | |||||
Static Public Member Functions | |||||
| D3DX_SURFACEFORMAT | OgreFormat_to_D3DXFormat (PixelFormat format) | ||||
| Static pixelformat functions. | |||||
| PixelFormat | closestD3DXFormat (PixelFormat format) | ||||
| bool | OgreFormat_to_DDPixelFormat (PixelFormat format, DDPIXELFORMAT &out) | ||||
| void | cleanupDictionary () | ||||
| Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |||||
Protected Types | |||||
| typedef std::vector< HardwarePixelBufferSharedPtr > | SurfaceList | ||||
| Vector of pointers to subsurfaces. | |||||
Protected Member Functions | |||||
| void | loadImpl (void) | ||||
| | |||||
| void | createInternalResourcesImpl (void) | ||||
| | |||||
| void | freeInternalResourcesImpl (void) | ||||
| | |||||
| void | createSurface2D (void) | ||||
| void | createSurface3D (void) | ||||
| void | _chooseD3DFormat (DDPIXELFORMAT &ddpf) | ||||
| internal method, return a D3D pixel format for texture creation | |||||
| void | _constructCubeFaceNames (const String name) | ||||
| internal method, construct full cube texture face names from a given string | |||||
| String | _getCubeFaceName (unsigned char face) const | ||||
| internal method, the cube map face name for the spec. face index | |||||
| void | _createSurfaceList () | ||||
| size_t | calculateSize (void) const | ||||
| | |||||
| virtual void | _loadImages (const std::vector< const Image * > &images) | ||||
| Generic method to load the texture from a set of images. | |||||
| void | unloadImpl (void) | ||||
| Default implementation of unload which calls freeInternalResources. | |||||
| bool | createParamDictionary (const String &className) | ||||
| Internal method for creating a parameter dictionary for the class, if it does not already exist. | |||||
Protected Attributes | |||||
| IDirect3DDevice7 * | mD3DDevice | ||||
| A pointer to the Direct3D device. | |||||
| IDirectDrawSurface7 * | mSurface | ||||
| Surface of the (first) device-specific texture. | |||||
| String | mCubeFaceNames [6] | ||||
| cube texture individual face names | |||||
| SurfaceList | mSurfaceList | ||||
| bool | mRestoring | ||||
| Are we restoring from a lost device? | |||||
| unsigned long | mHeight | ||||
| unsigned long | mWidth | ||||
| unsigned long | mDepth | ||||
| size_t | mNumRequestedMipmaps | ||||
| size_t | mNumMipmaps | ||||
| bool | mMipmapsHardwareGenerated | ||||
| float | mGamma | ||||
| TextureType | mTextureType | ||||
| PixelFormat | mFormat | ||||
| int | mUsage | ||||
| unsigned short | mSrcBpp | ||||
| unsigned long | mSrcWidth | ||||
| unsigned long | mSrcHeight | ||||
| unsigned long | mSrcDepth | ||||
| unsigned short | mFinalBpp | ||||
| bool | mHasAlpha | ||||
| bool | mInternalResourcesCreated | ||||
| ResourceManager * | mCreator | ||||
| Creator. | |||||
| String | mName | ||||
| Unique name of the resource. | |||||
| String | mGroup | ||||
| The name of the resource group. | |||||
| ResourceHandle | mHandle | ||||
| Numeric handle for more efficient look up than name. | |||||
| bool | mIsLoaded | ||||
| Is the resource currently loaded? | |||||
| size_t | mSize | ||||
| The size of the resource in bytes. | |||||
| bool | mIsManual | ||||
| Is this file manually loaded? | |||||
| String | mOrigin | ||||
| Origin of this resource (e.g. script name) - optional. | |||||
| ManualResourceLoader * | mLoader | ||||
| Optional manual loader; if provided, data is loaded from here instead of a file. | |||||
| String | mParamDictName | ||||
| Class name for this instance to be used as a lookup (must be initialised by subclasses). | |||||
Static Protected Attributes | |||||
| ParamDictionaryMap | msDictionary | ||||
| Dictionary of parameters. | |||||
Definition at line 39 of file OgreD3D7Texture.h.
|
|
Vector of pointers to subsurfaces.
Definition at line 72 of file OgreD3D7Texture.h. |
|
||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
internal method, return a D3D pixel format for texture creation
|
|
|
internal method, construct full cube texture face names from a given string
|
|
|
|
|
|
internal method, the cube map face name for the spec. face index
Definition at line 96 of file OgreD3D7Texture.h. References mCubeFaceNames, and Ogre::String. |
|
|
Generic method to load the texture from a set of images. This can be used by the specific implementation for convience. Implementations might decide not to use this function if they can use their own image loading functions.
|
|
|
Notify this resource of it's origin.
Definition at line 214 of file OgreResource.h. References Ogre::String. |
|
|
Implements Ogre::Resource. |
|
|
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. MaterialManager) initializes. |
|
|
|
|
|
Method for copying this object's parameters to another object.
Definition at line 296 of file OgreStringInterface.h. References Ogre::ParamDictionary::mParamDefs, and Ogre::StringInterface::setParameter(). |
|
|
Copies (and maybe scales to fit) the contents of this texture to another texture.
Reimplemented from Ogre::Texture. |
|
|
Creates the internal texture resources for this texture.
|
|
|
Implements Ogre::Texture. |
|
|
Internal method for creating a parameter dictionary for the class, if it does not already exist.
Definition at line 172 of file OgreStringInterface.h. References Ogre::String. |
|
|
|
|
|
|
|
|
Definition at line 212 of file OgreTexture.h. |
|
|
Frees internal texture resources for this texture.
|
|
|
Implements Ogre::Texture. |
|
||||||||||||
|
This buffer can then be used to copy data from and to a particular level of the texture.
Implements Ogre::Texture. |
|
|
Gets the manager which created this resource.
Definition at line 205 of file OgreResource.h. |
|
|
D3D-specific member that returns the underlying surface.
|
|
|
Returns the depth of the texture (only applicable for 3D textures).
Definition at line 140 of file OgreTexture.h. |
|
|
Returns the pixel format for the texture surface.
Definition at line 218 of file OgreTexture.h. References Ogre::PixelFormat. |
|
|
Returns the gamma adjustment factor applied to this texture.
Definition at line 122 of file OgreTexture.h. |
|
|
Gets the group which this resource is a member of.
Definition at line 202 of file OgreResource.h. References Ogre::String. |
|
|
Definition at line 188 of file OgreResource.h. References Ogre::ResourceHandle. |
|
|
Returns the height of the texture.
Definition at line 132 of file OgreTexture.h. |
|
|
Are mipmaps hardware generated?
Definition at line 118 of file OgreTexture.h. |
|
|
Gets resource name.
Definition at line 183 of file OgreResource.h. References Ogre::String. |
|
|
Return the number of faces this texture has. This will be 6 for a cubemap texture and 1 for a 1D, 2D or 3D one. |
|
|
Gets the number of mipmaps to be used for this texture.
Definition at line 106 of file OgreTexture.h. |
|
|
Get the origin of this resource, e.g. a script file name.
Definition at line 212 of file OgreResource.h. References Ogre::String. |
|
|
Definition at line 209 of file OgreStringInterface.h. |
|
|
Retrieves the parameter dictionary for this class.
Definition at line 196 of file OgreStringInterface.h. |
|
|
Generic parameter retrieval method.
Definition at line 265 of file OgreStringInterface.h. References Ogre::ParamCommand::doGet(), Ogre::ParamDictionary::getParamCommand(), and Ogre::String. |
|
|
Retrieves a list of parameters valid for this object.
|
|
|
Retrieves info about the size of the resource.
Definition at line 172 of file OgreResource.h. |
|
|
Returns the original depth of the input texture (only applicable for 3D textures).
Definition at line 152 of file OgreTexture.h. |
|
|
Returns the height of the original input texture (may differ due to hardware requirements).
Definition at line 144 of file OgreTexture.h. |
|
|
Returns the width of the original input texture (may differ due to hardware requirements).
Definition at line 148 of file OgreTexture.h. |
|
|
Gets the type of texture.
Definition at line 102 of file OgreTexture.h. References Ogre::TextureType. |
|
|
Returns the TextureUsage indentifier for this Texture.
Definition at line 169 of file OgreTexture.h. |
|
|
Returns the width of the texture.
Definition at line 136 of file OgreTexture.h. |
|
|
Returns true if the texture has an alpha layer.
Definition at line 227 of file OgreTexture.h. |
|
|
Returns true if the Resource has been loaded, false otherwise.
Definition at line 195 of file OgreResource.h. References OGRE_LOCK_AUTO_MUTEX. |
|
|
Is this resource manually loaded?
Definition at line 160 of file OgreResource.h. |
|
|
Returns true if the Resource is reloadable, false otherwise.
Definition at line 153 of file OgreResource.h. |
|
|
Loads the resource, if it is not already.
Reimplemented in Ogre::Mesh, and Ogre::GLSLGpuProgram. |
|
|
Loads the data from an image.
Implements Ogre::Texture. |
|
|
|
|
|
Implements Ogre::Resource. |
|
||||||||||||||||||||
|
Loads the data from a raw stream.
|
|
|
Static pixelformat functions.
|
|
||||||||||||
|
|
|
|
Reloads the resource, if it is already loaded.
|
|
|
Restore this texture from a lost device.
|
|
|
Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();.
Definition at line 165 of file OgreTexture.h. |
|
|
Sets the pixel format for the texture surface; can only be set before load().
|
|
|
Sets the gamma adjustment factor applied to this texture.
Definition at line 128 of file OgreTexture.h. |
|
|
Set the height of the texture; can only do this before load();.
Definition at line 156 of file OgreTexture.h. |
|
|
Sets the number of mipmaps to be used for this texture.
Definition at line 112 of file OgreTexture.h. |
|
||||||||||||
|
Generic parameter setting method.
Referenced by Ogre::StringInterface::copyParametersTo(). |
|
|
Generic multiple parameter setting method.
|
|
|
Sets the type of texture; can only be changed before load().
Definition at line 98 of file OgreTexture.h. |
|
|
Sets the TextureUsage indentifier for this Texture; only useful before load().
Definition at line 181 of file OgreTexture.h. |
|
|
Set the width of the texture; can only do this before load();.
Definition at line 160 of file OgreTexture.h. |
|
|
'Touches' the resource to indicate it has been used.
Reimplemented in Ogre::Material. |
|
|
Unloads the resource; this is not permanent, the resource can be reloaded later if required.
Reimplemented in Ogre::GLSLGpuProgram. |
|
|
Default implementation of unload which calls freeInternalResources.
Implements Ogre::Resource. |
|
|
Creator.
Definition at line 73 of file OgreResource.h. |
|
|
cube texture individual face names
Definition at line 70 of file OgreD3D7Texture.h. Referenced by _getCubeFaceName(). |
|
|
A pointer to the Direct3D device.
Definition at line 67 of file OgreD3D7Texture.h. |
|
|
Definition at line 252 of file OgreTexture.h. |
|
|
Definition at line 265 of file OgreTexture.h. |
|
|
Definition at line 260 of file OgreTexture.h. |
|
|
Definition at line 257 of file OgreTexture.h. |
|
|
The name of the resource group.
Definition at line 77 of file OgreResource.h. |
|
|
Numeric handle for more efficient look up than name.
Definition at line 79 of file OgreResource.h. |
|
|
Definition at line 266 of file OgreTexture.h. |
|
|
Definition at line 250 of file OgreTexture.h. |
|
|
Definition at line 268 of file OgreTexture.h. |
|
|
Is the resource currently loaded?
Definition at line 81 of file OgreResource.h. |
|
|
Is this file manually loaded?
Definition at line 85 of file OgreResource.h. |
|
|
Optional manual loader; if provided, data is loaded from here instead of a file.
Definition at line 89 of file OgreResource.h. |
|
|
Definition at line 256 of file OgreTexture.h. |
|
|
Unique name of the resource.
Definition at line 75 of file OgreResource.h. |
|
|
Definition at line 255 of file OgreTexture.h. |
|
|
Definition at line 254 of file OgreTexture.h. |
|
|
Origin of this resource (e.g. script name) - optional.
Definition at line 87 of file OgreResource.h. |
|
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
Definition at line 160 of file OgreStringInterface.h. |
|
|
Are we restoring from a lost device?
Definition at line 75 of file OgreD3D7Texture.h. |
|
|
Dictionary of parameters.
Definition at line 157 of file OgreStringInterface.h. |
|
|
The size of the resource in bytes.
Definition at line 83 of file OgreResource.h. |
|
|
Definition at line 263 of file OgreTexture.h. |
|
|
Definition at line 264 of file OgreTexture.h. |
|
|
Definition at line 264 of file OgreTexture.h. |
|
|
Definition at line 264 of file OgreTexture.h. |
|
|
Surface of the (first) device-specific texture.
Definition at line 68 of file OgreD3D7Texture.h. |
|
|
Definition at line 73 of file OgreD3D7Texture.h. |
|
|
Definition at line 259 of file OgreTexture.h. |
|
|
Definition at line 261 of file OgreTexture.h. |
|
|
Definition at line 251 of file OgreTexture.h. |
Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:44:40 2005