Hajime Hoshi
850303b770
ebiten: Change the type of Uniforms to map[string]interface{}
...
Fixes #1324
2020-09-06 21:02:30 +09:00
Hajime Hoshi
8aef1f9080
restorable: Enable to set the 'volatile' state later
...
Updates #1309
2020-08-19 00:57:23 +09:00
Hajime Hoshi
d4042a5cfa
ebiten: Bug fix: Source regions should not be passed when not needed
...
The source region information affects the condition of merging
graphics commands. To avoid performance issues by the big number of
graphcis commands, do not pass the source region whenever possible.
Fixes #1293
2020-08-12 02:12:35 +09:00
Hajime Hoshi
69f87d5fd1
ebiten: Add new shader builtin functions: image[N]TextureBoundAt
...
Fixes #1287
2020-08-11 03:24:54 +09:00
Muang
5a5a45a42f
ebiten: Correct a typo ( #1282 )
2020-08-08 03:12:18 +09:00
szzhiyang
4249697062
Fix typo in the documentation for DrawImageOptions ( #1275 )
...
"The default (zero) value is identify" -> "The default (zero) value is identity"
2020-07-30 11:32:57 +09:00
Hajime Hoshi
52a5ea2d44
ebiten: More precise calculation for mipmap
2020-07-26 18:41:59 +09:00
Hajime Hoshi
637afe6d67
mipmap: Skip mipmap calculation if possible
...
If we know we can skip mipmap calculation from GeoM, let's skip it.
Updates #1265
2020-07-26 12:25:03 +09:00
Hajime Hoshi
d017a1b95e
Swap the order of the dependencies 'buffered and 'mipmap'
2020-07-26 12:15:23 +09:00
Hajime Hoshi
968f077bab
ebiten: Enable to specify a shader to (*Image).DrawTriangles
2020-07-25 23:29:10 +09:00
Hajime Hoshi
2bdbcd724d
ebiten: Rename Draw*WithShader -> Draw*Shader
...
Updates #1168
2020-07-25 23:15:11 +09:00
Hajime Hoshi
434c58e8b3
ebiten: Use the term 'sub-image' instead of subimage
2020-07-23 19:57:43 +09:00
Hajime Hoshi
96921668ca
ebiten: Move the definition DrawImageOptions
2020-07-23 18:55:19 +09:00
Hajime Hoshi
0123c0676a
ebiten: Fix comments
2020-07-23 17:14:36 +09:00
Hajime Hoshi
388e2623e8
ebiten: Merge DrawImage and DrawImageWithShader
...
Updates #1168
2020-07-23 17:08:35 +09:00
Hajime Hoshi
ec9863dfef
ebiten: Bug fix: Wrong argument type at DrawImageWithShader
2020-07-21 06:23:39 +09:00
Hajime Hoshi
65783489a5
ebiten: Panic when a sub-image is specified at DrawRectangleWithImage and DrawTrianglesWithShader
...
Updates #1168
2020-07-20 23:04:19 +09:00
Hajime Hoshi
63f83ceeaa
ebiten: Add DrawImageWithShader
...
Fixes #1168
2020-07-20 22:55:21 +09:00
Hajime Hoshi
c567a7b507
ebiten: Add DrawRectangleWithShader
...
Updates #1168
2020-07-20 22:48:22 +09:00
Hajime Hoshi
76534fcf5f
ebiten: Fix comments: a triangle -> triangles
2020-07-20 20:54:12 +09:00
Hajime Hoshi
1123cf46f9
ebiten: DrawTriangles is no longer experimental
2020-07-20 20:38:24 +09:00
Hajime Hoshi
e34bb20dcd
ebiten: Add comments for DrawTrianglesWithShader(Options)
2020-07-20 20:37:10 +09:00
Hajime Hoshi
fe79bb27af
graphicscommand: Refactoring
2020-07-18 23:25:16 +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
0c13fff62a
ebiten: Add a restriction that all the source image sizes are same
...
Updates #1193
2020-07-17 02:17:31 +09:00
Hajime Hoshi
f927e09f56
mipmap: Unify DrawImage and DrawTriangles
...
Fixes #909
2020-07-16 02:31:17 +09:00
Hajime Hoshi
7f2be42410
mipmap: Use mipmap for DrawTriangles
...
Updates #909
2020-07-16 02:31:11 +09:00
Hajime Hoshi
7f70797a6d
ebiten: Rename DrawTriaglesWithShaderOptions.Textures to Images
2020-07-15 03:49:05 +09:00
Hajime Hoshi
d6bce5b9d2
ebiten: Add a comment
2020-07-12 03:17: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
02ef92f4cd
ebiten: Remove copying pixels from ReplacePixels and copyImage (renamed to imageToBytes)
...
This optimization utilizes the fact that copying happens in the
'shareable' package to add paddings.
Updates #1222
2020-07-03 03:01:48 +09:00
Hajime Hoshi
f7757ae025
ebiten: Add AddressUnsafe
...
Fixes #1219
2020-07-03 00:33: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
4c640d2500
buffered, restorable: Remove copying pixels
...
Instead, the callers (ebiten.NewImageFromImage and
(*ebiten.Image).ReplacePixels) have responsibility to copy the
pixels now. This change should reduce unnecessary copying pixels.
Updates #1222
2020-07-01 02:56:40 +09:00
Hajime Hoshi
6fd2a82614
ebiten: Fix comments
2020-06-30 22:01:28 +09:00
Hajime Hoshi
1fe2f47701
graphicscommand: Remove the source-region parts from the uniform variables
2020-06-30 00:44:05 +09:00
Hajime Hoshi
36515eb1f5
Revert "ebiten: Make ebiten.Image and buffered.Image 1:1"
...
This reverts commit 620981a09a
.
Fixes #1218
Updates #896
2020-06-28 01:01:39 +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
530723ec66
ebiten: Bug fix: Crash at examples/shader
2020-06-17 01:47:01 +09:00
Hajime Hoshi
620981a09a
ebiten: Make ebiten.Image and buffered.Image 1:1
...
This change creates a new buffered.Image even for a sub-image. This
can increase a memory usage a little, but decrease the GPU memory
usage since only the necessary pixels are allocated on a texture
atlas.
Fixes #896
Updates #1194
2020-06-14 11:15:38 +09:00
Hajime Hoshi
e180598ce0
ebiten: Rename a variable
2020-06-14 02:35:46 +09:00
Hajime Hoshi
137663c0df
ebiten: Refactoring
2020-06-13 21:21:37 +09:00
Hajime Hoshi
40906676e6
buffered: Add 'Pixels' and remove 'At'
...
This is a preparation to make shareable.Image and ebiten.Image 1:1
Now sub-images doesn't have its own shareable.Image.
Updates #896
Updates #1194
2020-06-13 21:01:50 +09:00
Hajime Hoshi
5db4a55a07
ebiten: Check the source images are not disposed at DrawTriangles and DrawTrianglesWithShader
2020-06-13 18:12:21 +09:00
Hajime Hoshi
3566dddfbf
ebiten: Refactoring
2020-06-13 17:33:29 +09:00
Hajime Hoshi
ba36d5a8e9
shader: Reland: Add a predefined uniform variable: __viewportSize
2020-06-07 00:14:09 +09:00
Hajime Hoshi
fe308f1971
Revert "shader: Add a predefined uniform variable: Internal_ViewportSize"
...
This reverts commit 6f411842f0
.
Reason: Test failures on internal/restorable
2020-06-05 04:36:09 +09:00
Hajime Hoshi
6f411842f0
shader: Add a predefined uniform variable: Internal_ViewportSize
2020-06-05 03:00:43 +09:00
Hajime Hoshi
d0aa18ddb9
Add shader public APIs experimentally
...
Updates #1168
2020-06-04 01:40:50 +09:00