Commit Graph

6173 Commits

Author SHA1 Message Date
Hajime Hoshi
6c4edf8605 internal/uidriver/glfw: Bug fix: Abort the game immediately on error
Updates #1688
2021-06-29 02:23:17 +09:00
Hajime Hoshi
9c5b7b56b2 internal/graphics: Reafctoring 2021-06-28 23:28:43 +09:00
Hajime Hoshi
817d176994 internal/graphicscommand: Misspelling at newShaderCommand.String 2021-06-27 23:20:27 +09:00
Hajime Hoshi
c725937cc6 internal/graphics: Reuse the vertices backend
This is basically a reland of 9cb631e30f.
This change locks the vertices backend at the end-frame phase to
protect from vertices usages by other goroutines.

Updates #1546
Closes #1681
2021-06-27 02:31:01 +09:00
Hajime Hoshi
1d83df0c13 ebiten: Refactoring 2021-06-27 01:46:35 +09:00
Hajime Hoshi
699bb095c3 internal/atlas: Better algorithm to release the temporary pixels 2021-06-26 23:29:45 +09:00
Hajime Hoshi
067e3c004d Remove internal/web 2021-06-26 17:04:00 +09:00
Hajime Hoshi
8ff42f55a1 internal/graphicsdriver/opengl: Give up restorign on browsers
Using restorable images is expensive as this sometimes requires to
load pixels from GPU. On browsers, just reloading the application
should be fine when the context lost happens.

Closes #1603
2021-06-26 16:54:21 +09:00
Hajime Hoshi
38ce46328a internal/atlas: Reuse byte array for ReplacePixels
This reduces memory allocation at ReplacePixels.

Updates #1681
2021-06-26 03:48:25 +09:00
Hajime Hoshi
371bbfc0f2 audio/internal/readerdriver: Bug fix: Avoid AudioQueueReset
Instead, call AudioQueueStop and discard the current AudioQueue.

Closes #1680
Updates #1650
2021-06-26 01:14:37 +09:00
Hajime Hoshi
4ce90a564b Update CONTRIBUTING.md 2021-06-26 00:47:46 +09:00
Hajime Hoshi
ab5f5cbfea audio/internal/readerdriver: Bug fix: Race condition on UNIX/Linux
Updates #1680
2021-06-25 03:17:42 +09:00
Hajime Hoshi
c7ac5a32b5 audio/internal/readerdriver: Stop using the reader driver
Apparently #1680 seems pretty hard to fix. Use the old Oto
implementation until this issue is fixed.

Updates #1680
2021-06-25 01:05:00 +09:00
Hajime Hoshi
47dfba69a5 audio/internal/readerdriver: Bug fix: Race condition on macOS/iOS
Updates #1680
2021-06-25 00:32:27 +09:00
Hajime Hoshi
301515f44b Add Hiroki KUMAZAKI to AUTHORS 2021-06-24 22:51:33 +09:00
Hiroki KUMAZAKI
eb5fde74af
examples: Add an example "stars" (#1679) 2021-06-24 22:50:47 +09:00
Hajime Hoshi
a615be69c7 examples: Add //go:build 2021-06-24 21:49:37 +09:00
Hajime Hoshi
414a64ce78 internal/atlas: Allow extending a texture atlas
As PBO is no longer used (#1678), using a big atlas with
ReplacePixels is no longer problematic.

Closes #1674
Updates #1675
2021-06-24 21:35:36 +09:00
Hajime Hoshi
7c36426933 Update CONTRIBUTING.md about the communities 2021-06-24 21:22:36 +09:00
Hajime Hoshi
2a8e8d0eb6 internal/graphicsdriver/opengl: Stop using PBO
PBO was introduced to improve the performance at ReplacePixels,
but we found that PBO can degrades the performance. Also, now
multiple glTexImage2Ds are called successively like a batch, so
the situation is now different from that time when PBO was
introduced.

Let's remove PBO usages and wait and see.

Closes #1678
2021-06-24 21:20:58 +09:00
Hajime Hoshi
79220192ac
Update CONTRIBUTING.md about the build tag
This is for Go 1.17.
2021-06-24 14:08:50 +09:00
Hajime Hoshi
bd13e96727 examples/noise: Show FPS 2021-06-24 12:06:59 +09:00
Hajime Hoshi
7f60cd41eb internal/graphicsdriver/opengl: Refactoring: Remove unused arguments from texSubImage2D 2021-06-24 12:06:28 +09:00
Hajime Hoshi
fa8e271f2a internal/atlas: Bug fix: Set the minimum texture size to 8192px
Closes #1675
Updates #1674
2021-06-19 18:52:08 +09:00
Hajime Hoshi
43c964a3b8 internal/thread: Refactoring 2021-06-15 00:43:48 +09:00
Hajime Hoshi
49c3c30c79 ebiten: Add IsWindowBeingClosed / SetWindowClosingHandled / IsWindowClosingHandled
IsWindowBeingClosed reports whether the window is being closed by
the user.

SetWindowClosingHandled sets whether the window closing is handled
or not. If the state is true, the window is not closed immediately
by the user and the game can handle the closing state. In this case,
the Update function should return an error in order to end the game.

This change also adds examples/windowclosing.

Closes #1574
2021-06-14 02:29:11 +09:00
Hajime Hoshi
f989ce4e64 internal/uidriver/glfw: Rename variables 2021-06-13 23:25:24 +09:00
Hajime Hoshi
bceb512e78 internal/glfw: Bug fix: build failure with GOOS=js
Updates #1672
2021-06-13 22:59:57 +09:00
Hajime Hoshi
ed6756662a internal/glfw: Clean up the code
Updates #1672
2021-06-13 22:48:27 +09:00
Hajime Hoshi
3c2d562967 internal/glfw: Bug fix: NewCallbackCDecl objects were leaked
Callbacks created by NewCallbackCDecl were never released and then
they are leaked, especially when the window size was changed by
SetWindowSize on Windows.

This change defines new callback ID types with uintptr, and reuse
the callbacks.

Closes #1672
2021-06-13 22:23:01 +09:00
Hajime Hoshi
0cea5f2f1a internal/glfw: Remove one of go-vet warnings 2021-06-13 14:41:39 +09:00
Hajime Hoshi
584c6524ee internal/graphicsdriver/opengl: Refactring 2021-06-13 14:19:33 +09:00
Hajime Hoshi
741548351c Update README (supporting Nintendo Switch) 2021-06-11 23:51:51 +09:00
Hajime Hoshi
06e09c8ef2 Bug fix: Specifying Go 1.17 beta1 with actions/setup-go 2021-06-11 01:20:56 +09:00
Hajime Hoshi
aa024bd7e5 Add Go 1.17beta1 to the tests 2021-06-11 01:18:08 +09:00
Hajime Hoshi
b54ad73a2b Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
Hajime Hoshi
f1fc6fe3e8 cmd/ebitenmobile: Clean the temporary directory up after the execution 2021-06-10 01:06:52 +09:00
Hajime Hoshi
cb0f4c4378 cmd/ebitenmobile: Bug fix: os.WriteFile is not defined at Go 1.15
Updates #1667
2021-06-09 22:58:22 +09:00
Hajime Hoshi
cf1a91a344 cmd/ebitnmobile: Bug fix: using ebitenmobile with EBITENMOBILE_GOMOBILE failed
Closes #1667
2021-06-09 22:50:01 +09:00
Hajime Hoshi
9cf30d9b70 cmd/ebitenmobile: Handle os.Setenv error
Updates #1666
2021-06-09 21:33:40 +09:00
Hajime Hoshi
269a79408f Revert "cmd/ebitenmobile: Remove gomobile init"
This reverts commit ecc8514d4b.

Reason: This doesn't fix the issue. gomobile assumes the existence of $GOPATH/pkg/gomobile, so leave it as it is.

Updates #1666
2021-06-09 12:58:19 +09:00
Hajime Hoshi
ecc8514d4b cmd/ebitenmobile: Remove gomobile init
`gomobile init` installs gobind at $GOPATH/bin, but this is not
needed for ebitenmobile.

Updates #1666
2021-06-09 12:21:09 +09:00
Hajime Hoshi
95c494f47e audio/internal/readerdriver: Share one goroutine to read the source to the buffers (iOS/macOS)
This fix improves the latency of the audio.

Closes #1662
2021-06-09 01:52:21 +09:00
Hajime Hoshi
67e5fae9c0 audio/internal/readerdriver: Refactoring 2021-06-09 00:29:01 +09:00
Hajime Hoshi
f1a20f29b9 Update go.mod
Updates #1258
Updates #1415
Updates #1462
2021-06-08 03:17:30 +09:00
Hajime Hoshi
a627c41217 Remove support of Go 1.13 and Go 1.14
Updates #1258
Updates #1415
Updates #1462
2021-06-07 21:44:22 +09:00
Hajime Hoshi
4276e2964e audio/internal/oboe: Use a bigger buffer for safety
There were sometimes slight noises on a low-end device like Asus
Zenfone (ASUS_X013DB).

Updates #1662
2021-06-07 03:52:30 +09:00
Hajime Hoshi
61682d6d5c audio/internal/oboe: Nil slice should be safe to convert to reflect.SliceHeader 2021-06-07 03:33:09 +09:00
Hajime Hoshi
658192f83d audio/internal/readerdriver: Bug fix: A player must be the EOF state when the buffer is empty 2021-06-07 03:20:48 +09:00
Hajime Hoshi
9f9d53aad3 audio/internal/readerdriver: Bug fix: Possible busy loop when a player reaches EOF 2021-06-07 03:03:22 +09:00