Commit Graph

528 Commits

Author SHA1 Message Date
Hajime Hoshi
ba8ea50d57 ebiten: Follow image.RGBA64Image's aim
image.RGBA64Image aims to get 64bit color values efficiently to avoid
allocating an original color value and converting it to colorRGBA64.
Thus, we should avoid allocating color.RGBA for RGBA64At.

Updates #1769
2021-08-21 15:22:38 +09:00
Trevor Slocum
92d8562b1d
ebiten: Add (*Image).RGBA64At (#1773)
Closes #1769.
2021-08-21 15:15:48 +09:00
Hajime Hoshi
21aa96f9f5 internal/affine: Refactoring: Make ColorM interface 2021-07-27 12:10:22 +09:00
Hajime Hoshi
b466a0cbd7 ebiten: Add EvenOdd to DrawTrianglesOptions and DrawShaderTrianglesOptions
Updates #844
Closes #1684
2021-07-05 03:35:55 +09:00
Hajime Hoshi
66be53804d ebiten: Bug fix: Fill on a sub-image didn't work correctly
Closes #1691
2021-07-02 22:42:28 +09:00
Hajime Hoshi
d94a89f37b ebiten: Update the comments of (*Image).SubImage
Closes #1643
2021-05-13 21:23:17 +09:00
Hajime Hoshi
5c8d8ab2eb ebiten: Make NewImage/NewImageFromImage panic when RunGame finishes
Closes #1149
2021-04-03 18:44:43 +09:00
Hajime Hoshi
41f060b1d2 ebiten: Use the common vertices backend at DrawTriangles 2021-03-20 20:25:42 +09:00
Hajime Hoshi
26b9fa20c1 internal/graphics: Bug fix: Race condition at QuadVertices
QuadVertices or verticesBackend.slice reused its backend slice.
This caused a race condition. QuadVertices can be accessed from
multiple goroutines, and resetting the head and copying the data
at internal/graphicscommand might not be synced.

This change fixes this issue by basically reverting
9cb631e30f.

Closes #1546
2021-03-20 16:32:13 +09:00
Hajime Hoshi
b23dfff2ff ebiten: Refactoring 2021-01-31 22:45:47 +09:00
Hajime Hoshi
5a62587df5 ebiten: Bug fix: The vertex backend was not flushed when the screen is shrunk
The last parameter of QuadVertices represents whether we can flush
the backend vertices (on Wasm). The problem was that this was
unexpectedly false even though the image is the screen, when the
screen rendering is done with FilterLinear instead of FilterScreen.

Closes #1479
2021-01-31 22:37:18 +09:00
Hajime Hoshi
569964d7e4 Cache SubImage for the empty images 2021-01-25 01:31:18 +09:00
Hajime Hoshi
170ddd70a5 ebiten: Add comments 2020-11-08 04:12:48 +09:00
Hajime Hoshi
c7330883ef restorable: Remove Fill and make (*ebiten.Image).Fill available for sub-images
Now a scissor (a clipping region) can be specified, we don't have to
worry about the rendering results out of the specified region.
Replace the implmenetation of the Fill with just a DrawTriangles with
an empty white image.

As a side effect, SubImage is avilable for Fill.

Fixes #1416
2020-11-08 02:50:06 +09:00
Hajime Hoshi
ed028110cf ebiten: Allow rendering on a sub-image by scissor test
Fixes #1255
2020-11-08 00:58:44 +09:00
Hajime Hoshi
9464dc2f58 ebiten: Refactoring: canSkipMipmap 2020-10-31 02:59:48 +09:00
Hajime Hoshi
2259378430 ebiten: Panic immediately when zero size is given to NewImage(FromImage) 2020-10-23 00:42:57 +09:00
Hajime Hoshi
1b816eb249 ebiten: Remove the error returning value from NewImageFromImage
Updates #1380
2020-10-06 01:03:33 +09:00
Hajime Hoshi
c6053bcf14 ebiten: Remove the error returning value from NewImage
Updates #1380
2020-10-06 00:48:56 +09:00
Hajime Hoshi
54da0d9763 ebiten: Remove the returning value from (*Image).DrawImage
Updates #1380
2020-10-06 00:21:17 +09:00
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
448a863eb1 ebiten: Remove FilterDefault
Fixes #503
2020-10-05 01:48:47 +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
2dadc6a7a9 ebiten: Make AddressUnsafe default
Fixes #1228
2020-10-04 23:49:35 +09:00
Hajime Hoshi
0c85100898 ebiten: Remove some deprecated members from DrawImageOptions
Updates #1127
2020-10-04 04:51:56 +09:00
Hajime Hoshi
1d4ff9a906 ebiten: Remove the deprecated functions and constants
Updates #1127
2020-10-04 04:47:24 +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
9f49e68fea ebiten: Add links to documents/shader.html 2020-09-23 16:45:00 +09:00
Hajime Hoshi
76b701a03d ebiten: Better comments about uniform variables 2020-09-23 16:24:41 +09:00
Hajime Hoshi
b2f6cc5791 ebiten: Revive DrawTrianglesShader
Updates #1325
2020-09-20 18:55:24 +09:00
Hajime Hoshi
938d78122f ebiten: Remove shaders from DrawImage
Updates #1325
2020-09-20 18:14:01 +09:00
Hajime Hoshi
0db7dc22b2 ebiten: Allow SubImage at DrawTriangles 2020-09-20 05:10:08 +09:00
Hajime Hoshi
41564533f9 ebiten: Allow SubImage at DrawRectShader 2020-09-20 04:48:10 +09:00
Hajime Hoshi
f287fada13 ebiten: Update comments 2020-09-20 01:05:16 +09:00
Hajime Hoshi
85a6ef2ea6 ebiten: Add comments 2020-09-19 21:07:23 +09:00
Hajime Hoshi
1d51be7f68 ebiten: Merge DrawTriangles and DrawTrianglesShader
Updates #1325
2020-09-19 19:18:02 +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
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