mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-07-06 22:42:19 +08: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user