1 // SwiftShader Software Renderer
3 // Copyright(c) 2005-2011 TransGaming Inc.
5 // All rights reserved. No part of this software may be copied, distributed, transmitted,
6 // transcribed, stored in a retrieval system, translated into any human or computer
7 // language by any means, or disclosed to third parties without the explicit written
8 // agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
9 // or implied, including but not limited to any patent rights, are granted to you.
12 #ifndef D3D9_Direct3DVolumeTexture9_hpp
13 #define D3D9_Direct3DVolumeTexture9_hpp
15 #include "Direct3DBaseTexture9.hpp"
23 class Direct3DVolume9;
25 class Direct3DVolumeTexture9 : public IDirect3DVolumeTexture9, public Direct3DBaseTexture9
28 Direct3DVolumeTexture9(Direct3DDevice9 *device, unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
30 virtual ~Direct3DVolumeTexture9();
33 long __stdcall QueryInterface(const IID &iid, void **object);
34 unsigned long __stdcall AddRef();
35 unsigned long __stdcall Release();
37 // IDirect3DResource9 methods
38 long __stdcall GetDevice(IDirect3DDevice9 **device);
39 long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
40 long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
41 long __stdcall FreePrivateData(const GUID &guid);
42 unsigned long __stdcall SetPriority(unsigned long newPriority);
43 unsigned long __stdcall GetPriority();
44 void __stdcall PreLoad();
45 D3DRESOURCETYPE __stdcall GetType();
47 // IDirect3DBaseTexture9 methods
48 unsigned long __stdcall SetLOD(unsigned long newLOD);
49 unsigned long __stdcall GetLOD();
50 unsigned long __stdcall GetLevelCount();
51 long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType);
52 D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType();
53 void __stdcall GenerateMipSubLevels();
55 // IDirect3DVolumeTexture9 methods
56 long __stdcall GetLevelDesc(unsigned int level, D3DVOLUME_DESC *description);
57 long __stdcall GetVolumeLevel(unsigned int level, IDirect3DVolume9 **volume);
58 long __stdcall LockBox(unsigned int level, D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags);
59 long __stdcall UnlockBox(unsigned int level);
60 long __stdcall AddDirtyBox(const D3DBOX *dirtyBox);
63 Direct3DVolume9 *getInternalVolumeLevel(unsigned int level);
66 // Creation parameters
67 const unsigned int width;
68 const unsigned int height;
69 const unsigned int depth;
71 Direct3DVolume9 *volumeLevel[MIPMAP_LEVELS];
75 #endif // D3D9_Direct3DVolumeTexture9_hpp