Commit Graph

4877 Commits

Author SHA1 Message Date
Hajime Hoshi
1fdab58ff5 vector: Add FillOptions 2020-03-16 23:49:55 +09:00
Hajime Hoshi
4b63be0156 graphics: Use float64 in GeoM
The reason why float32 was adopted was forgotten. Using float64
should not be problematic.

Fixes #883
2020-03-16 00:38:33 +09:00
Hajime Hoshi
6bc62b8f17 uidriver/glfw: Update comments 2020-03-15 15:42:05 +09:00
Hajime Hoshi
cebc203e6f cmd/ebitenmobile: Bug fix: .exe was requried on Windows
On Windows, executable files must have .exe extension, or
exec.LookPath since exec.LookPath checks %PATHEXT%.

This fixes the issue that ebitenmobile didn't invoke the original
gobind wrapper and then didn't include and compile some Java files.

Fixes #1096
2020-03-05 01:05:59 +09:00
Hajime Hoshi
b4a9538e1d graphicsdriver/opengl/gl: Remove a misspelled unused const 2020-02-26 12:06:47 +09:00
Hajime Hoshi
08bb0834cc Use Go 1.14 by default at .travis.yml 2020-02-26 11:45:50 +09:00
Hajime Hoshi
e3d1e7784e cmd/ebitenmobile: Refactoring 2020-02-24 17:50:01 +09:00
Hajime Hoshi
5040b3bcfc thread: Add comments 2020-02-24 01:54:52 +09:00
Hajime Hoshi
00e78c1eae thread: Close channels 2020-02-24 01:50:23 +09:00
Hajime Hoshi
c166fe8eea Update GLFW to v3.3.2
Fixes #1086
2020-02-23 03:10:38 +09:00
Hajime Hoshi
fd69f58dae input: Add comments about mobiles
Updates #237
Updates #1090
2020-02-23 02:09:28 +09:00
Hajime Hoshi
3af869732c uidriver/mobile: Implement InputChars for gomobile-build
This change also fixes InputChars to return only printable Unicode
chars on Android.

Updates #237
2020-02-23 01:01:40 +09:00
Hajime Hoshi
de52eb75e4 mobile/ebitenmobileview: Implement InputChars on Android / ebitenmobile
Updates #237
2020-02-23 00:51:49 +09:00
Hajime Hoshi
0ea5e65c92 mobile/ebitenmobileview: Bug fix: compile error 2020-02-23 00:36:40 +09:00
Hajime Hoshi
a208a026f6 uidriver/mobile: Implement keyboard key inputs for gomobile-build
Updates #237
2020-02-22 23:57:16 +09:00
Hajime Hoshi
1dd0c22510 mobile/ebitenmobileview: Bug fix: Wrong key names 2020-02-22 13:45:01 +09:00
corfe83
b3c567de89
Fix another ~300 allocations per frame in my test project (#1089)
This simple change brings my simple test project from 752 allocations per frame to 474 allocations per frame. It seems a shame that go's escape analysis is not smart enough to leave this variable on the stack.

GeoM is a 24-byte struct and there is a slight perf difference that we are storing it in stack, but also copying it around with this change (instead of an 8-byte pointer). This could make things faster (due to stack / CPU cache) or slower (due to copying more memory) - when I try a stress test (drawing 100K images per frame), I can't see any actual performance difference (but I do see 100K fewer allocations, and GC is no longer running almost all the time).
2020-02-22 13:40:17 +09:00
Hajime Hoshi
7ea56b2e79 keys: Refactoring: Rename a map (driverKeyNameToJSKey) 2020-02-22 03:31:10 +09:00
Hajime Hoshi
cd4cb435f2 keys: Refactoring: Rename and reverse a map (androidKeyToDriverKeyName) 2020-02-22 03:28:59 +09:00
Hajime Hoshi
6d78610645 Add Tom Lister to AUTHORS 2020-02-21 22:11:01 +09:00
Tom Lister
3eea196c09
Fix missing js build tag (#1088)
Added js to build tags as suggested by @hajimehoshi

Fixes #1087
2020-02-21 20:24:25 +09:00
corfe83
a18cddb39f
Reduce heap allocations in thread.go and input.go (#1085)
I've been doing some profiling of a very simple ebiten project, and noticed that thread.go was doing a bunch of unnecessary allocations to accomplish its work. This change seeks to reduce GC work.

Input.go was also doing some unnecessary allocations.

The thread.go change reduces the total number of allocations per frame from 1342 to 852 (~36% reduction). The input.go change reduces it further to 752 (~44% total reduction). Perf tests were done on windows.
2020-02-21 09:59:45 +09:00
Hajime Hoshi
5b7151595b mobile/ebitenmobileview: Handle keyboard keys on Android (ebitenmobile)
Updates #237
2020-02-20 01:53:51 +09:00
Hajime Hoshi
6faad68931 input: Refactoring 2020-02-20 00:18:40 +09:00
Hajime Hoshi
682f454fc2 input: Refactoring: Rename variables 2020-02-19 10:52:58 +09:00
Hajime Hoshi
db2c4dc260 mobile/ebitenmobile: Rename functions
This is a preparation for other input devices.

Updates #237
2020-02-19 01:51:05 +09:00
Hajime Hoshi
e20cbac8d8 mobile/ebitenmobileview: Rename files 2020-02-19 00:48:57 +09:00
Hajime Hoshi
dc96d25457 graphics: Fix comments on ReplacePixels 2020-02-16 22:25:32 +09:00
Hajime Hoshi
875a529708 graphics: Allow ReplacePixels on a sub-image
Fixes #980
2020-02-16 22:18:07 +09:00
Hajime Hoshi
d9bd7ab07d buffered: Remove (*Image).Set
This is a preparation for ReplacePixels of a sub-image.

Updates #980
2020-02-16 21:45:28 +09:00
Hajime Hoshi
733c1b649a buffered: Bug fix: Copying pixels failed for the delayed commands
Fixes #1082
2020-02-16 20:16:04 +09:00
Hajime Hoshi
911b36ed98 buffered: Refactoring 2020-02-16 20:03:04 +09:00
Hajime Hoshi
405ae99b32 buffered: Refactoring: Flush delayed functions without the lock 2020-02-16 19:53:17 +09:00
Hajime Hoshi
ff8689cfcd 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:06:48 +09:00
Hajime Hoshi
d790c86e8a cmd/ebitenmobile: Add -trimpath
Fixes #1068
2020-02-16 17:32:00 +09:00
Hajime Hoshi
f0395bfc80 Add corfe83 to AUTHORS 2020-02-16 02:03:32 +09:00
corfe83
61c2d7cfe8
Simple optimization in IsKeyPressed (#1080)
Simple optimization on IsKeyPressed to avoid iterating through whole map of possible keys.
2020-02-16 02:02:05 +09:00
Hajime Hoshi
f396b258e2 cmd/ebitenmobile: Update gomobile version
This change also eliminates a hack for golang/go#36668
2020-02-15 14:06:02 +09:00
Zachary Burkett
bb60818e8d
Add linebreak support to text.Draw (#1075)
Closes #1074
2020-02-12 23:15:57 +09:00
Hajime Hoshi
087f30b72d ui: Remove the unused function setWindowResizable
Updates #994
2020-02-12 20:58:25 +09:00
Hajime Hoshi
883b25f257 uidriver/mobile: Refactoring 2020-02-12 00:36:34 +09:00
Hajime Hoshi
d59aea1db1 driver: Remove the return value from RunWithoutMainLoop 2020-02-11 23:56:53 +09:00
Hajime Hoshi
aef4b4ba53 uidriver/mobile: Refactoring: Give a default outside size 2020-02-11 23:29:52 +09:00
Hajime Hoshi
d0fce2a2db mobile/ebitenmobileview: Refactoring 2020-02-11 22:43:00 +09:00
Hajime Hoshi
9298b044e3 graphicsdriver/metal: Bug fix: avoid using mtl.LoadActionDontCare
Fixes #1019
2020-02-11 20:29:03 +09:00
Hajime Hoshi
38d8cbf6af cmd/ebitenmobile: Bug fix: iOS view was not shown
This enbugs that garbages are rendered outside the screen. I think
the bug in iPad is now exposed to any iOS devices.

Updates #1019
2020-02-11 20:20:20 +09:00
Hajime Hoshi
c927d33457 mobile/ebitenmobileview: Use the common uiContext for layouting
This means that the whole offscreen is cleared correctly.

This change is a little breaking change: SetScreenSize or other
functions no longer works on ebitenmobile. Use Layout instead.

Fixes #1019
2020-02-11 19:40:47 +09:00
Hajime Hoshi
1b4c9f4e4d uidriver/mobile: Remove impl.go 2020-02-11 14:50:55 +09:00
Hajime Hoshi
a303487328 uidriver/mobile: Add comments 2020-02-11 14:45:50 +09:00
Hajime Hoshi
024fc48647 Refactoring: Add init.go 2020-02-11 11:14:19 +09:00