Hajime Hoshi
87e412cd39
internal/graphicsdriver/opengl: refactoring: separate graphcis_*.go for macOS
...
Updates #2714
2024-10-12 13:58:57 +09:00
LoparPanda
5245537e21
internal/graphicsdriver/opengl/gl: fixes DeleteVertexArrays removing entry from textures instead of vertexArrays value store in webgl driver ( #3125 )
...
This is just what appears to be a typo in the WebGL driver that is deleting the mapping between a uint32 ID and a
JavaScript value for vertexArrays from the value store for the textures instead. This seems like it would potentially
cause a crash if the numbers aligned.
2024-10-08 15:42:50 +09:00
Hajime Hoshi
5bcfdee75f
internal/graphicsdriver/playstation5: bug fix: need to adjust image size
2024-10-06 16:29:59 +09:00
Hajime Hoshi
1c475eff78
internal/graphicsdriver/playstation5: bug fix: Cgo bans to pass a Go pointer to a Go pointer
2024-09-29 18:22:17 +09:00
Hajime Hoshi
1b6a615adb
internal/graphicsdriver/playstation5: add Shader
2024-09-29 17:46:52 +09:00
Hajime Hoshi
a38395a48a
internal/graphicsdriver/playstation5: add PixelsArgs
2024-09-29 17:46:26 +09:00
Hajime Hoshi
8b0c930c2d
internal/ui: bug fix: an undecorated window should reach the top of the screen
...
Closes #3118
2024-09-28 02:52:40 +09:00
Hajime Hoshi
2ef823ccd2
internal/ui: remove panic in adjustWindowSize
2024-09-28 02:45:56 +09:00
Hajime Hoshi
239a4f2a91
internal/gamepaddb: update the database
2024-09-24 00:10:11 +09:00
Hajime Hoshi
f0d4147ed5
internal/png: go generate
2024-09-24 00:01:15 +09:00
Hajime Hoshi
a499a976f7
internal/graphicsdriver/playstation5: change the name convention
2024-09-23 23:22:22 +09:00
Hajime Hoshi
508922250a
internal/graphpicsdriver/playstation5: add consts
2024-09-23 23:06:02 +09:00
Hajime Hoshi
043164e17c
internal/graphicsdriver/playstation5: bug fix: call C Begin/End functions
2024-09-23 17:59:28 +09:00
Hajime Hoshi
4d3f357f81
internal/graphicsdriver/playstation5: add Begin and End
2024-09-23 17:30:53 +09:00
Hajime Hoshi
eb365c51d5
ebiten: add RequestAttention
...
Closes #2998
2024-09-22 00:05:00 +09:00
Hajime Hoshi
66734dc3fb
internal/restorable: reland: remove 'volatile' attribute when restorable is not used
2024-09-21 23:29:32 +09:00
Hajime Hoshi
c23358ac95
Revert "internal/restorable: remove 'volatile' attribute when restorable is not used"
...
This reverts commit 9bdc89d40f
.
Reason: Unexpected changes were included
2024-09-21 23:28:46 +09:00
Hajime Hoshi
9bdc89d40f
internal/restorable: remove 'volatile' attribute when restorable is not used
2024-09-21 23:24:59 +09:00
Hajime Hoshi
6b85d9deb0
internal/shader: add check for out-of-bounds
...
Closes #3112
2024-09-21 22:06:36 +09:00
Hajime Hoshi
eabc697022
internal/shader: add tests for arrays
2024-09-21 21:43:08 +09:00
Hajime Hoshi
e6d4eac218
internal/shader: bug fix: check the size of array initialization
...
Closes #3111
2024-09-21 21:42:50 +09:00
Hajime Hoshi
d46c677327
Revert "internal/shader: bug fix: an index must be a constant for vectors"
...
This reverts commit 7c4f532b83
.
Updates #3011
Reason: Dynamic indices should be allowed with WebGL 2.
2024-09-19 23:42:49 +09:00
Hajime Hoshi
2270359cd4
internal/ui: remove println
2024-09-17 23:12:16 +09:00
Hajime Hoshi
24e5751ece
internal/ui: add sleep for an environment where vsync doesn't work
...
Updates #2952
2024-09-17 02:11:31 +09:00
Hajime Hoshi
50f0a8343c
internal/ui: bug fix: skipCount should be reset when the outside size changes
...
Closes #3101
2024-09-17 00:57:05 +09:00
Hajime Hoshi
d30908522a
internal/ui: bug fix: test failures
...
BeginFrame and EndFrame must be paired even if an error occurs.
2024-09-16 23:54:13 +09:00
Hajime Hoshi
b9dce05ca1
internal/ui: skip SwapBuffers call if needed
...
Updates #2890
Updates #2952
2024-09-16 23:21:16 +09:00
Hajime Hoshi
9a8d6e7b41
internal/ui: implement (*Monitor).Size for mobiles
...
Closes #2935
2024-09-16 19:42:23 +09:00
Hajime Hoshi
4a10702f6c
internal/ui: replace deprecated APIs
...
[UIScreen mainScreen] is now deprecated.
2024-09-16 18:20:03 +09:00
Hajime Hoshi
5fe818e17d
internal/ui: refactoring: remove updateOnceSwapped
2024-09-16 02:52:53 +09:00
Hajime Hoshi
6f3f567b58
internal/ui: bug fix: recover the cursor mode when capturing fails
...
Closes #2764
2024-09-15 18:34:13 +09:00
Hajime Hoshi
e90f99bd4a
internal/ui: bug fix: InitUnfocused option didn't work
...
Updates #2924
Closes #3099
2024-09-14 17:31:26 +09:00
Hajime Hoshi
99ffe09b63
internal/ui: bug fix: skip focus check for the first update
2024-09-14 17:08:21 +09:00
Hajime Hoshi
9a511fecb5
internal/jsutil: move to internal/graphicsdriver/opengl/gl
2024-09-14 16:10:49 +09:00
Hajime Hoshi
355dd453bd
internal/mipmap: refactoring
2024-09-12 17:36:17 +09:00
Hajime Hoshi
cbecbe2bad
internal/mipmap: refactoring
2024-09-12 15:55:27 +09:00
Hajime Hoshi
6389db14a2
internal/mipmap: reuse internal mipmap images whenever possible
...
Closes #3093
2024-09-12 15:30:31 +09:00
Hajime Hoshi
4bccf9d009
all: use math/rand/v2
2024-09-12 01:17:26 +09:00
Hajime Hoshi
a4bfa6cb15
all: use Go 1.21's min/max builtin functions
2024-09-12 01:01:05 +09:00
Hajime Hoshi
a36f6210c0
all: use Go 1.20 APIs
...
Closes #2746
2024-09-12 00:22:45 +09:00
Hajime Hoshi
07d29fa729
cmd/ebitenmobile: bug fix: consider EbitenSurfaceView recreation
...
On Android Emulator (Small Desktop API 32), EbitenRenderer can be
easily recreated by resizing the window. Thus, EbitenRenderer should
not have any flags like strictContextRestoration. Also, the flag
onceSurfaceCreated_ doesn't work there.
2024-09-09 16:42:57 +09:00
Hajime Hoshi
6a51e5b003
internal/restorable: optimize WritePixels
...
This adds (*Image).makeStaleIfDependingOnWithRegion to reduce the
possibility of making an image stale.
2024-09-08 22:55:34 +09:00
Hajime Hoshi
af9bd6a282
all: specify src-regions correctly
...
This parameter was not important and actually not used with usual
shaders. However, now this information will be important for the
restorable package optimization later.
There was a performance issue that was caused by srcRegions, but
now this should not happen thanks to FilterUniformVariables.
Updates #1293
2024-09-08 22:24:15 +09:00
Hajime Hoshi
73565034a9
internal/restorable: refactoring
2024-09-08 19:29:41 +09:00
Hajime Hoshi
bbe3cba110
internal/restorable: remove draw-triangles history items at WritePixels
2024-09-08 18:20:40 +09:00
Hajime Hoshi
f32648b144
internal/restorable: skip adding stale regions when the image doesn't need to be restored
2024-09-08 17:51:09 +09:00
Hajime Hoshi
aa8e112414
internal/restorable: restore a stale image at clearing pixels
2024-09-08 17:48:23 +09:00
Hajime Hoshi
26f0479f16
internal/restorable: typo
2024-09-08 17:06:25 +09:00
Hajime Hoshi
9ef9ea0469
internal/restorable: refactoring
2024-09-08 17:03:18 +09:00
Hajime Hoshi
b36160d9e7
internal/restorable: bug fix: make all the images stale correctly
2024-09-08 16:11:57 +09:00
Hajime Hoshi
20f8df7fc1
internal/restorable: refactoring: remove lastTarget
...
This didn't improve performance very much. Rather, this made the code
a little hard to read and could have a potential issue.
2024-09-08 16:08:36 +09:00
Hajime Hoshi
167c3435f7
internal/restorable: refactoring
2024-09-08 16:03:56 +09:00
Hajime Hoshi
4824dc0360
internal/restorable: resolve a stale state when possible
2024-09-08 14:28:16 +09:00
Hajime Hoshi
30a2817ab5
internal/restorable: add Hint to optimize drawImageHistoryItem size
2024-09-08 12:24:20 +09:00
Hajime Hoshi
29ef2c84ef
internal/atlas: add comments
2024-09-08 11:31:52 +09:00
Hajime Hoshi
1488e5e685
internal/graphicscommand: add attributes to images
2024-09-07 23:38:16 +09:00
Hajime Hoshi
4fa8265c58
internal: add comments
2024-09-07 23:24:55 +09:00
Hajime Hoshi
46cf09197b
internal/graphicscommand: enable to show shader names
2024-09-07 22:06:41 +09:00
Hajime Hoshi
393437b8be
internal/graphicscommand: imporve blend log
2024-09-07 21:29:50 +09:00
Hajime Hoshi
1b2a2afbfb
internal/restorable: rename restoring -> restoration
2024-09-07 19:09:00 +09:00
Hajime Hoshi
d50a438c07
internal/restorable: optimize removeDuplicatedRegions
...
Updates #2375
Updates #2626
Updates #3083
2024-09-07 19:01:05 +09:00
Hajime Hoshi
35f4884a74
ebiten: add RunGameOptions.StrictContextRestration
...
This reverts commit a30f075896
.
This change adds a new option StrictContextRestration to make the
restoration optional.
Closes #3083
2024-09-07 18:36:04 +09:00
Hajime Hoshi
935e7a6d5d
Revert "internal/restorable: remove the case when the restoring is needed"
...
This reverts commit c08a2193a9
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
5e18f191c1
Revert "internal/restorable: remove drawTrianglesHistoryItem"
...
This reverts commit afe3f7a8ff
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
16d2052836
Revert "internal/restorable: remove alwaysReadPixelsFromGPU"
...
This reverts commit f3206721a3
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
81d35df33b
Revert "internal/restorable: remove unused functions and variables"
...
This reverts commit 8169253a57
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
6453e552f3
Revert "internal/restorable: remove unnecessary functions and variables around shaders"
...
This reverts commit 4f3e00ec3a
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
34639d0028
Revert "internal/restorable: remove ImageTypeRestorable"
...
This reverts commit 8c2d4e1408
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
169b9fe51e
Revert "internal/restorable: move DumpImages to internal/atlas"
...
This reverts commit 7c9266d8b6
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
a9d8f374c8
Revert "internal/restorable: move SwapBuffers to internal/atlas"
...
This reverts commit f610cb5724
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
c2c5480878
Revert "internal/atlas: move some functions in internal/restorable to internal/atlas"
...
This reverts commit 3651d73e0b
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
a324cfd3b6
Revert "internal/restorable: remove ImageType"
...
This reverts commit 21ef462c37
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
62ed5bed4b
Revert "internal/restorable: integrate some functions into internal/atlas"
...
This reverts commit c5d0ec3de7
.
Updates #3803
2024-09-07 16:54:20 +09:00
Hajime Hoshi
d533461936
Revert "internal/restorable: integrate ReadPixels into internal/atlas"
...
This reverts commit e804f9e58c
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
becada4afc
Revert "internal/restorable: refactoring"
...
This reverts commit 81e1104613
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
19d2009a5f
Revert "internal/restorable: integrate Shader.Dispose into internal/atlas"
...
This reverts commit bfa2c460a2
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
17a5488c49
Revert "internal/restorable: integrate Image.DrawTriangles into internal/atlas"
...
This reverts commit 3ee905bc4d
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
d733308eb1
Revert "internal/restorable: integrate Image.WritePixels into internal/atlas"
...
This reverts commit 6cc8150185
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
104cc18477
Revert "internal/restorable: integrate Image.Extend into internal/atlas"
...
This reverts commit 6151fd313f
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
54c117b0de
Revert "internal/restorable: integrate Image functions into internal/atlas"
...
This reverts commit 59896e4447
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
5a5feb0401
Revert "internal/restorable: remove Image"
...
This reverts commit 812cd494de
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
0b01aeea16
Revert "internal/restorable: integrate the implementation into internal/atlas"
...
This reverts commit c404b448aa
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
81c75e1b0a
Revert "internal/atlas: refactoring: remove ImageTypeVolatile"
...
This reverts commit def82fd5d3
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
6eb0271f83
internal/graphicscommand: better log for read/write pixels
2024-09-06 18:38:07 +09:00
Hajime Hoshi
0e6702c043
internal/file: update comments
2024-09-06 11:03:39 +09:00
Hajime Hoshi
e43bb3898b
internal/file: bug fix: VirtualFS.Open(".") should always return a new entry
...
Closes #3081
2024-09-06 10:44:08 +09:00
Hajime Hoshi
b34f9977f6
internal/gamepaddb: update the database
...
This uses b4001f8b2d
2024-09-03 02:19:03 +09:00
Hajime Hoshi
3eda0dd387
internal/graphicsdriver/playstation5: add extern C
2024-09-01 20:08:52 +09:00
Hajime Hoshi
ca54ce69c4
internal/graphicsdriver/playstation5: bug fix: compile error
2024-09-01 20:00:41 +09:00
Hajime Hoshi
7f1e6cb538
internal/graphicsdriver/playstation5: add ebitengine_SetVertices
2024-09-01 19:47:21 +09:00
Hajime Hoshi
71370a01bd
internal/beforemaintest: avoid os.Exit(0)
2024-09-01 13:58:39 +09:00
Hajime Hoshi
67441c4823
internal/testing: avoid os.Exit(0)
...
os.Exit(0) might cause test flakiness.
https://github.com/hajimehoshi/ebiten/actions/runs/10650734256/job/29522689113
```
panic: unexpected call to os.Exit(0) during test
goroutine 1 [running]:
os.Exit(0x0)
/opt/hostedtoolcache/go/1.23.0/x64/src/os/proc.go:67 +0x8
github.com/hajimehoshi/ebiten/v2/internal/testing.MainWithRunLoop(0x19b28c0)
/home/runner/work/ebiten/ebiten/internal/testing/testing.go:50 +0xa
github.com/hajimehoshi/ebiten/v2/internal/graphicscommand_test.TestMain(...)
/home/runner/work/ebiten/ebiten/internal/graphicscommand/image_test.go:42
main.main()
_testmain.go:55 +0x5
```
2024-09-01 13:31:40 +09:00
Hajime Hoshi
f98003bcd5
ebiten: add ColorSpace and RunGameOptions.ColorSpace
...
This works only for macOS Metal and WebGL so far.
Closes #2871
2024-08-28 03:03:57 +09:00
Hajime Hoshi
42209606b1
internal/ui: disable IME and enable it only when necessary
...
Closes #2918
2024-08-27 02:22:30 +09:00
Hajime Hoshi
dc68152f17
internal/shader: better error message for the fragment entry point
2024-08-25 19:38:57 +09:00
Hajime Hoshi
9693ce8382
internal/shader: allow less arguments at Fragment
...
Closes #3073
2024-08-25 19:17:41 +09:00
Hajime Hoshi
e2662a8af7
internal/shader: bug fix: wrong indexing
2024-08-25 18:58:05 +09:00
Hajime Hoshi
2cc809516f
ebiten: add Vertex.Custom0 to Custom3
...
Closes #2640
2024-08-25 18:11:39 +09:00
Hajime Hoshi
bff760af01
internal/shader: bug fix: test failures
...
Updates #2640
2024-08-25 17:43:44 +09:00
Hajime Hoshi
fef487e09d
internal/shaderir/hlsl: refactoring: more flexible generation
...
Updates #2640
2024-08-25 17:27:00 +09:00