diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 58dabd2cee..ead6b7c80c 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -8,6 +8,8 @@ #include +#include + #include #include #include @@ -754,6 +756,12 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings) osg::ref_ptr exts = osg::GLExtensions::Get(0, false); bool shadersSupported = exts && (exts->glslLanguageVersion >= 1.2f); +#if OSG_VERSION_LESS_THAN(3, 6, 6) + // hack fix for https://github.com/openscenegraph/OpenSceneGraph/issues/1028 + if (exts) + exts->glRenderbufferStorageMultisampleCoverageNV = nullptr; +#endif + std::string myguiResources = (mResDir / "mygui").string(); osg::ref_ptr guiRoot = new osg::Group; guiRoot->setName("GUI Root"); diff --git a/components/sceneutil/util.cpp b/components/sceneutil/util.cpp index 5c2f8c2934..5b6e0a3ee0 100644 --- a/components/sceneutil/util.cpp +++ b/components/sceneutil/util.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -324,12 +323,6 @@ osg::ref_ptr addEnchantedGlow(osg::ref_ptr node, Resourc bool attachAlphaToCoverageFriendlyFramebufferToCamera(osg::Camera* camera, osg::Camera::BufferComponent buffer, osg::Texture * texture, unsigned int level, unsigned int face, bool mipMapGeneration) { -#if OSG_VERSION_LESS_THAN(3, 6, 6) - // hack fix for https://github.com/openscenegraph/OpenSceneGraph/issues/1028 - osg::ref_ptr extensions = osg::GLExtensions::Get(0, false); - if (extensions) - extensions->glRenderbufferStorageMultisampleCoverageNV = nullptr; -#endif unsigned int samples = 0; unsigned int colourSamples = 0; bool addMSAAIntermediateTarget = Settings::Manager::getBool("antialias alpha test", "Shaders") && Settings::Manager::getInt("antialiasing", "Video") > 1;