Commit Graph

4997 Commits

Author SHA1 Message Date
Hajime Hoshi
6cd00f3b88 internal/graphicsdriver/opengl: exclude playstation5 2024-08-11 22:41:21 +09:00
Hajime Hoshi
9a751d7c26 internal/mipmap: refactoring 2024-08-11 22:33:21 +09:00
Hajime Hoshi
e6807794f2 internal/mipmap: refactoring 2024-08-11 22:29:15 +09:00
Hajime Hoshi
5e820be911 internal/buffered: refactoring
This is a preparation for adding members to Vertex.

Updates #2640
2024-08-11 22:25:45 +09:00
Hajime Hoshi
5f80f4b3de all: refactoring 2024-08-11 21:43:00 +09:00
Hajime Hoshi
89933bf0ab internal/graphicsdriver/playstation5: bug fix: compile error 2024-08-10 21:52:38 +09:00
Hajime Hoshi
332da38565 internal/graphicsdriver/playstation5: update DrawTriangles
A Go pointer in a C struct could cause some troubles.
2024-08-10 21:21:09 +09:00
Hajime Hoshi
a5235eea86 internal/graphicsdriver/opengl/gl: always prefer OpenGL ES to OpenGL
Closes #2944
2024-08-10 01:21:35 +09:00
Hajime Hoshi
9c80367f2f internal/gamepad: ignore EACCES error for /dev/input
Updates #3057
2024-08-08 11:35:39 +09:00
Hajime Hoshi
1f03971fa9 internal/debug: reland: rename functions 2024-08-07 23:48:35 +09:00
Hajime Hoshi
fab9482e0e Revert "internal/debug: rename functions"
This reverts commit 74722298a2.

Reason: This included an unexpected change in internal/gamepad
2024-08-07 23:47:51 +09:00
Hajime Hoshi
74722298a2 internal/debug: rename functions 2024-08-07 23:42:36 +09:00
Hajime Hoshi
2a34d1d47b internal/graphicsdriver/opengl/gl: use PureGo version for Android again
This is basically a revert for 297efea68b.
This updates PureGo for the Android issue.

Updates #3052
Updates ebitengine/purego#262
2024-08-05 23:34:56 +09:00
Hajime Hoshi
aba652c323 internal/graphicsdriver/playstation5: add DrawTriangles 2024-08-04 19:13:36 +09:00
Hajime Hoshi
9bd17de2d3 internal/graphicsdriver/opengl: remove unused members 2024-08-04 04:26:53 +09:00
Hajime Hoshi
37a6057230 internal/ui: bug fix: increase maxSkipCount
Closes #3055
2024-08-04 04:16:01 +09:00
Hajime Hoshi
af6072c1b4 internal/shader: add more tests
Updates #3011
2024-08-03 19:08:03 +09:00
Hajime Hoshi
7c4f532b83 internal/shader: bug fix: an index must be a constant for vectors
Updates #3011
2024-08-03 19:03:42 +09:00
Hajime Hoshi
719838b7ab .github/workflows: update wasmbrowsertest to fix timeout issue
The issue agnivade/wasmbrowsertest#60 was fixed.

Updates #1313
2024-08-02 23:03:01 +09:00
Hajime Hoshi
297efea68b internal/graphicsdriver/opengl/gl: use C version for Android
Unfortunately PureGo's dlopen didn't work on some Android devices.
Use the Cgo version instead in the same way as v2.7.

Closes #3052
2024-08-01 11:52:07 +09:00
Hajime Hoshi
856b339298 internal/ui: bug fix: show a black dot at the red button when needed
When SetWindowClosingHandled(true) is called, a black dot should be
shown at the red button to close the window.

Closes #3020
2024-07-31 23:54:18 +09:00
Hajime Hoshi
3106f98b52 internal/graphicsdriver/opengl/gl: add more error messages to load libraries 2024-07-31 21:35:24 +09:00
Hajime Hoshi
1843f6acc1 internal/ui: bug fix: dropping multiple files didn't work on Firefox and Safari
Closes #3045
2024-07-31 11:50:30 +09:00
Hajime Hoshi
95ad1b158c internal/file: refactoring
Updates #3045
2024-07-31 11:21:35 +09:00
Hajime Hoshi
0281ac7bd2 all: use bufio.NewWriter to improve writing speed 2024-07-29 16:29:57 +09:00
Hajime Hoshi
ef5ac4175d all: use bufio.Reader to improve reading speed 2024-07-29 02:28:37 +09:00
Hajime Hoshi
d086e83a62 internal/shader: stabilize wasm tests on GitHub CI 2024-07-26 03:16:34 +09:00
Hajime Hoshi
5d47863a27 internal/shader: bug fix: untyped const bool couldn't be an if condition
Closes #2993
2024-07-26 02:09:16 +09:00
Hajime Hoshi
09cefc6e71 internal/shader: bug fix: crash with an invalid operand
Closes #2989
2024-07-26 00:06:12 +09:00
Hajime Hoshi
abc056ab29 internal/gamepad: refactoring 2024-07-21 09:10:04 +09:00
Hajime Hoshi
7ab9382424 internal/gamepad: bug fix: crash when XInput and DInput gamepads were connected
Closes #3047
2024-07-20 22:30:38 +09:00
Hajime Hoshi
687e505db0 internal/gamepad: specify dwHow explicitly
As _DIPH_DEVICE is 0, this worked even without setting it, but this
was less readable.
2024-07-20 19:37:53 +09:00
Hajime Hoshi
b6b08f4fce internal/gamepad: typo 2024-07-20 19:21:09 +09:00
Hajime Hoshi
122877c265 internal/gamepad: bug fix: GUID was not reliable as a unique identifier
Use a HID path as a gamepad unique identifier instead.

Closes #3046
2024-07-20 19:17:57 +09:00
cowboy.macke
3a6aaac5ac
internal/ui: bug fix: crash by dropping an HTML element onto the canvas (#3044)
Closes #3043
2024-07-18 17:19:21 +09:00
Hajime Hoshi
1804d56777 Revert "all: open up for more destinations images (#3013)"
This reverts commit 46d171c3c5.

Reason: MRT is now suspended. Let's revisit this when we work on MRT again.
2024-07-16 22:43:49 +09:00
Hajime Hoshi
f9b0451e08 internal/ui: call setRunning(true) at a more appropriate timing 2024-07-15 22:52:50 +09:00
Hajime Hoshi
38d6328e41 internal/ui: bug fix: crash on Windows
Updates #3042
2024-07-15 22:44:45 +09:00
Hajime Hoshi
3d385ef0aa internal/ui: refactoring: call initOnMainThread on the main thread explicitly
Closes #3042
2024-07-15 22:07:47 +09:00
Hajime Hoshi
d4dc2ef5d7 internal/ui: refactoring: remove an unused member 2024-07-15 21:53:07 +09:00
Hajime Hoshi
9bc5ed3847 internal/graphicscommand: bug fix: missing file
Updates #3036
2024-07-12 11:30:36 +09:00
Hajime Hoshi
7b46df44ee internal/graphicscommand: bug fix: buffered write pixel args might never be released
Closes #3036
2024-07-12 11:25:50 +09:00
Bertrand Jung
46d171c3c5
all: open up for more destinations images (#3013)
Updates #2930
2024-07-09 02:05:55 +09:00
Hajime Hoshi
1679555bbb internal/ui: fix a wrong comment 2024-07-07 01:05:40 +09:00
Hajime Hoshi
073d022c2e internal/graphicsdriver/opengl: remove IsFramebuffer and IsRenderbuffer
These function return true in most cases, and when these return false,
the situation is pretty bad and recovering the situation would not be
possible.

IsFramebuffer and IsRenderbuffer cause round trips and affect performance.
Let's remove them.
2024-07-06 19:15:01 +09:00
Hajime Hoshi
4997e7e254 internal/graphicsdriver/opengl: lazy error check of shaders
See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#dont_check_shader_compile_status_unless_linking_fails
2024-07-04 21:47:52 +09:00
Hajime Hoshi
ed73f028c7 internal/ui: refactoring 2024-07-04 16:58:45 +09:00
Hajime Hoshi
3a18b32cbd internal/ui: bug fix: the screen size must be initialized first even when the canvas is unfocused
Closes #3034
2024-07-04 16:17:19 +09:00
Hajime Hoshi
346aaf071e internal/graphicscommand: add screen info to log 2024-07-04 02:01:56 +09:00
Hajime Hoshi
94a93f8032 internal/atlas: assume backend.image is never nil 2024-07-04 02:00:42 +09:00
Hajime Hoshi
c29d4b24bb internal/graphicsdriver/opengl: skip checkFramebufferStatus on browsers 2024-07-03 20:34:44 +09:00
Hajime Hoshi
2a22260d14 internal/atlas: backends for unmanaged images were never released
Closes #3030
2024-06-30 23:45:27 +09:00
Hajime Hoshi
3f91d8cdf1 internal/atlas: refactoring 2024-06-30 22:39:25 +09:00
Hajime Hoshi
ec7ef5e6a3 internal/atlas: add comments 2024-06-30 22:22:27 +09:00
Hajime Hoshi
5b8fd9733c internal/atlas: refactoring 2024-06-30 19:21:42 +09:00
Hajime Hoshi
9ff93e3063 all: fix comments 2024-06-30 18:56:07 +09:00
Hajime Hoshi
def82fd5d3 internal/atlas: refactoring: remove ImageTypeVolatile
ImageTypeVolatile was meaningful when Ebitengine had `restorable`
package, but now this doesn't make sense.
2024-06-30 18:50:02 +09:00
Hajime Hoshi
32417353d3 internal/ui: bug fix: the window size callback was not called on macOS
This is basically a revert of e150745598.

As the window size callback was not called, ebiten.WindowSize didn't
work correctly for a while.

Even after this change, the issue #2257 could not be reproduced. This
is mysterious, but probably macOS itself has updated.

Updates #2257
Closes #3029
2024-06-30 15:59:15 +09:00
Hajime Hoshi
a6d7cadab7 internal/graphicsdriver/playstation5: change struct member names 2024-06-17 03:04:18 +09:00
Hajime Hoshi
96e0fd7a50 exp/textinput: bug fix: pressing enter key was often ignored on iOS Safari
Closes #3015
2024-06-12 02:44:51 +09:00
Bertrand Jung
22fd1f107e
internal/graphics: renamed shader image count to specify src (#3012)
This just specifies that the constant refers to the number of source images passed to a shader.

This makes a distinction with the number of dst images, that could potentially be more than 1 in the future.
2024-06-10 02:02:47 +09:00
Hajime Hoshi
b121468991 ebiten: add FillRuleFillAll, FillRuleEvenOdd, and FillRuleNonZero
This change also deprecates the existing constants.

Closes #3006
2024-06-08 17:58:33 +09:00
Hajime Hoshi
e5d10c47e7 internal/graphicsdriver: reland: rename FillRule constants
Updates #3006
2024-06-08 12:16:20 +09:00
Hajime Hoshi
6ac1270cb0 Revert "internal/graphicsdriver: rename FillRule constants"
This reverts commit ab4a3af1b5.

Reason: compile error on Windows
2024-06-08 12:10:27 +09:00
Hajime Hoshi
ab4a3af1b5 internal/graphicsdriver: rename FillRule constants
Updates #3006
2024-06-08 11:54:46 +09:00
Hajime Hoshi
78ba0ded93 Revert "internal/glfw: bug fix: limit the DWM swap interval to Vista and 7"
This reverts commit 86e0bcc264.

Reason: This caused some issues like too much GPU usages.

Updates #2961
Closes #3003
2024-06-04 21:06:51 +09:00
XXIV
216a110761
internal/glfw: fix memory leak (#3008) 2024-06-04 13:00:20 +09:00
Hajime Hoshi
d0aaa23005 Revert "internal/atlas: reduce slice allocations"
This reverts commit 9442b244fc.

Reason: the slice was not escaped to heap, so this optimization was not needed
2024-05-27 23:47:39 +09:00
Hajime Hoshi
9442b244fc internal/atlas: reduce slice allocations 2024-05-27 23:32:17 +09:00
Hajime Hoshi
4818768965 shaderprecomp: remove ShaderSourceID
`ShaderSourceID` was confusing as there was no guarantee the same ID is
used for the same source if Ebitengine versions are different.

`ShaderSource` should be kept as the built-in shader contents should not
be exposed.

Updates #2861
Closes #2999
2024-05-27 00:01:05 +09:00
Hajime Hoshi
83ae577c80 Revert "shaderprecomp: remove ShaderSource and ShaderSourceID"
This reverts commit 8be3bb41d5.

Reason: removing `ShaderSource` unexpected exposes the source.

Updates #2999
2024-05-26 22:45:12 +09:00
Hajime Hoshi
8be3bb41d5 shaderprecomp: remove ShaderSource and ShaderSourceID
This change simplifies the APIs to avoid some confusions around IDs.

Updates #2861
Closes #2999
2024-05-26 22:42:52 +09:00
Hajime Hoshi
3279688dd6 Revert "shaderprecomp: accept an ID instead of source to register"
This reverts commit ecc3f29af1.

Reason: we are considering to remove ShaderSourceID

Updates #2861
Updates #2999
2024-05-26 21:29:44 +09:00
Hajime Hoshi
ecc3f29af1 shaderprecomp: accept an ID instead of source to register
Updates #2861
2024-05-26 19:39:30 +09:00
Hajime Hoshi
38d2892906 internal/glfw: bug fix: the cursor position was reset unexpectedly
There was a mistake when updating GLFW to v3.3.9 at 4647e9de53.
When the cursor mode is set to be enabled, the cursor position was
unexpectedly reset. This change fixes the issue.

Closes #2997
2024-05-26 15:11:50 +09:00
Hajime Hoshi
b0a4b6ebbf internal/graphicsdriver/playstation5: update the copyright year 2024-05-19 23:01:47 +09:00
Hajime Hoshi
657e04d3d1 internal/graphicsdriver/playstation5: separate the shader part 2024-05-19 18:05:16 +09:00
Hajime Hoshi
5bb060b1e9 shaderprecomp: add pssl 2024-05-12 15:07:38 +09:00
Hajime Hoshi
a108dac797 internal/shaderir: add 'pssl' package 2024-05-11 18:58:59 +09:00
Hajime Hoshi
b3ad97b22b internal/graphicsdriver/metal/mtl: add comments 2024-05-06 22:07:16 +09:00
Hajime Hoshi
f0ca3f1870 internal/graphicsdriver/metal/mtl: follow ObjC convention
Closes #2981
2024-05-06 21:51:57 +09:00
Hajime Hoshi
2261cf76de internal/graphicsdriver/metal/ca: follow ObjC convention
Updates #2981
2024-05-06 19:36:17 +09:00
Hajime Hoshi
10d9660125 shaderprecomp: implement for Windows
Closes #2861
2024-05-06 16:03:57 +09:00
Hajime Hoshi
5d4a68b0ea internal/shaderir/hlsl: refactoring: separate calculation uniform offsets 2024-05-05 20:47:35 +09:00
Hajime Hoshi
a41af4528b internal/graphicsdriver/directx: refactoring 2024-05-05 18:58:13 +09:00
Hajime Hoshi
caab1ee29f internal/graphicsdriver/metal: refactoring 2024-05-05 17:18:06 +09:00
Hajime Hoshi
c46f62e184 all: add a new package shaderprecomp
The current implementation is only for macOS so far.

Updates #2861
2024-05-05 03:51:04 +09:00
Hajime Hoshi
d7df5ebcbd internal/builtinshader: move a clearing shader to builtinshader 2024-05-05 02:18:14 +09:00
Hajime Hoshi
ca9a80600d internal/graphicsdriver/metal: release MTLLibrary 2024-05-04 19:26:12 +09:00
Hajime Hoshi
c3b9afe8c4 internal/ui: bug fix: compile error for browsers 2024-05-04 00:30:43 +09:00
Hajime Hoshi
1ebfa8b911 internal/ui: refactoring: remove unused code 2024-05-04 00:26:40 +09:00
Hajime Hoshi
c658a25171 all: replace execabs with os/exec
os/exec no longer searches executablse in the current directory as of
Go 1.19. See https://go.dev/blog/path-security and https://go.dev/issue/43724.
2024-05-03 23:39:38 +09:00
Hajime Hoshi
903ab6727b internal/ui: better panic message at ReadPixels before RunGame
Closes #2979
2024-05-03 16:36:19 +09:00
Hajime Hoshi
35e29a29e7 internal/ui: bug fix: wrong property names were specified
Closes #2975
2024-04-30 23:32:54 +09:00
Hajime Hoshi
0af5b41d48 internal/atlas: refactoring 2024-04-29 23:34:37 +09:00
Hajime Hoshi
bb799da51f internal/ui: use atomic.Int32 instead of atomic.Store/LoadInt32
Updates #2422
2024-04-29 21:53:43 +09:00
Hajime Hoshi
59fb259181 internal/graphicsdriver/gl: use PureGo for Linux and UNIX
Updates #2284
2024-04-29 21:25:15 +09:00
Hajime Hoshi
f34932151d all: use atomic.Bool instead of atomic.Store/LoadUint32
Updates #2422
2024-04-29 21:16:01 +09:00
Hajime Hoshi
c390f0a9fa internal/shader: bug fix: treat a built-in function as an invalid argument
Closes #2965
2024-04-29 16:44:33 +09:00
Hajime Hoshi
bc9e9d8562 ebiten: move the builtin shader to internal/builtinshader
Updates #2861
2024-04-20 21:23:37 +09:00