Skip to content

Commit

Permalink
DirectX11 example: fixed projection matrix offset.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Dec 1, 2014
1 parent e6b9950 commit bd762b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/directx11_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ static void ImImpl_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_c
return;

VERTEX_CONSTANT_BUFFER* pConstantBuffer = (VERTEX_CONSTANT_BUFFER*)mappedResource.pData;
const float L = 0.5f;
const float R = ImGui::GetIO().DisplaySize.x + 0.5f;
const float B = ImGui::GetIO().DisplaySize.y + 0.5f;
const float T = 0.5f;
const float L = 0.0f;
const float R = ImGui::GetIO().DisplaySize.x;
const float B = ImGui::GetIO().DisplaySize.y;
const float T = 0.0f;
const float mvp[4][4] =
{
{ 2.0f/(R-L), 0.0f, 0.0f, 0.0f},
Expand Down

0 comments on commit bd762b5

Please sign in to comment.