mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-11-03 17:24:24 +00:00 
			
		
		
		
	Examples: Most examples apps detect if ImDrawIdx was changed to 32-bits instead of 16
This commit is contained in:
		@@ -47,7 +47,7 @@ void ImGui_ImplDX9_RenderDrawLists(ImDrawData* draw_data)
 | 
			
		||||
    {
 | 
			
		||||
        if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
 | 
			
		||||
        g_IndexBufferSize = draw_data->TotalIdxCount + 10000;
 | 
			
		||||
        if (g_pd3dDevice->CreateIndexBuffer(g_IndexBufferSize * sizeof(ImDrawIdx), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &g_pIB, NULL) < 0)
 | 
			
		||||
        if (g_pd3dDevice->CreateIndexBuffer(g_IndexBufferSize * sizeof(ImDrawIdx), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, sizeof(ImDrawIdx) == 2 ? D3DFMT_INDEX16 : D3DFMT_INDEX32, D3DPOOL_DEFAULT, &g_pIB, NULL) < 0)
 | 
			
		||||
            return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user