Commit Graph

5859 Commits

Author SHA1 Message Date
Hajime Hoshi
6f185063d6 audio: Ensure Close is called at a readerPlayer is GCed 2021-03-22 04:11:08 +09:00
Hajime Hoshi
24973da123 internal/jsutil: Restrict the build environment 2021-03-22 03:50:05 +09:00
Hajime Hoshi
07c10880f4 audio: Bug fix: Test failures on browsers 2021-03-22 03:50:05 +09:00
Hajime Hoshi
a17fea39a1 audio: Bug fix: Compile error on Go 1.13 2021-03-22 02:16:46 +09:00
Hajime Hoshi
49a8a491cd audio: Implement the reader player for browsers
Updates #1458
2021-03-22 01:53:52 +09:00
Hajime Hoshi
e237d37929 Update README
Updates #744
2021-03-21 21:06:04 +09:00
Hajime Hoshi
0dbe5b37de Add package nintendoswitch
Updates #744
2021-03-21 21:01:26 +09:00
Hajime Hoshi
402e1a251a internal/uidriver/js: Bug fix: CursorMode didn't work on go2cpp 2021-03-21 16:40:35 +09:00
Hajime Hoshi
41f060b1d2 ebiten: Use the common vertices backend at DrawTriangles 2021-03-20 20:25:42 +09:00
Hajime Hoshi
15a0c53918 internal/graphics: Refactoring 2021-03-20 20:18:02 +09:00
Hajime Hoshi
26b9fa20c1 internal/graphics: Bug fix: Race condition at QuadVertices
QuadVertices or verticesBackend.slice reused its backend slice.
This caused a race condition. QuadVertices can be accessed from
multiple goroutines, and resetting the head and copying the data
at internal/graphicscommand might not be synced.

This change fixes this issue by basically reverting
9cb631e30f.

Closes #1546
2021-03-20 16:32:13 +09:00
Hajime Hoshi
80645ad4dc Add Humphrey Shotton to AUTHORS 2021-03-15 02:16:22 +09:00
Humphrey Shotton
21cfe362c8
internal/graphicscommand: fix missing graphicscommand log (#1543)
Closes #1544
2021-03-15 02:14:03 +09:00
Hajime Hoshi
36209465fc cmd/ebitenmobile: Bug fix: Skip 'uinput-fpc' on the joystick detection on Android
Apparently 'uinput-fpc' is a fingerprint reader and is recognized as
a joystick unexpectedly. This was often a primary gamepad on Ebiten
and confused Ebiten applications.

This change fixes this issue by skipping 'uinput-fpc' at the joystick
detection.

Closes #1542
2021-03-14 23:26:06 +09:00
Hajime Hoshi
9b335ae6dd mobile/ebitenmobileview: Performance improvement at updateInput 2021-03-14 22:24:45 +09:00
Hajime Hoshi
763ed32ca6 ebiten: Update input API comments for Android
Closes #1539
2021-03-14 18:02:55 +09:00
Hajime Hoshi
bc42cb31c3 Update Go versions at the test 2021-03-12 22:11:17 +09:00
Hajime Hoshi
3e7217cb86 internal/atlas: Add comments to moveTo 2021-03-12 00:26:38 +09:00
Hajime Hoshi
ec677a258f Rename internal/shareable -> internal/atlas
Also the terms are renamed:

 * shared -> on an atlas
 * not shared -> isolated

Closes #1529
2021-03-12 00:22:08 +09:00
Hajime Hoshi
d2be9beb2d Update Go versions at the test 2021-03-11 02:26:30 +09:00
Hajime Hoshi
df3e74533b internal/shareable: Use an exponential way to determine the image sharing
When an image was used in both ways source and destination, Ebiten
worked ineffectively since Ebiten tried to make the image on a texture
atlas after the image was used as a source for a while, which tried to
create a new internal texture every time.

This fix mitigates this issue by using an exponential way to determine
whether the image should be on a texture atlas again or not, so that
an image often used as a destination will require much longer time to
become on a texture atlas again.

Updates #1464
2021-03-10 02:30:33 +09:00
Hajime Hoshi
2c0108e178 examples/tiles: Misspelling 2021-03-09 03:23:53 +09:00
Hajime Hoshi
052947d7b7 internal/glfw: Update GLFW to 3.3.3 for Windows
Closes #1523
2021-03-09 02:19:34 +09:00
Hajime Hoshi
c536e34e56 Update GLFW
Updates #1523
2021-03-08 03:10:10 +09:00
Hajime Hoshi
54b2d9532e Update GLFW to 3.3.3
Updates #1523
2021-03-07 00:39:49 +09:00
Hajime Hoshi
990fb14f17 internal/uidriver/glfw: Separate createWindow and registring the callback
createWindow created a window and also registered the SetSize callback.
This was problematic in setWindowSize, since the callback was invoked
in setWindowSize unexpectedly.

This change separates createWindow and registring the callback so that
the created window in setWindowSize doesn't invoke the callback until
setWindowSize finishes.

Closes #1505
2021-03-06 17:48:28 +09:00
Hajime Hoshi
fda421c5fe internal/uidriver/glfw: Bug fix: SEGV at setWindowSize
u.window can be a different value before and after the function
setWindowSize.

Closes #1522
2021-03-03 23:04:35 +09:00
Hajime Hoshi
c8b98f13fb internal/graphics: Always use the vertex backend to reduce GC
Closes #1521
2021-03-03 22:23:15 +09:00
Hajime Hoshi
c3ddc2089a ebiten: Update comments 2021-03-01 12:07:55 +09:00
Hajime Hoshi
7dda2d8e4b ebiten: Do not skip Draw when vsync is disabled
Closes #1520
2021-03-01 12:06:14 +09:00
Hajime Hoshi
9e73b0d287 audio: Rename UnwrittenBufferSize -> UnplayedBufferSize 2021-03-01 01:27:42 +09:00
Hajime Hoshi
6d442c0a17 audio: Add comments 2021-02-28 23:47:57 +09:00
Hajime Hoshi
4bc0bb607b audio: Lazy initialization at reader players 2021-02-28 23:41:30 +09:00
Hajime Hoshi
dbdfce5fed audio: Add readerDriverPlayer.UnwrittenBufferSize to get the exact position 2021-02-28 01:42:48 +09:00
Hajime Hoshi
cb3fc3c51c Revert "shareable: Limit the texture size to 8192"
This reverts commit c92ccfff79.

Reason: This should no longer be needed after #1517 is fixed.
2021-02-27 13:55:13 +09:00
Hajime Hoshi
77b198211c internal/graphicsdriver/metal: Add a comment 2021-02-27 04:04:25 +09:00
Hajime Hoshi
53352cf2b3 internal/graphicsdriver/metal: Use the smallest temporary texture
Updates #1517
2021-02-27 03:45:19 +09:00
Hajime Hoshi
673627c4d4 internal/graphicsdriver/metal: Optimization 2021-02-27 02:30:20 +09:00
Hajime Hoshi
6b3c51921c internal/driver: Remove Image.Sync
Syncing is no longer needed for Metal, and additionally, OpenGL's sync
implementation was mock.

Updates #1508
2021-02-26 23:16:28 +09:00
Hajime Hoshi
9341d21614
internal/shareable: Call DrawTriangles instead of ReplacePixels at makeShared (#1513)
When context losts never happen, reading pixels and call replace-pixels command are not needed.

Closes #1508
2021-02-26 12:56:22 +09:00
Hajime Hoshi
d913e66cd9 Revert "uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically"
This reverts commit 61bf10e73e.

Reason: This prevents the app from iconifying when toggling apps.

Updates #1405
Closes #1504
2021-02-23 20:13:21 +09:00
Hajime Hoshi
18d526c2d3 internal/uidriver/glfw: Bug fix: Crash when returning from fullscreen
ForceUpdate was called unexpectedly inside Update. This caused the
race condition.

Closes #1505
2021-02-23 16:52:12 +09:00
Hajime Hoshi
b8cdcdb847 audio: Bug fix: NewInfiniteLoop(WithIntro) should work with incomplete values
Closes #1503
2021-02-22 02:15:45 +09:00
Hajime Hoshi
a13930650d examples/audiopanning: Bug fix: Fix several issues
* The stream was not looped.
 * The shown position was wrong.

Closes #1502
2021-02-22 02:00:52 +09:00
Hajime Hoshi
29099cf660 audio: Bug fix: Continue to play the audio after seeking on go2cpp 2021-02-21 23:54:43 +09:00
Hajime Hoshi
311d53ce2e examples/audio: Enable to touch 2021-02-21 19:20:24 +09:00
Hajime Hoshi
027463ff88 audio: Bug fix: timeStream was not used for a reader player 2021-02-21 18:48:58 +09:00
Hajime Hoshi
6f462e824f examples/audio: Use the same audio file for Ogg and MP3
This also changes the sample rate to 32000 for some special
environments.
2021-02-21 17:57:06 +09:00
Hajime Hoshi
e873b386a0 Update Go to 1.16.0 for the tests 2021-02-17 14:57:14 +09:00
Hajime Hoshi
969964cb46 internal/graphicsdriver/opengl/gl: Bug fix: Remove unsafe reflect usage
Closes #1495
2021-02-14 21:27:30 +09:00