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
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
e78f34aa26
internal/ui: add Image
...
This is a preparation for a refactoring. Image will be a proxy to
pass a graphics driver to the lower layer.
2022-03-20 01:39:05 +09:00
Hajime Hoshi
86698481f6
ebiten: add a comment
2022-03-05 01:58:44 +09:00
Hajime Hoshi
4610505fc5
ebiten: check the current error at Set and ReplacePixels
2022-03-05 01:52:55 +09:00
Hajime Hoshi
9c6b7aaca3
internal/ui: catch the error at At correctly
2022-03-05 01:44:59 +09:00
divVerent
f2209a0b51
internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. ( #1996 )
...
Note that this applies only to the builtin shaders - interface for Kage stays
unchanged for compatibility.
Minor compatibility delta: when interpolating alpha values, previous code has
created nonsense values, such as, when interpolating from
fully-transparent-black (0,0,0,0) to opaque-white (1,1,1,1), something like
half-transparent-grey (0.25,0.25,0.25,0.5) where half-transparent-white
(0.5,0.5,0.5,0.5) is used by the new code.
I assume this is a strict improvement, however this may warrant some testing.
Possible later improvement could be moving the premultiplication from fragment
shader to CPU. Did not do this as it makes the code rather inconsistent of Kage
vs built-in shader usage.
Updates #1772
2022-02-24 02:27:50 +09:00
Hajime Hoshi
b282b1805b
internal/ui: refactoring: add ui.SetError
...
This is a preparation to move uiContext to the package internal/ui.
2022-02-13 17:17:08 +09:00