Hajime Hoshi
04bbe1ebb6
ebiten: Remove the returning value from (*Image).ReplacePixels
...
Updates #1380
2020-10-06 00:16:18 +09:00
Hajime Hoshi
525d16bec8
ebiten: Remove the returning value from (*Image).Dispose
...
Updates #1380
2020-10-06 00:13:23 +09:00
Hajime Hoshi
c2ee8e8d59
ebiten: Remove returning values from (*Image).Clear and Fill
...
Updates #1380
2020-10-06 00:08:55 +09:00
Hajime Hoshi
83ead375a4
ebiten: Update comments
2020-10-05 02:00:50 +09:00
Hajime Hoshi
fe97e7b0a5
ebiten: Remove the filter argument from NewImage and NewImageFromImage
...
Updates #503
2020-10-05 01:40:44 +09:00
Hajime Hoshi
0892ffa4b2
ebiten: Bug fix: Fix the test error at DrawTriangles
2020-10-05 00:30:10 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Hajime Hoshi
abbb929148
ebiten: Bug fix: Wrong uniform type was used
...
This change also includes PanicOnErrorAtImageAt, which panics when
an error is detected at (*Image).At. This function is only for testing.
Fixes #1349
2020-09-17 20:52:32 +09:00
Hajime Hoshi
442849e120
ebiten: Skip some tests on Wasm
...
They are flagile and sometimes causes crash on GitHub Actions workflow
tests.
2020-08-24 04:10:24 +09:00
Hajime Hoshi
dfc23ee557
ebiten: Skip tests in the short mode
2020-08-19 23:11:54 +09:00
Hajime Hoshi
80d04732c2
Revert "ebiten: Skip heavy tests even on Wasm"
...
This reverts commit 0ee70df466
.
Reason: This didn't affect the results
2020-08-19 23:00:45 +09:00
Hajime Hoshi
9c85b20817
ebiten: Bug fix: Test compilation error
2020-08-19 22:41:36 +09:00
Hajime Hoshi
0ee70df466
ebiten: Skip heavy tests even on Wasm
...
Updates #1313
2020-08-19 22:33:01 +09:00
Hajime Hoshi
213fbd283a
ebiten: Bug fix: Skip the tests correctly
2020-08-19 22:07:15 +09:00
Hajime Hoshi
bebad644ad
ebiten: Refactoring
2020-08-18 23:31:19 +09:00
Hajime Hoshi
a48c0d9f2c
ebiten: Skip some tests on Go1.12 Wasm
2020-08-17 04:15:33 +09:00
Hajime Hoshi
c032d61f93
ebiten: Rename a test case
...
Updates #1269
2020-07-28 14:04:05 +09:00
Hajime Hoshi
da98e67345
mipmap: Bug fix: Wrong level calculation when the indices are empty
...
Fixes #1269
2020-07-28 14:02:51 +09:00
Hajime Hoshi
d22026d366
ebiten: Better test values for CompositeModeMultiply
2020-07-18 21:57:02 +09:00
Hajime Hoshi
6ccb614b08
graphicsdriver/metal: Implement CompositeModeMultiply
...
Updates #410
2020-07-18 21:51:57 +09:00
Hajime Hoshi
f927e09f56
mipmap: Unify DrawImage and DrawTriangles
...
Fixes #909
2020-07-16 02:31:17 +09:00
Hajime Hoshi
a4e669cc39
ebiten: Avoid using SubImage for stretching test
2020-07-15 23:49:26 +09:00
Hajime Hoshi
2a9fd5ef13
mipmap: Avoid using the vertex backend when GopherJS is not used
...
The backend logic is especially for GopherJS. As the backend logic
tends to consume a lot of memory, let's avoid this when possible.
Updates #797
2020-07-14 12:16:37 +09:00
Hajime Hoshi
cec32d4f72
ebiten: Add tests to modify pixels after ReplacePixels
...
Updates #1222
2020-07-03 03:25:47 +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
006b518929
ebiten: Skip test failing on macOS
2020-06-27 20:24:32 +09:00
Hajime Hoshi
5c4740c294
ebiten: Improve TestImageColorMCopy to test copying actually works
2020-06-25 22:49:37 +09:00
Hajime Hoshi
198621404f
buffered: Bug fix: Pixel data was not invalidated after DrawImage/Triangles
2020-06-25 13:11:19 +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
484473b6d9
graphicscommand: Span to 1/3 pixels
...
The center of pixels is problematic as the behavior depends on GPU.
In order to avoid this, align the vertices with about 1/3 pixels.
Updates #929
Fixes #1171
2020-06-16 03:56:53 +09:00
Hajime Hoshi
0b94e2e036
ebiten: Updates the tests
...
The tests are still disabled as they don't pass yet.
Updates #1171
2020-06-15 02:51:21 +09:00
Hajime Hoshi
6d25f7eaeb
ebiten: Disable TestImageFloatTranslate
...
It looks like the behavior depends on GPU.
Updates #1171
2020-06-14 18:22:28 +09:00
Hajime Hoshi
d74f7d3a77
shareable: Add gaps between images
...
After this change, each image on the texture atlases has a
transparent border around it.
This change removes the hack to round texels not to violate the
source regions.
Fixes #1194
Updates #1171
2020-06-14 18:05:41 +09:00
Hajime Hoshi
96fa0565e4
buffered: Remove mutex and use sync/atomic for performance
...
This change also enables to remove the optimization at
(*buffered.Image).ReplacePixels.
// This commit w/ the optimization
BenchmarkImageDrawOver-8 60225 19241 ns/op
// This commit w/o the optimization
BenchmarkImageDrawOver-8 66567 17700 ns/op
// The previous w/ the optimization
BenchmarkImageDrawOver-8 62355 19580 ns/op
// The previous w/o the optimization
BenchmarkImageDrawOver-8 54460 22768 ns/op
Updates #1137
2020-06-14 01:16:23 +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
81159b8538
ebiten: Skip some slow tests on GopherJS
...
Fixes #1138
2020-04-19 02:09:02 +09:00
Hajime Hoshi
1d701577d6
buffered: Use the pending pixels when possible at At
...
(*Image).At can be unnecessarily slow since this tries to get
pixels from GPU. This change reduces the chance to read GPU by
using its pending pixels when possible.
Fixes #1137
2020-04-17 21:34:49 +09:00
Hajime Hoshi
19333c51e4
ebiten: Use internal/testing for tests
2020-04-01 18:35:12 +09:00
Hajime Hoshi
c36d4678a3
mipmap: Bug fix: DrawTriangles with a scale-only color matrix should be optimized
...
Fixes #1101
2020-03-17 02:48:29 +09:00
Hajime Hoshi
875a529708
graphics: Allow ReplacePixels on a sub-image
...
Fixes #980
2020-02-16 22:18:07 +09:00
Hajime Hoshi
aa6fc67736
Revert "graphics: Avoid all copying pixels"
...
This reverts commit c60a32a479
.
Reason: This breaks backward comptibility and it was not obvious how to fix examples.
2019-11-16 02:04:46 +09:00
Hajime Hoshi
c60a32a479
graphics: Avoid all copying pixels
...
This is a breaking change: ReplacePixels now takes the ownership
of the given pixels.
Fixes #983
2019-11-16 01:51:36 +09:00
Hajime Hoshi
1b011e3864
graphics: Bug fix: unexpected panic at Set with an out-of-range position
2019-10-12 02:28:55 +09:00
Hajime Hoshi
2621681a2a
graphics: Add TestImageDrawTrianglesAndMutateArgs
2019-09-18 23:52:11 +09:00
Hajime Hoshi
e434869dd7
graphics: More precise enlarging
...
Before this change, enlarging a 1px image with x4095 scale was not
accurate and edges were missing. This change fixes this issue.
Updates #611
2019-07-31 22:02:39 +09:00
Hajime Hoshi
b210339786
graphics: Use 'negative' mipmap when enlarging a too small image
...
This is a hack to render edges correctly.
This works only when the filter is nearest.
Fixes #611
2019-07-30 23:03:55 +09:00
Hajime Hoshi
d25d184ed7
graphics: Bug fix: wrong for loops in TestImageMipmap*
2019-07-30 19:19:30 +09:00
Hajime Hoshi
db1030a6d4
graphics: Add TestImageMipmapNegativeDet
2019-07-30 14:11:04 +09:00
Hajime Hoshi
0793d35c40
graphicscommand: Improve debug messages
...
Fixes #900
2019-07-19 23:35:13 +09:00
Hajime Hoshi
66b00c6f87
graphics: Remove println
2019-07-15 03:12:53 +09:00
Hajime Hoshi
a7e7e007ca
restorable: Bug fix: PutQuadVertices should take the source image
...
Fixes #898
2019-07-15 03:10:03 +09:00
Hajime Hoshi
4ab97ad250
graphics: Add TestImageZeroSizedMipmap
2019-04-25 10:51:59 +09:00
Hajime Hoshi
3cb9d18fc4
graphics: Bug fix: Too small mipmap
...
Bug: #839
2019-04-07 05:29:46 +09:00
Hajime Hoshi
5ed6565d1d
graphics: Bug fix: SubImage's SubImage's bounds was wrong
2019-02-21 23:44:57 +09:00
Hajime Hoshi
8934f8296f
graphics: Bug fix: Don't touch pixelsToSet when disposing a subimage
...
This change also removes finalizer for subimages since this is not
necessary.
Fixes #823
2019-02-21 23:07:11 +09:00
Hajime Hoshi
cbb0a1da95
graphicsdriver: Refactoring
...
This improved FPS on mobiles a little bit. Maybe now texture2D is
called only when necessary, but not sure.
2019-02-17 17:37:11 +09:00
Hajime Hoshi
1c3113e763
graphics: Add TestImageDrawTrianglesWithSubImage
2019-02-16 22:37:44 +09:00
Hajime Hoshi
fd250c8d8c
graphics: Rename NextPowerOf2Int -> InternalImageSize and add image size adjustment
...
There is a minimum internal image size on some system like old iOS
devices. This change adds adjustment of the size.
Issue: #810
2019-02-14 23:06:01 +09:00
Hajime Hoshi
5ccd240a35
graphics: Add TestImageAlphaOnBlack
2019-01-27 21:45:18 +09:00
Hajime Hoshi
128e99b6af
graphics: Implement (*Image).Set
2019-01-14 02:25:36 +09:00
Hajime Hoshi
6783aaae56
graphics: Better test for a crash
2019-01-11 00:31:32 +09:00
Hajime Hoshi
f1582c2d73
graphics: Add Address representing a sampler address mode
...
Fixes #761
2018-12-24 17:29:31 +09:00
Hajime Hoshi
189b8a17e9
graphics: Use source-border check even at DrawTriangles
...
DrawTriangles can now take a sub-image.
2018-12-23 03:24:39 +09:00
Hajime Hoshi
cae5f6bf4b
graphics: Add a test for #669 and #759
2018-12-21 04:08:44 +09:00
Hajime Hoshi
968e137cc5
graphics: Add TestImageLinearGradation
2018-12-03 01:53:12 +01:00
Hajime Hoshi
e537cb2c27
graphics: Bug fix: render source might not be initialized
2018-12-01 21:36:51 +01:00
Hajime Hoshi
962a11468b
restorable: Fix clearing logic
...
Fixes #740
2018-11-28 23:00:24 +01:00
Hajime Hoshi
1a54ff34e6
graphics: Forbid nil at ReplacePixels explicitly
2018-11-28 22:26:34 +01:00
Hajime Hoshi
14f5a03a79
Merge math and graphics packages
2018-11-17 20:23:12 +09:00
Hajime Hoshi
959c6511dd
graphics: Fix test names
2018-11-09 01:58:41 +09:00
Hajime Hoshi
03c800cb9b
graphics: Bug fix: wrong region on a subimage
2018-11-09 01:40:02 +09:00
Hajime Hoshi
9f0d14dd05
graphics: Add tests for #732
2018-11-09 00:48:21 +09:00
Hajime Hoshi
f54bdfa159
Reland: graphics: Bug fix: a sub image's Size was wrong
...
Size() usages are also fixed.
Fixes #732
2018-11-08 12:58:14 +09:00
Hajime Hoshi
27331024af
Revert "graphics: Bug fix: a sub image's Size was wrong"
...
This reverts commit 76ac850f6b
.
Reason: This breaks many examples
2018-11-08 12:19:38 +09:00
Hajime Hoshi
76ac850f6b
graphics: Bug fix: a sub image's Size was wrong
...
Fixes #732
2018-11-08 04:22:19 +09:00
Hajime Hoshi
710f56531f
graphics: Experimental: (*image.Image).SubImage
...
Fixes #722
2018-10-28 02:19:14 +09:00
Hajime Hoshi
d3bd858aba
graphics: Bug fix: Mipmap was not invalidated at DrawTriangle
...
Fixes #725
2018-10-26 02:08:18 +09:00
Hajime Hoshi
8b82667df1
graphics: Bug fix: Violating edge pixels with linear filter
...
Fixes #724
2018-10-26 00:48:51 +09:00
Hajime Hoshi
b9328bf14d
graphics: Add tests for #710
2018-10-11 02:44:51 +09:00
Hajime Hoshi
1a703ae34b
graphics: Extend the range to 4000 in TestImageStretch ( #611 )
2018-09-28 01:13:25 +09:00
Hajime Hoshi
bac0431c9f
graphics: Simplify mipmap calculation
2018-08-03 00:02:49 +09:00
Hajime Hoshi
d17a6dde9b
graphics: Remove unnecessary converts
2018-08-02 01:10:06 +09:00
Hajime Hoshi
972eea89db
affine: Fix some functions in GeoM test
...
Fixes #657
2018-08-02 01:06:54 +09:00
Hajime Hoshi
351c048e2f
graphics: Add TestSprites
2018-05-29 02:20:50 +09:00
Hajime Hoshi
b9cd7afff5
graphics: Add TestImageStretch ( #611 )
2018-05-13 23:47:59 +09:00
Hajime Hoshi
d7d892f2d6
graphics: Allow a little margin for edge pixels
2018-05-13 23:00:06 +09:00
Hajime Hoshi
63c33b24df
graphics: Refactoring
2018-04-16 01:51:32 +09:00
Hajime Hoshi
9902497e3d
test: Use flock to make tests exclusive
...
Fixes #575
2018-04-07 00:59:52 +09:00
Hajime Hoshi
f92a2748a4
graphics: Fix TestImageCompositeModeLighter
2018-03-21 03:42:58 +09:00
Hajime Hoshi
dbdae667f8
graphics: Temporary hack to pass tests on TravisCI
2018-03-21 03:10:15 +09:00
Hajime Hoshi
0a5deab0a2
graphics: Reland Bug fix: More strict calculation for the nearest filter ( #558 )
...
Better version of bae8f9d874
2018-03-21 02:40:26 +09:00
Hajime Hoshi
b157f2d6d0
Revert "graphics: Bug fix: More strict calculation for the nearest filter ( #558 )"
...
This reverts commit bae8f9d874
.
Reason: TravisCI failed
2018-03-20 04:16:37 +09:00
Hajime Hoshi
bae8f9d874
graphics: Bug fix: More strict calculation for the nearest filter ( #558 )
2018-03-20 04:05:03 +09:00
Hajime Hoshi
1b35bbec9a
test: Simplify code to get a test image
2018-03-15 03:48:32 +09:00
Hajime Hoshi
efea65ee58
graphics: Bug fix: wrong texels were used ( #546 )
2018-03-11 04:11:49 +09:00
Hajime Hoshi
dbe5c9c0ab
graphics: Add comments
2018-03-11 00:40:37 +09:00
Hajime Hoshi
48408cba11
shareable: Bug fix: Protect critical sections
2018-03-11 00:38:49 +09:00
Hajime Hoshi
c5872c6640
graphics: Misspelling
2018-03-03 20:42:16 +09:00
Hajime Hoshi
caf4e9504f
graphics: ReplacePixels should work on shared textures
2018-03-03 20:35:44 +09:00
Hajime Hoshi
d5bca2d499
graphics: Bug fix: (*Image).At must return color.RGBA type value
2018-03-03 18:51:52 +09:00