forked from codecat/nanovg_d3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
4,237 additions
and
2,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// | ||
// Copyright (c) 2013 Mikko Mononen [email protected] | ||
// | ||
// D3D Demo port cmaughan. | ||
// This software is provided 'as-is', without any express or implied | ||
// warranty. In no event will the authors be held liable for any damages | ||
// arising from the use of this software. | ||
|
@@ -148,9 +148,11 @@ void Draw() | |
if (screenshot) | ||
{ | ||
screenshot = 0; | ||
// Screenshot not yet supported | ||
//saveScreenShot(fbWidth, fbHeight, premult, "dump.png"); | ||
} | ||
|
||
// Don't wait for VBlank | ||
IDXGISwapChain_Present(pSwapChain, 0, 0); | ||
} | ||
|
||
|
@@ -437,7 +439,9 @@ BOOL InitializeDX(unsigned int x, unsigned int y) | |
{ | ||
if (Quality > 0) | ||
{ | ||
DXGI_SAMPLE_DESC Desc = { i, Quality - 1 }; | ||
DXGI_SAMPLE_DESC Desc; | ||
Desc.Count = i; | ||
Desc.Quality = Quality - 1; | ||
swapDesc.SampleDesc = Desc; | ||
} | ||
} | ||
|
@@ -460,7 +464,7 @@ BOOL InitializeDX(unsigned int x, unsigned int y) | |
if (FAILED(hr)) | ||
{ | ||
swapDesc.SampleDesc.Count = 1; | ||
hr = IDXGIFactory_CreateSwapChain(pDXGIFactory, pDevice, &swapDesc, &pSwapChain); | ||
hr = IDXGIFactory_CreateSwapChain(pDXGIFactory, (IUnknown*)pDevice, &swapDesc, &pSwapChain); | ||
} | ||
#endif | ||
} | ||
|
Oops, something went wrong.