Renderer: Handle resize events on-demand instead of polling

We now differentiate between a resize event and surface change/destroyed
event, reducing the overhead for resizes in the Vulkan backend. It is
also now now safe to change the surface multiple times if the video thread
is lagging behind.
This commit is contained in:
Stenzek
2018-01-26 16:23:24 +10:00
parent 5baf3bbe2e
commit de632fc9c8
19 changed files with 364 additions and 350 deletions

View File

@ -59,14 +59,13 @@ void Close();
extern ID3D11Device* device;
extern ID3D11Device1* device1;
extern ID3D11DeviceContext* context;
extern HWND hWnd;
extern IDXGISwapChain1* swapchain;
void Reset();
void Reset(HWND new_wnd);
void ResizeSwapChain();
void Present();
unsigned int GetBackBufferWidth();
unsigned int GetBackBufferHeight();
D3DTexture2D*& GetBackBuffer();
D3DTexture2D* GetBackBuffer();
const char* PixelShaderVersionString();
const char* GeometryShaderVersionString();
const char* VertexShaderVersionString();