Commit Graph

7586 Commits

Author SHA1 Message Date
Hajime Hoshi
8c4b29ed1f ebiten: bug fix: resolveSetVerticesCacheIfNeeded must be called after Draw
Closes #2542
2023-01-15 02:05:35 +09:00
Hajime Hoshi
edc3c829fb .github/workflows: skip installing wasmbrowsertest on Go 1.15
As of wasmbrowsertest@v0.5.0, chromedp@v0.8.6 is used and this doesn't
work with Go 1.15.
2022-12-19 03:09:02 +09:00
Hajime Hoshi
b625cc84ce internal/ui: bug fix: FPS drop on fullscreen on macOS 13
Updates #1745
Closes #2495
2022-12-16 03:02:42 +09:00
Hajime Hoshi
1fc08d3d61 internal/graphicsdriver/directx: revert some commits for feture levels
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
2022-12-09 15:58:23 +09:00
Hajime Hoshi
3ce436f5ff internal/ui: bug fix: wrong calculation of wheel scrolling
Closes #2487
2022-12-08 02:10:45 +09:00
Hajime Hoshi
a4d20094d7 internal/graphicsdriver/directx: change the default feature level to 11_0
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
2022-12-07 21:18:33 +09:00
Hajime Hoshi
dc47d472d0 .github/workflows: skip building go-inovation for iOS
The latest purego uses reflect.Pointer, which was introduced in
Go 1.18 (https://github.com/golang/go/issues/47651).
2022-12-03 13:31:05 +09:00
Hajime Hoshi
f87504c3ec internal/glfwwin: bug fix: crash when dropping a file
Updates #2478
2022-12-03 04:48:09 +09:00
Hajime Hoshi
ed88559a50 internal/graphicsdriver/directx: add EBITENGINE_DIRECTX_FEATURE_LEVEL
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
2022-11-21 02:53:37 +09:00
Hajime Hoshi
84dd1679e3 examples/shader: remove the CRT example for license incompatibility 2022-11-17 22:47:02 +09:00
Hajime Hoshi
5cd7d9107e internal/graphicsdriver/directx: bug fix: a software adaptor was unexpectedly chosen
Closes #2459
2022-11-16 15:53:27 +09:00
Hajime Hoshi
cc82ad19a1 internal/graphicsdriver/directx: specify DX level 12
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
2022-11-16 15:53:05 +09:00
Hajime Hoshi
ca1044ff33 internal/ui: bug fix: fullscreening didn't work correctly on macOS 13
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
2022-11-05 14:22:03 +09:00
Hajime Hoshi
aecbf2344d ebiten: bug fix: SubImage+At didn't consider the original image's setVerticesCache
Close #2428
2022-11-02 12:33:11 +09:00
Hajime Hoshi
b983014e95 internal/graphicscommand: bug fix: compile error
Updates #2391
Updates #2423
2022-10-30 10:58:04 +09:00
Hajime Hoshi
13d28f50e5 internal/graphicscommand: always flush buffers
After #2423 is fixed, buffers should be able to be flushed safely
anytime.

Updates #2391
Updates #2423
2022-10-30 10:52:55 +09:00
Hajime Hoshi
e51d7ce947 internal/graphicscommand: bug fix: clear buffers when disposing an image
Closes #2423
2022-10-30 03:24:34 +09:00
Hajime Hoshi
651a43c076 update bitmapfont to v2.2.2
Closes #2411
2022-10-29 22:32:18 +09:00
Hajime Hoshi
9c2569dabc update bitmapfont
For https://pkg.go.dev/vuln/GO-2022-1059

Updates #2405
Updates #2411
2022-10-27 12:57:07 +09:00
Hajime Hoshi
4347b17991 cmd/ebitenmobile: go generate
Updates #2407
2022-10-25 13:43:01 +09:00
Hajime Hoshi
8d81ed1d32 cmd/ebitenmobile: bug fix: dead lock due to @synchronized
Closes #2407
2022-10-25 13:39:41 +09:00
Hajime Hoshi
89471701fc internal/graphicscommand: bug fix: suppress test flakiness on browsers
Closes #2391
2022-10-16 18:03:26 +09:00
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