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
Hajime Hoshi
fe6a2daef4
graphicsdriver/metal: Bug fix: Had to set the vsync state again at resetting
...
Fixes #1364
2020-10-14 01:58:56 +09:00
Hajime Hoshi
249e1c46ba
graphicsdriver/metal: Remove an old comment
...
Updates #1367
2020-10-14 01:51:18 +09:00
Hajime Hoshi
eed619ad0f
graphicsdriver/metal, graphicsdriver/opengl: Reland: Remove the thread usages for performance
...
Instead, graphicscommand package has a thread.
Updates #1367
2020-10-13 02:46:31 +09:00
Hajime Hoshi
713eee1117
Revert "graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance"
...
This reverts commit 2942f10d9d
.
Reason: Compile error on mobiles and runtime error on browsers
2020-10-13 02:12:02 +09:00
Hajime Hoshi
2942f10d9d
graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance
...
Instead, graphicscommand package has a thread.
Updates #1367
2020-10-13 01:50:54 +09:00
Hajime Hoshi
dc288d37f8
Bug fix: Compile error for Wasm
2020-10-07 02:23:45 +09:00
Hajime Hoshi
ee4ebaaa95
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 02:07:03 +09:00
Hajime Hoshi
7a0e31a23a
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 01:33:10 +09:00
Hajime Hoshi
e90b5ff277
Update import paths in the documents
2020-10-04 05:07:08 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Bui Quoc Trong
0d29979296
Fix the comment style cause heading in pkgsite ( #1369 )
2020-09-29 16:55:39 +09:00
Hajime Hoshi
3dab49fc39
graphicsdriver/opengl: Better error message
2020-09-17 20:35:57 +09:00
Hajime Hoshi
52fcab7a90
graphicsdriver/metal: Fix comments
2020-09-06 16:51:44 +09:00
Hajime Hoshi
e565433fb0
graphicsdriver/metal: Bug fix: Synchronizing textures on iOS was necessary
...
Fixes #1337
2020-09-06 16:19:50 +09:00
Hajime Hoshi
68c43bb4fb
graphicsdriver/opengl: Enable to compile with gldebug tag for gomobile
2020-09-04 15:08:40 +09:00
Hajime Hoshi
a3b41515a9
ui: Replace the native window's type (unsafe.Pointer) with uintptr
...
Updates #1306
2020-09-04 00:51:48 +09:00
Hajime Hoshi
bd888f62b9
graphicsdriver/opengl: Exclude bytes.go from non-mobile environments
...
This requires reflect and reflect prevents Ebiten from being compiiled
with TinyGo.
Updates #747
2020-08-20 22:24:21 +09:00
Hajime Hoshi
c921a63c21
graphicsdriver/opengl/gl: Bug fix: Crash on Parallels
...
Fixes #1310
2020-08-18 04:33:59 +09:00
Hajime Hoshi
609a3c4e22
ebiten: Bug fix: Fix the texel calculation
...
In shaders, texCoord is always in texture0's texels. Convert them
at imageNTextureAt functions correctly.
Fixes #1290
2020-08-11 04:15:07 +09:00
Hajime Hoshi
69f87d5fd1
ebiten: Add new shader builtin functions: image[N]TextureBoundAt
...
Fixes #1287
2020-08-11 03:24:54 +09:00
Hajime Hoshi
4d1947f711
grpahicsdriver/metal: Better error message
2020-08-09 04:06:30 +09:00
Hajime Hoshi
a45e241da1
shaderir/metal: Implement the shader IR compiler for Metal
...
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
2b89710600
graphicsdriver/metal: Refactoring
2020-08-08 18:05:58 +09:00
Hajime Hoshi
6dc74d308b
graphicsdriver/metal: Rename viewportSize to internalSize and use it more
2020-08-08 16:07:14 +09:00
Hajime Hoshi
b4046a795e
graphics: Reduce the usage of InternalImageSize
2020-08-08 16:01:33 +09:00
Hajime Hoshi
fe1cea533a
graphicsdriver/metal: Add a generalized 'draw' function
...
This is a preparation for rendering shaders.
Updates #1165
2020-08-08 03:12:44 +09:00
Hajime Hoshi
28c638cb5b
graphicsdriver/opengl: Unexpose NewShader
2020-08-08 03:12:44 +09:00
Hajime Hoshi
8bac08cbd9
Add internal/shaderir/glsl
2020-08-03 23:27:27 +09:00
Hajime Hoshi
38dcadb233
graphicsdriver/opengl: Add program error info to the error
2020-08-01 18:58:05 +09:00
Hajime Hoshi
a4334c5464
shader: Use arrays at uniform variables
...
Fixes #1274
2020-08-01 17:22:10 +09:00