Commit Graph

660 Commits

Author SHA1 Message Date
Hajime Hoshi
4ca3fa5e57
internal/graphicsdriver: replace Region with image.Rectangle (#2791)
Closes #2790
2023-09-28 14:29:55 +09:00
Hajime Hoshi
b95228a8a6 all: rename arguments in Kage
Closes #2767
2023-09-24 16:46:36 +09:00
Hajime Hoshi
361c89073a ebiten: bug fix: wrong conversion of 16bit to 8bit color values
Closes #2749
2023-09-06 21:24:01 +09:00
Hajime Hoshi
db34930ae8 internal/graphics: add built-in Kage functions
This change adds these Kage functions:

* imageDstOrigin
* imageDstSrc
* imageSrcNOrigin
* imageSrcNSrc

and deprecates these functions:

* imageDstRegionOnTexture
* imageSrcRegionOnTexture

Closes #1870
2023-08-28 15:06:45 +09:00
Hajime Hoshi
101372a8c3 ebiten: allow different-size source images at DrawTrianglesShader (pixel mode)
Updates #1870
2023-08-28 01:39:43 +09:00
Hajime Hoshi
e1b77fefae ebiten: update comments
Updates #1870
2023-08-27 23:57:07 +09:00
Hajime Hoshi
a4f8c1c1dc ebiten: remove old comments 2023-08-27 22:02:39 +09:00
Hajime Hoshi
ead3f32df0 ebiten: refactoring 2023-08-27 21:38:54 +09:00
Hajime Hoshi
c4b8378b71 ebiten: fix typo 2023-08-27 21:21:14 +09:00
Hajime Hoshi
534370f7b1 internal/graphics: enable to specify regions for each source image
This is a preparation to specify different sizes of source images.

Updates #1870
2023-08-27 21:15:01 +09:00
Hajime Hoshi
4b9875295c ebiten: refactoring: reduce local variables 2023-08-27 18:14:50 +09:00
Hajime Hoshi
3678b20c5d ebiten: bug fix: DrawImage/DrawRectShader unexpectedly modified the given options
Closes #2733
2023-08-27 01:40:37 +09:00
Hajime Hoshi
a9b2f5f9ca Revert "ebiten: panic if a non-existent uniform variable name is given"
This reverts commit 1b8580fab7.

Reason: some existing applications don't work with this fix.

Updates #2710
2023-08-24 14:15:19 +09:00
Hajime Hoshi
63df6168d9 internal/shader: use plural forms for Kage compiler directives
This change renames

```
//kage:unit texel
//kage:unit pixel
```

to

```
//kage:unit texels
//kage:unit pixels
```

.

Closes #2717
2023-08-01 11:41:38 +09:00
Hajime Hoshi
a0ffd8dd25 ebiten: enable texCoord at DrawRectShader even without a source image
imageSrcRegionOnTexture will return (0, 0) to (width, height) for
the pixel-unit mode.

Closes #2166
2023-08-01 04:14:36 +09:00
Hajime Hoshi
1b8580fab7 ebiten: panic if a non-existent uniform variable name is given
Closes #2710
2023-07-29 20:24:42 +09:00
Hajime Hoshi
0b1c7404d5 ebiten: use zero values for an unspecified uniform variable
Closes #2709
2023-07-29 19:11:49 +09:00
Hajime Hoshi
d0e4023d88 internal/ui: add a length check for uniform variables 2023-07-29 18:59:36 +09:00
Hajime Hoshi
d2c991b774 all: refactoring: use image.Rectangle 2023-04-28 01:03:38 +09:00
Hajime Hoshi
3e0ff1abe1 ebiten: improve panic messages 2023-03-23 21:26:58 +09:00
Hajime Hoshi
c7ca9cb321 ebiten: omit the exceeding part of vertices at Draw* 2023-03-23 21:23:33 +09:00
Hajime Hoshi
e1386e2032 ebiten: add restrictions for values in indices at DrawTriangles*
Closes #2611
2023-03-23 21:09:37 +09:00
Hajime Hoshi
ce9274a29d ebiten: remove the restriction for len(indices) at Draw*
Closes #2460
2023-03-23 20:01:15 +09:00
Hajime Hoshi
2a5a0a8895 ebiten: update documents 2023-03-23 19:56:25 +09:00
Hajime Hoshi
8b267265ed ebiten: update comments
Updates #2171
2023-03-20 11:04:58 +09:00
Hajime Hoshi
39aaf7fe37 ebiten: update comments
Updates #2601
2023-03-14 13:07:40 +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
bb68ebfcad ebiten: add RunGameWithOptions to specify graphics library
This also adds mobile.SetGameWithOptions.

Updates #2378
2022-12-09 21:27:31 +09:00
Hajime Hoshi
015ce2b262 internal/ui: refactoring: reduce APIs 2022-12-09 00:05:22 +09:00
Hajime Hoshi
79ed63f281 ebiten: fix comments 2022-12-06 01:57:48 +09:00
Hajime Hoshi
89c64f83e3 ebiten: performance improvement by reducing allocations of []float32 2022-12-03 21:53:56 +09:00
Hajime Hoshi
0a6813c17f internal/graphics: use flatten []float32 slice instead of [][]float32
Closes #2479
2022-12-03 20:23:58 +09:00
Hajime Hoshi
61f1d8b69f internal/graphics: remove the common vertices backend
It was actually impossible to use the common vertices backend in a
thread-safe manner, and actually this caused race conditions.

This changes fixes the issue by giving up a central backend, and
letting images have their own vertices buffer.

Closes #2473
2022-12-03 01:02:23 +09:00
Hajime Hoshi
d407607168 ebiten: update comments
Updates #2471
2022-11-27 14:38:57 +09:00
Hajime Hoshi
9aedafbb1a ebiten: update the comment about optimization 2022-11-27 14:10:30 +09:00
Hajime Hoshi
bba196d1ec ebiten: allow array types for uniform variables
Closes #2448
2022-11-18 14:08:31 +09:00
Hajime Hoshi
1ecac8d834 all: allow integer uniform variables for Kage shaders
Closes #2305
Updates #2448
2022-11-13 01:49:24 +09:00
Hajime Hoshi
419bb4c1e9 all: use uint32 instead of float32 for uniform values
This is a preparation for other types of uniform values.

Updates #2305
2022-11-12 20:28:07 +09:00
Hajime Hoshi
156c34a316 ebiten: separate a package for ColorM: colorm
Closes #2171
2022-11-08 23:50:04 +09:00
Hajime Hoshi
d11c46ef1f ebiten: update comment 2022-11-04 20:53:52 +09:00
Hajime Hoshi
d73e8f785d internal/graphicsdriver: render various destination regions as one command
Closes #2232
2022-11-04 20:49:44 +09:00
Hajime Hoshi
384dee7160 internal/graphicscommand: remove unused uniform variables
This improves possibility of merging graphics commands by reducing
uniform variables.

Updates #2232
2022-11-03 22:45:17 +09:00
Artem Yadelskyi
10415d417a
all: replace interface{} with any (#2430)
Closes #2429
2022-11-03 15:33:09 +09:00
Hajime Hoshi
b3a93c66b0 ebiten: remove a comment 2022-11-02 13:05:11 +09:00
Hajime Hoshi
84289a06ba ebiten: update comments about Set
Set no longer loads pixels from GPU.
2022-11-02 02:09:43 +09:00
Hajime Hoshi
083835af9a ebiten: fix comments 2022-11-01 13:28:54 +09:00
Hajime Hoshi
8d854cbb82 ebiten: rename ColorSclaeFormat -> ColorScaleMode 2022-11-01 13:09:52 +09:00
Hajime Hoshi
e237a70135 ebiten: refactoring: use struct{} to save memory 2022-10-31 23:58:41 +09:00
Hajime Hoshi
8919bc809a ebiten: refactoring: compile-time check 2022-10-31 23:36:07 +09:00