mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 22:36:35 +00:00
Examples: DirectX9: Explicitely setting viewport to match that other examples are doing (#937)
This commit is contained in:
parent
52308a54f8
commit
d74a3349e9
@ -94,6 +94,15 @@ void ImGui_ImplDX9_RenderDrawLists(ImDrawData* draw_data)
|
|||||||
g_pd3dDevice->SetIndices(g_pIB);
|
g_pd3dDevice->SetIndices(g_pIB);
|
||||||
g_pd3dDevice->SetFVF(D3DFVF_CUSTOMVERTEX);
|
g_pd3dDevice->SetFVF(D3DFVF_CUSTOMVERTEX);
|
||||||
|
|
||||||
|
// Setup viewport
|
||||||
|
D3DVIEWPORT9 vp;
|
||||||
|
vp.X = vp.Y = 0;
|
||||||
|
vp.Width = (DWORD)io.DisplaySize.x;
|
||||||
|
vp.Height = (DWORD)io.DisplaySize.y;
|
||||||
|
vp.MinZ = 0.0f;
|
||||||
|
vp.MaxZ = 1.0f;
|
||||||
|
g_pd3dDevice->SetViewport(&vp);
|
||||||
|
|
||||||
// Setup render state: fixed-pipeline, alpha-blending, no face culling, no depth testing
|
// Setup render state: fixed-pipeline, alpha-blending, no face culling, no depth testing
|
||||||
g_pd3dDevice->SetPixelShader(NULL);
|
g_pd3dDevice->SetPixelShader(NULL);
|
||||||
g_pd3dDevice->SetVertexShader(NULL);
|
g_pd3dDevice->SetVertexShader(NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user