Hajime Hoshi
a50d9e6291
internal/atlas: check overflows
2023-08-06 13:46:41 +09:00
Hajime Hoshi
1ae5e022b6
internal/atlas: change when to count up usedAsDestinationCount
...
An image has a counter to count how many times an image is used.
Before this change, the counter was updated only when an image was moved
from a source backend to a destination backend. This seemed not enough,
and an image was likely moved to a source backend more often than
necessary (#2676 ).
However, there was also an issue that the counter was updated too
aggressively and the image was unlikely moved from a destination to
a source image (#2586 ).
In order to resolve this dilemma, let's adopt an intermediate way:
count up the counter at most once per frame.
Updates #2586
Updates #2676
2023-08-06 13:27:28 +09:00
Hajime Hoshi
6fa8c02d4a
internal/shader: bug fix: div between a matrix and a flaot failed
...
Closes #2719
2023-08-05 02:12:39 +09:00
Hajime Hoshi
d9acc57997
internal/goglfw: fix copyright texts
...
This change updates the copyright comment to respect the original
GLFW source comments.
2023-08-04 01:17:23 +09:00
Hajime Hoshi
56f37ed42b
internal/cglfw: change the license to Apache-2.0
...
Closes #2695
2023-08-04 01:09:48 +09:00
Hajime Hoshi
4158e206e6
internal/graphicsdriver/metal: rename files
2023-08-03 23:54:48 +09:00
Hajime Hoshi
120366c3ac
internal/cglfw: change the license of *.go files to Apache-2.0
...
Updates #2695
2023-08-03 23:52:53 +09:00
Hajime Hoshi
3dd2f15b64
internal/cglfw: remove GLFW_C_REVISION.txt
...
The source in internal/cglfw is no longer the same as the original one.
2023-08-02 02:02:30 +09:00
Hajime Hoshi
b2be456af8
internal/goglfw: change the license to Apache-2.0
...
Updates #2695
2023-08-01 23:57:05 +09:00
Hajime Hoshi
d410d740a3
internal/graphicsdriver/opengl/gl: change the license of default_cgo* to Apache-2.0
...
Updates #2695
2023-08-01 23:45:43 +09:00
Hajime Hoshi
d8630f940d
internal/shader: bug fix: forbide comparing non-scalar values
...
Closes #2718
2023-08-01 12:32:16 +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
ae9781cd53
internal/graphicscommand: add comments
2023-08-01 00:18:12 +09:00
Hajime Hoshi
ce25583438
internal/atlas: refactoring: move temporaryBytes to internal/graphicscommand
2023-08-01 00:11:40 +09:00
Hajime Hoshi
0fb1cdcfbd
internal/atlas: bug fix: there should be multiple temporaryBytes objects for pipelining
...
Closes #2716
2023-07-31 16:18:17 +09:00
Hajime Hoshi
f81dbd9288
internal/graphicsdriver: flush commands asynchronously whenever possible
...
Closes #2664
2023-07-30 22:44:13 +09:00
Hajime Hoshi
a7e4665f71
internal/graphicscommand: use multiple command queues
...
This is a preparation for asynchronous rendering.
Updates #2664
2023-07-30 22:42:58 +09:00
Hajime Hoshi
5a64f8299e
internal/thread: refactoring: add a common interface Thread
2023-07-30 22:42:24 +09:00
Hajime Hoshi
81b7fd7641
internal/graphicscommand: refactoring
2023-07-30 18:37:18 +09:00
Hajime Hoshi
d13bea29dc
internal/ui: refactoring
2023-07-30 03:52:54 +09:00
Hajime Hoshi
3869e2e4f6
internal/ui: refactoring: integrate the render thread usages into internal/graphicscommand
...
Updates #2664
2023-07-30 03:50:49 +09:00
Hajime Hoshi
246bd41695
internal/graphicscommand: fix a wrong comment
2023-07-30 01:56:58 +09:00
Hajime Hoshi
4df647a400
internal/shader: bug fix: forbid to have an initial value for uniform variables
...
Closes #2711
2023-07-29 20:51:02 +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
5ddf1df423
internal/shaderir: remove ConstType
...
Closes #2550
2023-07-29 15:34:30 +09:00
Hajime Hoshi
7549f4fcd6
internal/shader: reduce ConstType usages
...
Updates #2550
2023-07-29 14:18:32 +09:00
Hajime Hoshi
e225f118fb
internal/shaderir: use ConstType just for an assetion
...
Updates #2550
2023-07-29 14:02:26 +09:00
Hajime Hoshi
900b687f40
internal/shader: add tests
...
Updates #2712
2023-07-28 01:59:31 +09:00
Hajime Hoshi
692d119818
internal/shader: refactoring: reduce ConstType usages
...
Updates #2550
2023-07-28 01:36:15 +09:00
Hajime Hoshi
88be4c5b7c
internal/shader: reland: bug fix: stricter type checks for the built-in cast-like functions
...
Closes #2712
2023-07-28 01:33:27 +09:00
Hajime Hoshi
be2123f7fd
Revert "internal/shader: bug fix: stricter type checks for the built-in functions"
...
This reverts commit 287545b02a
.
Reason: test failures
Updates #2712
2023-07-28 00:54:36 +09:00
Hajime Hoshi
287545b02a
internal/shader: bug fix: stricter type checks for the built-in functions
...
Closes #2712
2023-07-28 00:51:42 +09:00
Hajime Hoshi
ef08873f30
internal/shader: reland2: bug fix: int + ivec failed
...
Closes #2707
2023-07-26 01:23:02 +09:00
Hajime Hoshi
8aefa49510
Revert "internal/shader: reland: bug fix: int + ivec failed"
...
This reverts commit 1c4a0ac0dc
.
Reason: TestShaderUniformMatrix2 failed on Windows
Updates #2707
2023-07-26 00:30:17 +09:00
Hajime Hoshi
1c4a0ac0dc
internal/shader: reland: bug fix: int + ivec failed
...
Closes #2707
2023-07-25 23:02:06 +09:00
Hajime Hoshi
3d8d759976
Revert "internal/shader: bug fix: int + ivec failed"
...
This reverts commit a93908503a
.
Reason: test failures at TestShaderUniformMatrix2
Updates #2070
2023-07-25 22:53:02 +09:00
Hajime Hoshi
a93908503a
internal/shader: bug fix: int + ivec failed
...
Closes #2707
2023-07-25 22:42:06 +09:00
Hajime Hoshi
ad63d0842c
internal/shader: refactoring: check dimensions at AreValidTypesForBinaryOp
2023-07-25 13:46:44 +09:00
Hajime Hoshi
6b94de4ef6
internal/shader: refactoring: integrate type checks to shaderir.AreValidTypesForBinaryOp
2023-07-25 02:51:25 +09:00
Hajime Hoshi
b743b7ab50
internal/shader: bug fix: return true
for float must fail
...
Closes #2706
2023-07-25 02:51:18 +09:00
Hajime Hoshi
29545906c0
internal/shader: refactoring
2023-07-25 01:40:47 +09:00
Hajime Hoshi
c329eab1b2
internal/shader: refactoring
2023-07-24 12:29:27 +09:00
Hajime Hoshi
20123e8420
internal/shader: bug fix: unary operators should keep the type info
...
Closes #2705
2023-07-24 02:21:42 +09:00
Hajime Hoshi
5a1109e56a
internal/shader: refactoring
2023-07-24 02:06:54 +09:00
Hajime Hoshi
0657e67cef
internal/shader: add more tests for % op
2023-07-24 02:00:00 +09:00
Hajime Hoshi
d99da81203
internal/shader: refactoring
2023-07-24 01:49:37 +09:00
Hajime Hoshi
a8c3eb7167
internal/shader: bug fix: don't allow a binary op with different typed constants
...
Closes #2704
2023-07-24 01:41:22 +09:00
Hajime Hoshi
9ffbc51607
internal/shader: remove ConstType usages from canApplyBinaryOp
...
Updates #2550
2023-07-23 14:55:15 +09:00
Hajime Hoshi
94d1df8c7d
internal/shader: simplify canBeFloatImplicitly
...
Updates #2550
2023-07-23 14:06:18 +09:00
Hajime Hoshi
12e60b7273
internal/shader: reduce shaderir.ConstType usages
...
Updates #2550
2023-07-23 13:08:08 +09:00
Hajime Hoshi
a5af8f3b0b
internal/shaderir: remove isUntypedInteger
...
Updates #2550
2023-07-23 13:04:25 +09:00
Hajime Hoshi
8b4c744ca8
internal/ui: rename a file
...
Use `_linbsd.go` suffix for Linux and BSDs.
2023-07-23 02:29:57 +09:00
Hajime Hoshi
91e1c0ea29
ebiten: add more cursor shapes
...
This change adds these new cursor shapes:
* CursorShapeNESWResize
* CursorShapeNWSEResize
* CursorShapeMove
* CursorShapeNotAllowed
Closes #2476
2023-07-23 00:49:45 +09:00
Hajime Hoshi
269b557e38
internal/glfw: rename files
...
Updates #1162
2023-07-22 18:15:46 +09:00
Hajime Hoshi
3d41e8171e
internal/cglfw: refactoring: split build.go into each platform
2023-07-22 17:37:48 +09:00
Hajime Hoshi
47dea6fac4
move internal/glfw/glfw to internal/cglfw
2023-07-22 01:02:55 +09:00
Hajime Hoshi
c85c5b1884
internal/glfw: move Wayland files
2023-07-21 01:59:40 +09:00
Hajime Hoshi
0324db5657
internal/glfw/glfw: remove -l options
...
DLLs for OpenGL are loaded automatically and doesn't have to link them
when compiling.
DLLs for Vulkan are not used.
2023-07-21 01:09:25 +09:00
Hajime Hoshi
65bbfad84a
internal/glfw/glfw: remove null_platform.h
2023-07-21 01:04:08 +09:00
Hajime Hoshi
214f6094f8
internal/glfw/glfw: move osmesa_context.h
2023-07-21 00:09:17 +09:00
Hajime Hoshi
f6e5d2eca6
internal/glfw/glfw: remove unnecessary files
2023-07-21 00:03:26 +09:00
Hajime Hoshi
bccb33236f
internal/glfw/glfw: move xkb_unicode.* and X11 files
2023-07-20 23:37:44 +09:00
Hajime Hoshi
e10c5f5c59
internal/glfw/glfw: move and remove null_* files
2023-07-15 12:57:15 +09:00
Hajime Hoshi
31bad92c23
internal/glfw/glfw: move cocoa_* and nsgl_* files
2023-07-15 12:38:43 +09:00
Hajime Hoshi
647d2aca14
internal/glfw/glfw: move egl_context.* files
2023-07-15 12:30:12 +09:00
Hajime Hoshi
4d9ae2a815
./internal/glfw/glfw: move posix_*.* files
2023-07-13 03:39:12 +09:00
Hajime Hoshi
d8a8404fd4
internal/glfw/glfw/glfw/src: remove internal.h
2023-07-13 03:39:12 +09:00
Hajime Hoshi
a4c183c5d4
internal/glfw/glfw: move some C and H files
2023-07-13 03:08:09 +09:00
Hajime Hoshi
8ee3a6d0c1
internal/glfw/glfw/glfw/src: remove warnings for Wayland
2023-07-13 02:33:06 +09:00
Hajime Hoshi
5ddf75c4b3
internal/glfw/glfw/glfw/src: bug fix: build failure
2023-07-11 00:15:41 +09:00
Hajime Hoshi
72293d48b5
internal/glfw/glfw: unify c_glfw_bsd.go and c_glfw_linux.go
2023-07-11 00:05:33 +09:00
Hajime Hoshi
bf197e379b
internal/glfw/glfw: refactoring: remove glfw/include
2023-07-10 23:30:03 +09:00
Hajime Hoshi
4267e5d22e
internal/gamepad: bug fix: do not call GetRawInputDeviceList with the count 0
...
Updates #2696
2023-07-08 19:18:05 +09:00
Hajime Hoshi
bc2b373bca
internal/glfw/glfw: fix build tags
2023-07-08 14:04:30 +09:00
Hajime Hoshi
f8d8d7a231
examples/life, internal/graphicsdriver/opengl/gl: format copyright texts
2023-07-08 02:50:54 +09:00
Hajime Hoshi
c2b386a917
internal/glfw/glfw: refactoring
2023-07-08 02:34:56 +09:00
Hajime Hoshi
fafbe2711f
internal/glfw/glfw: refactoring
2023-07-08 02:16:39 +09:00
Hajime Hoshi
8039911bc8
internal/glfw/glfw: add license header comments
2023-07-08 02:15:47 +09:00
Hajime Hoshi
a4c2072c0f
internal/glfw/glfw: add 'static' to C functions
2023-07-08 00:37:20 +09:00
Hajime Hoshi
eba8713c64
internal/glfw/glfw: refactoring: reduce files
2023-07-08 00:33:20 +09:00
Hajime Hoshi
65fd352e3b
internal/glfw/glfw: remove unused files
2023-07-07 12:12:47 +09:00
Hajime Hoshi
7a7d4fd91f
internal/ui: bug fix: need to delay to capture a cursor
...
From the spec https://w3c.github.io/pointerlock/#extensions-to-the-element-interface ,
capturing a cursor might require a cooltime. This change adds a delay
to capture a cursor just after escaping from a capture.
Closes #2693
2023-07-07 01:24:02 +09:00
Hajime Hoshi
d0b6d2c41a
internal/glfw/glfw: remove implementation for joystick
...
Closes #2692
2023-07-06 23:24:34 +09:00
Hajime Hoshi
8052c5bdd5
internal/glfw/glfw: remove the Windows part
2023-07-06 00:08:48 +09:00
Hajime Hoshi
fbe732b378
copy github.com/go-gl/glfw/v3.3/glfw to internal/glfw/glfw
...
Closes #2546
2023-07-05 23:59:34 +09:00
guangwu
54e1263565
all: unnecessary use of fmt.Sprintf ( #2691 )
...
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-07-05 16:36:29 +09:00
Hajime Hoshi
eb5c1ee818
internal/ui: bug fix: the original cursor position was not scaled correctly
...
Updates #2690
2023-07-05 09:24:29 +09:00
Hajime Hoshi
929539b66e
add exp/textinput package
...
This works only for macOS and browsers so far.
Updates #1029
2023-07-05 02:09:04 +09:00
Hajime Hoshi
1d02d20879
internal/ui: fix comments
2023-07-04 23:34:00 +09:00
divVerent
b96aea70f1
internal/ui: compute antialias region size correctly. ( #2681 )
...
Closes #2679
2023-06-24 02:25:19 +09:00
Hajime Hoshi
8de08295e9
internal/restorable: refactoring
2023-05-26 01:44:13 +09:00
Hajime Hoshi
0f4066e7ac
internal/restorable: remove clearIfOverlapped
...
We found clearIfOverlapped could be a heavy task in some actual applications.
Instead of clearing existing data in the pixels records, add a new record
with a nil slice which indicates a cleared region.
2023-05-25 21:26:53 +09:00
Hajime Hoshi
47f19da710
internal/restorable: early return for an empty rectangle
2023-05-25 19:17:22 +09:00
Hajime Hoshi
90562ee84b
internal/goglfw: enable to build for GOOS=darwin
...
Updates #2546
2023-05-21 21:29:40 +09:00
Hajime Hoshi
0ab214b018
internal/goglfw: move updateWindowStyles call to win32window_windows.go
...
updateWindowStyles is originally a Windows-specific function in GLFW,
so this should be in win32window_windows.go.
2023-05-14 02:56:32 +09:00
the-goodies
12a179aab9
internal/goglfw: fix _GET_X_LPARAM and _GET_Y_LPARAM from api_windows.go ( #2665 )
...
Negative values should not disappear. For example, if _HIWORD returns 63000,
then _GET_Y_LPARAM should return -2536, but now it returns 63000.
This fixes that.
2023-05-10 09:27:40 +09:00
Hajime Hoshi
50b68a0427
internal/goglfw: refactoring: use unsafe.Add
2023-05-10 00:41:57 +09:00
Hajime Hoshi
1035b1d182
internal/shader: bug fix: wrong issue number
...
Updates #2590
Updates #2648
2023-05-09 01:40:33 +09:00