Commit Graph

1834 Commits

Author SHA1 Message Date
Hajime Hoshi
f32a3154de buffered: Bug fix: Set and some functions before the main loop caused wrong results
invalidatePendingPixels was not called properly.

Fixes #1081
2020-02-16 19:10:10 +09:00
Hajime Hoshi
ccab797473 buffered: Bug fix: Resolve pixels when DrawTriangles is called before the main loop
Fixes #1052
2020-01-11 04:29:55 +09:00
Hajime Hoshi
a3146024c3 buffered: Bug fix: Needed to copy pixels when buffering
Updates #983
2019-12-19 01:20:12 +09:00
Hajime Hoshi
5be536c043 restorable: Merge two 'copy' into one
Fixes #983
2019-12-19 01:19:47 +09:00
Hajime Hoshi
9284380ddd Enable to compile Ebiten on js/wasm with Go 1.14
Fixes #1024
2019-12-19 00:48:56 +09:00
Hajime Hoshi
a322e8d9c4 graphicsdriver/metal/mtl: Bug fix: need to link CoreGraphics as of Catalina
Fixes #989
2019-11-17 23:02:27 +09:00
Hajime Hoshi
3ea616dc28 uidriver/glfw: Bug fix: an unexpected window at launching
Fixes #986
2019-11-17 19:59:47 +09:00
Hajime Hoshi
e0e45b94e9 ui: Bug fix: a window was alwasy 'unfocused' on Windows
There is an issue in GLFW that a window was recognized as unfoces
on Windows (glfw/glfw#1573). As a workaround, skip the logic for
an unfocused window on Windows. On Windows, even if a window is in
another workspace, vsync works. Then there seems no problem.

Fixes #987
2019-11-17 14:13:41 +09:00
Hajime Hoshi
1b951ad794 graphicsdriver/glfw: Bug fix: CPU was busy when the window is hidden
Fixes #982
2019-11-14 23:12:28 +09:00
Hajime Hoshi
1c114e83d3 uidriver/glfw: Bug fix: Freeze on Wayland
Fixes #974
2019-11-10 19:29:19 +09:00
Hajime Hoshi
72c63ece17 uidriver/glfw: Bug fix: errors are ignored at (*UserInterface).run
Updates #978
2019-11-10 19:10:19 +09:00
Hajime Hoshi
e95dc5f27a web: Bug fix: iPad was not recognized as iOS
Fixes #979
2019-11-10 16:53:46 +09:00
Hajime Hoshi
35436ea504 buffered: Bug fix: reset the flag when invalidating the pending pixels
Updates #977
2019-11-09 05:55:44 +09:00
Hajime Hoshi
9673feda9b buffered: Bug fix: Resolve pixels only when Set is called
Fixes #977
2019-11-09 05:44:41 +09:00
Hajime Hoshi
49a5a2bf4e uidriver/js: Bug fix: Needed to initialize pseudoScale with the given scale
Updates #960, #973
2019-10-27 17:16:49 +09:00
Hajime Hoshi
06bbc08e9b web: Bug fix: IsAndroidChrome always returned true 2019-10-24 00:20:33 +09:00
Hajime Hoshi
e7611139c3 uidriver/js: Bug fix: Watch the state regularly instead of events
visibilitystate is sometimes not called and in this case the app
does not come back.

This fix creates another goroutine to watch the state, and remove
event handlers.

Fixes #961
2019-10-21 00:04:07 +09:00
Hajime Hoshi
e578b0bd49 graphicscommand: Bug fix: Needed to adjust vertices when highp is not available
Fixes #962
2019-10-19 17:05:04 +09:00
Hajime Hoshi
43a8881ab8 uidriver/ui: Reduce calls of syscall/js 2019-10-16 02:56:58 +09:00
Hajime Hoshi
72248fa3ef ui: Bug fix: Focus canvas explicitly on input
Fixes #961
2019-10-15 23:57:16 +09:00
Hajime Hoshi
75721e6fc1 ui: Auto scaling on browsers
This change forces Ebiten apps on browsers 'fullscreen' mode.
After this change, 'scale' value is no longer used on browsers.

Note that this breaks backward compatibility, but as long as the
game works in an iframe, this should not be problematic.

Fixes #960
2019-10-15 00:02:02 +09:00
Hajime Hoshi
30c185f254 uidriver/js: Bug fix: context must not be accessed before loop 2019-10-14 02:41:04 +09:00
Hajime Hoshi
5027bc1af5 buffered: Allow Set before the game runs
Fixes #949
2019-10-12 03:13:29 +09:00
Hajime Hoshi
cbe4844fa0 Fix misspellings 2019-10-12 01:10:53 +09:00
Hajime Hoshi
4bfe60fb8a graphicsdriver/metal: Bug fix: SetFragmentBytes must be called anytime
Fixes #954
2019-10-10 03:13:55 +09:00
Hajime Hoshi
3c976eae02 cmd/ebitenmobile: Use Metal on iOS
The emulators still use OpenGL.

Fixes #737
2019-10-09 02:13:47 +09:00
Hajime Hoshi
4088de5349 graphicsdriver/opengl/gl: Fix go-vet errors on Windows
Updates #889
2019-10-06 23:19:59 +09:00
Hajime Hoshi
3a0f8655e6 graphicsdriver/opengl/gl: Indentation 2019-10-06 23:02:15 +09:00
Hajime Hoshi
378be6be80 graphicsdriver/opengl/gl: Remove unused functions
This improves `go vet` results.

Updates #889
2019-10-06 22:49:38 +09:00
Hajime Hoshi
0d56207672 graphicsdriver/opengl/gl: Remove unnecessary consts 2019-10-06 04:27:57 +09:00
Hajime Hoshi
7e7751bd43 restorable: Performance tuning
This is based on the result of examples/set (Wasm).
2019-10-04 02:02:36 +09:00
Hajime Hoshi
382f6365fd shareable: Avoid defer for performance 2019-10-04 01:52:27 +09:00
Hajime Hoshi
38ee9113ee graphicsdriver/opengl/gl: Remvoe PtrOffset
Updates #889
2019-10-01 01:48:42 +09:00
Hajime Hoshi
ffbdda9a25 shareable: Avoid defer for performance 2019-09-29 03:50:43 +09:00
Hajime Hoshi
907302c440 graphicscommand: Keep the capacity at q.commands 2019-09-29 03:23:40 +09:00
Hajime Hoshi
86b4e9ffeb restorable: Bug fix: Do not mutate graphics.QuadIndices 2019-09-29 02:57:11 +09:00
Hajime Hoshi
6c8c064a58 restorable: Add TestMutateSlices 2019-09-29 02:36:06 +09:00
Hajime Hoshi
9cb631e30f Reland: graphics: Reuse vertices backend and reduce allocating
This is a reland of 74f1e5519f.

The vertex slice is now copied before saving as the drawing
history items.
2019-09-29 01:36:00 +09:00
Hajime Hoshi
4feb0a4f3e restorable: Bug fix: indices has to be copied 2019-09-29 01:30:26 +09:00
Hajime Hoshi
5e6bdc25e5 gofmt 2019-09-28 23:09:20 +09:00
Hajime Hoshi
f873b66267 graphicscommand: Reduce calling InternalWidth/InternalHeight 2019-09-28 23:03:11 +09:00
Hajime Hoshi
791f96f980 graphicscommand: Reduce division operators 2019-09-28 02:31:04 +09:00
Hajime Hoshi
7bb2895415 clock: Avoid calling (js.Value).Get() for performance 2019-09-28 01:47:48 +09:00
Hajime Hoshi
af6bda48c3 Reduce division operators
It looks like runtime.wasmDiv takes account for a big part at CPU
usages with examples/sprites.
2019-09-27 03:29:10 +09:00
Hajime Hoshi
3cf867035d buffered: Do not delay commands if possible
Delaying commands causes memory allocations, which can be heavy
especially on browsers.

This avoids to use 'defer' for performance.
2019-09-27 03:27:47 +09:00
Hajime Hoshi
3291ec51bb buffered: Use a raw function to avoid allocating structs 2019-09-27 00:37:31 +09:00
Hajime Hoshi
fc3e8bebe4 Use 0-length slice instead of nil to keep capacities 2019-09-27 00:34:55 +09:00
Hajime Hoshi
59333ba1ad jsutil: Avoid allocating ArrayBuffer unnecessarily 2019-09-26 23:59:00 +09:00
Hajime Hoshi
9a42b264fd web: Speed optimization 2019-09-26 22:11:16 +09:00
Hajime Hoshi
899fc38d23 Add wasm test with wasmbrowsertest
Fixes #881
2019-09-23 02:45:37 +09:00