Commit Graph

591 Commits

Author SHA1 Message Date
Hajime Hoshi
fb6dffaf12 ebiten: remove a wrong comment 2022-10-02 00:21:35 +09:00
Hajime Hoshi
520c47f0e8 Revert "ebiten: use Kage shaders instead of built-in shaders for a color matrix"
This reverts commit 7fc79c50c3.

Reason: a color scale might be used with ColorM (DrawTriangles)

Updates #2364
2022-10-02 00:19:37 +09:00
Hajime Hoshi
7fc79c50c3 ebiten: use Kage shaders instead of built-in shaders for a color matrix
Closes #2364
2022-10-02 00:08:14 +09:00
Hajime Hoshi
9d06875243 ebiten: remove 'experimental' from the shader APIs
Now the Kage shaders are used for the screen and will be used for ColorM.

Updatse #2046
Updates #2171
2022-09-30 22:45:26 +09:00
Hajime Hoshi
1f70307582 ebiten: add DrawRectShaderOptions.ColorScale
This change also introduces a new struct ColorScale.

Closes #2361
2022-09-30 21:44:48 +09:00
Hajime Hoshi
d00bd1cb16 internal/ui: refactoring: move setVerticesCache to ui.Image
Updates #2362
2022-09-29 01:21:46 +09:00
Alexander F. Rødseth
0d2c8b59fc
ebiten: reorder fields as recommended by the fieldalignment utility (#2359)
This reduces the struct size from 64 to 32 bytes.
2022-09-28 18:11:08 +09:00
Hajime Hoshi
284c9fcc7f update URLs in comments 2022-09-23 19:09:25 +09:00
Hajime Hoshi
d9704f2ba9 ebiten: typo 2022-08-21 23:01:25 +09:00
Hajime Hoshi
ef7966b625 ebiten: typo 2022-08-21 21:58:10 +09:00
Hajime Hoshi
f923250a65 ebiten: typo 2022-08-21 20:02:53 +09:00
Hajime Hoshi
652cd169b2 ebiten: revert the changes for DrawRectShader
This reverts these commits:
- 9bd46cb2b5.
- f8c4634017.

This causes test failures on the Steam bot. See #2246.

Updates #2166
Closes #2246
2022-08-17 00:56:33 +09:00
Hajime Hoshi
f8c4634017 ebiten: always specify the source region at DrawRectShader
imageSrcRegionOnTexture should work even without any images.

Updates #2166
2022-08-16 22:43:33 +09:00
Hajime Hoshi
0217ed0544 ebiten: add WritePixels replacing ReplacePixels
Closes #2236
2022-08-08 03:50:27 +09:00
Hajime Hoshi
24424d036c ebiten: update comments 2022-08-08 03:42:14 +09:00
Hajime Hoshi
34aa52459e internal/ui: rename ReplacePixels -> WritePixels
Updates #2236
2022-08-08 03:32:26 +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
39790c257b ebiten: update comments 2022-08-08 01:59:09 +09:00
Hajime Hoshi
81bd5b488c ebiten: add (*Image).ReadPixels
Closes #1995
2022-08-08 01:42:26 +09:00
Hajime Hoshi
6d87be7169 internal/ui, internal/mipmap: refactoring: replace At with ReadPixels
Updates #1995
2022-08-06 00:32:42 +09:00
mattn
3cd0daac67
go generate ./... with Go 1.19 (#2228) 2022-08-03 20:48:02 +09:00
Hajime Hoshi
1daf3bd8ff ebiten: update comments 2022-07-13 02:26:30 +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
5411e8136b ebiten: bug fix: use DrawTriangles as an implementation of Set
Closes #2154
2022-07-04 12:02:47 +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
aee2e67242 ebiten: refactoring 2022-06-15 11:54:49 +09:00
Hajime Hoshi
922784f574 ebiten: English 2022-06-15 02:34:31 +09:00
Hajime Hoshi
654c4c286c ebiten: English 2022-06-15 02:27:24 +09:00
Hajime Hoshi
0f27999909 ebiten: bug fix: wrong comments
Updates #2013
Updates #2017
2022-06-15 02:24:03 +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
81f91658ff internal/atlas: refactoring: remove SetVolatile and SetIsolate
Pass an image type to NewImage instead.
2022-06-08 01:08:00 +09:00
Hajime Hoshi
c379873a1f rename Ebiten -> Ebitengine 2022-05-25 22:48:19 +09:00
Hajime Hoshi
4a90841a59 ebiten: update a comment 2022-04-28 11:14:36 +09:00
Hajime Hoshi
b1bcbbeeea ebiten: add comments at DrawTriangles 2022-04-26 23:23:31 +09:00
Hajime Hoshi
6710808cd1 ebiten: compile shaders at NewShader
Closes #2035
2022-04-04 02:52:57 +09:00
Hajime Hoshi
f75a70dc40 internal/graphicscommand: treat []float32 instead of interface{} for uniform variables 2022-04-03 03:51:52 +09:00
Hajime Hoshi
9ddcf58728 ebiten: allow passing ebiten.Image to NewImageFromImage
Closes #1917
2022-04-02 06:10:22 +09:00
Hajime Hoshi
0c6362c93a internal/atlas: move the color scaling from internal/atlas to ebiten
Updates #1820
2022-04-02 02:47:56 +09:00
Hajime Hoshi
5c7917897c internal/ui: refactoring: move the logic in gameForUI to context 2022-04-01 22:33:31 +09:00
Hajime Hoshi
3ae4e873e6 ebiten: refactoring: remove an unused member Image.screen 2022-04-01 18:17:07 +09:00
Hajime Hoshi
b5bb576a58 internal/ui: refactoring: unexport ConvertUniforms 2022-03-21 17:05:50 +09:00
Hajime Hoshi
c316aaae72 internal/buffered: simplify the API 2022-03-21 15:19:06 +09:00
Hajime Hoshi
14c327c89b internal/atlas: replace Pixels with At to reduce unnecessary slice allocations 2022-03-20 18:39:17 +09:00
Hajime Hoshi
54b4e87506 internal/restorable: bug fix: ReplacePixels on a sub-image might panic on Android
If regions by ReplacePixel are overlapped, this can panics. This can
happen only on Android, where a context lost can happen.

Thus, a sub-image cannot call a direct ReplacePixels. internal/buffer
has to care this.
2022-03-20 18:01:37 +09:00
Hajime Hoshi
c3e855ab02 internal/buffered: refactoring 2022-03-20 16:44:11 +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
cc574ad67e internal/atlas: rename functions: Area -> Region 2022-03-20 04:20:23 +09:00