[osg] Added OPENGL_PROFILE option to osg port as a triplet variable.#24108
[osg] Added OPENGL_PROFILE option to osg port as a triplet variable.#24108strega-nil-ms merged 3 commits intomicrosoft:masterfrom
Conversation
There was a problem hiding this comment.
You have modified or added at least one portfile where deprecated functions are used.
Details
If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)
In the ports that use the new function, you have to add the corresponding dependencies:
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}The following files are affected:
ports/osg/portfile.cmake
You have modified or added at least one vcpkg.json where a "license" field is missing.
Details
If you feel able to do so, please consider adding a "license" field to the following files:
ports/osg/vcpkg.json
Valid values for the license field can be found in the documentation
|
Thanks so much! |
|
Thanks for merging this PR! It will make building osgearth and osg applications much easier. |
This PR allows you to set the OPENGL_PROFILE used by osg as a triplet variable via the osg_OPENGL_PROFILE setting. The default is GL3. I've tested this locally on Windows x64-windows using GL2, GL3 and GLCORE and they all built as expected. It's really useful to be able to switch between the different builds via triplets, thanks to @Osyotr for the suggestion to do it this way instead of as a feature.
What does your PR fix?
Some applications that use OSG require the use of modern OpenGL and need OSG to be built in gl3 modes to function properly. The main purpose of this to allow osg to create an OpenGL core context which lets it be used in tools like NVIDIA Nsight or in VMWare. We are preparing a new osgEarth 3.3 release and it needs to be built against an OSG with GL3 support.
Which triplets are supported/not supported? Have you updated the CI baseline?
Same as previously supported. I tested locally on x64-windows.
Does your PR follow the maintainer guide?
Yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?Yes