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

[qtbase] Add support for building with OpenGL ES 3.0 #36407

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ports/qtbase/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_GUI_OPTIONS
"xrender" FEATURE_xrender # requires FEATURE_xcb_native_painting; otherwise disabled.
"xrender" FEATURE_xcb_native_painting # experimental
"gles2" FEATURE_opengles2
"gles3" FEATURE_opengles3
#Cannot be required since Qt will look in CONFIG mode first but is controlled via CMAKE_DISABLE_FIND_PACKAGE_Vulkan below
#"vulkan" CMAKE_REQUIRE_FIND_PACKAGE_WrapVulkanHeaders
"egl" FEATURE_egl
Expand All @@ -187,6 +188,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_GUI_OPTIONS
"opengl" CMAKE_DISABLE_FIND_PACKAGE_WrapOpenGL
"egl" CMAKE_DISABLE_FIND_PACKAGE_EGL
"gles2" CMAKE_DISABLE_FIND_PACKAGE_GLESv2
"gles3" CMAKE_DISABLE_FIND_PACKAGE_GLESv3
"fontconfig" CMAKE_DISABLE_FIND_PACKAGE_Fontconfig
#"freetype" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemFreetype # Bug in qt cannot be deactivated
"harfbuzz" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemHarfbuzz
Expand All @@ -201,7 +203,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_GUI_OPTIONS
# There are more X features but I am unsure how to safely disable them! Most of them seem to be found automaticall with find_package(X11)
)

if( "gles2" IN_LIST FEATURES)
if("gles2" IN_LIST FEATURES)
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='es2')
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF)
endif()
Expand All @@ -223,8 +225,7 @@ else()
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=no)
endif()

# Disable GLES3
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles3:BOOL=OFF)
# Disable OpenGL ES 3.1 and 3.2
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles31:BOOL=OFF)
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles32:BOOL=OFF)

Expand Down
15 changes: 14 additions & 1 deletion ports/qtbase/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qtbase",
"version": "6.6.1",
"port-version": 8,
"port-version": 9,
"description": "Qt Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down Expand Up @@ -211,6 +211,19 @@
}
]
},
"gles3": {
"description": "OpenGL ES 3.0",
"supports": "!windows & !osx",
"dependencies": [
{
"name": "qtbase",
"default-features": false,
"features": [
"gles2"
Copy link
Contributor

@m-kuhn m-kuhn Jan 29, 2024

Choose a reason for hiding this comment

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

You mention ios in the description, I had troubles building for ios with gles2 in the past (see https://codereview.qt-project.org/c/qt/qtbase/+/458413), is this issue solved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I could solve pretty much this exact issue by adding the gles3 feature.

]
}
]
},
"glib": {
"description": "GLib",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7178,7 +7178,7 @@
},
"qtbase": {
"baseline": "6.6.1",
"port-version": 8
"port-version": 9
},
"qtcharts": {
"baseline": "6.6.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtbase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "99b63c90d57e03fb23c3750b28f70e810c981474",
"version": "6.6.1",
"port-version": 9
},
{
"git-tree": "5e2e2b00fd42bc15c333b7dded4e7db4109ca11f",
"version": "6.6.1",
Expand Down
Loading