-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to OpenTK GameWindow instead of WinForms+GLControl #136
Conversation
TODO: Add SDL native libs for Window's sake. |
@@ -40,27 +27,14 @@ internal DesktopGameWindow(GraphicsContextFlags flags) | |||
Form.SizeChanged += delegate { OnClientSizeChanged(); }; | |||
Form.Paint += delegate { OnPaint(); }; | |||
Form.FormClosing += Form_FormClosing; | |||
Form.FormClosed += delegate { OnExited(); }; | |||
Form.FormClosed += delegate { OnExited(); };*/ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
} | ||
|
||
internal TextInputSource CreateTextInput() => new BackingTextBox(Form); | ||
internal TextInputSource CreateTextInput() => null;// new BackingTextBox(Form); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
if (FocusedDrawable?.TriggerCharacterInput(c) ?? false) | ||
return true; | ||
return false; | ||
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
A note from my end: We need to make sure that exclusive fullscreen works with this on windows machines with intel integrated graphics. This should be the case if GameWindow has its OpenGL content as a top-level form, but not if it uses any level of nesting. |
|
||
OnWndProc?.Invoke(ref m); | ||
|
||
if (m.Result.ToInt32() < 0) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
e2eaaa4
to
e7ca126
Compare
Also adds back GL initialisation which was removed.
85a5119
to
9898c97
Compare
Tested, works with both visual tests and osu! on Linux. Fixes weird bug on Linux where several rows of pixels on the top were black. Requires testing on Windows, since all input was switched to OpenTK and I hear that's wonky on Windows.