OpenSceneGraph
OpenSceneGraph copied to clipboard
Silence OpenGL deprecation warnings on macOS; we know.
Once Apple finally decides to drop OpenGL support then OSG can also then remove support for Apple products.
This cuts down on the amount of spam, 8 lines per call to OpenGL on macOS. Reduces compile time in addition to making actual errors easier to track down.
If merged, can this be cherry-picked to OpenSceneGraph-3.6 ?
Example of spam to be silenced:
In file included from /Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/src/osg/PrimitiveRestartIndex.cpp:15:
/Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/include/osg/State:1149:30: warning: 'glEnable' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations]
if (enabled) glEnable(mode);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2472:13: note: 'glEnable' has been explicitly marked deprecated here
extern void glEnable (GLenum cap) OPENGL_DEPRECATED(10.0, 10.14);
^
In file included from /Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/src/osg/PrimitiveRestartIndex.cpp:15:
/Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/include/osg/State:1150:22: warning: 'glDisable' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations]
else glDisable(mode);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2462:13: note: 'glDisable' has been explicitly marked deprecated here
extern void glDisable (GLenum cap) OPENGL_DEPRECATED(10.0, 10.14);
^
Thanks. Sounds sensible. I'll wrapping major client work next week, so plan to pop back over to do some OSG support catch up in December. Will merge with 3.6 branch.
On Wed, 17 Nov 2021 at 16:21, Bret Curtis @.***> wrote:
Once Apple finally decides to drop OpenGL support then OSG can also then remove support for Apple products.
This cuts down on the amount of spam, 8 lines per call to OpenGL on macOS. Reduces compile time in addition to making actual errors easier to track down.
If merged, can this be cherry-picked to OpenSceneGraph-3.6 ?
Example of spam to be silenced:
In file included from /Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/src/osg/PrimitiveRestartIndex.cpp:15: /Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/include/osg/State:1149:30: warning: 'glEnable' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations] if (enabled) glEnable(mode); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2472:13: note: 'glEnable' has been explicitly marked deprecated here extern void glEnable (GLenum cap) OPENGL_DEPRECATED(10.0, 10.14); ^ In file included from /Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/src/osg/PrimitiveRestartIndex.cpp:15: /Users/gitlab/builds/OpenMW/openmw-dep/macos/source/openscenegraph/include/osg/State:1150:22: warning: 'glDisable' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations] else glDisable(mode); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2462:13: note: 'glDisable' has been explicitly marked deprecated here extern void glDisable (GLenum cap) OPENGL_DEPRECATED(10.0, 10.14); ^
You can view, comment on, or merge this pull request online at:
https://github.com/openscenegraph/OpenSceneGraph/pull/1102 Commit Summary
- bc0728b https://github.com/openscenegraph/OpenSceneGraph/pull/1102/commits/bc0728b44f8c1eebf59d4e208b8eff16a67819f1 Silence OpenGL deprecation warnings on macOS; we know.
File Changes
(1 file https://github.com/openscenegraph/OpenSceneGraph/pull/1102/files )
- M CMakeLists.txt https://github.com/openscenegraph/OpenSceneGraph/pull/1102/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a (3)
Patch Links:
- https://github.com/openscenegraph/OpenSceneGraph/pull/1102.patch
- https://github.com/openscenegraph/OpenSceneGraph/pull/1102.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openscenegraph/OpenSceneGraph/pull/1102, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKEGUD3TBMCNGD4COKRHB3UMPI6LANCNFSM5IHNBNVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.