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);
93 LoadedStreams _prepareCubeTex();
95 LoadedStreams _prepareNormTex();
97 LoadedStreams _prepareVolumeTex();
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();
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 );
bool mHwGammaReadSupported
Is hardware gamma supported (read)?
IDirect3DBaseTexture9 * pBaseTex
actual texture pointer
vector< HardwarePixelBufferSharedPtr >::type SurfaceList
Vector of pointers to subsurfaces.
bool mHwGammaWriteSupported
Is hardware gamma supported (write)?
PixelFormat
The pixel format used for images, textures, and render surfaces.
Interface describing a manual resource loader.
Abstract class representing a Texture resource.
unsigned long long int ResourceHandle
map< IDirect3DDevice9 *, TextureResources * >::type DeviceToTextureResourcesMap
bool requiresTextureFlipping() const
IDirect3DTexture9 * pNormTex
1D/2D normal texture pointer
D3DMULTISAMPLE_TYPE mFSAAType
IDirect3DSurface9 * pFSAASurface
Optional FSAA surface.
IDirect3DVolumeTexture9 * pVolumeTex
Volume texture.
This class represents a RenderTarget that renders to a Texture.
bool isHardwareGammaReadToBeUsed() const
Indicates whether the hardware gamma is actually enabled and supported.
Shared pointer implementation used to share pixel buffers.
String _getCubeFaceName(unsigned char face) const
internal method, the cube map face name for the spec. face index
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Defines a generic resource handler.
DeviceToTextureResourcesMap mMapDeviceToTextureResources
Map between device to texture resources.
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
RenderTexture implementation for D3D9.
Reference-counted shared pointer, used for objects where implicit destruction is required.
DeviceToTextureResourcesMap::iterator DeviceToTextureResourcesIterator
SharedPtr< vector< MemoryDataStreamPtr >::type > LoadedStreams
LoadedStreams mLoadedStreams
Vector of pointers to streams that were pulled from disk by prepareImpl but have yet to be pushed int...
Represents a Direct3D rendering resource.
IDirect3DCubeTexture9 * pCubeTex
cubic texture pointer
D3DPOOL mD3DPool
The memory pool being used.