summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/d3d/D3D9Window.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/GfxDevice/d3d/D3D9Window.h')
-rw-r--r--Runtime/GfxDevice/d3d/D3D9Window.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/d3d/D3D9Window.h b/Runtime/GfxDevice/d3d/D3D9Window.h
new file mode 100644
index 0000000..038b59f
--- /dev/null
+++ b/Runtime/GfxDevice/d3d/D3D9Window.h
@@ -0,0 +1,39 @@
+#ifndef D3D9WINDOW_H
+#define D3D9WINDOW_H
+
+#include "D3D9Includes.h"
+#include "Runtime/GfxDevice/GfxDeviceWindow.h"
+#include "Runtime/GfxDevice/GfxDeviceObjects.h"
+#include "D3D9Utils.h"
+#include "TexturesD3D9.h"
+
+class D3D9Window : public GfxDeviceWindow
+{
+private:
+ IDirect3DDevice9* m_Device;
+ IDirect3DSwapChain9* m_SwapChain;
+ RenderColorSurfaceD3D9 m_BackBuffer;
+ RenderDepthSurfaceD3D9 m_DepthStencil;
+ D3DFORMAT m_DepthStencilFormat;
+ int m_FSAALevel;
+public:
+ D3D9Window( IDirect3DDevice9* device, HWND window, int width, int height, DepthBufferFormat depthFormat, int antiAlias );
+ ~D3D9Window();
+
+ bool Reshape( int width, int height, DepthBufferFormat depthFormat, int antiAlias );
+
+ bool BeginRendering();
+ bool EndRendering( bool presentContent );
+ void SetAsActiveWindow ();
+
+ D3DFORMAT GetDepthStencilFormat() const { return m_DepthStencilFormat; }
+
+ RenderSurfaceHandle GetBackBuffer();
+ RenderSurfaceHandle GetDepthStencil();
+};
+
+#if UNITY_EDITOR
+int GetCurrentD3DFSAALevel();
+#endif
+
+#endif