Skip to content

Commit

Permalink
[qtbase] Add support for OpenGL ES 3.0 (microsoft#36407)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd authored Feb 2, 2024
1 parent 47237ed commit 69a6cce
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
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"
]
}
]
},
"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 @@ -7182,7 +7182,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

0 comments on commit 69a6cce

Please sign in to comment.