Hajime Hoshi
f6b48cb57c
ebiten: reland: improve anti-alias test
2023-02-19 23:48:22 +09:00
Hajime Hoshi
da33f39259
Revert "ebiten: improve anti-alias test"
...
This reverts commit ebb687562f
.
Reason: test failures: https://github.com/hajimehoshi/ebiten/actions/runs/4216421788/jobs/7318236488x
2023-02-19 22:57:47 +09:00
Hajime Hoshi
ebb687562f
ebiten: improve anti-alias test
2023-02-19 21:59:41 +09:00
Hajime Hoshi
961c34efb5
internal/ui: use a small buffer image for anti-alias
...
Closes #2399
2023-02-19 17:35:43 +09:00
Hajime Hoshi
5df69f6dcc
ebiten: update tests
2023-02-19 16:19:54 +09:00
Pierre Curto
4de807cc44
all: fix typos ( #2558 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
f054a7634a
ebiten: deprecate (*Image).Size
...
Closes #2351
2023-01-20 01:26:37 +09:00
Hajime Hoshi
156c34a316
ebiten: separate a package for ColorM: colorm
...
Closes #2171
2022-11-08 23:50:04 +09:00
Hajime Hoshi
4c5f019db3
ebiten: add TestImageSetAndSubImage
...
Updates #2428
2022-11-02 12:35:21 +09:00
Hajime Hoshi
8d854cbb82
ebiten: rename ColorSclaeFormat -> ColorScaleMode
2022-11-01 13:09:52 +09:00
Hajime Hoshi
3eff8bcfa3
ebiten: add TestImageColorMScale
2022-10-31 14:35:26 +09:00
Hajime Hoshi
f04e391cb4
all: rename emptyImage -> whiteImage
2022-10-21 15:26:56 +09:00
Hajime Hoshi
9ec23ddeb4
ebiten: add DrawTrianglesOptions.AntiAlias
and DrawTrianglesShaderOptions.AntiAlias
...
Closes #2385
2022-10-21 02:07:41 +09:00
Hajime Hoshi
6e9e57b3bd
ebiten: skip slow tests on 32bit Windows
...
Updates #2332
Updates #2382
2022-10-18 01:02:44 +09:00
Hajime Hoshi
da5f5ea327
ebiten: add blend factors
...
Updates #2382
2022-10-18 00:21:13 +09:00
Hajime Hoshi
15ae074c43
ebiten: clean up tests
2022-10-17 11:45:31 +09:00
Hajime Hoshi
180e456a8e
ebiten: rename members of Blend
...
Updates #2382
2022-10-17 00:51:55 +09:00
Hajime Hoshi
e03825bf08
ebiten: add BlendOperationSubtract and BlendOperationReverseSubtract
...
Updates #2382
2022-10-17 00:30:24 +09:00
Hajime Hoshi
b79495761e
ebiten: add Blend and deprecate CompositeMode
...
Updates #2382
2022-10-16 22:47:00 +09:00
Hajime Hoshi
058b8d5635
ebiten: add ColorScaleFormat to DrawTrianglesOptions
...
Closes #2365
2022-10-02 14:14:11 +09:00
Hajime Hoshi
f6c4b29a3d
ebiten: add TestImageColorMAndScale
2022-10-02 01:02:29 +09:00
Hajime Hoshi
0217ed0544
ebiten: add WritePixels replacing ReplacePixels
...
Closes #2236
2022-08-08 03:50:27 +09:00
Hajime Hoshi
ea04e2a9de
ebiten: remove returning error from ReadPixels
...
- As ReadPixels should often be used at Draw, error handling would be hard.
- Make the API consistent with ReplacePixels.
Updates #1995
2022-08-08 02:48:25 +09:00
Hajime Hoshi
c382cb2b05
ebiten: use %v for consistency
2022-08-08 01:43:11 +09:00
Hajime Hoshi
81bd5b488c
ebiten: add (*Image).ReadPixels
...
Closes #1995
2022-08-08 01:42:26 +09:00
mattn
2bacecca24
fix typos ( #2227 )
2022-08-03 22:40:39 +09:00
Hajime Hoshi
b48c2aa103
internal/graphicsdriver/directx: bug fix: too many constant buffers could be allocated
...
Closes #2204
2022-07-15 03:40:24 +09:00
Hajime Hoshi
afed6a83c6
internal/graphics: change the naming convention: Num -> Count
...
This change also renames ebiten.MaxIndicesNum -> ebiten.MaxIndicesCount.
2022-07-13 02:02:44 +09:00
Hajime Hoshi
80c26e6dcc
ebiten: bug fix: Set after Set resulted in a wrong color
...
Updates #2154
Updates #2176
2022-07-05 01:13:45 +09:00
Hajime Hoshi
66bf40dc84
ebiten: bug fix: resolveSetVerticesCacheIfNeeded could resolve more vertices
...
Closes #2178
2022-07-05 00:28:53 +09:00
Hajime Hoshi
a70e069f0d
ebiten: add tests
...
Updates #2178
2022-07-04 23:58:00 +09:00
Hajime Hoshi
ddced3af9f
ebiten: bug fix: Fill and Clear doesn't work on an image whose upper-left is not (0, 0)
...
Closes #2159
2022-06-24 02:02:00 +09:00
Hajime Hoshi
acd70d6e34
ebiten: add NewImageFromImageWithOptions
...
Closes #2013
Closes #2017
Closes #2124
2022-06-15 14:19:16 +09:00
Hajime Hoshi
bac34a4474
ebiten: add NewImageWithOptions and NewImageOptions
...
This change adds NewImageWithOptions, that creates a new image with
the given options.
NewImageWithOptions takes image.Rectangle instead of a width and a
height, then a user can create an image with an arbitrary bounds.
A left-upper position can be a negative number.
NewImageWithOptions can create an unmanged image, that is no longer
on an automatic internal texture atlas. A user can have finer controls
over the image.
This change also adds tests for this function.
Updates #2013
Updates #2017
Updates #2124
2022-06-15 02:20:19 +09:00
Hajime Hoshi
9ddcf58728
ebiten: allow passing ebiten.Image to NewImageFromImage
...
Closes #1917
2022-04-02 06:10:22 +09:00
Hajime Hoshi
696bbc088f
internal/ui: rename variables
2022-03-20 16:51:23 +09:00
Hajime Hoshi
673556d03f
internal/ui: move the error handlings to the ui package
2022-03-20 16:26:26 +09:00
Hajime Hoshi
b59dd45239
internal/buffered: separate ReplacePixels with the large-area and small-area versions
...
For the large-area version, this doesn't require a graphics driver.
This is necessary to ensure that ReplacePixels never needs a graphics
driver.
2022-03-20 04:13:31 +09:00
Hajime Hoshi
d4d4b9c070
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: more efficient modulo
2022-03-04 03:47:55 +09:00
divVerent
62229e82a6
Pre-failing test for color interpolation during rendering. ( #2001 )
...
Before #1996 , this failed with:
image_test.go:1997: At(1, 0): got: {64 64 128 255}, want: {0 128 128 255}
The difference is:
- Before, colors were interpolated in straight-color space:
- Background: {0 0 255 255}
- Vertex A: {255 0 0 0}
- Vertex B: {0 255 0 255}
- Interpolated: {128 128 0 128}
- Premultiplied: {64 64 0 128}
- Onto Background: {64 64 128 255}
- After, colors are interpolated in premultiplied space:
- Background: {0 0 255 255}
- Vertex A: {255 0 0 0}
- Vertex A premultiplied: {0 0 0 0}
- Vertex B: {0 255 0 255}
- Vertex B premultiplied: {0 255 0 255}
- Interpolated: {0 128 0 128}
- Onto Background: {0 128 128 255}
This DIFFERS from the sample fragment shader, which returns the color as is
(Kage allows vertex color values to be used for arbitrary purposes and
interpolates independently):
- Shader sample:
- Background: {0 0 255 255}
- Vertex A: {255 0 0 0}
- Vertex B: {0 255 0 255}
- Interpolated: {128 128 0 128}
- Onto Background: {128 128 128 255}
as the blend function is `GL_ONE` / `GL_ONE_MINUS_SRC_ALPHA`. This shader behavior
is unchanged but has been documented by #1996 .
2022-02-24 03:12:33 +09:00
Hajime Hoshi
f182b185d9
internal/graphicscommand: bug fix: overflow when len(vertices) > len(indices)
...
Closes #1913
2021-12-26 06:15:12 +09:00
r3vit
57c45a13e4
Remove dot imports from tests - Remove dot imports ( #1837 )
...
Closes #1824
2021-10-02 19:58:48 +09:00
Hajime Hoshi
65c2fd4bcd
ebiten: Bug fix: Test compile error
2021-09-19 17:54:13 +09:00
Trevor Slocum
92d8562b1d
ebiten: Add (*Image).RGBA64At ( #1773 )
...
Closes #1769 .
2021-08-21 15:15:48 +09:00
Hajime Hoshi
a29748ab2b
ebiten: Refactoring: Move a test
2021-08-18 01:13:40 +09:00
Hajime Hoshi
415ceded79
ebiten: Bug fix: Colorm.Concat crashed when the argument is an initial value
...
Closes #1765
2021-08-18 01:09:07 +09:00
Hajime Hoshi
c06e8a5501
ebiten: Fix tests for a very restricted environment (Steam Runtime)
...
Updates #1733
2021-07-28 22:04:13 +09:00
Hajime Hoshi
79e067b0f8
ebiten: Add BenchmarkColorMScale
...
Updates #1658
2021-07-27 13:31:37 +09:00
Hajime Hoshi
674802d2f5
ebiten: Bug fix: Draw commands with EvenOdd should not be merged
...
Updates #1684
2021-07-05 18:08:55 +09:00
Hajime Hoshi
daa883d799
ebiten: Bug fix: Stencil buffers should not be cleared until all the vertices are rendered
...
Updates #1684
2021-07-05 17:41:06 +09:00