mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Added support for dynamic d3dcompile load
If you really want to use d3dcompile, then I think its better to find the most recent d3dcompile you have on your computer and load its D3DCompile function. This process is now automatically handled. Just define the right Preprocessor.
This commit is contained in:
parent
a1037e3bf2
commit
3a0d9c55c1
5 changed files with 72 additions and 4 deletions
|
|
@ -342,6 +342,12 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
|
|||
// 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
|
||||
// See https://github.com/ocornut/imgui/pull/638 for sources and details.
|
||||
|
||||
#ifdef USE_D3DCOMPILE
|
||||
decltype(D3DCompile)* D3DCompile = load_d3dcompile();
|
||||
if (D3DCompile == nullptr)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// Create the vertex shader
|
||||
{
|
||||
#ifdef USE_D3DCOMPILE
|
||||
|
|
@ -441,6 +447,10 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_D3DCOMPILE
|
||||
unload_d3dcompile();
|
||||
#endif
|
||||
|
||||
// Create the blending setup
|
||||
{
|
||||
D3D11_BLEND_DESC desc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue