Skip to content

[osg] Added OPENGL_PROFILE option to osg port as a triplet variable.#24108

Merged
strega-nil-ms merged 3 commits intomicrosoft:masterfrom
jasonbeverage:osg_openglprofile
Apr 14, 2022
Merged

[osg] Added OPENGL_PROFILE option to osg port as a triplet variable.#24108
strega-nil-ms merged 3 commits intomicrosoft:masterfrom
jasonbeverage:osg_openglprofile

Conversation

@jasonbeverage
Copy link
Copy Markdown
Contributor

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.

Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

Yes

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

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

@JonLiu1993 JonLiu1993 self-assigned this Apr 13, 2022
@JonLiu1993 JonLiu1993 changed the title Added OPENGL_PROFILE option to osg port as a triplet variable. [osg] Added OPENGL_PROFILE option to osg port as a triplet variable. Apr 13, 2022
@JonLiu1993 JonLiu1993 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Apr 13, 2022
@JonLiu1993 JonLiu1993 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Apr 14, 2022
@strega-nil-ms
Copy link
Copy Markdown
Contributor

Thanks so much!

@strega-nil-ms strega-nil-ms merged commit bb584d3 into microsoft:master Apr 14, 2022
@jasonbeverage
Copy link
Copy Markdown
Contributor Author

Thanks for merging this PR! It will make building osgearth and osg applications much easier.

@jasonbeverage jasonbeverage deleted the osg_openglprofile branch April 14, 2022 16:30
@vicroms vicroms mentioned this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants