Before this change, `delayedCommandsFlushed` was set as 1 BEFORE
buffered commands were flushed. This meant that a function call and
a command being flushed were not concurrent-safe.
This change fixes this issue by changing the timing of setting
`delayedCommandsFlushed` as 1 to the later time after flushing the
buffered commands.
Closes#2580
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
As of macOS 13, a retrieved collectionBehavior included
NSWindowCollectionBehaviorFullScreenNone and this prevented the window
from being fullscreen.
This change fixes this issue by removing the flag
NSWindowCollectionBehaviorFullScreenNone when necessary.
Closes#2437
(*Image).WritePixels doens't send a command to the queue immediately
but caches commands internally. However, the package atlas assumed
that pixel data was sent to the cache every end of a frame. Then, byte
slices for pixels were corrupted.
This change fixes the issue by resolving all the images when flushing
commands.
Closes#2390
When DrawTriangles is called and then WritePixels is called on a
sub-image, a panic happened. However, this panic actually happens
only when the graphics driver requires restoring (e.g. OpenGL ES
on Android). The situation was very limited, but this was a real
problem on Android.
This panic was introduced to prevent a rendering bug by a inmature
graphics drivers, but we should no longer need this. This change
just removes the panic.
Updates #292Closes#2346
SDL interprets this as "map -1 to 1, map 0 to -1", so we should do the same.
This fix contains two parts:
* Fix the intended output range.
* Also fix the formula to map a range to a range.
The fix does not change behavior if a "-a" mapping isn't used, as in any other case max-min == 1 or max+min == 0.
Fixes#2334
Calling setFrame in windowDidExitFullScreen caused unexpected results
like a strange window size after fullscreen. Let's remove this.
By removing this, setting window position and size during fullscreen
will no longer work again. Let's fix this later.
Closes#2295
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
When a decorating state is switched, a framebuffer-size callback was
invoked but with wrong parameters on macOS.
This callback was originally implemented for i3 window manager, and
was not needed for macOS. Then, let's not use this on macOS. Probably
we can also skip this registering on Windows.
Updates #1960Closes#2257