Hajime Hoshi
e1f18b53f5
internal/ui: refactoring
2023-10-16 00:02:25 +09:00
Hajime Hoshi
47e70f2544
internal/ui: use errors.New instead of fmt.Errorf
2023-10-15 23:27:04 +09:00
Hajime Hoshi
742f3a6dac
internal/ui: refactoring: reduce functions
2023-10-15 20:14:23 +09:00
Hajime Hoshi
18714e22a1
internal/ui: reland: return errors when getting a graphics driver fails
2023-10-15 18:34:08 +09:00
Hajime Hoshi
bd10f19567
Revert "internal/ui: return errors when getting a graphics driver fails"
...
This reverts commit d4e31aedd6
.
Reason: compile error with -tags=nintendosdk
2023-10-15 18:32:47 +09:00
Hajime Hoshi
d4e31aedd6
internal/ui: return errors when getting a graphics driver fails
2023-10-15 18:26:13 +09:00
Hajime Hoshi
8274b32301
internal/graphicslibrary: refactoring: remove IsGL and IsDirectX
2023-10-15 17:30:16 +09:00
Hajime Hoshi
48054ec9c8
all: update Oto (Oboe 1.8.0)
2023-10-15 17:07:00 +09:00
Hajime Hoshi
0378230b3e
internal/ui: refactoring: reduce theUI
2023-10-15 17:02:15 +09:00
Hajime Hoshi
83a4133577
internal/ui: refactoring: remove globalState
2023-10-15 16:51:16 +09:00
Hajime Hoshi
a16a03c9db
internal/ui: refactoring
2023-10-15 16:38:05 +09:00
Hajime Hoshi
a89aaa0756
internal/ui: refactoring: remove fpsMode from globalState
2023-10-15 16:19:41 +09:00
Hajime Hoshi
beabe9c6ee
internal/ui: bug fix: compile failure with -tags=nintendosdk
2023-10-15 03:58:29 +09:00
Hajime Hoshi
f25f46f50c
exp/textinput: bug fix: compile failure
2023-10-15 03:50:40 +09:00
Hajime Hoshi
27fd10595b
internal/ui: refactoring: reduce global functions and prefer Get()
2023-10-15 03:40:48 +09:00
Hajime Hoshi
69f1fa5f29
internal/ui: unify the receivers for UI
2023-10-15 02:51:23 +09:00
Hajime Hoshi
77bdbac244
Revert "internal/ui: remove an unused function"
...
This reverts commit df3a1c3cdd
.
Reason: compile failure: UpdateInputFromEvent was used from textinput
2023-10-15 02:23:27 +09:00
Hajime Hoshi
df3a1c3cdd
internal/ui: remove an unused function
2023-10-15 01:32:39 +09:00
Hajime Hoshi
2a8d8d71fc
internal/ui: merge init functions
...
The Go specification doesn't determine the order of init functions.
In order to reduce unexpected behavior, merge some init functions.
2023-10-15 00:17:09 +09:00
Hajime Hoshi
567e2fa04c
ebiten: add BlendOperationMin
and BlendOperationMax
...
Closes #2395
2023-10-13 01:56:33 +09:00
Hajime Hoshi
7018e7dfb1
internal/ui: rename files
2023-10-11 02:03:58 +09:00
Hajime Hoshi
51190c2ba9
all: update dependencies
2023-10-11 01:06:33 +09:00
Hajime Hoshi
54c6c6b728
internal/glfw: bug fix: always use draw.Draw for any images
...
Closes #2807
2023-10-11 01:03:06 +09:00
Hajime Hoshi
1e5086fd5a
internal/buffered: bug fix: enable TestGC again
...
The logic should be called in a game's Update explicitly.
Updates #2805
Closes #2806
2023-10-10 03:06:09 +09:00
Hajime Hoshi
4701a61e4b
internal/buffered: skip a flaky test
...
Updates #2805
2023-10-10 02:22:12 +09:00
Hajime Hoshi
cc5174f104
internal/buffered: bug fix: images created in init() were not GCed
...
Closes #2805
2023-10-10 00:31:44 +09:00
Hajime Hoshi
738f13f73f
internal/ui: remove unnecessary build tags
2023-10-09 23:39:06 +09:00
Hajime Hoshi
f269b61903
internal/atlas: introduce a managed byte slice pool
...
A managed byte slice from the new byte slice pool has a function
to release and put it back to the pool explicitly, and this doesn't
rely on GCs.
Updates #1681
Closes #2804
2023-10-09 20:32:32 +09:00
Hajime Hoshi
34d577a5ff
Revert "internal/atlas: reintroduce a byte pool"
...
This reverts commit 7e17b25c56
.
Reason: the current byte pool suppresses allocations to some extent, but doesn't suppress GCs.
Updates #1681
2023-10-09 14:40:05 +09:00
Hajime Hoshi
7e17b25c56
internal/atlas: reintroduce a byte pool
...
The old byte pool depnded on lifetimes of command queues, and this
was tricky.
The new byte pool uses runtime.SetFinalizer so this should be much
easier to use.
Updates #1681
2023-10-09 03:28:29 +09:00
Hajime Hoshi
2405b7e825
internal/restorable: remove unnecessary copying
...
After 6e5361c328
, WritePixels can
expect that the given pixel byte slice is always new, and now can
be assumed immutable. Do not copy the slice for restoring.
Actually, these copying were introduced at 38ce46328a
in order to reuse the same slice regions.
2023-10-09 01:17:43 +09:00
Hajime Hoshi
6e5361c328
internal/restorable: use clearImage to avoid allocations
...
Bytes from a pool in a command queue is now pretty hard to use correctly
as the lifetime of a queue is not clear.
Remove the byte pools once. Let's reconsider pool usages later.
This change also removes imagesWithBuffers as this is no longer needed.
imagesWithBuffers was necessary to ensure all the bytes from the pool
of the command queue was used before the queue flushes the commands,
as the command queue cleared the pool after flushing. The lifetimes
were pretty ticky.
2023-10-09 00:42:58 +09:00
Hajime Hoshi
cc8cf688f4
internal/restorable: use clearImage to avoid allocations
2023-10-08 23:59:31 +09:00
Hajime Hoshi
e768e8ad40
internal/graphicscommand: refactoring: add commandqueue.go
2023-10-08 19:54:28 +09:00
Hajime Hoshi
9ed3c89594
internal/graphicscommand: remove an image from imageWithBuffers whenever possible
2023-10-08 19:43:58 +09:00
Hajime Hoshi
810b62f83e
internal/graphicscommand: introduce commandQueuePool and commandQueueManager
...
This removes the restriction of the number of command queues.
Updates #1704
2023-10-08 19:23:57 +09:00
Hajime Hoshi
d2dd62b6db
internal/graphicscommand: remove unnecessary references to drawTrianglesCommand
2023-10-08 17:18:16 +09:00
Hajime Hoshi
fd1083808c
internal/graphicscommand: switch the queue before flushing
...
This is a preparation to do something (e.g. handling inputs) during
being blocked by Flush.
Updates #1704
2023-10-08 16:10:07 +09:00
Hajime Hoshi
53525342b1
internal/graphicscommand: bug fix: Flush didn't return error when sync=false
2023-10-08 04:30:14 +09:00
Hajime Hoshi
e352181ec1
mobile: add RunOnJVM
...
RunOnJVM is just a wrapper of golang.org/x/mobile/app.RunOnJVM,
in order to reduce direct dependencies on golang.org/x/mobile.
Updates #2803
2023-10-08 02:21:56 +09:00
Hajime Hoshi
cede5027d3
internal/glfw: merge internal/cglfw into internal/glfw
...
Closes #2703
2023-10-07 23:59:55 +09:00
Hajime Hoshi
ad0b61c022
internal/cglfw: fix errors to be close to internal/glfw
...
Updates #2703
2023-10-07 22:48:44 +09:00
Hajime Hoshi
6dc375f7a6
internal/cglfw: let Terminate return an error
...
This change also removes flushErrors, which is only for GLFW
debuggings.
2023-10-07 22:35:40 +09:00
Hajime Hoshi
7bcefa1035
internal/cglfw: remove acceptError
2023-10-07 22:14:34 +09:00
Hajime Hoshi
98dc59c89f
internal/cglfw: let functions return errors
...
Updates #2703
2023-10-07 20:28:03 +09:00
Hajime Hoshi
ee1c179c83
internal/cglfw: let functions return errors in native_linbsd.go
...
Updates #2703
2023-10-07 20:28:03 +09:00
Hajime Hoshi
6a5d46dc43
internal/cglfw: use stderr for logs
2023-10-07 20:28:03 +09:00
Hajime Hoshi
82bceba847
internal/cglfw: let functions return errors in native_darwin.go and glfw_unix.go
...
Updates #2703
2023-10-07 18:37:06 +09:00
Hajime Hoshi
cb023af4b6
internal/cglfw: use stderr instead of log
2023-10-07 18:36:20 +09:00
Hajime Hoshi
aef7b0dd38
internal/glfw: rename files
...
Updates #2703
2023-10-07 17:23:33 +09:00