Commit Graph

1835 Commits

Author SHA1 Message Date
Hajime Hoshi
f1091910bd Revert "graphicscommand: Remove copying pixels"
This reverts commit 339a96b7e6.

Reason: this causes panic on extending textures
2019-11-16 00:43:22 +09:00
Hajime Hoshi
339a96b7e6 graphicscommand: Remove copying pixels
Now ReplacePixels takes the ownership.

Updates #983
2019-11-16 00:29:37 +09:00
Hajime Hoshi
bfd5774faf graphicsdriver/glfw: Bug fix: CPU was busy when the window is hidden
Fixes #982
2019-11-14 23:11:36 +09:00
Hajime Hoshi
8c54cf639a graphicsdriver/opengl: Reduce glFlush calls
Fixes #981
2019-11-14 01:21:08 +09:00
Hajime Hoshi
c2eae69b47 graphicscommand: Refactoring 2019-11-14 00:08:44 +09:00
Hajime Hoshi
a1a294df72 uidriver/glfw: Bug fix: Freeze on Wayland
Fixes #974
2019-11-10 19:26:49 +09:00
Hajime Hoshi
572780ed6d uidriver/glfw: Bug fix: errors are ignored at (*UserInterface).run
Updates #978
2019-11-10 19:09:41 +09:00
Hajime Hoshi
d43e203ccf uidriver/glfw: Remove a redundant 'if' branch 2019-11-10 17:34:14 +09:00
Hajime Hoshi
63f73ddd75 web: Bug fix: iPad was not recognized as iOS
Fixes #979
2019-11-10 16:52:49 +09:00
Hajime Hoshi
8d12446dbe buffered: Bug fix: reset the flag when invalidating the pending pixels
Updates #977
2019-11-09 05:54:27 +09:00
Hajime Hoshi
ec59e9b9ae buffered: Bug fix: Resolve pixels only when Set is called
Fixes #977
2019-11-09 05:43:36 +09:00
Hajime Hoshi
ddba7f0ee0 driver: Bug fix: unused import 2019-11-04 03:15:09 +09:00
Hajime Hoshi
889bc12093 driver: Remove IsPlayground 2019-11-04 03:04:00 +09:00
Hajime Hoshi
3c29fbdce2 jsutil: Refactoring: SliceToTypedArray -> CopySliceToJS
This unifieslocations of the temporary buffer.
2019-10-30 00:35:48 +09:00
Hajime Hoshi
31f56efd75 jsutil: Add doc.go
This is to avoid no-Go-files error on TravisCI.

https://travis-ci.org/hajimehoshi/ebiten/builds/603539948
2019-10-28 01:28:50 +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