Hajime Hoshi
601fd5eb22
uidriver/js: Update go2cpp touch API
2020-12-27 19:56:24 +09:00
Hajime Hoshi
8e6792ca23
uidriver/js: Refactoring: Use a map for gamepad states
...
This change improves the consistency with touches.
2020-12-27 18:44:16 +09:00
Hajime Hoshi
3d48922d8c
jsutil: Bug fix: byteLenght must be accessed every time to get the latest value
2020-12-26 17:04:12 +09:00
Hajime Hoshi
e95cccad21
jsutil: Reduce calls of (js.Value).Get
...
(js.Value).Get invokes the string conversion from UTF-8 to UTF-16.
This is related to #1438 , though this is not a fix in the OpenGL
driver.
Updates #1438
2020-12-26 05:12:04 +09:00
Hajime Hoshi
a6ade8f5cd
uidriver/js: Update touch APIs for go2cpp
2020-12-21 23:01:12 +09:00
Hajime Hoshi
b20f611058
uidriver/js: Implement touches on go2cpp
2020-12-21 18:36:01 +09:00
Hajime Hoshi
59567993c2
clock: Bug fix: High TPS didn't work well due to the timer precision
...
When the TPS is high (e.g., 300), the count might be unreliable
since the timer might not be precise on some machines. In this
case, calculate the factor and multiply the count by it.
Fixes #1444
2020-12-21 00:23:29 +09:00
Hajime Hoshi
53d0e1eae0
clock: Add comment
2020-12-20 21:59:09 +09:00
Hajime Hoshi
aef104203d
clock: Refactoring
2020-12-20 21:54:28 +09:00
Hajime Hoshi
4215678f4c
clock: Bug fix: Syncing with the system clock happens more often than expected
...
When the specified TPS is too big (e.g., 300), the time threshold
to determine whether the clock should be synchronized with the
system clock can be too small, and the decision can be wrong too
often. To fix this, prepare another time assuming the TPS was 60
and use the bigger one.
Fixes #1443
2020-12-20 21:23:40 +09:00
Hajime Hoshi
8003000976
uidriver/js: Refactoring
2020-12-20 18:19:58 +09:00
Hajime Hoshi
2e2ee2595b
uidriver/js: Refactoring
2020-12-20 18:17:08 +09:00
Hajime Hoshi
d3fbf377ef
shader: Bug fix: A wrong usage of a pointer
2020-12-20 13:32:22 +09:00
Hajime Hoshi
de14a44c01
restorable: Replace a potentially dangerous pointer usage
...
Getting a poniter to a loop variable is potentially dangerous.
2020-12-20 13:28:17 +09:00
Hajime Hoshi
2106e0fa6a
devicescale: Use devicePixelRatio property for go2cpp
2020-12-20 00:45:13 +09:00
Hajime Hoshi
5bbb148a38
uidriver/js: Add jsKeyToID to avoid js.Value.String
...
Fixes #1437
2020-12-16 13:30:42 +09:00
Hajime Hoshi
69b1d2e820
uidriver/js: Use js.Value as key strings
...
Updates #1437
2020-12-16 12:53:33 +09:00
Hajime Hoshi
442be20f4d
uidriver/js: Avoid calling String when possible to reduce overhead
...
Updates #1437
2020-12-16 12:41:55 +09:00
Hajime Hoshi
e856b236f3
jsutil: Refactoring
2020-12-16 02:41:06 +09:00
Hajime Hoshi
7e32075abd
jsutil: Avoid creating Uint8Array when copying bytes from Go to JS
...
Updates #1435
2020-12-16 01:50:05 +09:00
Hajime Hoshi
49b86843c3
jsutil: Avoid creating Uint8Array at TemporaryUint8Array
...
Updates #1435
2020-12-16 01:21:13 +09:00
Hajime Hoshi
146357c298
jsutil: Enable to specify length at Uint8ArrayToSlice
2020-12-15 01:13:15 +09:00
Hajime Hoshi
e5c1151cc5
jsutil: Avoid creating Float32Array at TemporaryFloat32Array
...
Updates #1435
2020-12-15 00:40:43 +09:00
Hajime Hoshi
f440e368b3
graphicsdriver/opengl: Use WebGL2 API on go2cpp
2020-12-14 02:02:45 +09:00
Hajime Hoshi
547621ddad
clock: Bug fix: The game was frozen when TPS is <= 4
...
Fixes #1417
2020-12-13 15:14:15 +09:00
Hajime Hoshi
692460c5aa
testing: Bug fix: Lack of uniform variables
2020-12-09 11:52:45 +09:00
Hajime Hoshi
718273c2d7
ebiten: Add a new shader function imageDstRegionOnTexture
...
Updates #1428
2020-12-09 11:36:29 +09:00
Hajime Hoshi
8d2a4ac917
uidriver/glfw: Bug fix: OpenGL was adopted unexpectedly on macOS Big Sur
...
Fixes #1429
2020-12-09 10:21:26 +09:00
Hajime Hoshi
35867c7697
uidriver/js: Add go2cpp.screenWidth/screenHeight
2020-12-09 10:10:34 +09:00
Hajime Hoshi
768fdd2c47
uidriver/js: Separate registering event handlers
2020-12-06 22:56:09 +09:00
Hajime Hoshi
66d12722ae
graphicsdriver/opengl: Remove comments
2020-12-06 03:24:08 +09:00
Hajime Hoshi
2c31156a34
graphicsdriver/opengl: Reduce allocations of Float32Array on go2cpp
...
Updates #1426
2020-12-06 03:23:09 +09:00
Hajime Hoshi
2bf4a3bb6e
jsutil: Use Equal for Go 1.13
2020-12-06 03:14:25 +09:00
Hajime Hoshi
469dc31765
jsutil: Reduce allocating Uint8Array on go2cpp
...
Updates #1426
2020-12-06 03:00:50 +09:00
Hajime Hoshi
2ca0f3f300
jsutil: Remove println
2020-12-06 02:58:52 +09:00
Hajime Hoshi
7a86238c9a
jsutil: Remove ArrayBufferToSlice
2020-12-06 02:28:14 +09:00
Hajime Hoshi
b326b76d60
jsutil: Use a 'writable' TypedArray on go2cpp
2020-12-06 02:25:04 +09:00
Hajime Hoshi
410766c984
restorable: Add more detailed information to the panic message
...
Updates #1427
2020-12-05 19:56:06 +09:00
Hajime Hoshi
d4a2433643
Revert "graphicsdriver/opengl: Reduce creation of Float32Array"
...
This reverts commit 3c28bcf3c4
.
Reason: Tests failed: https://github.com/hajimehoshi/ebiten/runs/1496602911
2020-12-04 12:10:15 +09:00
Hajime Hoshi
3c28bcf3c4
graphicsdriver/opengl: Reduce creation of Float32Array
...
Updates #1426
2020-12-02 22:58:36 +09:00
Hajime Hoshi
44e2455c65
graphicsdriver/opengl: Avoid unnecessary creation of Uint16Array/Float32Array
...
Updates #1426
2020-12-02 20:40:28 +09:00
Hajime Hoshi
5897e1ab7c
Implement some preparation code for go2cpp
...
Updates #744
2020-11-30 23:18:42 +09:00
Hajime Hoshi
912e13071f
graphicsdriver/opengl: Refactoring
2020-11-29 23:04:00 +09:00
Hajime Hoshi
9a69c3ea9c
graphicscommand: Add 'dst-region' to String of DrawTriangles command
2020-11-27 01:48:17 +09:00
Hajime Hoshi
e7fafb5527
ebiten: Add a new log to dump update count
...
Fixes #1425
2020-11-24 22:36:32 +09:00
Hajime Hoshi
526a92256b
graphicsdriver/opengl: Refactoring: Remove shaderType
2020-11-21 23:33:25 +09:00
Hajime Hoshi
8dba7b7722
graphicsdriver/opengl: Refactoring: Remove dataType
2020-11-21 23:14:43 +09:00
Hajime Hoshi
c9060d2fa8
graphicsdriver/opengl: Remove bufferType
2020-11-21 23:07:11 +09:00
Hajime Hoshi
9c014a281a
graphicsdriver/opengl: Refactoring
2020-11-21 23:00:57 +09:00
Hajime Hoshi
859d247093
graphicsdriver/opengl: Refactoring
2020-11-21 22:49:49 +09:00