mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-18 09:14:47 +01:00
Merge pull request #371 from nguillemot/master
Examples: DirectX11: Fix vertex POSITION format (ImDrawVert::pos is 2D, not 4D)
This commit is contained in:
commit
59cedca02e
@ -328,7 +328,7 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
|
|||||||
|
|
||||||
// Create the input layout
|
// Create the input layout
|
||||||
D3D11_INPUT_ELEMENT_DESC localLayout[] = {
|
D3D11_INPUT_ELEMENT_DESC localLayout[] = {
|
||||||
{ "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (size_t)(&((ImDrawVert*)0)->col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (size_t)(&((ImDrawVert*)0)->col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user