Hajime Hoshi
7d146fb70b
internal/ui: bug fix: IsGL / SetUIView can be called before initialization is done
...
The functions in the package `mobile/ebitenmobileview` could be invoked
from EbitenViewController even before the graphics driver initialization
is done in theory.
This change fixes this issue by waiting the initialization by
channels. Also, this change adds error handlings at these functions.
Closes #2455
2022-11-15 01:53:20 +09:00
Hajime Hoshi
a0a5f2b301
internal/graphicsdriver/opengl: remove SetGomobileGLContext
...
This change is needed to initialize the context at opengl.NewGraphics.
Updates #2451
2022-11-13 15:07:14 +09:00
Artem Yadelskyi
5b53cef59e
all: remove old // +build
comments ( #2431 )
...
Closes #2325
2022-11-03 12:55:14 +09:00
Hajime Hoshi
3a0f28ce6b
internal/ui: refactoring: reduce global-variable usages
2022-09-26 00:46:03 +09:00
Hajime Hoshi
fa108ca717
internal/ui: bug fix: compiie errors on mobiles and browsers
2022-09-26 00:34:44 +09:00
Hajime Hoshi
e7c0a121c4
all: remove the build tag 'ebitencbackend'
...
This also automatically enables 'egl' when 'nintendosdk' is specified.
Updates #2242
2022-08-12 13:15:39 +09:00
Hajime Hoshi
dac6548c0c
all: rename ebitenginecbackend to nintendosdk
...
Updates #2242
2022-08-12 02:05:29 +09:00
Hajime Hoshi
428b1263d9
add ebitenginecbackend build tag besides ebitencbackend
...
Updates #2111
Updates #2190
2022-07-09 15:23:52 +09:00
Hajime Hoshi
f1037d8bff
internal/ui: handle gamepad errors
2022-06-24 20:20:49 +09:00
Hajime Hoshi
138463e219
internal/ui: rename chooseGraphicsDriver -> newGraphicsDriver
2022-06-17 02:40:39 +09:00
Hajime Hoshi
7484df0c5e
internal/graphicsdriver/metal: replace Get with NewGraphics
...
This is a prepartion to return an error when a graphics driver, especially
DirectX, fails to initialize.
Updates #2142
2022-06-17 02:40:35 +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
ea1c18d124
internal/ui: rename contextImpl -> context
2022-04-01 17:59:44 +09:00
Hajime Hoshi
3074dca670
internal/ui: add the EBITEN_GRAPHICS_LIBRARY environment variable
...
The `ebitengl` build tag is gone instead.
Closes #2007
2022-03-24 02:23:37 +09:00
Hajime Hoshi
85daef7436
internal/ui: bug fix: OpenGL must be used when gomobile-build is used
...
Now the logic of graphicsDriver() is updated, this can return a Metal
graphics driver on iOS even when gomobile-build is used.
This change fixes this issue.
2022-03-23 02:58:56 +09:00
Hajime Hoshi
15548b4c74
internal/ui: add userInterfaceImpl.graphicsDriver
2022-03-22 00:13:22 +09:00
Hajime Hoshi
be1836339b
internal/ui: define the common struct UserInterface for all the environments
...
The existing UserInterface structs became userInterfaceImpl structs.
2022-03-21 23:10:27 +09:00
Hajime Hoshi
12ce5ae83a
internal/ui: remove the call of graphicsDriver() from the context
2022-03-21 16:48:33 +09:00
Hajime Hoshi
4cbce71b2b
internal/graphicscommand: move the choice of graphics drivers to internal/ui
2022-03-20 02:51:31 +09:00
Hajime Hoshi
dd8900ea48
internal/graphicsdriver: refactoring: choose the graphics driver at this package
2022-02-27 23:51:19 +09:00
Hajime Hoshi
871121abe3
internal/ui: refactoring: remove (*contextImpl).layout
2022-02-14 02:59:02 +09:00
Hajime Hoshi
e2f0878a4c
internal/ui: refactoring: remove sizeChanged
...
It is safe to call Layout every frame.
2022-02-14 02:17:52 +09:00
Hajime Hoshi
ce3f83958e
internal/graphicscommand: rename RunOnMainThread -> RunOnRenderingThread
2022-02-14 00:20:49 +09:00
Hajime Hoshi
b695cb928a
internal/ui: remove RunWithoutMainLoop in non-mobile environments
2022-02-13 22:31:48 +09:00
Hajime Hoshi
0c1c40995c
internal/ui: rename types and members: uiContext -> gameForUI
2022-02-13 20:20:46 +09:00
Hajime Hoshi
08defeeded
internal/ui: move more logics to internal/ui
2022-02-13 20:02:49 +09:00
Hajime Hoshi
9b2f0b6c56
internal/ui: rename ResetForFrame -> ResetForTick
...
Resetting happens every tick, not every frame.
2022-02-13 19:54:40 +09:00
Hajime Hoshi
6a8e45e6c1
internal/ui: refactoring: simplify ResetForFrame
...
Updating the layout is already done every frame, so doing this in
ResetForFrame is not needed.
Updates #490
2022-02-13 19:31:35 +09:00
Hajime Hoshi
7b164882fc
internal/ui: refactoring: move AdjustPosition to the package internal/ui
2022-02-13 19:14:29 +09:00
Hajime Hoshi
2609d73a1a
internal/ui: refactoring: move some logics to internal/ui
2022-02-13 18:01:18 +09:00
Hajime Hoshi
b282b1805b
internal/ui: refactoring: add ui.SetError
...
This is a preparation to move uiContext to the package internal/ui.
2022-02-13 17:17:08 +09:00
Hajime Hoshi
e9cfbc1630
internal/ui: refactoring: remove Graphics()
2022-02-13 04:17:39 +09:00
Hajime Hoshi
52f4c409ac
internal/ui: refactoring: make Graphics a global function
2022-02-06 20:29:49 +09:00
Hajime Hoshi
0f09ddfbd2
internal/driver: remove Window
...
Closes #1983
2022-02-06 20:12:40 +09:00
Hajime Hoshi
80c03792cb
internal/driver: move the key definitions to internal/ui
...
Updates #1983
2022-02-06 19:14:18 +09:00
Hajime Hoshi
2fbfa5444b
internal/driver: remove Input
2022-02-06 18:34:31 +09:00
Hajime Hoshi
6f72b15912
internal/driver: move some definitions to internal/ui
...
Updates #1983
2022-02-06 18:13:45 +09:00
Hajime Hoshi
149736c3cf
internal/uidriver/*: integrate the packages into internal/ui
...
Updates #1983
2022-02-06 17:23:04 +09:00
Hajime Hoshi
7e5085f15b
Add uidriver package and move UI implementation to this packaage
2019-04-07 18:21:16 +09:00
Hajime Hoshi
a4a129e3af
ui: Rename currentUI -> theUI
2019-04-07 11:10:55 +09:00
Hajime Hoshi
1b8d4abfdb
driver: Move ui.GraphicsContext to driver
2019-04-07 10:48:18 +09:00
Hajime Hoshi
a980de8326
ui: Take the Input driver
2019-04-06 23:29:13 +09:00
Hajime Hoshi
de9f54fd9d
driver: Add Input
2019-04-06 21:48:54 +09:00
Hajime Hoshi
c21fb4d390
input: Move Touch to driver package
2019-03-31 18:58:43 +09:00
Hajime Hoshi
64d3e26fb0
input: Rename UpdateTouches -> SetTouches
2019-03-31 16:30:03 +09:00
Hajime Hoshi
0536efd95f
ui: Remove AdjustedCursorPosition
2019-03-31 02:06:42 +09:00
Hajime Hoshi
dec6be1a11
ui: Remove AdjustedTouches
2019-03-31 02:03:59 +09:00
Hajime Hoshi
5d6f66935a
ui: Remove UpdateTouches
2019-03-31 01:54:38 +09:00
Hajime Hoshi
43ec1e7fb3
input: Refactoring: Make Touch a struct
2019-03-31 01:14:49 +09:00
Hajime Hoshi
7445144194
Move graphicsdriver.GrapahicsDriver to driver.Graphics
2019-03-30 22:38:02 +09:00