(*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
Initializing an audio context might take long and reduce TPS/FPS
on Linux. With the latest Oto, the initialization happens in
parallel thanks to the 'ready' channel.
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