Commit Graph

60 Commits

Author SHA1 Message Date
Hajime Hoshi
c45e9d0c00 internal/processtest: remove an empty line 2023-11-19 17:01:00 +09:00
Hajime Hoshi
af6b8dcd1c internal/processtest: use text/v2
Updates #2454
2023-11-19 16:55:03 +09:00
Hajime Hoshi
c01ceeaa6a ebiten: replace (*Image).Dispose with Deallocate
Closes #2808
2023-11-03 17:45:39 +09:00
Hajime Hoshi
8a44ef4f6c internal/atlas: bug fix: (*Image).Deallocate (*Shader).Deallocate were not concurrent-safe
Updates #2162
2023-11-03 17:12:04 +09:00
Hajime Hoshi
457f6bb964 Revert "internal/ui: bug fix: panic at ReadPixels before running"
This reverts commit 2f6df3d4d6.

Reason: regression by calling (*ebiten.Image).At from a different goroutine

Updates #2820
2023-10-27 14:29:41 +09:00
Hajime Hoshi
2f6df3d4d6 internal/ui: bug fix: panic at ReadPixels before running
Closes #2820
2023-10-27 12:18:34 +09:00
Hajime Hoshi
39688dd27d internal/processtest: improve test issue2815
WritePixels for 1x1 image is optimized at internal/ui, and Ebitengine
doesn't read pixels from GPU in this case. Enlarge the tested image,
and use DrawImage to ensure to invalidate the internal cache.

Updates #2815
2023-10-20 02:48:21 +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
b95228a8a6 all: rename arguments in Kage
Closes #2767
2023-09-24 16:46:36 +09:00
Hajime Hoshi
2702c6b228 internal/processtest: suppress issue2475 test for Windows
The result seems flaky unfortunately.
2023-09-23 00:18:41 +09:00
Hajime Hoshi
07d2706e63 internal/processtest: bug fix: allow some numerical errors for cursor positions
Updates #2475
2023-09-17 19:58:30 +09:00
Hajime Hoshi
fd689467c5 internal/processtest: add a test for capturing cursor and fullscreen
Updates #2475
2023-09-17 19:41:56 +09:00
Hajime Hoshi
55bfc02509 internal/processtest: use (*testing.T).TempDir 2023-09-06 11:37:27 +09:00
Hajime Hoshi
f30a58a393 internal/ui: bug fix: disable global functions after the game termination
Closes #2743
2023-09-02 15:38:41 +09:00
Hajime Hoshi
6e968558b1 internal/ui: bug fix: setRunning(true) must be called after the main thread is set
Some functions like ebiten.SetCursorMode use `running` to detect
whether the game starts or not. If the game starts, the main thread
must exist, but there was a timing when `running` was true but the
main thread didn't exist.

This change fixes this issue by changing the timing to call
`setRunning(true)` after the main thread initialization and before
`initOnMainThread`. `initOnMainThread` assumes that `running` is
true.

Closes #2742
2023-09-02 04:24:51 +09:00
Hajime Hoshi
98ead195c6 audio: bug fix: deadlock between a player and a context
Closes #2737
2023-08-29 14:52:48 +09:00
Hajime Hoshi
0fb1cdcfbd internal/atlas: bug fix: there should be multiple temporaryBytes objects for pipelining
Closes #2716
2023-07-31 16:18:17 +09:00
Hajime Hoshi
0d1f990338 internal/processtest: output a better error message when failing to compile a Go program 2023-04-01 04:01:39 +09:00
Hajime Hoshi
2875eb25f1 internal/processtest: add a test for #2620
Updates #2620
2023-04-01 03:59:00 +09:00
Hajime Hoshi
4e7db88829 internal/processtest: bug fix: timeout didn't work for go-run
Apparently timing-out for a go-run process didn't work well. Instead,
use CommandContext for the actual test binary which is already built.
2023-04-01 03:56:50 +09:00
Hajime Hoshi
99fb40f299 internal/processtest: skip tests on WSL
Closes #1864
2023-03-30 13:42:44 +09:00
Hajime Hoshi
ff1621885d internal/processtest: use a semaphore for sub-tests
Updates #2571
2023-02-25 16:19:15 +09:00
Hajime Hoshi
0e57fc4c5f internal/processtest: set timeout
Updates #2571
2023-02-18 17:36:31 +09:00
Hajime Hoshi
7018d1aebe internal/processtest: fix the timeout logic
Updates #2571
2023-02-15 22:41:18 +09:00
Hajime Hoshi
a65b65110b Revert "internal/processtest: prevent parallel process testing"
This reverts commit 397da70815.

Reason: This did not resolve the issue: https://github.com/hajimehoshi/ebiten/actions/runs/4180959132/jobs/7242421909

Updates #2571
2023-02-15 15:13:57 +09:00
Hajime Hoshi
397da70815 internal/processtest: prevent parallel process testing
Updates #2571
2023-02-14 18:13:27 +09:00
Hajime Hoshi
8864ce1291 all: update comments 2023-02-07 12:05:43 +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
f054a7634a ebiten: deprecate (*Image).Size
Closes #2351
2023-01-20 01:26:37 +09:00
Artem Yadelskyi
10415d417a
all: replace interface{} with any (#2430)
Closes #2429
2022-11-03 15:33:09 +09:00
Artem Yadelskyi
5b53cef59e
all: remove old // +build comments (#2431)
Closes #2325
2022-11-03 12:55:14 +09:00
Hajime Hoshi
8aacf067dd all: use x/sys/execabs instead of os/exec
Closes #2418
2022-11-01 23:36:57 +09:00
Hajime Hoshi
f04e391cb4 all: rename emptyImage -> whiteImage 2022-10-21 15:26:56 +09:00
Hajime Hoshi
b79495761e ebiten: add Blend and deprecate CompositeMode
Updates #2382
2022-10-16 22:47:00 +09:00
Hajime Hoshi
27cb149475 internal/graphicscommand: bug fix: resolve unsent WritePixels commands
(*Image).WritePixels doens't send a command to the queue immediately
but caches commands internally. However, the package atlas assumed
that pixel data was sent to the cache every end of a frame. Then, byte
slices for pixels were corrupted.

This change fixes the issue by resolving all the images when flushing
commands.

Closes #2390
2022-10-16 15:19:25 +09:00
Hajime Hoshi
aa81a6cc7d internal/processtest/testdata: add a test file
Updates #2362
2022-10-16 15:17:09 +09:00
Hajime Hoshi
5404e4d68a all: replace io/ioutil with io and os
Closes #1770
2022-09-15 02:54:25 +09:00
Hajime Hoshi
1762869791 internal/processtest/testdata: typo 2022-09-02 03:23:30 +09:00
Terra Brown
de35a5a6f1
ebiten: add Termination for a regular termination (#2272)
Closes #2266
2022-08-27 21:33:40 +09:00
Hajime Hoshi
e9e48919df internal/processtest: rename test 2022-08-17 22:04:51 +09:00
Hajime Hoshi
0217ed0544 ebiten: add WritePixels replacing ReplacePixels
Closes #2236
2022-08-08 03:50:27 +09:00
Hajime Hoshi
ca8c36499d ebiten: recommend errors.Is instead of comparing the returned value directly
Closes #2152
2022-07-24 23:25:48 +09:00
Hajime Hoshi
0f52381580 ebiten: rename TPS functions
* SetMaxTPS() -> SetTPS()
* MaxTPS() -> TPS()
* CurrentTPS() -> ActualTPS()
* CurrentFPS() -> ActualFPS()

Closes #2071
2022-07-17 11:30:12 +09:00
Hajime Hoshi
8522bfd0bf internal/graphicscommand: bug fix: replacePixelsCommand should not read pixels
Reading pixels, writing pixels, and using the image as a source might
cause a flaky behavior with Metal. Stop reading pixels if possible.

Closes #2180
2022-07-05 23:30:26 +09:00
Hajime Hoshi
fb23e4b578 internal/processtest/testdata: fix col and row
Updates #2154
2022-07-04 12:07:39 +09:00
Hajime Hoshi
5411e8136b ebiten: bug fix: use DrawTriangles as an implementation of Set
Closes #2154
2022-07-04 12:02:47 +09:00
Hajime Hoshi
7d725f3e58 Revert "internal/graphicscommand: bug fix: using an image just after ReplacePixels might fail on Metal"
This reverts commit c31cc4ecff.

Reason: This didn't fix the issue.

Updates #2154
2022-07-04 11:50:06 +09:00
Hajime Hoshi
c31cc4ecff internal/graphicscommand: bug fix: using an image just after ReplacePixels might fail on Metal
Inserting a dummy rendering command after ReplacePixels and before
DrawTriangles solved the issue. This is a very dirty hack, but
there seems no other better way.

Closes #2154
2022-07-03 15:59:18 +09:00
Hajime Hoshi
12533c2cce Revert "internal/graphicsdriver/metal: bug fix: need to commit replace-pixels commands at DrawTriangles"
This reverts commit ac802cf0d0.

Reason: This caused flickerings, and didn't solve #2154

Updates #2154
Closes #2174
2022-07-03 12:17:58 +09:00