Skip to content

Commit

Permalink
[qtbase] Add support for OpenGL ES 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Jan 27, 2024
1 parent 7032c57 commit cb630ec
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ports/qtbase/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,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 @@ -186,6 +187,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 @@ -200,8 +202,11 @@ 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')
endif()

if("gles2" IN_LIST FEATURES OR "gles3" IN_LIST FEATURES)
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF)
endif()

Expand All @@ -222,8 +227,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": 7,
"port-version": 8,
"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 @@ -204,6 +204,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 @@ -7178,7 +7178,7 @@
},
"qtbase": {
"baseline": "6.6.1",
"port-version": 7
"port-version": 8
},
"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": [

Check failure on line 2 in versions/q-/qtbase.json

View check run for this annotation

Azure Pipelines / microsoft.vcpkg.pr (x86_windows)

versions/q-/qtbase.json#L2

versions/q-/qtbase.json(2,): error : while parsing versions for qtbase from version/q-/qtbase.json
{
"git-tree": "f85eab5f1f1d38386c951c9a5c61b9a36441bd4a",
"version": "6.6.1",
"port-version": 8
},
{
"git-tree": "f21d3613038a80d31b8b1aaec2c16a55f45da52e",
"version": "6.6.1",
Expand Down

0 comments on commit cb630ec

Please sign in to comment.