From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/d3d11/D3D11Window.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Runtime/GfxDevice/d3d11/D3D11Window.h (limited to 'Runtime/GfxDevice/d3d11/D3D11Window.h') diff --git a/Runtime/GfxDevice/d3d11/D3D11Window.h b/Runtime/GfxDevice/d3d11/D3D11Window.h new file mode 100644 index 0000000..e269cf2 --- /dev/null +++ b/Runtime/GfxDevice/d3d11/D3D11Window.h @@ -0,0 +1,28 @@ +#pragma once + +#include "External/DirectX/builds/dx11include/d3d11.h" +#include "Runtime/GfxDevice/GfxDeviceWindow.h" +#include "Runtime/GfxDevice/GfxDeviceObjects.h" +#include "TexturesD3D11.h" + +class D3D11Window : public GfxDeviceWindow +{ +private: + IDXGISwapChain* m_SwapChain; + RenderColorSurfaceD3D11 m_BackBuffer; + RenderDepthSurfaceD3D11 m_DepthStencil; + int m_AntiAlias; + +public: + D3D11Window (HWND window, int width, int height, DepthBufferFormat depthFormat, int antiAlias); + ~D3D11Window (); + + bool Reshape (int width, int height, DepthBufferFormat depthFormat, int antiAlias); + + bool BeginRendering (); + bool EndRendering (bool presentContent); + void SetAsActiveWindow (); + + RenderSurfaceHandle GetBackBuffer(); + RenderSurfaceHandle GetDepthStencil(); +}; -- cgit v1.1-26-g67d0