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
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
68c43bb4fb
graphicsdriver/opengl: Enable to compile with gldebug tag for gomobile
2020-09-04 15:08:40 +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
b4046a795e
graphics: Reduce the usage of InternalImageSize
2020-08-08 16:01:33 +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
Hajime Hoshi
073fd329f2
graphicsdriver/opengl: Enable to pass any type of uniform variables
...
Updates #1274
2020-08-01 05:11:24 +09:00
Hajime Hoshi
a50ef46ed0
graphicsdriver/opengl: Do not allow nil value for uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
da5642cd0e
graphicsdriver/opengl: Add type checks of uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
a0197d4c2f
graphicsdriver/opengl: Bug fix: Build error on Android
...
Fixes #1266
2020-07-26 17:01:11 +09:00
Hajime Hoshi
ca3fd4eaa4
ebiten: Add texture[ID]Size functions for shaders
...
Fixes #1239
2020-07-26 15:18:01 +09:00
Hajime Hoshi
d08a04a635
ebiten: Refactoring
2020-07-26 15:05:00 +09:00
Hajime Hoshi
75d34ab585
graphicsdriver/opengl: Forbids PBO on Raspberry Pi 4 ( #1261 )
...
Fixes #1208
2020-07-23 19:15:34 +09:00
Hajime Hoshi
29d53edf1d
graphicsdriver/opengl: Bug fix: Rename the attribute variables along with custom shaders
2020-07-20 04:06:35 +09:00
Hajime Hoshi
5506491c03
graphicsdriver/opengl: Bug fix: Binding the same texture multiple times did not work
...
Updates #1193
2020-07-19 04:34:53 +09:00
Hajime Hoshi
36e9803cea
shader: Enable to get pixels from multiple images
...
Updates #1193
2020-07-19 02:33:43 +09:00
Hajime Hoshi
fe79bb27af
graphicscommand: Refactoring
2020-07-18 23:25:16 +09:00
nanoslayer
72babcd420
ebiten: Add CompositeModeMultiply ( #1251 )
...
This change adds a new composite mode called `CompositeModeMultiply`,
which multiplies the source color with the destination color.
This is tested on Linux and Windows only.
Fixes #410
2020-07-18 21:37:17 +09:00
Hajime Hoshi
e0d5763a60
shader: Use the fixed number of images for shaders
...
This changes uses arrays rather than slices in order to avoid heap
allocations.
Updates #1193
2020-07-18 18:27:47 +09:00
Hajime Hoshi
7f70797a6d
ebiten: Rename DrawTriaglesWithShaderOptions.Textures to Images
2020-07-15 03:49:05 +09:00
Hajime Hoshi
d217bc6033
ebiten: Sparate textures from uniforms at DrawTrianglesWithShader
...
Updates #1193
Updates #1239
2020-07-09 01:59:21 +09:00
Hajime Hoshi
4021c24534
shader: Separate uniform variables and texture variabls
...
Textures cannot be treated as a regular variable, then they should
be treated differently from other uniform variables.
Add a new function texture0At replacing texture2D.
Updates #1239
2020-07-08 01:12:07 +09:00
Hajime Hoshi
b83f0acc4d
Remove source-region information from vertices
...
Fixes #1210
2020-07-02 23:38:39 +09:00
Hajime Hoshi
71c9e7ac40
driver: Add Region and sourceRegion parameter at Draw
...
This is a preparation to remove source-region information from
vertices.
Updates #1210
2020-07-02 03:26:05 +09:00
Hajime Hoshi
d3613e13af
graphicsdriver/opengl: Fix comments
2020-06-25 01:06:30 +09:00
Hajime Hoshi
2a63512c6e
driver: Add AddressUnsafe
...
This skips the source-region check and reduces 'if' branches from
shader programs.
AddressUnsafe is internal only so far. We might expose this value
later.
Updates #1210
2020-06-25 01:00:38 +09:00
Hajime Hoshi
bfc2fffba6
graphicsdriver/opengl: Move comments
2020-06-24 23:52:39 +09:00
Hajime Hoshi
20b5be0886
graphicsdriver: Bug fix: Tie-breaking when picking a texel
...
When a texel is picked on texel-borders of a texture, the behavior
(tie-breaking) depends on GPU and unexpected. This change fixes this
issue by shifting 1/512 [texel] when picking a texel up.
Updates #1212
2020-06-24 20:51:16 +09:00
Hajime Hoshi
1785b6a670
examples/moire: Add a smaller scale, and remove AdjustTexel function from shaders
...
This can reproduce the bug reported at #669 .
Apparently, the fix (8827520d4a
) is
no longer required after 3550abef7a
.
That's pretty odd, but examples/moire proves this fact.
Updates #669
Updates #759
2020-06-15 00:29:34 +09:00
Hajime Hoshi
f39c591252
shader: Enable more Go syntax
2020-06-11 01:13:03 +09:00
Hajime Hoshi
e25a6f4d46
graphicsdriver/opengl: Remove isTexture on desktops
2020-05-30 20:56:13 +09:00
Hajime Hoshi
2bdef2e8c4
restorable: Add an explicit way to detect context-lost
...
isTexture was used to detect context-lost and called every frame.
This was not good for performance.
This change adds a way to notify context-lost from the WebGL
handlers directly, and the package restorable uses it instead of
calling (*Image).isInvalaidated.
Fixes #1175
2020-05-30 20:29:15 +09:00
Hajime Hoshi
1c980a16f5
graphicsdriver/opengl: Ignore non-existent uniform locations
...
Shader users should not have to care about the existence of uniform
variables.
Updates #1168
2020-05-27 11:39:11 +09:00
Hajime Hoshi
f80719ef9a
driver: Use slices for uniform variables instead of maps
...
Fixes #1172
2020-05-26 23:50:11 +09:00
Hajime Hoshi
1cfc1964bf
graphicsdriver/opengl: Bug fix: fmt arguments
2020-05-25 02:36:45 +09:00
Hajime Hoshi
85730b433e
graphicsdriver: Bug fix: Pass texture natives as uniform variables correctly
2020-05-25 02:31:54 +09:00
Hajime Hoshi
9bf24ba545
graphicsdriver/opengl: Remove println and add error messages
2020-05-24 23:15:00 +09:00
Hajime Hoshi
521f9dcac5
graphicsdriver/opengl: Bug fix: deleted a wrong shader program
...
Updates #482
2020-05-23 22:40:49 +09:00
Hajime Hoshi
1a0d92267b
driver: Add shader API and implement it on OpenGL
...
Updates #482
2020-05-23 22:09:12 +09:00
Hajime Hoshi
8fd377f1e3
driver: Add ImageID and use this
...
This is a preparation to introduce shaders. Shader programs
require images as uniform variables, but the current way would make
API complex unnecessarily.
2020-05-20 00:11:08 +09:00