Examples: Cast to ImTextureID instead of void* when assigning to TexId. Applied to all examples. (#2015)

This commit is contained in:
omar
2018-08-09 17:49:48 +02:00
parent 9c0805010f
commit 421dc19798
10 changed files with 17 additions and 14 deletions

View File

@ -218,7 +218,8 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
ctx->RSSetScissorRects(1, &r);
// Bind texture, Draw
ctx->PSSetShaderResources(0, 1, (ID3D11ShaderResourceView**)&pcmd->TextureId);
ID3D11ShaderResourceView* texture_srv = (ID3D11ShaderResourceView*)pcmd->TextureId;
ctx->PSSetShaderResources(0, 1, &texture_srv);
ctx->DrawIndexed(pcmd->ElemCount, idx_offset, vtx_offset);
}
idx_offset += pcmd->ElemCount;
@ -286,7 +287,7 @@ static void ImGui_ImplDX11_CreateFontsTexture()
}
// Store our identifier
io.Fonts->TexID = (void *)g_pFontTextureView;
io.Fonts->TexID = (ImTextureID)g_pFontTextureView;
// Create texture sampler
{