Hajime Hoshi
07480ed66d
uidriver/glfw: Add better fallbacks for currentMonitorFromPosition
...
Updates #1119
2020-08-23 23:38:03 +09:00
Hajime Hoshi
10d6a3ad67
uidriver/glfw: Bug fix: Crash on Wine when getting a monitor
2020-08-23 02:31:52 +09:00
Hajime Hoshi
77fa0cb9ef
ui: Add SetInitFocused
...
Fixes #769
2020-08-23 02:19:09 +09:00
Hajime Hoshi
dea716c9a6
uidriver: Remove force focusing by clicking the body
...
As long as the game is embedded in an iframe, this is no longer
needed.
2020-08-22 18:40:34 +09:00
Hajime Hoshi
bd888f62b9
graphicsdriver/opengl: Exclude bytes.go from non-mobile environments
...
This requires reflect and reflect prevents Ebiten from being compiiled
with TinyGo.
Updates #747
2020-08-20 22:24:21 +09:00
Hajime Hoshi
85d172c673
uidriver/mobile: Bug fix: The context didn't recovered on gomobile-build
...
Updates #1176
2020-08-19 23:59:27 +09:00
Hajime Hoshi
7329880f40
restorable: Make the image stale when volatile state changes
2020-08-19 21:13:05 +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
c921a63c21
graphicsdriver/opengl/gl: Bug fix: Crash on Parallels
...
Fixes #1310
2020-08-18 04:33:59 +09:00
Hajime Hoshi
64a6b39240
Revert "restorable: Do not record pixels if restoring is not requried"
...
This reverts commit 5e1f263d6d
.
Reason: Issue #1304
2020-08-17 00:00:12 +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
a9b94a183b
shader: Implement swapping variables
...
Fixes #1248
2020-08-16 18:40:45 +09:00
Hajime Hoshi
06ed4f5444
shader: Implement len function
...
Fixes #1279
2020-08-16 02:07:39 +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
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
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
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
Hajime Hoshi
18732ca879
shader: Bug fix: Wrong type deduction with int(x)
...
Fixes #1298
2020-08-12 12:16:22 +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
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
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
985ff2d43f
graphicscommand: 0th image must be adopted to calculate the size
2020-08-11 01:38:00 +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
Hajime Hoshi
240e20ad87
shader: Bug fix: Wrong variable index at declaration
2020-08-09 23:23:40 +09:00
Hajime Hoshi
a0494210c3
shader: Bug fix: Wrong local variable index in a block
2020-08-09 23:14:28 +09:00
Hajime Hoshi
eacc9fac6a
shader: Indexing with non-consntat value should be allowed
2020-08-09 22:50:53 +09:00
Hajime Hoshi
5dc0d4e1a4
shader: Add more tests about 'for' loops
2020-08-09 22:26:57 +09:00
Hajime Hoshi
dee8690502
shaderir/glsl: Bug fix: Copying an array did not work on GLSL
...
Fixes #1286
2020-08-09 22:18:58 +09:00
Hajime Hoshi
646518f2e8
shaderir: Fix the test side: local variables for 'for' stmts must be reserved
2020-08-09 22:12:35 +09:00
Hajime Hoshi
b73fecae79
shaderir: Add tests for different counter types
2020-08-09 21:44:06 +09:00
Hajime Hoshi
2707915376
shaderir/glsl, shaderir/metal: Bug fix: Wrong local variables with multiple 'for' statements
2020-08-09 20:12:56 +09:00
Hajime Hoshi
80361443cc
shaderir/glsl, shaderir/metal: Bug fix: Wrong local variables in for
2020-08-09 20:06:13 +09:00
Hajime Hoshi
ee9257e626
shaderir: Use pointers for Block
2020-08-09 18:00:55 +09:00
Hajime Hoshi
07514a37c8
shaderir/glsl: Bug fix: Initialize an array
...
Updates #1285
2020-08-09 04:59:29 +09:00
Hajime Hoshi
febdc46ad5
shaderir/metal: Better array initialization
...
Updates #1285
2020-08-09 04:40:15 +09:00
Hajime Hoshi
a536b3ee25
shaderir/metal: Bug fix: Array initialization
...
Updates #1285
2020-08-09 04:22:12 +09:00
Hajime Hoshi
4d1947f711
grpahicsdriver/metal: Better error message
2020-08-09 04:06:30 +09:00
Hajime Hoshi
00a92a21a3
shader: Add compilation tests for Metal
2020-08-08 21:29:01 +09:00
Hajime Hoshi
a45e241da1
shaderir/metal: Implement the shader IR compiler for Metal
...
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
18b3859e20
shaderir: Export IsValidSwizzling
...
This is a preparation for compiling the IR to Metal.
Updates #1165
2020-08-08 19:08:10 +09:00
Hajime Hoshi
2b89710600
graphicsdriver/metal: Refactoring
2020-08-08 18:05:58 +09:00
Hajime Hoshi
caad187cd3
testing: Bug fix: Wrong attribute variables
2020-08-08 17:42:54 +09:00
Hajime Hoshi
6dc74d308b
graphicsdriver/metal: Rename viewportSize to internalSize and use it more
2020-08-08 16:07:14 +09:00
Hajime Hoshi
b4046a795e
graphics: Reduce the usage of InternalImageSize
2020-08-08 16:01:33 +09:00
Hajime Hoshi
fe1cea533a
graphicsdriver/metal: Add a generalized 'draw' function
...
This is a preparation for rendering shaders.
Updates #1165
2020-08-08 03:12:44 +09:00
Hajime Hoshi
28c638cb5b
graphicsdriver/opengl: Unexpose NewShader
2020-08-08 03:12:44 +09:00
Hajime Hoshi
ae28b83d45
testing: Fix wrong comments
2020-08-07 12:26:00 +09:00
Hajime Hoshi
00ccc8ad85
shaderir/glsl: Refactoring
2020-08-07 01:53:22 +09:00
Hajime Hoshi
6576a1da76
shaderir/glsl: Refactoring
2020-08-06 17:53:28 +09:00
Hajime Hoshi
6003d85f75
shaderir: Remove some builtin functions
...
'degrees' and 'radians' are not defined in Metal.
2020-08-05 02:06:28 +09:00
Hajime Hoshi
ffee5eb6b8
shaderir/glsl: Fix the panic messages
2020-08-05 01:50:41 +09:00
Hajime Hoshi
c22ec580bc
shaderir: Remove bultin functions for bvec
2020-08-05 01:41:06 +09:00
Hajime Hoshi
fb59901609
graphicscommand: Bug fix: build error
2020-08-04 01:08:29 +09:00
Hajime Hoshi
cf2f7009aa
graphicscommand: Allow shader tests on browsers
...
Updates #1166
2020-08-04 00:59:27 +09:00
Hajime Hoshi
8bac08cbd9
Add internal/shaderir/glsl
2020-08-03 23:27:27 +09:00
Hajime Hoshi
79e252c158
shaderir: Refactoring
2020-08-02 00:09:12 +09:00
Hajime Hoshi
fa60e31997
shaderir: Bug fix: Pass tests
2020-08-01 21:22:47 +09:00
Hajime Hoshi
4bd01fd038
graphicsdriver/opengl: Implement shaders for browsers
...
Fixes #1166
2020-08-01 20:27:46 +09:00
Hajime Hoshi
bab05874cd
shaderir: Remove unnecessary empty lines
2020-08-01 19:04:10 +09:00
Hajime Hoshi
38dcadb233
graphicsdriver/opengl: Add program error info to the error
2020-08-01 18:58:05 +09:00
Hajime Hoshi
a4334c5464
shader: Use arrays at uniform variables
...
Fixes #1274
2020-08-01 17:22:10 +09:00
Hajime Hoshi
2b4cf7fd17
shader: Remove unnecessary Println
2020-08-01 16:47:17 +09:00
Hajime Hoshi
073fd329f2
graphicsdriver/opengl: Enable to pass any type of uniform variables
...
Updates #1274
2020-08-01 05:11:24 +09:00
Hajime Hoshi
a50ef46ed0
graphicsdriver/opengl: Do not allow nil value for uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
da5642cd0e
graphicsdriver/opengl: Add type checks of uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
ac16564e95
shaderir: Add indexing
...
Fixes #1235
2020-07-29 23:49:57 +09:00
Hajime Hoshi
a0549820fd
shadeir: Add array composite literals
...
Updates #1235
2020-07-29 23:49:54 +09:00
Hajime Hoshi
004b279e4f
shader: Add array initialization
...
Updates #1235
2020-07-29 22:43:51 +09:00
Hajime Hoshi
62fbac2290
mipmap: Bug fix: HasHighPrecisionFloat cannot be called before the main loop
...
Instead, use the common number for the too-big scale.
Fixes #1270
2020-07-29 12:46:09 +09:00
Hajime Hoshi
2dc6cbe51a
shader: Make parseType return a boolean value indicating ok
2020-07-29 12:02:07 +09:00
Hajime Hoshi
d9c54bc0d0
shader: Implement an array variable
...
Updates #1235
2020-07-29 02:27:05 +09:00
Hajime Hoshi
da98e67345
mipmap: Bug fix: Wrong level calculation when the indices are empty
...
Fixes #1269
2020-07-28 14:02:51 +09:00
Hajime Hoshi
a43efb66b2
shaderir: Bug fix: Function prototypes were required for GLSL
...
Fixes #1267
2020-07-28 00:04:03 +09:00
Hajime Hoshi
a0197d4c2f
graphicsdriver/opengl: Bug fix: Build error on Android
...
Fixes #1266
2020-07-26 17:01:11 +09:00
Hajime Hoshi
ca3fd4eaa4
ebiten: Add texture[ID]Size functions for shaders
...
Fixes #1239
2020-07-26 15:18:01 +09:00
Hajime Hoshi
d08a04a635
ebiten: Refactoring
2020-07-26 15:05:00 +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
Hajime Hoshi
71aec36ef3
graphics: Update comments
2020-07-26 01:11:11 +09:00
Hajime Hoshi
eb056690aa
graphicsdriver/metal: Update the minimum macOS version to 10.12 for Go 1.15
2020-07-25 04:18:26 +09:00
Hajime Hoshi
75d34ab585
graphicsdriver/opengl: Forbids PBO on Raspberry Pi 4 ( #1261 )
...
Fixes #1208
2020-07-23 19:15:34 +09:00
Hajime Hoshi
bb1d08a681
shader: Remove the comments
2020-07-20 11:14:54 +09:00
Hajime Hoshi
1217db3b1e
ebiten: Remove user-defined vertex shaders
...
Fixes #1253
2020-07-20 10:07:55 +09:00
Hajime Hoshi
29d53edf1d
graphicsdriver/opengl: Bug fix: Rename the attribute variables along with custom shaders
2020-07-20 04:06:35 +09:00
Hajime Hoshi
c8fa937a0a
shaderir: Format
2020-07-20 02:12:31 +09:00
Hajime Hoshi
5506491c03
graphicsdriver/opengl: Bug fix: Binding the same texture multiple times did not work
...
Updates #1193
2020-07-19 04:34:53 +09:00
Hajime Hoshi
36e9803cea
shader: Enable to get pixels from multiple images
...
Updates #1193
2020-07-19 02:33:43 +09:00
Hajime Hoshi
5dd073fcbb
restorable, graphicscommand: Remove uniform variables
2020-07-19 01:55:01 +09:00
Hajime Hoshi
fe79bb27af
graphicscommand: Refactoring
2020-07-18 23:25:16 +09:00