Skip to content
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

Migrate OSX to GLFW3+ #8348

Open
wants to merge 71 commits into
base: dev
Choose a base branch
from
Open

Migrate OSX to GLFW3+ #8348

wants to merge 71 commits into from

Conversation

Jhonnyg
Copy link
Contributor

@Jhonnyg Jhonnyg commented Dec 23, 2023

We have removed our old modified GLFW version on OSX in favour of the latest publicly released GLFW 3.4 version. This will enable us to improve our desktop feature set, as well as help fix many legacy OS issues across the board. When we consider that this work is stable enough on OSX, the rest of the desktop platforms will get updated as well.

Fixes #7970

Comment on lines 570 to 573
static bool OpenGLIsSupported()
{
return (glfwInit() == GL_TRUE);
return true;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we got this far, we already know we have opengl support

share/ext/glfw/build_glfw.sh Outdated Show resolved Hide resolved
@Jhonnyg Jhonnyg added engine Issues related to the Defold engine glfw macos Issue related to the macOS platform labels Feb 8, 2024
@@ -127,7 +136,6 @@ def configure(conf):
conf.env['STLIB_HID_NULL'] = 'hid_null'
conf.env['STLIB_INPUT'] = 'input'
conf.env['STLIB_LIVEUPDATE'] = 'liveupdate'
conf.env['STLIB_PLATFORM_NULL'] = 'platform_null'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

Comment on lines +75 to 77
bool is_supported = next->m_IsSupportedCb();
if (next->m_Priority < selected->m_Priority && is_supported)
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we only link with one adapter we never actually do this check..

@@ -58,6 +60,7 @@ namespace dmHID

void Update(HContext context)
{
dmPlatform::PollEvents(context->m_Window);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old glfw automatically polls for events when doing a swapbuffers, so the hid_null doesn't respond to any mouse events (like being able to close the window).

@Jhonnyg Jhonnyg marked this pull request as ready for review May 16, 2024 14:00
@Jhonnyg Jhonnyg requested review from JCash, vlaaad and AGulev May 16, 2024 14:00
@Jhonnyg Jhonnyg added the feature request A suggestion for a new feature label May 16, 2024
vlaaad
vlaaad previously approved these changes May 16, 2024
Copy link
Contributor

@vlaaad vlaaad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The editor changes look good to me!

AGulev
AGulev previously approved these changes May 16, 2024
Copy link
Contributor

@AGulev AGulev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -55,6 +55,15 @@ namespace dmPlatform
DEVICE_STATE_KEYBOARD_NUMBER_PAD = 5,
DEVICE_STATE_KEYBOARD_EMAIL = 6,
DEVICE_STATE_KEYBOARD_PASSWORD = 7,
DEVICE_STATE_KEYBOARD_RESET = 8,
DEVICE_STATE_JOYSTICK_PRESENT = 9,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this JOYSTICK and GAMEPAD in the same header are so annoying ...

@Jhonnyg Jhonnyg dismissed stale reviews from AGulev and vlaaad via c5237c2 May 20, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues related to the Defold engine feature request A suggestion for a new feature glfw macos Issue related to the macOS platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to GLFW3
3 participants