Hajime Hoshi
b2e0a7b267
update Oto
2022-03-29 03:34:08 +09:00
Hajime Hoshi
07d6419dc6
internal/ui: bug fix: DeviceScaleFactor was not concurrent-safe before the main loop
...
Updates #1575
Closes #2042
2022-03-29 00:27:44 +09:00
Hajime Hoshi
2d912a2387
internal/shaderir/hlsl: bug fix: wrong offset of uniform array variables
...
Closes #2038
2022-03-27 01:49:52 +09:00
Hajime Hoshi
aef00a5235
internal/shader: bug fix: wrong type deduction at (scalar)*(matrix)
...
Updates #2037
2022-03-27 01:22:54 +09:00
Hajime Hoshi
6bd3c81e27
internal/graphicsdriver/directx, internal/graphicsdriver/metal: bug fix: uniform matrix-array variables were passed wrongly
...
Updates #2036
2022-03-27 00:32:30 +09:00
Hajime Hoshi
eaad959472
internal/graphicsdriver/metal: remove println
2022-03-27 00:12:34 +09:00
Hajime Hoshi
f6d87f6ee8
internal/graphicsdriver/directx, internal/graphicsdriver/metal: bug fix: uniform matrix variables were passed wrongly
...
Updates #2036
2022-03-26 23:58:48 +09:00
Hajime Hoshi
e1a3f12e68
.github/workflows: add a test for GOARCH=arm64 for macOS
...
Closes #1790
2022-03-26 23:07:34 +09:00
divVerent
0fd630100f
inpututil: allow an arbitrary number of gamepad buttons. ( #2031 )
...
Fixes crash in inpututil when a gamepad with more than "allowed" buttons is
connected.
Closes #2027
2022-03-26 20:25:41 +09:00
Hajime Hoshi
79e93d3b12
internal/graphicsdriver: introduce the DirectX driver
...
Closes #1007
2022-03-26 20:09:34 +09:00
Hajime Hoshi
a936ffc032
internal/shader: restrict the number of arguments for atan/atan2
2022-03-26 19:40:04 +09:00
Hajime Hoshi
d30a31b16c
internal/shaderir/hlsl: add function forward declarations
2022-03-26 19:10:03 +09:00
divVerent
1de1bfef55
internal/gamepad: fix uint16 underflow handling in gamepads. ( #2030 )
...
Fixes crash where Ebiten considers a keyboard a gamepad with way too many buttons.
Updates #2027
2022-03-26 15:41:59 +09:00
Hajime Hoshi
dcccd27629
internal/shaderir/msl: bug fix: mod for a vector and a scalar didn't work
...
Updates #2029
2022-03-26 02:57:38 +09:00
Hajime Hoshi
52376170a4
internal/shaderir: bug fix: float4x4(x) initialized all the components unexpectedly
...
See https://docs.microsoft.com/en-us/windows/win32/direct3d9/casting-and-conversion#parameter-value-modifiers
Updates #1007
2022-03-26 02:05:35 +09:00
Hajime Hoshi
cfd0de5c41
internal/shaderir: make outputs for unexpected operators consistent
2022-03-26 01:40:02 +09:00
Hajime Hoshi
4893b13acc
internal/shaderir: add internal/shaderir/hlsl
...
Updates #1007
2022-03-26 01:31:05 +09:00
Hajime Hoshi
b96b75d51c
ebiten: add TestShaderMatrixInitialize
2022-03-26 01:19:20 +09:00
Hajime Hoshi
7a33837ed7
audio: change the type of SetBufferSize to time.Duration
...
Updates #2026
2022-03-25 20:47:01 +09:00
Hajime Hoshi
0e8c423e51
Revert "audio: add (*Player).UnplayedBufferSize ( #2021 )"
...
This reverts commit 7744013b05
.
Reason: This is no longer needed and SetBufferSize is enough.
Updates #2020
Updates #2026
2022-03-25 20:28:32 +09:00
Hajime Hoshi
9bfbbb6e9e
internal/ui: add graphicsDriverGetter.getDirectX()
...
Updates #1007
2022-03-25 19:43:38 +09:00
Hajime Hoshi
08783542eb
audio: add Player.SetBufferSize
...
This change also adds examples/realtimepcm.
Closes #2026
2022-03-25 19:27:25 +09:00
Hajime Hoshi
798b60b67c
inpututil: bug fix: compile error
2022-03-25 14:36:34 +09:00
Hajime Hoshi
e4d0050452
internal/gamepad: bug fix: compile error
...
Updates #2027
2022-03-25 14:35:03 +09:00
Hajime Hoshi
5bb22d2bcf
inpututil: bug fix: GamepadButtonNum can exceed GamepadButtonMax
...
Closes #2027
2022-03-25 14:31:12 +09:00
Hajime Hoshi
b985689010
internal/gamepad: bug fix: crash when a too big button code is reported on Linux
...
Updates #2027
2022-03-25 14:28:09 +09:00
Hajime Hoshi
d74a627f41
audio/internal/cbackend: adjust the defalut buffer size to Oto's
2022-03-25 03:47:21 +09:00
Hajime Hoshi
e2de758160
audio/internal/cbackend: update comments
2022-03-25 03:46:57 +09:00
Hajime Hoshi
51091cd5bc
update Oto
...
Updates #2026
2022-03-25 02:35:05 +09:00
Hajime Hoshi
c61be3c532
internal/ui: bug fix: getMetal might return a nil pointer as a non-nil interface
2022-03-24 13:36:53 +09:00
Hajime Hoshi
eeb5687b73
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: change the return type to pointers
...
On second thought, returning pointers is more natural. Handling
nil is a caller's responsibility.
2022-03-24 13:20:36 +09:00
Hajime Hoshi
7bb7e45522
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: change the return type to interface
...
Converting a nil with a pointer type to an interface type is no longer
a nil-nil interface, and then comparing with nil causes an unexpected
results.
2022-03-24 03:24:58 +09:00
Hajime Hoshi
60e9ff35b2
go generate
...
Updates #2025
2022-03-24 02:42:52 +09:00
Hajime Hoshi
aee391e8d7
add Kacper Drobny to AUTHORS
2022-03-24 02:42:13 +09:00
Kacper Drobny
de8c02a00f
ebiten: add missing backward compatibility Add key ( #2024 )
...
Closes #2025
2022-03-24 02:41:24 +09:00
Hajime Hoshi
3074dca670
internal/ui: add the EBITEN_GRAPHICS_LIBRARY environment variable
...
The `ebitengl` build tag is gone instead.
Closes #2007
2022-03-24 02:23:37 +09:00
Hajime Hoshi
06d2905893
update CONTRIBUTING.md
2022-03-23 13:41:29 +09:00
Hajime Hoshi
6e07e3bab9
update CONTRIBUTING.md
2022-03-23 13:38:23 +09:00
Hajime Hoshi
06795fd19d
update CONTRIBUTING.md
2022-03-23 12:05:44 +09:00
Hajime Hoshi
78da232f53
update README
2022-03-23 03:56:46 +09:00
Hajime Hoshi
151dfffad6
internal/restorable: simplify canDetectContextLostExplicitly
...
This constant was set with some wrong assumptions:
1. On Android, recovering was needed.
2. On iOS, OpenGL ES was used when
a. The architecture was 386 or amd64 == an emulator is used
b. The build tag ebitengl was not specified
c. gomobile-build was used
3. On browsers, recovering was needed.
1., 2b, and 2c are correct.
2a. is not correct: Now emulators are available on all the
architectures with both Metal and OpenGL.
3. is not correct: Ebiten no longer recovers the contest lost.
Now, Ebiten can detect a context lost explicitly when
1. On Android
2. On iOS and on gomobile-build
(When gomobile-build is used, OpenGL should always be used)
Based on this fact, this change changes the constant to a variable,
and fixes the logic to set the variable.
2022-03-23 03:01:59 +09:00
Hajime Hoshi
85daef7436
internal/ui: bug fix: OpenGL must be used when gomobile-build is used
...
Now the logic of graphicsDriver() is updated, this can return a Metal
graphics driver on iOS even when gomobile-build is used.
This change fixes this issue.
2022-03-23 02:58:56 +09:00
Hajime Hoshi
09b0a0ffaf
internal/ui: refactoring: simplify the selection of graphics libraries
2022-03-23 02:21:53 +09:00
Hajime Hoshi
7e6e022065
cmd/ebitenmobile: support Metal for iOS simulators
2022-03-23 01:34:58 +09:00
Hajime Hoshi
a74e7b1578
Revert "internal/graphicsdriver/metal: refactoring"
...
This reverts commit 1c57393393
.
Reason: nothing is rendered on iOS.
Closes #2022
2022-03-23 01:22:39 +09:00
Hajime Hoshi
7744013b05
audio: add (*Player).UnplayedBufferSize ( #2021 )
...
Closes #2020
2022-03-22 16:55:56 +09:00
Hajime Hoshi
8e6907c64a
internal/ui: reduce the calls of graphicsDriver()
2022-03-22 02:17:41 +09:00
Hajime Hoshi
15548b4c74
internal/ui: add userInterfaceImpl.graphicsDriver
2022-03-22 00:13:22 +09:00
Hajime Hoshi
be1836339b
internal/ui: define the common struct UserInterface for all the environments
...
The existing UserInterface structs became userInterfaceImpl structs.
2022-03-21 23:10:27 +09:00
Hajime Hoshi
99437944bc
internal/ui: remove graphicsDrivre() calls from image.go
2022-03-21 22:49:47 +09:00