28 #ifndef __D3D9TEXTURE_H__
29 #define __D3D9TEXTURE_H__
86 void _loadCubeTex(IDirect3DDevice9* d3d9Device,
const LoadedStreams &loadedStreams);
88 void _loadNormTex(IDirect3DDevice9* d3d9Device,
const LoadedStreams &loadedStreams);
90 void _loadVolumeTex(IDirect3DDevice9* d3d9Device,
const LoadedStreams &loadedStreams);
100 void _createNormTex(IDirect3DDevice9* d3d9Device);
102 void _createCubeTex(IDirect3DDevice9* d3d9Device);
104 void _createVolumeTex(IDirect3DDevice9* d3d9Device);
107 D3DFORMAT _chooseD3DFormat(IDirect3DDevice9* d3d9Device);
110 size_t calculateSize(
void)
const;
112 void createInternalResources(
void);
114 void freeInternalResources(
void);
116 void createInternalResourcesImpl(
void);
118 void createInternalResourcesImpl(IDirect3DDevice9* d3d9Device);
120 void freeInternalResourcesImpl(
void);
122 void _setSrcAttributes(
unsigned long width,
unsigned long height,
unsigned long depth,
PixelFormat format);
124 void _setFinalAttributes(IDirect3DDevice9* d3d9Device,
TextureResources* textureResources,
125 unsigned long width,
unsigned long height,
unsigned long depth,
PixelFormat format);
127 D3DTEXTUREFILTERTYPE _getBestFilterMethod(IDirect3DDevice9* d3d9Device);
129 bool _canUseDynamicTextures(IDirect3DDevice9* d3d9Device, DWORD srcUsage, D3DRESOURCETYPE srcType, D3DFORMAT srcFormat);
131 bool _canAutoGenMipmaps(IDirect3DDevice9* d3d9Device, DWORD srcUsage, D3DRESOURCETYPE srcType, D3DFORMAT srcFormat);
133 bool _canUseHardwareGammaCorrection(IDirect3DDevice9* d3d9Device, DWORD srcUsage, D3DRESOURCETYPE srcType, D3DFORMAT srcFormat,
bool forwriting);
137 { assert(face < 6);
return mCubeFaceNames[face]; }
141 void _createSurfaceList(IDirect3DDevice9* d3d9Device, TextureResources* textureResources);
146 void loadImpl(IDirect3DDevice9* d3d9Device);
150 void unprepareImpl();
155 TextureResources* getTextureResources(IDirect3DDevice9* d3d9Device);
158 TextureResources* allocateTextureResources(IDirect3DDevice9* d3d9Device);
161 void createTextureResources(IDirect3DDevice9* d3d9Device);
164 void freeTextureResources(IDirect3DDevice9* d3d9Device, TextureResources* textureResources);
166 void determinePool();
190 IDirect3DBaseTexture9 *getTexture();
192 IDirect3DTexture9 *getNormTexture();
194 IDirect3DCubeTexture9 *getCubeTexture();
206 bool useDefaultPool();
209 virtual void notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device);
212 virtual void notifyOnDeviceDestroy(IDirect3DDevice9* d3d9Device);
215 virtual void notifyOnDeviceLost(IDirect3DDevice9* d3d9Device);
218 virtual void notifyOnDeviceReset(IDirect3DDevice9* d3d9Device);
228 virtual void update(
bool swap);
230 virtual void getCustomAttribute(
const String& name,
void *pData );
IDirect3DTexture9 * pNormTex
1D/2D normal texture pointer
This class represents a RenderTarget that renders to a Texture.
bool isHardwareGammaReadToBeUsed() const
Indicates whether the hardware gamma is actually enabled and supported.
bool requiresTextureFlipping() const
Interface describing a manual resource loader.
D3DMULTISAMPLE_TYPE mFSAAType
DeviceToTextureResourcesMap::iterator DeviceToTextureResourcesIterator
bool mHwGammaWriteSupported
Is hardware gamma supported (write)?
DeviceToTextureResourcesMap mMapDeviceToTextureResources
Map between device to texture resources.
PixelFormat
The pixel format used for images, textures, and render surfaces.
D3DPOOL mD3DPool
The memory pool being used.
IDirect3DSurface9 * pFSAASurface
Optional FSAA surface.
SharedPtr< vector< MemoryDataStreamPtr >::type > LoadedStreams
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Shared pointer implementation used to share pixel buffers.
unsigned long long int ResourceHandle
RenderTexture implementation for D3D9.
vector< HardwarePixelBufferSharedPtr >::type SurfaceList
Vector of pointers to subsurfaces.
bool mHwGammaReadSupported
Is hardware gamma supported (read)?
Defines a generic resource handler.
String _getCubeFaceName(unsigned char face) const
internal method, the cube map face name for the spec. face index
Reference-counted shared pointer, used for objects where implicit destruction is required.
Abstract class representing a Texture resource.
IDirect3DVolumeTexture9 * pVolumeTex
Volume texture.
IDirect3DCubeTexture9 * pCubeTex
cubic texture pointer
IDirect3DBaseTexture9 * pBaseTex
actual texture pointer
Represents a Direct3D rendering resource.
map< IDirect3DDevice9 *, TextureResources * >::type DeviceToTextureResourcesMap
LoadedStreams mLoadedStreams
Vector of pointers to streams that were pulled from disk by prepareImpl but have yet to be pushed int...