This reverts these commits
* a4d20094d7
* ed88559a50
* cc82ad19a1
Reason: As the default feature level becomes 11 again, we don't need the
environment variable EBITENGINE_DIRECTX_FEATURE_LEVEL for v2.4.
Updates #2466
Updates #2486
The feature level 12_0 causes some issues on some machines. As we now
have EBITENGINE_DIRECTX_FEATURE_LEVEL, let's go back to the default
feature level 11_0.
Updates #2486
A fix for #2447 was a breaking-change as the DirectX driver was no longer
available for some old graphics card.
To support such old cards, provide a new environment variable
EBITENGINE_DIRECTX_FEATURE_LEVEL to specify a feature level.
The possible values are 11_0, 11_1, 12_0, 12_1, and 12_2. The default
value is 12_0.
Closes#2466
The DirectX initialization passed but crashed later on some old machines
supporting the feature level 11 but not 12.
This change fixes the issue by changing the required feature level from
11 to 12 so that the initialization fails and OpenGL is used as the
fallback.
Closes#2447
This reverts commit 9d303e8dc5.
Reason: A GPU memory leak (#2292). Though this reverting reveals the error #2249
again, a memory leak is more critical. Then revert the change once, and then
take time to investigate how to resolve#2249.
Closes#2292
Updates #2249
CreateGraphicsPipelineState someitmes causes an error
DXGI_ERROR_DEVICE_HUNG, but we failed to know why.
Instead of fixing this, check the error earlier and use the fallback
grpahics library OpenGL in this case.
Updates #2198
* Wrong offsets were speicified when creating a constant buffer view and
a shader resource view.
* Wrong root descriptor tables were speicified. For one draw command,
one descriptor table for a constant buffer and textures should be used.
Updates #2198Closes#2201
When a screen is locked, an Ebitengine application crashed as the
swap chain's Present returned DXGI_STATUS_OCCLUDED.
Let's ignore the error and continue to run the applications. In the
ideal world, an application should stop running during the screen lock,
so let's revisit this later.
This fix also fixes the issue that a Win32API GetCursorPos returned
an error ERROR_ACCESS_DENIED when the screen was locked.
Closes#2179
Mapping for a constant buffer every frame might sometimes fails. We
are not sure the reason, but in the official examples, leaving mapped
regoins seems the way to go.
Updates #2084Closes#2157