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
|
|
@ -468,6 +468,12 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
|
|||
psoDesc.SampleDesc.Count = 1;
|
||||
psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
|
||||
|
||||
#ifdef USE_D3DCOMPILE
|
||||
decltype(D3DCompile)* D3DCompile = load_d3dcompile();
|
||||
if (D3DCompile == nullptr)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// Create the vertex shader
|
||||
{
|
||||
#ifdef USE_D3DCOMPILE
|
||||
|
|
@ -546,6 +552,10 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_D3DCOMPILE
|
||||
unload_d3dcompile();
|
||||
#endif
|
||||
|
||||
// Create the blending setup
|
||||
{
|
||||
D3D12_BLEND_DESC& desc = psoDesc.BlendState;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue