Hajime Hoshi
cd2ef6771a
internal/ui: bug fix: a wrong monitor was used at setWindowPositionInDIP
2022-02-08 20:20:36 +09:00
Hajime Hoshi
9f581327fa
intetrnal/ui: remove recreating a window after the fullscreen mode
...
As macOS's fullscreen is a native fullscreen, this hack is no longer
needed.
Updates #1004
2022-02-08 19:41:09 +09:00
Hajime Hoshi
f8097eb45d
internal/ui: give an initial window size at createWindow
...
This enables to skip setWindowSizeInDIPImpl in most cases.
Updates #1651
Updates #1914
2022-02-08 19:36:30 +09:00
Hajime Hoshi
320e7037f6
internal/ui: update comments
2022-02-08 19:23:38 +09:00
Hajime Hoshi
6dbc5ba558
internal/ui: refactoring: call updateWindowSizeLimits in createWindow
2022-02-08 16:06:12 +09:00
Hajime Hoshi
4c6c31e384
all: reorder build tags in an alphabetical order
2022-02-08 15:49:15 +09:00
Hajime Hoshi
9c8b4db81f
internal/ui: separate 'vibrate' part to internal/vibrate
2022-02-08 14:48:55 +09:00
Hajime Hoshi
d2d3673bd2
internal/ui: remove a redundant call of SetTitle
2022-02-08 04:30:58 +09:00
Hajime Hoshi
2fc09c7fcb
internal/ui: use the cursor position to choose the initial monitor for Linux/UNIX
...
Updates #1918
Closes #1982
2022-02-08 03:20:45 +09:00
Hajime Hoshi
294ee43716
internal/ui: remove a special logic for UNIX
...
The issue #1118 can no longer be reproduced.
Updates #1118
Updates #1982
2022-02-08 01:29:22 +09:00
Hajime Hoshi
cb4085277b
internal/ui: bug fix: adjust the window position correctly
...
Updates #1982
2022-02-07 23:52:16 +09:00
Hajime Hoshi
ed04021151
internal/ui: use the cursor position to choose the initial monitor for Windows
...
Updates #1918
Updates #1982
2022-02-07 23:31:46 +09:00
Hajime Hoshi
cafb71719c
internal/ui: use the cursor position to choose the initial monitor
...
Updates #1982
2022-02-07 22:37:10 +09:00
Hajime Hoshi
126dc81a96
internal/ui: add a comment
2022-02-07 00:51:48 +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
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
6b8516c7a5
driver: Move ui.RegularTermination to driver
2019-04-07 10:54:05 +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
80dcec865d
ui: Refactoring: Remove pollEvents
2019-03-31 19:51:53 +09:00
Hajime Hoshi
e273618081
input: Rename Reset -> ResetForFrame
2019-03-31 18:49:00 +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
853dbdf19d
input: Refactoring
2019-03-31 00:45:52 +09:00
Hajime Hoshi
7445144194
Move graphicsdriver.GrapahicsDriver to driver.Graphics
2019-03-30 22:38:02 +09:00
Hajime Hoshi
f2e42c3ea1
ui: Remove dependencies on driver package
2019-03-30 21:59:11 +09:00
Hajime Hoshi
d6d57fdadf
ui: Refactoring
2019-03-28 03:36:31 +09:00
Hajime Hoshi
8ec7ae4c08
Rename drivers -> driver
2019-03-28 01:48:45 +09:00
Hajime Hoshi
5e38f81462
Create packages drivers having actual drivers
2019-03-25 00:29:56 +09:00
Hajime Hoshi
a3882dbc37
ui: Bug fix: devicescale.GetAt must be called on the main thread
2019-03-12 00:28:37 +09:00
Hajime Hoshi
f56c3bd096
ui: Unexport SetWindowResizable ( #320 )
2019-02-25 02:19:47 +09:00
Hajime Hoshi
ea7c2f8da3
ui: Bug fix: Wrong assumption that the position was always >= 0
2019-02-24 23:34:36 +09:00
Hajime Hoshi
ba59cdbc5f
ui: Bug fix: The window must be shown on the current monitor ( #829 )
2019-02-24 23:26:07 +09:00
Hajime Hoshi
288e0a33ba
ui: Bug fix: SetSizeCallback must be effective only when the window is resizable
...
This is not a perfect solution but at least this fixes the
regression.
Fix #819
2019-02-24 03:25:38 +09:00
Hajime Hoshi
a3eddeb50f
Improve panic messages
2019-02-06 23:43:03 -10:00
Hajime Hoshi
645b94de5f
ui: Bug fix: actualScreenScale must be called on the main thread
2019-01-16 23:32:47 +09:00
Hajime Hoshi
5514a9c6ac
ui: Bug fix: Changing screen size didn't work correctly on Windows
...
Fixes #775
2019-01-09 11:08:27 +09:00
Hajime Hoshi
ae84e79d16
ui: Add IsWindowResizable and SetWindowResizable (again)
...
Fixes #320
2019-01-09 00:24:16 +09:00
Hajime Hoshi
0d4e903b7a
Revert "ui: Add IsWindowResizable and SetWindowResizable"
...
This reverts commit f403e0716f
.
Reason: Compilation error on browsers
2019-01-09 00:12:57 +09:00
Hajime Hoshi
f403e0716f
ui: Add IsWindowResizable and SetWindowResizable
...
Fixes #320
2019-01-08 23:52:53 +09:00
Hajime Hoshi
7f656f11d6
ui: Bug fix: Minimum window width should be 1 when the window is not decorated
2019-01-07 00:46:41 +09:00
Hajime Hoshi
55c2fa4de1
Use internal/glfw
2018-12-30 02:35:46 +09:00
Hajime Hoshi
83787123ac
ui: Refactoring
2018-12-28 14:08:44 +09:00
Hajime Hoshi
b349efaa0a
graphicsdriver/metal: Make main-thread usages more explicit
2018-12-28 02:43:00 +09:00
Hajime Hoshi
532488ac5c
mainthread: RunLockOSThread is mainthread package's responsibility
2018-12-28 02:20:53 +09:00
Hajime Hoshi
c76ce28065
Revert "ui: Bug fix: SetVsyncEnabled before Run didn't work on macOS"
...
This reverts commit 042b30a516
.
2018-12-28 02:18:38 +09:00
Hajime Hoshi
042b30a516
ui: Bug fix: SetVsyncEnabled before Run didn't work on macOS
2018-12-28 02:11:48 +09:00
Hajime Hoshi
4d0cc623fb
ui: Rename functions
2018-12-22 02:32:02 +09:00
Hajime Hoshi
ff62876552
Add Metal implementation
...
Fixes #621
2018-12-20 02:37:10 +09:00
Hajime Hoshi
db4395d71b
ui: Bug fix: ScreenSizeFullscreen before Run crashes on Linux
2018-12-19 01:21:00 +09:00
Hajime Hoshi
6ef5cc5857
ui: Bug fix: SetWindowDecorated didn't work
...
Fixes #753
2018-12-19 01:01:18 +09:00
Hajime Hoshi
b3ce89aab1
ui: Bug fix: SetWindowIcon before Run didn't work
...
Fixes #755
2018-12-18 23:16:09 +09:00
Hajime Hoshi
241ccc307f
ui: Add comments about #753
2018-12-18 03:34:45 +09:00
Hajime Hoshi
eac00c3d83
ui: Bug fix: SetCursorVisible before Run didn't work
...
Fixes #754
2018-12-18 03:07:16 +09:00
Hajime Hoshi
2fd0daec10
ui: Fix comments
2018-12-04 03:10:54 +01:00
Hajime Hoshi
d2595c5be7
ui: Refactoring
2018-11-15 01:08:36 +09:00
Ben Echols
5e70fce639
Added monitor cache and scale cache ( #731 )
2018-11-07 20:54:37 +09:00
Hajime Hoshi
2c7017534f
ui: Remove opengl dependency from ui package (desktop)
2018-11-05 01:24:53 +09:00
Hajime Hoshi
4090258904
opengl: Remove Init (except for mobile)
2018-11-05 00:21:39 +09:00
Hajime Hoshi
97a9e99112
opengl: Rename: BindScreenFramebuffer -> BeforeSwapping
2018-11-03 04:08:00 +09:00
Hajime Hoshi
0c4ef7ee8e
ui: Bug fix: fix the initial window position on multiple monitors
2018-10-14 16:59:14 +09:00
Hajime Hoshi
34596bb1cf
ui: Bug fix: IsVsyncEnabled can cause deadlock
2018-10-10 23:17:45 +09:00
Hajime Hoshi
b4a4b87b56
ui: Bug fix: ScreenSizeInFullscreen returned wrong scaled values
...
Fixes #708
2018-10-10 03:10:18 +09:00
Hajime Hoshi
e971f6d41c
ui: Avoid glfw.GetCurrentContext for threading issues
2018-10-10 01:45:39 +09:00
Hajime Hoshi
b5344bc994
ui: glfwScale must be called on the main thread
2018-10-10 01:07:47 +09:00
Hajime Hoshi
c758a1f8c6
ui: Rename MonitorSize -> ScreenSizeInFullscreen ( #708 )
2018-10-09 23:42:03 +09:00
Hajime Hoshi
c4a066ecd0
ui: Fix wrong comments about Windows
2018-10-08 04:06:44 +09:00
Hajime Hoshi
8d2820efb0
ui: Bug fix: the window is shown on the current monitor on Windows
...
Fixes #704
2018-10-08 03:24:14 +09:00
Hajime Hoshi
4a5548a4a0
ui: MonitorSize should return the 'current' monitor size instead of the primary monitor size
2018-10-08 01:15:57 +09:00
Hajime Hoshi
f3b7148564
ui: Bug fix: DeviceScaleFactor should return the current monitor's scale
2018-10-08 01:11:13 +09:00
Hajime Hoshi
effd530026
ui: Show the window on the current monitor ( #704 )
...
Tested on macOS. This doesn't work on Windows yet since there are
some codes that depends on the primary monitor.
2018-10-08 00:46:01 +09:00
Hajime Hoshi
fb7a3f2736
ui: Bug fix: Call SetPos multiple times to render correctly ( #703 )
2018-10-08 00:25:21 +09:00
Hajime Hoshi
e0d2d5e753
ui: Bug fix: wrong scaling when a window move across monitors
...
Fixes #701
2018-10-07 23:05:20 +09:00
Hajime Hoshi
0e7dab3707
ui: Fix comment
2018-10-06 20:04:48 +09:00
Hajime Hoshi
f9edfd7d57
ui: Remove unused variables
2018-10-06 19:55:10 +09:00
Hajime Hoshi
cc336a4c38
ui: Use more stable way to determine the current monitor
2018-10-06 19:53:43 +09:00
Hajime Hoshi
55a397bd65
devicescale: Specify the monitor to get the scale
...
Fixes #695
2018-10-06 19:43:23 +09:00
Hajime Hoshi
ca2fe22e4a
ui: Bug fix: Set the proper window position when coming back from fullscreen
2018-10-06 03:53:34 +09:00
Hajime Hoshi
7ea1ab6b58
ui: Bug fix: currentMonitor should not return nil
...
Fixes #700
2018-10-06 03:22:33 +09:00
Hajime Hoshi
cae9e39453
ui: Use the best suitable monitor for fullscreen
...
This change also changes the definition of MonitorSize.
2018-10-06 02:59:38 +09:00
Hajime Hoshi
16f6aeaa4a
ui: Refactoring: Use the current monitor
2018-10-06 02:38:02 +09:00
Hajime Hoshi
02a2fc2d44
ui: Bug fix: Force to adjust window size when scale is changed
...
Fixes #644
2018-10-03 03:26:11 +09:00
Hajime Hoshi
c494b53822
ui: Refactoring: Add deviceScale struct
2018-10-02 23:06:56 +09:00
Hajime Hoshi
9906c935f6
ui: Remove unnecessary lock protection
2018-10-02 03:25:30 +09:00
Hajime Hoshi
fce82e1502
ui: Use frame counter to update device scale
2018-10-02 03:21:59 +09:00
Hajime Hoshi
78f2946797
ui: Bug fix: timer condition was wrong
2018-10-02 02:53:17 +09:00
Hajime Hoshi
bf850e12a4
ui: Recalc device scale repeatedly for multiple displays ( #644 )
2018-10-02 02:49:08 +09:00
Hajime Hoshi
308c8091cd
ui: Fix comments
2018-09-30 18:53:38 +09:00
Hajime Hoshi
25a5f1dd83
ui: Sleep when vsync doesn't work ( #692 )
2018-09-30 14:44:54 +09:00
Hajime Hoshi
15260537a2
graphics: Bug fix: fullscreen rendering was wrong
...
After fad65f2f5d
, the viewport size
is always same as the framebuffer size. The 'screen' image size
was the actual rendering region size, and padding was not
considered in the size. The padding is added on the fullscreen
mode.
This fix adds the extra padding values to the 'screen' image size
so that the 'screen' framebuffer will be same size as the monitor
size.
Fixes #693
2018-09-29 21:47:41 +09:00
Hajime Hoshi
eb68cdad6e
ui: Bug fix: Freezing on calling SetVsyncEnabled
2018-07-17 02:37:22 +09:00
Hajime Hoshi
e25c237a01
Add IsVsyncEnabled / SetVsyncEnabled
...
This enables the game to work more efficiently (but consume much
more CPU).
Fixes #405 .
2018-07-14 21:43:55 +09:00
Philipp Steinhaus
39b3170185
input: Enable mouse wheel input ( #628 )
2018-06-18 00:38:30 +09:00
Hajime Hoshi
5976e4bbbc
audio: More intellegent suspending/resuming ( #617 )
...
Before this change, the audio is suspended when the game stops for
1/12[s]. However, as game often stops for more than 1/12[s]
especially on mobiles, this implemntation caused some audio
glitches.
This change fixes this problem by re-implementing suspending/
resumeing audio by detecting the window is active/focused or not.
2018-05-26 23:31:04 +09:00
Hajime Hoshi
d8dba69b47
ui: Add MonitorSize
...
Fixes #470
2018-05-05 02:42:45 +09:00
Hajime Hoshi
d41f959b96
ui: Initialize GLFW before Run
2018-05-04 23:55:23 +09:00
Hajime Hoshi
9efccea31c
ui: Add SetWindowTitle
...
Fixes #595
2018-05-02 19:21:17 +09:00
Hajime Hoshi
2d3c6ab5b8
ui: Remove build tag 'gomobilebuild'
...
Fixes #573
2018-04-07 02:14:54 +09:00
Hajime Hoshi
c540d0fc0d
ui: Add AdjustedTouches for consistency
2018-04-02 01:54:44 +09:00
Hajime Hoshi
4de2dc0240
Add input package
2018-04-01 23:20:45 +09:00
Hajime Hoshi
5ec5cf2450
ui: Add comments
2018-03-17 18:34:20 +09:00
Hajime Hoshi
526fbd3619
ui: Implement SetWindowDecorated and IsWindowDecorated
...
Fixes #430 .
2018-03-17 18:30:55 +09:00
Hajime Hoshi
0cc456b534
ui: Rename sizeChanged -> toChangeSize
2018-02-25 00:44:45 +09:00
Hajime Hoshi
04341a014c
ui: Add comments
2018-02-25 00:44:41 +09:00
Hajime Hoshi
a644e92298
restorable: Better calculation to clear restorable.Image
2018-02-24 21:16:30 +09:00
Hajime Hoshi
692f36f664
graphics: Add comments
2018-02-24 20:40:26 +09:00
Hajime Hoshi
78a58fd1ae
ui: Bug fix: userInterface.fullscreen() must be called from the main thread
2018-02-24 18:10:39 +09:00
Hajime Hoshi
a87f197c1b
ui: Add TODO
2018-02-24 14:50:45 +09:00
Hajime Hoshi
e3023889ac
ui: Change RegularTermination to a value
2018-02-04 00:22:38 +09:00
Hajime Hoshi
8b2ed6cddd
ui: Update GraphicsContext every frame ( #490 )
2018-02-02 02:08:03 +09:00
Hajime Hoshi
38c72faf95
ui: Deprecate SetCursorVisibility and add SetCursorVisible ( #407 )
2018-01-09 02:01:33 +09:00
Hajime Hoshi
0469ef386b
ui: Fix comment
2018-01-06 23:53:35 +09:00
Hajime Hoshi
a64367f906
ui: Refactoring: remove an unneeded member
2018-01-03 17:35:34 +09:00
Hajime Hoshi
c82809867d
Add internal/devicescale
2018-01-03 05:22:56 +09:00
Hajime Hoshi
9578307d7b
ui: Organize members
2018-01-03 00:23:18 +09:00
Hajime Hoshi
cea9bd5a19
input: Bug fix: runeBuffer should be reset on each frame
2017-11-10 01:21:15 +09:00
Hajime Hoshi
05e220e105
ui: Allow smaller window width ( #444 )
2017-10-20 03:25:21 +09:00
Hajime Hoshi
414170b138
ui: Refactoring
2017-10-20 02:50:39 +09:00
Hajime Hoshi
b590005c7a
opengl: BindFramebuffer no longer returns error
2017-09-25 00:14:25 +09:00
Hajime Hoshi
835d199f02
ui: Rename SetIcon to SetWindowIcon ( #386 )
2017-09-23 17:40:09 +09:00
Hajime Hoshi
dacda0d176
ui: Add SetIcon ( #386 )
2017-09-23 04:28:57 +09:00
1l0
5d2393c3c1
glfw: Add StickyModes to window.InputMode ( resolve #314 #399 ) ( #423 )
2017-08-28 23:29:19 +09:00
Jake
0d703ca3d4
InputChars ( #403 )
...
This implements #400
2017-08-15 04:11:51 +09:00
Hajime Hoshi
5f538bff82
ui: Bug fix: initCursorVisible must be true by default
2017-08-12 18:32:51 +09:00
Hajime Hoshi
783e57d3f2
ui: Remove 'fullscreen' member variable
2017-08-12 18:31:16 +09:00
Hajime Hoshi
b186bc1e94
ui: Add IsCursorVisible ( #377 )
2017-08-12 15:45:16 +09:00
Hajime Hoshi
f0d47312c4
ui: Add IsRunnableInBackground / SetRunnableInBackground ( #272 )
2017-08-03 03:21:51 +09:00
Hajime Hoshi
bb5036b3e1
ui: Refactoring
2017-08-03 01:07:04 +09:00
Hajime Hoshi
1021521591
ui: initFullscreen should always be protected by lock
2017-08-03 00:19:04 +09:00
Hajime Hoshi
434d5bb00b
ui: Bug fix: SetFullscreen / IsFullscreen should be concurrent safe; IsFullscreen should return the correct value even before Run
2017-08-02 23:48:08 +09:00
Hajime Hoshi
807d03eb3b
ui: Delay initialize until Run ( #397 )
2017-07-30 20:26:40 +09:00
Hajime Hoshi
f591ca3d2b
ui: Bug fix: SetFullscreen didn't work without Run
2017-07-15 21:43:33 +09:00
Hajime Hoshi
c94c994bd1
ui: Allow SetFullscreen without Run
2017-07-15 20:29:13 +09:00
Hajime Hoshi
d7b7aac6e4
ui: Fix wrong comment
2017-07-01 13:03:27 +09:00
Hajime Hoshi
7d236950c2
ui: Bug fix: SwapInterval needs to be called after SetMonitor ( #357 )
2017-07-01 12:41:16 +09:00
Hajime Hoshi
ba204c6d3b
ui: Adjust cursor positoin on fullscreen mode ( #374 )
2017-07-01 04:27:38 +09:00
Hajime Hoshi
c694851765
ui: Center the screen on fullscreen mode ( #374 )
2017-07-01 04:12:09 +09:00
Hajime Hoshi
3168af1db4
ui: Refactoring: refresh rate is ignored when no monitor is specified at SetMonitor
2017-06-30 23:20:53 +09:00
Hajime Hoshi
68fbf59720
ui: Refactoring
2017-06-30 11:07:19 +09:00
Hajime Hoshi
cefa86ce13
ui: Fullscreen scale can be recalculated during fullscreen mode
2017-06-30 10:54:13 +09:00
Hajime Hoshi
6336b59493
ui: Bug fix: original positions must not be updated during fullscreen mode ( #376 )
2017-06-30 10:48:18 +09:00
Hajime Hoshi
af8b5d72c3
ui: Bug fix: Fullscreen scale must be recalculated
2017-06-30 10:22:30 +09:00
Hajime Hoshi
76da09f74c
ui: Bug fix: Window title might lost on macOS ( #267 )
2017-06-30 02:14:14 +09:00
Hajime Hoshi
64ed7b93f6
ui: Bug fix: better restoring position ( #267 )
2017-06-30 02:11:54 +09:00
Hajime Hoshi
1d60c009ed
ui: Bug fix: fullscreen scale calculation was wrong ( #267 )
2017-06-30 02:08:12 +09:00
Hajime Hoshi
2996f778b6
ui: Bug fix: position was wrong when changing window size
2017-06-30 01:53:14 +09:00
Hajime Hoshi
5b6fa2d384
ui: Adjust cursor position on fullscreen ( #267 )
2017-06-30 01:39:26 +09:00
Hajime Hoshi
e7370d8a54
ui: Adjust fullscreen scale ( #267 )
2017-06-30 01:28:35 +09:00
Hajime Hoshi
5dbfafb200
ui: Reserve window position before entering fullscreen-mode ( #267 )
2017-06-30 01:28:03 +09:00
Hajime Hoshi
b569eb9c5a
ui: Add SetFullscreen / IsFullscreen ( #267 )
2017-06-30 01:28:00 +09:00
Hajime Hoshi
d0f086323b
ui: Use returning values
2017-06-30 00:37:24 +09:00
Hajime Hoshi
f7a8c7efa6
ui: Avoid recalc the scale factor
2017-06-05 00:06:40 +09:00
Hajime Hoshi
1d59938295
ui: Refactoring: Remove unneeded error handlings
2017-05-31 10:47:52 +09:00
Hajime Hoshi
7d181e3182
opengl: Hide OpenGL context usages into internal/graphics package
2017-05-31 02:18:04 +09:00
Hajime Hoshi
93cdfe107e
ui: Keep the device scale to avoid re-calculation
2017-05-14 04:21:20 +09:00
Hajime Hoshi
b409631515
Add FreeBSD support ( #352 )
2017-05-11 19:09:13 +09:00
Hajime Hoshi
fb612a4b87
ui: Adjust window size in case when glfwGetVideoMode fails ( #328 )
2017-04-19 00:51:15 +09:00
Hajime Hoshi
cad051437d
ui: Refactoring
2017-03-03 11:15:07 +09:00
Hajime Hoshi
e11bc62059
ui: SetScreenSize/Scale no longer returns error
2017-03-03 10:58:29 +09:00
Hajime Hoshi
b6b61fc003
ui: setScreenSize in ui_glfw.go no longer returns error
2017-03-03 10:50:47 +09:00
Hajime Hoshi
0ba28d1183
ui: Remove unused function
2017-03-03 02:27:39 +09:00
gonutz
112654995f
Hide console window on Windows ( #318 )
...
* Hide console only if double-clicking Windows exe
When building on Windows the console window is hidden on start-up if
double-clicking the executable but not if running the program from the
command line (as a developer).
See the code comments for an explanation of the used heuristic.
2017-02-07 20:44:10 +09:00
Hajime Hoshi
0ef1e61d55
mobile: Fix iOS tag usages ( #310 )
2017-01-26 01:32:33 +09:00
Hajime Hoshi
411721a4da
ui: Add TODO
2016-11-26 02:35:55 +09:00
Hajime Hoshi
07294a98b6
Move internal/graphics/opengl -> internal/opengl
2016-11-03 23:31:25 +09:00
Hajime Hoshi
071b65f173
loop: Remove IsRunning
2016-09-03 21:14:06 +09:00
Hajime Hoshi
cd885ce7c5
ui: Add SetCursorVisibility ( #258 )
2016-09-03 18:54:21 +09:00
Hajime Hoshi
87efaafcff
Update GLFW version 3.1 -> 3.2
2016-09-03 16:25:43 +09:00
Hajime Hoshi
84b512a3ac
ui: Bug fix: Remove unneeded argument
2016-09-03 02:12:11 +09:00
Hajime Hoshi
ec70ea3be5
ui: Refactoring
2016-09-03 01:06:16 +09:00
Hajime Hoshi
db782ff0d9
ui: Remove UserInterface interface
2016-09-03 00:20:05 +09:00
Hajime Hoshi
f204c14f90
ui: Rename Run -> RunMainThreadLoop
2016-09-03 00:00:44 +09:00
Hajime Hoshi
6164ecb9fc
ui: Reduce functions in UserInterface
2016-09-02 23:45:54 +09:00
Hajime Hoshi
128dcaa342
ui: Rename Main -> Run
2016-09-02 02:59:40 +09:00
Hajime Hoshi
571d67f967
ui: Reduce methods in UserInterface
2016-09-02 02:31:03 +09:00
Hajime Hoshi
453c2c4589
ui: Remove Terminate
2016-09-02 01:07:41 +09:00
Hajime Hoshi
6da16aa1a0
ui: Refactoring: Remove events
2016-09-02 00:53:05 +09:00
Hajime Hoshi
1e0bdf844d
loop: Bug fix: vsync should not use channels on browsers ( #259 )
2016-09-01 10:36:00 +09:00
Hajime Hoshi
612d3b07b0
ui: Bug fix: ui.funcs might be closed before sending a value
2016-08-17 01:57:20 +09:00
Hajime Hoshi
f556b19f22
Add error checks
2016-08-03 23:44:54 +09:00
Hajime Hoshi
8e58f3ce0a
ui: Bug fix: closed channel never blocks
2016-08-03 01:07:46 +09:00
Hajime Hoshi
30b521f3b8
Add error checks
2016-08-03 01:02:05 +09:00
Hajime Hoshi
6968e898c3
Bug fix: ui.Main should be suspended when error occurs in the loop
2016-08-02 02:48:19 +09:00
Hajime Hoshi
e118a755f5
ui: Bug fix: Sizing also calls GLContext
2016-07-24 05:29:47 +09:00
Hajime Hoshi
efe64d56f4
ui: Bug fix: Avoid dead lock
2016-07-24 04:32:12 +09:00
Hajime Hoshi
c5e42c91be
ui: Add glcontext.go
2016-07-24 00:05:36 +09:00
Hajime Hoshi
121063ee2b
ui: Initialize GLContext at Start
2016-07-23 22:17:36 +09:00
Hajime Hoshi
5a3ea34cfc
ui: Delay initializing the context
2016-07-23 21:43:35 +09:00
Hajime Hoshi
3553fc55c3
ui: Unify the context thread and the UI thread
2016-07-23 21:22:59 +09:00
Hajime Hoshi
8371426888
ui: Refactoring
2016-07-23 21:01:30 +09:00
Hajime Hoshi
1953539e22
ui: Refactoring: Simplify initializing
2016-07-23 20:25:52 +09:00
Hajime Hoshi
910e1b760c
ui: Introduce glfwScale
2016-07-04 11:37:34 +09:00
Hajime Hoshi
0d91883fb9
opengl: Remove init (desktops)
2016-07-04 00:51:58 +09:00
Hajime Hoshi
bb511b2c13
ui: Scale is now float64 ( #236 )
2016-06-25 01:26:59 +09:00
Hajime Hoshi
b0a7e13502
ui: Remove ScreenSizeEvent.Scale
2016-06-19 05:10:27 +09:00
Hajime Hoshi
858b391592
ui: Bug fix: unused variable
2016-06-19 05:05:56 +09:00
Hajime Hoshi
ea377b8e20
ui: More accurate device scale factor
2016-06-19 05:04:38 +09:00
Hajime Hoshi
bc2703c345
opengl: Call glViewport each time when different framebuffer is set
2016-06-18 22:47:34 +09:00
Hajime Hoshi
5eb77d2fb5
Remove 'default framebuffer' and add 'screen framebuffer' for iOS
2016-06-18 04:56:13 +09:00
Hajime Hoshi
dfe4db67be
Fix for iOS
2016-06-17 02:08:25 +09:00
Hajime Hoshi
13f594baed
Fix build tags for iOS (WIP)
2016-06-15 00:19:02 +09:00
Hajime Hoshi
eb8e8b6034
ui: Remove FinishRendering
2016-06-10 01:49:21 +09:00
Hajime Hoshi
6d06b01cae
gomobile bind works
2016-05-22 04:25:15 +09:00
Hajime Hoshi
d09bb63f71
ui: Change UserInterface to be an interface
2016-05-20 00:07:06 +09:00
Hajime Hoshi
76ea075896
Add example/mobile (not-compilable yet)
2016-05-19 03:17:50 +09:00
Hajime Hoshi
335781759c
ui: Introduce ScreenSizeEvent to simplify the run loop
2016-05-18 11:56:43 +09:00
Hajime Hoshi
faff188574
ui: Move Now() to internal/loop and hide it
2016-05-18 11:24:17 +09:00
Hajime Hoshi
cd5436712b
ui: Hide Init() func
2016-05-18 11:12:23 +09:00
Hajime Hoshi
063ed564fd
Move the run loop to internal/loop
2016-05-18 10:59:37 +09:00
Hajime Hoshi
7f19d4a1ac
ui: Remove CurrentUI()
2016-05-18 10:51:11 +09:00
Hajime Hoshi
5c68ee4034
ui: Use events in the game loop
2016-05-18 02:03:41 +09:00
Hajime Hoshi
49c156d2b5
ui: Rename DoEvents -> Update
2016-05-18 01:22:01 +09:00
Hajime Hoshi
d6bfa72c5c
graphics: Remove openGLState.initialize
2016-05-16 11:32:26 +09:00
Hajime Hoshi
9f2b53d24c
graphics: Add InitializeIfNeeded function (preparing for Android)
2016-05-15 04:05:57 +09:00
Hajime Hoshi
295e3c0a0a
ui: Bug fixed: there was an error shadowed and not used
2016-05-14 03:25:44 +09:00
Hajime Hoshi
a04ce352f8
opengl: Bug fixed: there were some errors shadowed and not used
2016-05-14 03:24:01 +09:00
Hajime Hoshi
57a9ecd821
ui: Refactoring
2016-05-07 22:27:10 +09:00
Hajime Hoshi
209b4e6864
ui: Add Main for the OS main thread
2016-05-06 21:30:23 +09:00
Hajime Hoshi
5a379cb7cb
Reduce panics ( #196 )
2016-04-11 01:48:40 +09:00
Hajime Hoshi
3ec0020f02
graphics: Bug fix ( #201 ): Remove gl.Flush for performance (this ws added by #161 but no longer needed because of BindZeroFrameBuffer)
2016-04-08 21:45:53 +09:00
Hajime Hoshi
75ef9a6d47
ui: Add read-write lock
2016-03-26 17:24:40 +09:00
Hajime Hoshi
4a60343fe6
ui: Don't use currentUI directly
2016-03-26 15:17:01 +09:00
Hajime Hoshi
95485441f4
ui: Remove dataset attributes
2016-03-25 01:15:47 +09:00
Hajime Hoshi
fb3bf4e3b4
ui: Add CurrentUI()
2016-03-25 00:38:30 +09:00
Hajime Hoshi
6ac6b8e7c0
input: Make functions goroutine-safe ( #192 )
2016-03-24 23:51:20 +09:00
Hajime Hoshi
6efead974f
ui: Rename ActualScale -> ActualScreenScale
2016-03-23 01:14:28 +09:00
Hajime Hoshi
62dffe5405
Add ebiten.ScreenScale() ( #191 )
2016-03-23 00:44:16 +09:00
Hajime Hoshi
2157061479
ui: Use actualScale to calc minimum window size
2016-03-22 12:01:53 +09:00
Hajime Hoshi
993a55abde
ui: Set window width limitation for Windows ( #165 )
2016-03-22 11:56:40 +09:00
Hajime Hoshi
8f15978c83
ui: Bug fix: Quit soon after the window is closed ( #185 )
2016-03-15 00:32:06 +09:00
Hajime Hoshi
b1f856a0e0
Add FPS const
2016-03-13 04:57:31 +09:00
Hajime Hoshi
fc200ec6f2
ui: Bug fix: The default framebuffer must be bound before swapping buffers
2016-02-28 00:56:39 +09:00
Hajime Hoshi
05eaec6dd9
ui: Bug fix: scale for cursor was wrong ( #166 )
2016-02-27 17:04:35 +09:00
Hajime Hoshi
7617a225f6
ui: deviceScaleFactor -> deviceScale
2016-02-27 02:17:31 +09:00
Hajime Hoshi
651d803107
ui: Change how to calc framebuffer scale
2016-02-27 01:53:02 +09:00
Hajime Hoshi
8069c980c3
ui: Refactoring: Add ui.ActualScale()
2016-02-27 01:44:01 +09:00
Hajime Hoshi
138a689382
ui: Refactoring
2016-02-27 01:35:14 +09:00
Hajime Hoshi
e2cf288ed7
ui: Bug fix: Wrong framebuffer scale
2016-02-26 03:50:00 +09:00
Hajime Hoshi
c97cae9598
ui: Remove println :-(
2016-02-26 03:45:52 +09:00
Hajime Hoshi
868eef0c2f
ui: Bug fix: Consider that (frame buffer width) / (window width) can be more than 1 ( #164 )
2016-02-26 03:44:37 +09:00
Hajime Hoshi
fc7be5be3c
ui: Bug fix: monitor's size might be 0 e.g. on Linux VM
2016-02-26 03:14:51 +09:00
Hajime Hoshi
4d53cf20da
ui: Calculate DPI and set the actual scale based on DPI
2016-02-26 03:09:23 +09:00
Hajime Hoshi
922f392544
ui: Bug fix: Call glFinish before glfwSwapBuffers to make sure all OpenGL tasks are executed ( #161 )
2016-02-24 22:57:19 +09:00
Hajime Hoshi
59adc6979a
ui: Bug fix: Adjust scaling factor on Linux ( #157 )
2016-02-23 01:41:57 +09:00