osgEarth and osg and OPENGL_PROFILE=GL2 vs GL3 discussion #31861
Replies: 3 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Can you elaborate on how VCPKG_CMAKE_CONFIGURE_OPTIONS would be used in this case? The issue is the question of what the "default" value should be, GL2 or GL3. If you are maintaining a legacy osg application that needs the fixed function pipeline or just running the osg examples then you want it to be GL2. If you are developing an osgearth application or a modern shader based application you need it to be GL3. |
Beta Was this translation helpful? Give feedback.
-
There's no good solution unfortunately. |
Beta Was this translation helpful? Give feedback.
-
Recently this PR was merged which sets the osg_OPENGL_PROFILE back to GL2 from GL3 in order to get the osg examples working. osgEarth requires that osg be built against either GL3 or GLCORE versions of osg and we've been getting some error reports on our Github issues that osgearth isn't working when installed from vcpkg (because osg is now being built against GL2 instead of GL3).
This requires osgEarth users to remember to modify their triplet file and add this line to it:
I've updated the documentation in osgEarth to reflect the current state of the osg port and that it's required to set the custom triplet variable.
This is fine if that is what is required, but it's not obvious to someone that just tries to run vcpkg install osgearth without consulting any documentation.
My current thought is to submit a PR to the osgEarth port that checks for an appropriate setting of the osg_OPENGL_PROFILE and if it's not GL3 or GLCORE then emitting a FATAL error telling the user to set the osg_OPENGL_PROFILE triplet variable and stopping the build. That means that users won't be able to vcpkg install osgearth without setting the variable but it's better to be notified of the issue up front and fail than let it seemingly succeed only to end up with a non-working osgEarth.
Does my suggestion of existing the osgEarth build with a notification to set the osg_OPENGL_PROFILE triplet variable to GL3 make sense or is there some other vcpkg solution to this issue that I might be overlooking?
Beta Was this translation helpful? Give feedback.
All reactions