Commit Graph

598 Commits

Author SHA1 Message Date
Hajime Hoshi
71a32d2036 internal/ui: pass the canvas element directly instead of an ID 2022-06-11 15:34:17 +09:00
Hajime Hoshi
95628ee5f7 internal/ui: add a unique ID to the canvas for browsers 2022-06-11 15:24:50 +09:00
Hajime Hoshi
83ac234142 internal/ui: bug fix: offscreen images were created too often unexpectedly 2022-06-08 09:26:22 +09:00
Hajime Hoshi
81f91658ff internal/atlas: refactoring: remove SetVolatile and SetIsolate
Pass an image type to NewImage instead.
2022-06-08 01:08:00 +09:00
Hajime Hoshi
d3e3df812a internal/ui: recreate an offscreen image when isScreenClearedEveryFrame is toggled
This is a preparation to remove SetVolatile and SetIsolated in
the atlas package.
2022-06-07 23:16:42 +09:00
Hajime Hoshi
86a0a4154d internal/atlas: rename SetIsolate -> SetIsolated 2022-06-06 07:17:45 +09:00
Hajime Hoshi
b9012fc6ed internal/atlas: unify the term 'isolate' and 'independent' to 'isolate' 2022-06-06 00:28:23 +09:00
Hajime Hoshi
2eb4ef1a94 internal/gamepad: give a window from another package instead of GetActiveWindow
GetActiveWindow doesn't work on Xbox.

Updates #2084
2022-06-03 18:42:54 +09:00
Hajime Hoshi
0adb0c3860 internal/ui: bug fix: compile error 2022-06-01 02:09:10 +09:00
Hajime Hoshi
9c15bda275 internal/ui: return a null Window on Xbox
Updates #2084
2022-06-01 01:26:31 +09:00
Hajime Hoshi
ff868ba39f internal/ui: skip some functions for Xbox
Updates #2084
2022-06-01 00:58:36 +09:00
Hajime Hoshi
dcb5bb47c6 internal/glfw: unify the naming convension for Win32API 2022-06-01 00:48:22 +09:00
Hajime Hoshi
c379873a1f rename Ebiten -> Ebitengine 2022-05-25 22:48:19 +09:00
Hajime Hoshi
55657e72ae internal/ui: skip hideConsoleWindowOnWindows in Xbox
Updates #2084
2022-05-25 00:13:28 +09:00
Hajime Hoshi
ad5ebae3cc internal/ui: refactoring 2022-05-22 21:53:42 +09:00
Hajime Hoshi
f67b4cc1d6 internal/glfw: use a pure Go implementation of GLFW
This change removes internal/glfw/glfw, that is a DLL loader, and
replaces the usages with internal/glfwwin, that is a pure Go
implementation of GLFW for Windows.

The build tag `ebitenexternaldll` is also removed.

Closes #1764
2022-05-20 22:10:00 +09:00
Hajime Hoshi
eec5ea00ec internal/glfw: refactoring: use pointers or functions for callbacks 2022-05-20 17:49:46 +09:00
Hajime Hoshi
8d2b08dd14 internal/glfw: refactoring: make callback handlers consistent 2022-05-19 01:49:21 +09:00
Hajime Hoshi
3d00bb1fa2 internal/gamepad, internal/ui: type-cast returning values from Win32APIs just in case 2022-05-11 00:48:44 +09:00
Hajime Hoshi
38a2aa11fd internal/ui: bug fix: deadlock at Layout with Ebiten's image functions called
Closes #2079
2022-04-26 01:12:57 +09:00
Hajime Hoshi
2a5b5b4823 internal/ui: avoid a busy loop in restoreWindow
Updates #1826
2022-04-10 17:55:39 +09:00
Hajime Hoshi
3fe1df8b3b internal/ui: bug fix: ebiten.WindowSize() returned (1,1) when iconified 2022-04-10 16:50:47 +09:00
Hajime Hoshi
aae866350a internal/ui: bug fix: (*glfw.Window).GetSize() returns (0,0) when iconified
Closes #2066
2022-04-10 16:43:03 +09:00
Hajime Hoshi
d3b83dd4ea internal/ui: refactoring 2022-04-09 18:23:56 +09:00
Hajime Hoshi
fcb7df0a59 internal/ui: bug fix: checking fullscreen on Safari was wrong 2022-04-09 17:25:19 +09:00
Hajime Hoshi
a69be34001 internal/ui: update the error message for fullscreen 2022-04-09 16:55:09 +09:00
Hajime Hoshi
93b4c0d9b1 internal/ui: add comments
Updates #1590
2022-04-08 18:40:13 +09:00
Hajime Hoshi
2008916261 internal/ui: bug fix: use the native unit for origWindowPosByOS 2022-04-08 16:43:13 +09:00
Hajime Hoshi
90070c09fe internal/ui: rename origPos -> origWindowPos 2022-04-08 15:59:16 +09:00
Hajime Hoshi
352d332097 internal/ui: remove redundant comments 2022-04-08 15:51:56 +09:00
Hajime Hoshi
ee124baf60 internal/ui: bug fix: WindowSize returned a wrong value on fullscreen on macOS
Closes #2062
2022-04-08 14:57:51 +09:00
Hajime Hoshi
6710808cd1 ebiten: compile shaders at NewShader
Closes #2035
2022-04-04 02:52:57 +09:00
Hajime Hoshi
4b0967be42 internal/ui: gofmt 2022-04-04 01:48:15 +09:00
Hajime Hoshi
f1f9f74e5c internal/ui: bug fix: force to refresh the framebuffer by resizing the window very quickly
Closes #2050
2022-04-03 18:43:22 +09:00
Hajime Hoshi
f75a70dc40 internal/graphicscommand: treat []float32 instead of interface{} for uniform variables 2022-04-03 03:51:52 +09:00
Hajime Hoshi
b52a02a178 internal/ui: bug fix: crash when Image.MarkDisposed is called multiple times
Closes #2048
2022-04-03 00:21:26 +09:00
Hajime Hoshi
5c7917897c internal/ui: refactoring: move the logic in gameForUI to context 2022-04-01 22:33:31 +09:00
Hajime Hoshi
9c448d207a internal/ui: remove an unnecessary alias 2022-04-01 21:17:26 +09:00
Hajime Hoshi
b53cb2acd6 internal/ui, internal/mipmap, internal/graphicscommand: fix a wrong panic message 2022-04-01 20:12:12 +09:00
Hajime Hoshi
8e40b2562e internal/ui: remove an error returning value from Game.Draw 2022-04-01 19:10:10 +09:00
Hajime Hoshi
ea1c18d124 internal/ui: rename contextImpl -> context 2022-04-01 17:59:44 +09:00
Hajime Hoshi
09a548e055 internal/ui: consider the case when currentMonitor() returns nil
Closes #1887
2022-04-01 03:51:28 +09:00
Hajime Hoshi
b5a9ff007c internal/ui: bug fix: WindowPosition/SetWindowPosition didn't work on macOS fullscreen
Updates #1590
Closes #2043
2022-03-30 12:10:48 +09:00
Hajime Hoshi
172da82aa7 internal/ui: optimization: reduce u.t.Call 2022-03-30 03:28:18 +09:00
Hajime Hoshi
f2860bebed internal/ui: remove an unnecessary hack to resize the window
The bug (#1606) is no longer reproducible even without the hack.

Updates #1606
Updates #1609
2022-03-30 02:48:39 +09:00
Hajime Hoshi
feb70963c6 internal/ui: force to put the window in the initial monitor
To make things simple, let's not put the window outside the initial
monitor.

Updates #1351
Closes #1575
2022-03-30 01:56:35 +09:00
Hajime Hoshi
07d6419dc6 internal/ui: bug fix: DeviceScaleFactor was not concurrent-safe before the main loop
Updates #1575
Closes #2042
2022-03-29 00:27:44 +09:00
Hajime Hoshi
79e93d3b12 internal/graphicsdriver: introduce the DirectX driver
Closes #1007
2022-03-26 20:09:34 +09:00
Hajime Hoshi
9bfbbb6e9e internal/ui: add graphicsDriverGetter.getDirectX()
Updates #1007
2022-03-25 19:43:38 +09:00
Hajime Hoshi
c61be3c532 internal/ui: bug fix: getMetal might return a nil pointer as a non-nil interface 2022-03-24 13:36:53 +09:00