Skip to content

Commit

Permalink
Fix performance issues
Browse files Browse the repository at this point in the history
  • Loading branch information
HybridEidolon committed Dec 10, 2016
1 parent 5f21767 commit 4742aa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bbmod/src/imgui_impl_d3d8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void ImGui_ImplD3D8_RenderDrawLists(ImDrawData* draw_data)
return;
}
if (!g_maskVB && !g_maskIB) {
if (g_device->CreateVertexBuffer(6 * sizeof(CUSTOMVERTEX), D3DUSAGE_WRITEONLY, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &g_maskVB) < 0) return;
if (g_device->CreateVertexBuffer(6 * sizeof(CUSTOMVERTEX), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &g_maskVB) < 0) return;
if (g_device->CreateIndexBuffer(6, D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, sizeof(ImDrawIdx) == 2 ? D3DFMT_INDEX16 : D3DFMT_INDEX32, D3DPOOL_DEFAULT, &g_maskIB) < 0) return;
ImDrawIdx* idx_dst;
g_maskIB->Lock(0, 6 * sizeof(ImDrawIdx), (BYTE**)&idx_dst, D3DLOCK_DISCARD);
Expand Down

0 comments on commit 4742aa1

Please sign in to comment.