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
Hajime Hoshi
6ccb614b08
graphicsdriver/metal: Implement CompositeModeMultiply
...
Updates #410
2020-07-18 21:51:57 +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
ebd0e11c0d
graphicsdriver/metal: Avoid synching texture data at ReplacePixels
...
Instead, use a temporary texture, transfer texture data to it, and
copy the data on GPU side.
2020-06-28 19:40:37 +09:00
Hajime Hoshi
00e8b701c1
graphicsdriver/metal: Optimization
2020-06-27 04:14:21 +09:00
Hajime Hoshi
2bc1475a15
graphicsdriver/metal: Bug fix: Sync textures before replacing a region
...
Updates #1213
2020-06-27 03:08:17 +09:00
Hajime Hoshi
5a176d6f4f
graphicsdriver/metal: Bug fix: synchronizing must be skipped on iOS
2020-06-27 01:45:14 +09:00
Hajime Hoshi
9f76b96c1f
graphicsdriver/metal: Specify the texture type explicitly
2020-06-26 23:46:12 +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
e023425be0
graphicsdriver/metal: Reduce calls of SetLayer
2020-06-14 05:07:33 +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
Hajime Hoshi
7f2092f964
graphicsdriver/opengl: Enable to bind multiple textures (in theory)
2020-05-17 23:57:42 +09:00
Hajime Hoshi
733c463e26
graphicsdriver/opengl: Treat a texture as a uniform variable
2020-05-17 23:25:49 +09:00
Hajime Hoshi
68ef41e256
graphicsdriver/opengl: Integrate uniform variables
2020-05-17 20:20:29 +09:00
Hajime Hoshi
ff311dd564
graphicsdriver/opengl: Pass uniform values to useProgram
2020-05-17 19:43:01 +09:00
Hajime Hoshi
84e2c6f994
graphicsdriver/opengl/gl: Bug fix: misuse of unsafe.Pointer
2020-05-17 19:42:23 +09:00
Hajime Hoshi
8ab12827c0
graphicsdriver/opengl: Refactoring
2020-05-17 19:01:46 +09:00
Hajime Hoshi
9cc128fb40
graphicsdriver/opengl: Integrate last uniform values
2020-05-17 18:36:33 +09:00
Hajime Hoshi
d12b406e0a
graphicsdriver/opengl: Remove unused variables
2020-05-17 18:15:27 +09:00
Hajime Hoshi
f4a1f90d92
graphicsdriver/opengl/gl: Reduce reflect usage
2020-05-17 14:28:13 +09:00
Hajime Hoshi
4fa52dcc56
Remove MonoGame support
...
Fixes #1148
2020-05-08 19:32:28 +09:00
Hajime Hoshi
274245e39c
graphicsdriver/metal: Refactoring: Invert the viewport's Y direction
2020-05-08 18:12:30 +09:00
Hajime Hoshi
8029dc352a
driver: Use framebuffer's Y directions
2020-05-08 16:49:19 +09:00
Hajime Hoshi
c43ba6e17d
graphicsdriver/metal: Update comments
2020-05-08 05:49:38 +09:00
Hajime Hoshi
7068eb9284
graphicsdriver/metal: Simplify the projection matrix
2020-05-08 05:06:09 +09:00
Hajime Hoshi
7ad3343e9c
graphicsdriver/monogame: Implement Pixels
...
Updates #1078
2020-04-22 02:23:16 +09:00
Hajime Hoshi
691e42f806
graphicsdriver/monogame: Bug fix: An underlying image size should be adjusted
2020-04-21 02:43:47 +09:00