Hajime Hoshi
6fe6543b4b
internal/graphicsdriver/opengl: Bug fix: getBufferSubData was available only with WebGL2
2021-04-06 00:11:51 +09:00
Hajime Hoshi
bd8367588e
internal/graphicsdriver/opengl: Prepare function objects by bind
...
Passing a Go string to the JS world is expensive. This change reduces
this cost by preparing function objects by bind.
Closes #1438
2021-04-05 23:53:21 +09:00
Hajime Hoshi
77b198211c
internal/graphicsdriver/metal: Add a comment
2021-02-27 04:04:25 +09:00
Hajime Hoshi
53352cf2b3
internal/graphicsdriver/metal: Use the smallest temporary texture
...
Updates #1517
2021-02-27 03:45:19 +09:00
Hajime Hoshi
673627c4d4
internal/graphicsdriver/metal: Optimization
2021-02-27 02:30:20 +09:00
Hajime Hoshi
6b3c51921c
internal/driver: Remove Image.Sync
...
Syncing is no longer needed for Metal, and additionally, OpenGL's sync
implementation was mock.
Updates #1508
2021-02-26 23:16:28 +09:00
Hajime Hoshi
969964cb46
internal/graphicsdriver/opengl/gl: Bug fix: Remove unsafe reflect usage
...
Closes #1495
2021-02-14 21:27:30 +09:00
Hajime Hoshi
b8694aa66a
internal/graphicsdriver/opengl: Optimization
2021-01-26 00:45:17 +09:00
Hajime Hoshi
f77c514598
graphicsdriver/opengl: Refactoring
2021-01-05 02:07:30 +09:00
Hajime Hoshi
b7abde7f00
graphicsdriver/opengl: Bug fix: getBufferSubData did not work correctly on JS
2021-01-03 19:44:29 +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
718273c2d7
ebiten: Add a new shader function imageDstRegionOnTexture
...
Updates #1428
2020-12-09 11:36:29 +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
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
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
Hajime Hoshi
ddc8115b51
graphicsdriver/opengl: Refactoring: remove ensureGL
2020-11-21 22:09:58 +09:00
Hajime Hoshi
dd46221968
graphicsdriver/opengl: Enable dFdx for mobiles
...
Fixes #1404
2020-11-21 19:40:11 +09:00
Hajime Hoshi
b1d7a5f595
shaderir/glsl: Enable dFdx for WebGL
...
With WebGL1, an extension is required for dFdx. On the other hand,
with WebGL2, GLSL ES 300 is required and the extension is forbidden.
This change fixes shaderir/glsl to switch the output depends on the
WebGL version.
This change also adds a new build tag 'ebitenwebgl1' forcing WebGL 1.
Updates #1404
2020-11-21 19:07:54 +09:00
Hajime Hoshi
2097312a8b
graphicsdriver/opengl: Refactoring
2020-11-21 16:44:49 +09:00
Hajime Hoshi
4df958c9fd
Avoid comparing to js.Undefined() for consistency
2020-11-21 14:25:17 +09:00
Hajime Hoshi
ed494dbf59
restorable: Reland: Do not record pixels if restoring is not requried
...
This change also remove the restrictions of operations on
graphicscommand.Image. For example, now DrawTriangles and
ReplacePixels can be mixed on the same image.
Fixes #1022
2020-11-14 15:00:16 +09:00
Hajime Hoshi
86a0c7aa82
graphicsdriver/opengl: Use PBO when retrieving pixels
2020-11-13 09:10:56 +09:00
Hajime Hoshi
ddfb8adbc4
graphicsdriver/metal: Asynchronous sending pixels
...
Fixes #1418
2020-11-10 22:48:03 +09:00
Hajime Hoshi
5705dc79fb
graphicsdriver/metal: Do not need to wait until flushing at Sync
2020-11-10 22:12:26 +09:00
Hajime Hoshi
99b4a3096a
graphicsdriver/opengl: Use Go const values instead of getting them dynamically
2020-11-08 19:23:32 +09:00
Hajime Hoshi
e09f3aa286
graphicsdriver/metal/mtl: Bug fix: Fix the guard range
2020-11-08 04:44:43 +09:00
Hajime Hoshi
aaff18ecf7
graphicsdriver/metal/mtl: Bug fix: Guard the handler map by a mutex
...
The handler is invoked in another thread than the main thread.
2020-11-08 04:40:13 +09:00
Hajime Hoshi
ed028110cf
ebiten: Allow rendering on a sub-image by scissor test
...
Fixes #1255
2020-11-08 00:58:44 +09:00
Hajime Hoshi
e4e8e7254e
graphicsdriver/metal/mtl: Refactoring: Specify struct member names explicitly
2020-11-07 23:46:07 +09:00
Hajime Hoshi
a8f96ee9af
graphicsdriver/metal: Add Sync to sync CPU and GPU asynchronously
...
Fixes #1414
2020-11-07 04:09:47 +09:00
Hajime Hoshi
6e3cbe2e33
graphicsdriver/metal/mtl: Refactoring
2020-11-07 03:26:35 +09:00
Hajime Hoshi
8da5ad2c4f
graphicsdriver/metal: Misspelling
2020-11-03 23:44:40 +09:00
Hajime Hoshi
f611b48c71
graphicsdriver/opengl: Use native GLES functions for mobiles
...
After this change, GL functions for mobiles, especially Android, are
native ones instead of golang.org/x/mobile/gl functions in order to
reduce goroutine context switches.
On gomobile-build, golang.org/x/mobile/gl functions are still used.
Fixes #1387
2020-10-19 03:51:20 +09:00
Hajime Hoshi
2740938460
graphicsdriver/opengl: Fix the error message again
2020-10-18 22:55:37 +09:00
Hajime Hoshi
b755a1f970
graphicsdriver/opengl: Fix the error message
2020-10-18 22:12:39 +09:00
Hajime Hoshi
cac4b43ddd
graphicsdriver/opengl/gles: Add copyright comments
2020-10-18 18:18:08 +09:00
Hajime Hoshi
55af18a178
graphicsdriver/opengl: Use a new package gles
...
Updates #1387
2020-10-18 18:16:11 +09:00