mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Examples: DirectX10: Fix warning, disable debug device, add ignore list (#424)
This commit is contained in:
parent
59f0db6f15
commit
dadd03fc11
4
examples/.gitignore
vendored
4
examples/.gitignore
vendored
@ -7,6 +7,10 @@ directx9_example/Debug/*
|
|||||||
directx9_example/Release/*
|
directx9_example/Release/*
|
||||||
directx9_example/ipch/*
|
directx9_example/ipch/*
|
||||||
directx9_example/x64/*
|
directx9_example/x64/*
|
||||||
|
directx10_example/Debug/*
|
||||||
|
directx10_example/Release/*
|
||||||
|
directx10_example/ipch/*
|
||||||
|
directx10_example/x64/*
|
||||||
directx11_example/Debug/*
|
directx11_example/Debug/*
|
||||||
directx11_example/Release/*
|
directx11_example/Release/*
|
||||||
directx11_example/ipch/*
|
directx11_example/ipch/*
|
||||||
|
@ -110,7 +110,6 @@ void ImGui_ImplDX10_RenderDrawLists(ImDrawData* draw_data)
|
|||||||
{ (R + L) / (L - R), (T + B) / (B - T), 0.5f, 1.0f },
|
{ (R + L) / (L - R), (T + B) / (B - T), 0.5f, 1.0f },
|
||||||
};
|
};
|
||||||
memcpy(&pConstantBuffer->mvp, mvp, sizeof(mvp));
|
memcpy(&pConstantBuffer->mvp, mvp, sizeof(mvp));
|
||||||
D3D10_MAPPED_TEXTURE2D texMap;
|
|
||||||
g_pVertexConstantBuffer->Unmap();
|
g_pVertexConstantBuffer->Unmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,8 +117,8 @@ void ImGui_ImplDX10_RenderDrawLists(ImDrawData* draw_data)
|
|||||||
{
|
{
|
||||||
D3D10_VIEWPORT vp;
|
D3D10_VIEWPORT vp;
|
||||||
memset(&vp, 0, sizeof(D3D10_VIEWPORT));
|
memset(&vp, 0, sizeof(D3D10_VIEWPORT));
|
||||||
vp.Width = ImGui::GetIO().DisplaySize.x;
|
vp.Width = (UINT)ImGui::GetIO().DisplaySize.x;
|
||||||
vp.Height = ImGui::GetIO().DisplaySize.y;
|
vp.Height = (UINT)ImGui::GetIO().DisplaySize.y;
|
||||||
vp.MinDepth = 0.0f;
|
vp.MinDepth = 0.0f;
|
||||||
vp.MaxDepth = 1.0f;
|
vp.MaxDepth = 1.0f;
|
||||||
vp.TopLeftX = 0;
|
vp.TopLeftX = 0;
|
||||||
|
@ -58,11 +58,7 @@ HRESULT CreateDeviceD3D(HWND hWnd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
UINT createDeviceFlags = 0;
|
UINT createDeviceFlags = 0;
|
||||||
#ifdef _DEBUG
|
//createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG;
|
||||||
createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG;
|
|
||||||
#endif
|
|
||||||
D3D_FEATURE_LEVEL featureLevel;
|
|
||||||
const D3D_FEATURE_LEVEL featureLevelArray[1] = { D3D_FEATURE_LEVEL_10_1, };
|
|
||||||
if (D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice) != S_OK)
|
if (D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice) != S_OK)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user