Commit Graph

822 Commits

Author SHA1 Message Date
Hajime Hoshi
e93bcd9e55 internal/ui: bug fix: needed to wait for swapping buffers before entering fullscreen
Closes #2599
2023-03-13 21:40:40 +09:00
Hajime Hoshi
051b0c7238 internal/ui: bug fix: a big-offscreen size could be 0
Closes #2589
2023-03-03 22:34:43 +09:00
Hajime Hoshi
ea7d007df9 internal/ui: bug fix: dstRegion should not exceed the image region
Closes #2577
2023-02-21 14:15:39 +09:00
Hajime Hoshi
d91b8cae88 internal/ui: reland: refactoring: improve anti-alias logic
* Remove the image extension. The image is always flushed when necessary.
* Use a small offscreen image whichever the blend is.

Updates #2399
2023-02-19 23:49:32 +09:00
Hajime Hoshi
3aa8448511 Revert "internal/ui: refactoring: improve anti-alias logic"
This reverts commit 41f8295611.

Reason: test failures: https://github.com/hajimehoshi/ebiten/actions/runs/4216421788/jobs/7318236488
2023-02-19 22:46:37 +09:00
Hajime Hoshi
41f8295611 internal/ui: refactoring: improve anti-alias logic
* Remove the image extension. The image is always flushed when necessary.
* Use a small offscreen image whichever the blend is.

Closes #2399
2023-02-19 22:14:23 +09:00
Hajime Hoshi
961c34efb5 internal/ui: use a small buffer image for anti-alias
Closes #2399
2023-02-19 17:35:43 +09:00
Hajime Hoshi
8479fee606 internal/ui: refactoring 2023-02-18 18:23:57 +09:00
Hajime Hoshi
56597800dd internal/ui: refactoring: add bigOffscreenImage
Updates #2399
2023-02-18 02:32:41 +09:00
Hajime Hoshi
7315044dcf internal/ui: remove a redundant call to close a window
glfw.Terminate should close the window too. This might fix the issue
so let's wait and see.

Updates #2551
2023-02-15 14:36:28 +09:00
Hajime Hoshi
8864ce1291 all: update comments 2023-02-07 12:05:43 +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
f009dd8dd2 ebiten: implement DroppedFiles to replace AppendDroppedFiles
Closes #2552
2023-01-25 14:27:11 +09:00
Hajime Hoshi
16e49e0499 internal/ui: fix a potential out-of-range error 2023-01-24 00:32:08 +09:00
Hajime Hoshi
84e32c2e4e internal/ui: more precise detection of directory on browsers
Updates #1868
2023-01-22 18:28:34 +09:00
Hajime Hoshi
8c25fac860 ebiten: add AppendDroppedFiles
Closes #1868
2023-01-22 17:22:25 +09:00
Hajime Hoshi
b79f0394cc internal/ui: refactoring: allow slices in InputState 2023-01-22 01:28:57 +09:00
Hajime Hoshi
d53803615a internal/ui: merge a window-closing state into an input state 2023-01-21 23:42:48 +09:00
Hajime Hoshi
08fba564f8 internal/ui: refactoring: define global sel_ objects 2023-01-09 01:41:13 +09:00
Hajime Hoshi
95f1ef0fb9 internal/ui: bug fix: recover the cursor shape when the cursor is visible
Closes #2527
2023-01-07 20:03:21 +09:00
Hajime Hoshi
86fa9366f7 internal/ui: use 'set' instead of 'push' for cursors
We don't need to use a cursor stack.
2023-01-07 19:16:41 +09:00
Hajime Hoshi
7418576c16 internal/ui: re-enable skipping to render the final screen when possible
With Metal, nextDrawable could return immediately when a command buffer
is empty. To avoid high CPU usage, this change adds a slight sleep in
this case.

With DirectX, Present waits for a while even though nothing is updated,
then that's fine.

Updates #2341
Updates #2342
Updates #2520
2023-01-03 23:09:28 +09:00
Hajime Hoshi
365740aca9 internal/ui: update comments
Updates #2521
2023-01-03 21:39:34 +09:00
Hajime Hoshi
67c9d65d82 internal/ui: refactoring 2023-01-03 21:17:47 +09:00
Hajime Hoshi
0bdfeec610 internal/ui: use a separate render thread for Nintendo Switch
Updates #2512
2023-01-03 21:12:18 +09:00
Hajime Hoshi
312dce950c internal/ui: bug fix: compile failures with -tags=nintendosdk
Needed to use NativeDisplayType for eglGetDisplay.
2023-01-03 20:38:45 +09:00
Hajime Hoshi
6344273b7c internal/ui: bug fix: compile failures with -tags=nintendosdk 2023-01-03 20:29:05 +09:00
Hajime Hoshi
73985c6c96 internal/ui: bug fix: compile failures with -tags=nintendosdk 2023-01-03 20:12:36 +09:00
Hajime Hoshi
723a44a822 internal/ui: rename ebitengine_Init -> ebitengine_Initialize 2023-01-03 19:23:38 +09:00
Hajime Hoshi
0e0205b2d0 internal/ui: use -overlay to provide the implementation for Nintendo Switch
Closes #2372
2023-01-03 19:10:15 +09:00
Hajime Hoshi
da97657afb Revert "internal/ui: refactoring: remove unnecessary hack for unfocusing"
This reverts commit 3f753b7086.

Reason: this was actually necessary.

Updates #982
Updates #987
Closes #2521
2023-01-03 02:06:55 +09:00
Hajime Hoshi
70bcec189d internal/ui: refactoring 2023-01-03 01:43:55 +09:00
Hajime Hoshi
e4b15faefe internal/ui: bug fix: wrong condition 2023-01-03 01:28:51 +09:00
Hajime Hoshi
bbc82ef2db internal/ui: skip rendering onto the final framebuffer only for OpenGL
This was reverted at a049acd94e but now
I've confirmed this is not problematic only with OpenGL.

Updates #2341
Updates #2342
2023-01-03 01:24:53 +09:00
Hajime Hoshi
a049acd94e internal/ui: disable the optimization to skip rendering offscreen
This caused some issues in various environments. Until we find a good
solution, let's disable this.

Updates #2341
Updates #2342
Closes #2518
2023-01-02 23:14:03 +09:00
Hajime Hoshi
471237b701 internal/ui: bug fix: ignore ERROR_BUSY when deleting a GL context
Closes #2518
2023-01-02 15:05:16 +09:00
Hajime Hoshi
7018318546 internal/ui: bug fix: compile error on the testing CI 2023-01-01 18:01:14 +09:00
Hajime Hoshi
bba32bc06e internal/ui: refactoring 2023-01-01 17:45:20 +09:00
Hajime Hoshi
afbd1aebf1 internal/ui: use -overlay to provide the implementation for Nintendo Switch
Updates #2372
2023-01-01 01:35:05 +09:00
Hajime Hoshi
34941ca083 all: separate the rendering thread from the main thread
Updates #1704
Closes #2512
2022-12-30 22:57:34 +09:00
Hajime Hoshi
0fc21470e2 internal/ui: move some context-dependent processes to updateFrameImpl
This is a preparation to introduce an independent thread for rendering.

Updates #2512
2022-12-30 22:06:36 +09:00
Hajime Hoshi
b9fb4e9f50 internal/ui: remove an unnecessary hack for macOS
Now macOS always uses the native fullscreen even for a transparent
window, we no longer need a hack to call SwapBuffers explicitly.

Updates #1004
2022-12-30 16:25:05 +09:00
Hajime Hoshi
0a03df297b internal/ui: make it explicit to call swapBuffers only w/ OpenGL 2022-12-30 15:44:01 +09:00
Hajime Hoshi
0e137e8dd7 internal/ui: bug fix: compile error on mobiles 2022-12-30 15:44:01 +09:00
Hajime Hoshi
8902d95b2d internal/ui: remove unused function runOnAnotherThreadFromMainThread 2022-12-30 13:52:05 +09:00
Hajime Hoshi
e1992347b7 internal/graphicscommand: rename SetRenderingThread -> SetRenderThread 2022-12-30 13:51:32 +09:00
Hajime Hoshi
fa4916d063 internal/ui: refactoring 2022-12-30 13:28:00 +09:00
Hajime Hoshi
3f753b7086 internal/ui: refactoring: remove unnecessary hack for unfocusing
The sleeping for an unfocused state also happens in (*userInterfaceImpl).update().

Updates #982
Updates #987
2022-12-30 00:41:46 +09:00
Hajime Hoshi
7e7deeab22 internal/ui: bug fix: SetWindowIcon crashed in the single-thread mode
Updates #1468
Closes #2513
2022-12-30 00:01:11 +09:00
Hajime Hoshi
b597ed1e27 internal/ui: remove unnecessary swapBuffer call
This was introduced at 9e161864f6, the
background is now unclear. Things work even without this hack.

Updates #157
Updates #158
2022-12-29 21:48:37 +09:00