]> git.cworth.org Git - apitrace-tests/blobdiff - apps/d3d11/tri.cpp
d3d*: Don't set the BufferDesc dimmension.
[apitrace-tests] / apps / d3d11 / tri.cpp
index a380ca7c7b4581a0cc5be554ea1cc3cb25b7a6ca..fe746313c29902db72c01a187cbc319089f01233 100644 (file)
@@ -43,7 +43,9 @@ static ID3D11Device * g_pDevice = NULL;
 static ID3D11DeviceContext * g_pDeviceContext = NULL;
 
 
-int main(int argc, char *argv[]){
+int
+main(int argc, char *argv[])
+{
     HRESULT hr;
 
     HINSTANCE hInstance = GetModuleHandle(NULL);
@@ -96,8 +98,6 @@ int main(int argc, char *argv[]){
 
     DXGI_SWAP_CHAIN_DESC SwapChainDesc;
     ZeroMemory(&SwapChainDesc, sizeof SwapChainDesc);
-    SwapChainDesc.BufferDesc.Width = WindowWidth;
-    SwapChainDesc.BufferDesc.Height = WindowHeight;
     SwapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;;
     SwapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
     SwapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
@@ -107,6 +107,7 @@ int main(int argc, char *argv[]){
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
     static const D3D_FEATURE_LEVEL FeatureLevels[] = {
         D3D_FEATURE_LEVEL_11_0,