Commit Graph

7564 Commits

Author SHA1 Message Date
Hajime Hoshi
4b22781d01 internal/atlas: remove an unnecessary mutex
Updates #2390
2022-10-16 15:29:17 +09:00
Hajime Hoshi
a971490dc9 internal/graphicscommand: bug fix: resolve unsent WritePixels commands
(*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
2022-10-16 15:27:30 +09:00
Hajime Hoshi
966823e445 internal/processteset/testdta: bug fix: compile error 2022-10-16 15:26:34 +09:00
Hajime Hoshi
67178c9534 internal/processtest/testdata: add a test file
Updates #2362
2022-10-16 15:18:04 +09:00
Hajime Hoshi
2b261c6314 internal/glfwwin, internal/graphicsdriver/directx: bug fix: wrong error handlings for Windows HANDLE
Closes #2366
2022-10-02 01:58:45 +09:00
Hajime Hoshi
659e048de9 ebiten: bug fix: resolveSetVerticesCacheIfNeeded was not called for the offscreen
Closes #2362
2022-09-28 23:09:21 +09:00
Hajime Hoshi
b4306e0e56 internal/mipmap: bug fix: mipmap images were unexpectedly volatile
Closes #2354
2022-09-28 01:41:19 +09:00
Hajime Hoshi
eecabf25f4 internal/restorable: bug fix: wrong panic on mixing DrawTriangles and WritePixels
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 #292
Closes #2346
2022-09-24 21:44:35 +09:00
Hajime Hoshi
ef26267703 internal/ui: bug fix: reentering updateImpl caused double unlocking
updateImpl can be invoked in multiple ways. This should have been
protected by a mutex, or this caused unexpected reentrance.

Closes #2339
2022-09-20 13:23:44 +09:00
divVerent
e808f168a1 internal/gamepaddb: fix mapping support for e.g. dpleft:-a0. (#2335)
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
2022-09-20 00:35:08 +09:00
Hajime Hoshi
3e6d97a19f update Oto to v2.3.1 2022-09-12 21:56:59 +09:00
Hajime Hoshi
1a2e93c594 internal/gamepad: bug fix: a wireless Xbox controller didn't work correctly on macOS
The button and hat values must be adjusted by their minimum values.
See also GLFW's implementation.

Closes #266
2022-09-12 01:56:17 +09:00
Hajime Hoshi
62ad95186f update Oto 2022-09-10 19:07:56 +09:00
Hajime Hoshi
f3bb2bae09 update Oto (detect swtching devices automatically on Windows)
Closes #2317
2022-09-10 18:46:10 +09:00
Hajime Hoshi
13d53f5d8f update Oto (release COM objects appropriately)
Updates #2314
2022-09-10 17:29:50 +09:00
Hajime Hoshi
ce34be560c update Oto (fix crashes on Windows when plugging out a headset)
Closes #2314
2022-09-10 16:37:20 +09:00
divVerent
0ae4002750 internal/gamepad: ignore EPERM when opening gamepads (#2308)
This seems required for the Snap sandbox when probing a non-gamepad device node.

Closes #2307
2022-09-06 21:29:50 +09:00
Hajime Hoshi
557bef998d bug fix: go mod vendor didn't work
Closes #2306
Closes ebitengine/purego#31
2022-09-05 17:27:08 +09:00
Hajime Hoshi
6feb4c5121 internal/shader: bug fix: test failures
Updates #2304
2022-09-05 02:52:42 +09:00
Hajime Hoshi
ead48ca5ab internal/shaderir: bug fix: wrong argument check on pow
Closes #2304
2022-09-05 02:36:15 +09:00
Hajime Hoshi
ba19f06ede ebitenutil: bug fix: NewImageFromReader was not available on mobiles
Closes #2301
2022-09-03 20:30:28 +09:00
Hajime Hoshi
40052f6e35 internal/ui: bug fix: do not call setFrame in windowDidExitFullScreen
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
2022-09-02 17:50:37 +09:00
Hajime Hoshi
7c6466cfa0 internal/graphicsdriver/directx: bug fix: processtest failures
The command allocators should be reset only when the frame index was
updated.

Closes #2249
2022-09-02 12:48:38 +09:00
Hajime Hoshi
5459036d1c Revert "internal/graphicsdriver/directx: bug fix: do not reset command allocators at Begin"
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
2022-09-02 02:30:50 +09:00
Hajime Hoshi
e93aac7b98 update Oto to v2.3.0 2022-08-31 22:29:43 +09:00
Hajime Hoshi
8dfcde4413 update Oto to v2.3.0-rc.2 2022-08-28 00:38:00 +09:00
Hajime Hoshi
cc8aca2ae2 update Oto to fix crashes with Go 1.15 and 1.16
Closes #2268
2022-08-25 01:21:37 +09:00
Hajime Hoshi
fc5cef124f ebiten: add comments about termination 2022-08-22 23:30:36 +09:00
Hajime Hoshi
141d64b0f5 ebiten: typo 2022-08-21 23:01:35 +09:00
Hajime Hoshi
174eeb6f14 ebiten: typo 2022-08-21 21:58:19 +09:00
Hajime Hoshi
670ba4ffe4 ebiten: typo 2022-08-21 20:03:07 +09:00
Hajime Hoshi
c94deb1ddb release v2.4.0-rc.1 2022-08-21 04:00:50 +09:00
Hajime Hoshi
b4589254f8 update Oto
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.
2022-08-21 00:58:13 +09:00
Hajime Hoshi
833473316f internal/ui: forbide RestoreWindow when the window size limits are specified
Closes #2259
2022-08-20 22:36:37 +09:00
Hajime Hoshi
31141d5112 internal/ui: forbid maximizing window when a window size is limited
Closes #2258
2022-08-20 22:24:13 +09:00
Hajime Hoshi
e150745598 internal/ui: bug fix: do not register a framebuffer-size callback on macOS
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 #1960
Closes #2257
2022-08-20 19:10:42 +09:00
Hajime Hoshi
85d54515cd internal/shader: check types for && and || correctly
Updates #2256
2022-08-19 17:34:03 +09:00
Hajime Hoshi
d6047f3988 internal/shader: add type checks to compare two values
Closes #2187
2022-08-19 17:03:29 +09:00
Hajime Hoshi
f63b87f675 internal/shader: refactoring 2022-08-19 15:24:00 +09:00
Hajime Hoshi
a4b9d3c241 internal/gamepaddb: update the database
Adopts 74ebd51889
2022-08-19 02:54:03 +09:00
Hajime Hoshi
c585ea3018 update Oto to v2.3.0-alpha.7 2022-08-19 02:51:01 +09:00
Hajime Hoshi
71013e0527 update dependencies 2022-08-19 02:49:43 +09:00
Hajime Hoshi
73cd05eeec update github.com/jfreymuth/oggvorbis to v1.0.4
This improves an error message when an empty source is passed to
the decoder.

Updates #2251
2022-08-19 02:46:54 +09:00
Hajime Hoshi
590147acda internal/shader: add type checks for the builtin function texture2D
Note that texture2D is usually not called by users.

Closes #2184
2022-08-19 02:27:40 +09:00
Hajime Hoshi
63eee0600e internal/shader: add type checks for the builtin function transpose
Updates #2184
2022-08-19 01:57:24 +09:00
Hajime Hoshi
7a94cbbd62 internal/shader: add refract
Closes #2255
2022-08-19 01:48:35 +09:00
Hajime Hoshi
13ae8f5872 internal/shader: add type checks for the builtin function faceforward
Updates #2184
2022-08-19 01:48:30 +09:00
Hajime Hoshi
73f12fa704 internal/shader: add type checks for the builtin function smoothstep
Updates #2184
2022-08-19 01:27:01 +09:00
Hajime Hoshi
f3ea274d20 internal/shader: add type checks for the builtin function mix
Updates #2184
2022-08-19 01:19:20 +09:00
Hajime Hoshi
ec851a85f5 internal/shader: add type checks for the builtin function step
Updates #2184
2022-08-19 00:25:04 +09:00