Platform_Win32_Screen_D3D9.h
Go to the documentation of this file.00001 00010 #ifndef __Platform_Win32_Screen_D3D9_H__ 00011 #define __Platform_Win32_Screen_D3D9_H__ 00012 00013 // Includes 00014 #include "Platform_Win32_Screen_Technology.h" 00015 00016 // Forward declares 00017 struct IDirect3D9; 00018 struct IDirect3DDevice9; 00019 struct IDirect3DTexture9; 00020 00021 00022 // Platform_Win32_Screen_D3D9 00023 class Platform_Win32_Screen_D3D9:public Platform_Win32_Screen_Technology 00024 { 00025 00026 public: 00027 Platform_Win32_Screen_D3D9(struct HWND__* windowHandle, bool fullscreen, int screenWidth, int screenHeight, bool interpolationMode); 00028 virtual ~Platform_Win32_Screen_D3D9(); 00029 00030 virtual bool Setup(); 00031 00032 virtual bool Present( 00033 unsigned short* bitmapData, 00034 int bitmapWidth, 00035 int bitmapHeight, 00036 unsigned short modulate, 00037 unsigned short backgroundColor 00038 ); 00039 00040 virtual void SetInterpolationMode( 00041 bool enabled 00042 ); 00043 00044 virtual void TransformCursorCoordinates(float& x, float& y); 00045 00046 private: 00047 bool CreateBackBuffers(int width, int height); 00048 00049 bool CopyBitmapToBackBuffer( 00050 unsigned short* bitmapData, 00051 int bitmapWidth, 00052 int bitmapHeight, 00053 unsigned short backgroundColor 00054 ); 00055 00056 bool CopyBackBufferToFrontBuffer( 00057 int bitmapWidth, 00058 int bitmapHeight, 00059 unsigned short modulate); 00060 00061 private: 00062 struct HWND__* windowHandle_; 00063 bool interpolationMode_; 00064 bool fullscreen_; 00065 int screenWidth_; 00066 int screenHeight_; 00067 void* d3dDLL_; 00068 IDirect3D9* direct3D_; 00069 IDirect3DDevice9* device_; 00070 IDirect3DTexture9* backbuffer1_; 00071 IDirect3DTexture9* backbuffer2_; 00072 int backbufferWidth_; 00073 int backbufferHeight_; 00074 bool usingDynamicTexture_; 00075 bool buffer1Filled_; 00076 bool buffer2Filled_; 00077 00078 int lastPresentWidth_; 00079 int lastPresentHeight_; 00080 }; 00081 00082 00083 00084 #endif /* __Platform_Win32_Screen_D3D9_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
