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
30a2817ab5
internal/restorable: add Hint to optimize drawImageHistoryItem size
2024-09-08 12:24:20 +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
9e208eee81
all: use QuadVerticesFromDstAndSrc when possible
2024-08-12 02:42:36 +09:00
Hajime Hoshi
b6ab7a10c1
internal/graphics: unify QuadVertices
...
This is a preparation for adding members to Vertex.
Updates #2640
2024-08-12 00:29:24 +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
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
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
fd2c79398e
Revert "internal/atlas: refactoring: ensure ReadPixels to be processed in a frame"
...
This reverts commit 55702a7c28
.
Reason: This didn't work with the single-thread mode.
Updates #1704
Closes #2939
2024-03-26 13:10:00 +09:00
Hajime Hoshi
2ec5c788ab
internal/buffered: fix comments
2024-01-17 04:19:07 +09:00
Hajime Hoshi
cef272f638
internal/buffered: refactoring
2024-01-17 00:20:12 +09:00
Hajime Hoshi
3cbc1870bf
internal/buffered: update pixels instead of dotsBuffer when possible
2024-01-17 00:18:06 +09:00
Hajime Hoshi
26e2748732
internal/buffered: bug fix: check errors from ReadPixels
2024-01-16 13:26:31 +09:00
Hajime Hoshi
2f894cb311
internal/buffered: move tests to internal/beforemaintest
...
Also, this change moves TestUnsyncedPixels to buffered_test.
2024-01-16 13:07:10 +09:00
Hajime Hoshi
7b3eae3dcb
internal/ui: reland: move dotsBuffer from internal/ui.Image to internal/buffered.Image
...
This is a reland of fb426cd0dd
.
This is a refactoring as 'caching' things should be in internal/buffered,
but also this is a performance optimization to make pixels and dotsBuffer
work well together.
2024-01-16 12:45:43 +09:00
Hajime Hoshi
b2759b66f9
Revert "internal/ui: move dotsBuffer from internal/ui.Image to internal/buffered.Image"
...
This reverts commit fb426cd0dd
.
Reason: processtest (TestPrograms/issue2089) failed (flaky)
2024-01-16 02:56:24 +09:00
Hajime Hoshi
fb426cd0dd
internal/ui: move dotsBuffer from internal/ui.Image to internal/buffered.Image
...
This is a refactoring as 'caching' things should be in internal/buffered,
but also this is a performance optimization to make pixels and dotsBuffer
work well together.
2024-01-16 02:08:41 +09:00
Hajime Hoshi
7f396f72de
all: remove the comments about restorable
2024-01-13 20:00:01 +09:00
Hajime Hoshi
c08a2193a9
internal/restorable: remove the case when the restoring is needed
...
Updates #805
2024-01-09 00:20:35 +09:00
Hajime Hoshi
4e93efa5ac
internal/graphicsdriver: reland: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 19:09:50 +09:00
Hajime Hoshi
f695df5924
Revert "internal/graphicsdriver: add FillRule and replace boolean values with this"
...
This reverts commit 38cf964a3b
.
Reason: build failure on Windows
2023-11-04 19:02:40 +09:00
Hajime Hoshi
38cf964a3b
internal/graphicsdriver: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 18:57:31 +09:00
Hajime Hoshi
f2544a1bd9
internal/graphicsdriver: use []uint32 instead of []uint16 for indices
...
Updates #2612
2023-11-04 04:39:17 +09:00
Hajime Hoshi
c01ceeaa6a
ebiten: replace (*Image).Dispose with Deallocate
...
Closes #2808
2023-11-03 17:45:39 +09:00
Hajime Hoshi
55702a7c28
internal/atlas: refactoring: ensure ReadPixels to be processed in a frame
...
This enables to call (*Image).At from HandleInput, which might be
called outside of a frame.
Updates #1704
2023-10-25 00:48:09 +09:00
Hajime Hoshi
b94c3fa9bb
internal/atlas: split EndFrame into EndFrame and SwapBuffers
...
This enables to do something asynchronously while executing SwapBuffers
in a different goroutine.
This is a preparation for HandleInput.
Updates #1704
2023-10-24 00:22:04 +09:00
Hajime Hoshi
e80e981bf5
internal/atlas: let callers retry ReadPixels instead of blocking
...
This is a preparation to implement HandleInput, which might call
(*Image).At in its callback.
Updates #1704
2023-10-20 02:30:32 +09:00
Hajime Hoshi
ad51e22252
internal/atlas: bug fix: ReadPixels crashed when inFrame was false
...
This change fixes the issue by letting ReadPixels return a channel
and executing this asynchronously when needed.
Closes #2815
2023-10-19 03:56:54 +09:00
Hajime Hoshi
7d517bfb63
internal/buffered: move buffering to internal/atlas
...
Closes #2814
2023-10-19 01:56:18 +09:00
Hajime Hoshi
da979a3ab2
internal/buffer, internal/mipmap: remove Shader
2023-10-19 00:52:32 +09:00
Hajime Hoshi
19ee79e2cb
internal/buffered: remove unnecessary deferred functions for shaders
2023-10-18 23:36:41 +09:00
Hajime Hoshi
3f1b7e78b8
internal/buffered: remove unnecessary deferred functions
2023-10-18 23:20:02 +09:00
Hajime Hoshi
58847e023d
internal/buffered: refactoring
2023-10-18 23:03:05 +09:00
Hajime Hoshi
b0f88bce7d
internal/buffered: remove unnecessary deferred functions
2023-10-18 22:30:01 +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
4ca3fa5e57
internal/graphicsdriver: replace Region with image.Rectangle ( #2791 )
...
Closes #2790
2023-09-28 14:29:55 +09:00
Hajime Hoshi
534370f7b1
internal/graphics: enable to specify regions for each source image
...
This is a preparation to specify different sizes of source images.
Updates #1870
2023-08-27 21:15:01 +09:00
Hajime Hoshi
3869e2e4f6
internal/ui: refactoring: integrate the render thread usages into internal/graphicscommand
...
Updates #2664
2023-07-30 03:50:49 +09:00
Hajime Hoshi
d2c991b774
all: refactoring: use image.Rectangle
2023-04-28 01:03:38 +09:00
Hajime Hoshi
c48d0fbb7a
internal/buffer: refactoring
2023-02-26 02:20:07 +09:00
Hajime Hoshi
110ba5403d
internal/buffered: remove redundant pixel data if possible
2023-02-26 01:55:43 +09:00
Hajime Hoshi
b08b740914
internal/buffered: bug fix: functions were not concurrent-safe
...
Before this change, `delayedCommandsFlushed` was set as 1 BEFORE
buffered commands were flushed. This meant that a function call and
a command being flushed were not concurrent-safe.
This change fixes this issue by changing the timing of setting
`delayedCommandsFlushed` as 1 to the later time after flushing the
buffered commands.
Closes #2580
2023-02-21 20:38:06 +09:00
Pierre Curto
4de807cc44
all: fix typos ( #2558 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
89c64f83e3
ebiten: performance improvement by reducing allocations of []float32
2022-12-03 21:53:56 +09:00
Hajime Hoshi
0a6813c17f
internal/graphics: use flatten []float32 slice instead of [][]float32
...
Closes #2479
2022-12-03 20:23:58 +09:00
Hajime Hoshi
61f1d8b69f
internal/graphics: remove the common vertices backend
...
It was actually impossible to use the common vertices backend in a
thread-safe manner, and actually this caused race conditions.
This changes fixes the issue by giving up a central backend, and
letting images have their own vertices buffer.
Closes #2473
2022-12-03 01:02:23 +09:00