Platform_Win32_3D_D3D9_Texture.h
Go to the documentation of this file.00001 00011 #ifndef __Platform_Win32_3D_D3D9_Texture_H__ 00012 #define __Platform_Win32_3D_D3D9_Texture_H__ 00013 00014 // Includes 00015 #include "Platform_3D_Texture.h" 00016 00017 // Forward declares 00018 struct IDirect3DTexture9; 00019 struct IDirect3DDevice9; 00020 struct IDirect3DSurface9; 00021 class Asset; 00022 00023 // Platform_Win32_3D_D3D9_Texture 00024 class Platform_Win32_3D_D3D9_Texture: public Platform_3D_Texture 00025 { 00026 public: 00027 Platform_Win32_3D_D3D9_Texture( 00028 IDirect3DDevice9* device, 00029 int width, 00030 int height, 00031 void* data 00032 ); 00033 00034 Platform_Win32_3D_D3D9_Texture( 00035 IDirect3DDevice9* device, 00036 void* data, 00037 int size 00038 ); 00039 00040 virtual ~Platform_Win32_3D_D3D9_Texture(); 00041 00042 virtual void Bind(int stage); 00043 00044 virtual int GetWidth(); 00045 virtual int GetHeight(); 00046 virtual bool HasAlphaChannel(); 00047 00048 virtual void Lock(); 00049 virtual void Unlock(); 00050 virtual unsigned char* GetTexelData(); 00051 virtual int GetPitch(); 00052 00053 private: 00054 IDirect3DDevice9* device_; 00055 IDirect3DTexture9* d3dTexture_; 00056 IDirect3DSurface9* lockedSurface_; 00057 unsigned char* lockedData_; 00058 int lockedPitch_; 00059 int width_; 00060 int height_; 00061 int depth_; 00062 int mipLevels_; 00063 D3DFORMAT format_; 00064 }; 00065 00066 #endif /* __Platform_Win32_3D_D3D9_Texture_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
