Commit Graph

5397 Commits

Author SHA1 Message Date
Hajime Hoshi
2acb604260 examples/contextlost: Bug fix: Failed to compile with Go 1.12 2020-08-16 23:05:33 +09:00
Hajime Hoshi
5e1f263d6d restorable: Do not record pixels if restoring is not requried
Fixes #1022
2020-08-16 20:07:17 +09:00
Hajime Hoshi
67706ce6ed Update go-mp3 version
Go 1.12 failed to build go-mp3 v0.3.0.
2020-08-16 19:46:38 +09:00
Hajime Hoshi
a9b94a183b shader: Implement swapping variables
Fixes #1248
2020-08-16 18:40:45 +09:00
Hajime Hoshi
05a1c2faa1 examples/shader: Always use 1 for an alpha
This is necessary to keep the color pre-multiplied
2020-08-16 02:34:21 +09:00
Hajime Hoshi
06ed4f5444 shader: Implement len function
Fixes #1279
2020-08-16 02:07:39 +09:00
Hajime Hoshi
a1d278b097 examples/shader: Add water.go
Updates #1284
2020-08-15 21:36:13 +09:00
Hajime Hoshi
a67fd4a2b3 mipmap: Bug fix: Adopt 32 for tooBigScale
I found the case that 64 was not enough on Huawei ALE-L02.
2020-08-15 15:39:27 +09:00
Hajime Hoshi
d90edf5826 examples/windowsize: Add an option to skip clearing the screen
Updates #1132
2020-08-15 03:14:38 +09:00
Hajime Hoshi
71e65fa1b7 cmd/ebitenmobile: Use an explict way to detect context lost on Android
Fixes #1176
2020-08-15 01:39:08 +09:00
Hajime Hoshi
d48770cb1c png: Update for Go 1.15 2020-08-14 03:25:02 +09:00
Hajime Hoshi
c43e8e24d5 Update Go to 1.15 in .travis.yml 2020-08-14 03:00:12 +09:00
Hajime Hoshi
7307a148f5 glfw: Use Dockerfile for ease to generate the embedding files for Windows
As MinGW version is specified, the result should be more deterministic.

Fixes #1201
2020-08-14 01:34:58 +09:00
Hajime Hoshi
d73472f4f2 Use the library style of file2byteslice 2020-08-14 00:50:09 +09:00
Tom Lister
e96a1fb1c7
ebiten: Implement SetClearingScreenSkipped/IsClearingScreenSkipped (#1302)
Fixes #1132
2020-08-13 18:19:56 +09:00
Hajime Hoshi
a1c7c18788 examples/shader: Regenerate files with the latest file2byteslice 2020-08-13 03:03:27 +09:00
Hajime Hoshi
1bc6f612b3 Update dependencies 2020-08-13 03:02:14 +09:00
Hajime Hoshi
799bd2caf4 Update golang.org/x/sys 2020-08-13 03:01:28 +09:00
Hajime Hoshi
f6c3e0579f shaderir: Adopt the precision 10 for float literals
Adopted the same precision of (*math/big.Float).String().
2020-08-13 00:01:16 +09:00
Hajime Hoshi
50cd33ed9b shader: Bug fix: Use integer literals in the integer context
Fixes #1299
2020-08-12 13:47:22 +09:00
Hajime Hoshi
39d829d3bf shader: Check the index is an exact integer 2020-08-12 13:47:22 +09:00
Tom Lister
6d113e4b0d
ebitenutil: Use net/http at file_js.go (#1296)
Fixes #1154
2020-08-12 13:37:38 +09:00
Hajime Hoshi
18732ca879 shader: Bug fix: Wrong type deduction with int(x)
Fixes #1298
2020-08-12 12:16:22 +09:00
Hajime Hoshi
ed240b8393 ebiten: Add shader builtin functions: imageSrcTextureSourceRegion
Updates #1294
2020-08-12 03:34:46 +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
Magnus
95022ff1a5
examples/shader: dissolve shader (#1291)
Updates #1284
2020-08-12 00:43:07 +09:00
Hajime Hoshi
08270ee729 shader: Enable to parse ... in an array type 2020-08-11 23:51:22 +09:00
Hajime Hoshi
f71346da6c shaderir: Add bool/int/float conversion
Updates #1289
2020-08-11 23:04:55 +09:00
Hajime Hoshi
8bc1c8bbd8 ebiten: Rename shader internal variables 2020-08-11 05:18:14 +09:00
Hajime Hoshi
70acb9c1f6 shader: Rename shader bultin functions
Renamed image0TextureSize to imageSrcTextureSize, and removed the
other texture-size functions.

As texture-coordinates are always in image0's texture texels,
calculations with texels are always done with image0's texture texels.
Then, other texture-size functions are useless. To avoid confusion,
let's remove the functions and leave the necessary funciton.
2020-08-11 05:02:22 +09:00
Hajime Hoshi
b95195ab71 examples/shader: Fix some API usages 2020-08-11 04:25:20 +09:00
Hajime Hoshi
609a3c4e22 ebiten: Bug fix: Fix the texel calculation
In shaders, texCoord is always in texture0's texels. Convert them
at imageNTextureAt functions correctly.

Fixes #1290
2020-08-11 04:15:07 +09:00
Hajime Hoshi
69f87d5fd1 ebiten: Add new shader builtin functions: image[N]TextureBoundAt
Fixes #1287
2020-08-11 03:24:54 +09:00
Hajime Hoshi
523dc6f2a0 graphicscommand: Add comments 2020-08-11 03:17:50 +09:00
Hajime Hoshi
bc930ed0ec Revert "examples/shader: Rename ScreenSize -> ImageSize"
This reverts commit 3893f9cdbe.

Reason: The screen size and the image size can be different.
2020-08-11 02:16:16 +09:00
Hajime Hoshi
68ca0c634e ebiten: Rename builtin shader functions
* textureDstSize -> imageDstTextureSize
 * texture[N]Size -> image[N]TextureSize
 * texture[N]At -> image[N]TextureAt

Updates #1287
2020-08-11 02:07:53 +09:00
Hajime Hoshi
3893f9cdbe examples/shader: Rename ScreenSize -> ImageSize 2020-08-11 01:52:16 +09:00
Hajime Hoshi
985ff2d43f graphicscommand: 0th image must be adopted to calculate the size 2020-08-11 01:38:00 +09:00
Hajime Hoshi
8bfe406470 examples/shader: Make the chromatic berration example more readable 2020-08-10 21:58:49 +09:00
Hajime Hoshi
8aa90e60d2 examples/shader: Regenerate bytes 2020-08-10 21:52:58 +09:00
Hajime Hoshi
f282a57a69 Revert "examples/shader: Merge generate.go and main.go"
This reverts commit fec9cae66a.

Reason: go generate failed without the build tag
2020-08-10 21:52:18 +09:00
Hajime Hoshi
fec9cae66a examples/shader: Merge generate.go and main.go 2020-08-10 21:12:34 +09:00
Tom Lister
6e5a9a4534
examples/shader: Add the chromatic aberration example (#1288)
Updates #1284
2020-08-10 21:08:53 +09:00
Hajime Hoshi
d66e48b91f Update Oto to v0.6.3 2020-08-10 15:37:13 +09:00
Hajime Hoshi
8dec91db43 examples/shader: Add the radial blur example
Updates #1284
2020-08-10 05:16:44 +09:00
Hajime Hoshi
ee049a19ac shader: Bug fix: Wrong local variable index in a block in the fragment entry point 2020-08-10 02:29:49 +09:00
Hajime Hoshi
9b6b306ca3 shader: Bug fix: Wrong local variable index in a block in an entry point 2020-08-10 02:22:09 +09:00
Hajime Hoshi
4d20da9bc0 shader: Refactoring 2020-08-10 02:02:26 +09:00
Hajime Hoshi
e534fe8246 shader: Add more tests using a for-loop 2020-08-10 01:14:42 +09:00
Hajime Hoshi
5d2606b6a5 shader: Bug fix: Wrong local variable indices in blocks 2020-08-10 01:09:02 +09:00