From e9ffbcc1b0aa771ca627a26acb6565b6b5e85555 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 30 Jul 2015 11:45:10 +0200 Subject: [PATCH 1/3] OSG 3.3.3 moves GL extensions out of osg::Texture --- components/resource/texturemanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/resource/texturemanager.cpp b/components/resource/texturemanager.cpp index 4bd712ea5..252456fb1 100644 --- a/components/resource/texturemanager.cpp +++ b/components/resource/texturemanager.cpp @@ -118,10 +118,17 @@ namespace Resource case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): { +#if OSG_MIN_VERSION_REQUIRED(3, 3, 3) + osg::GLExtensions* exts = osg::GLExtensions::Get(0, false); + if (exts && !exts->isTextureCompressionS3TCSupported + // This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG. + && !osg::isGLExtensionSupported(0, "GL_S3_s3tc")) +#else osg::Texture::Extensions* exts = osg::Texture::getExtensions(0, false); if (exts && !exts->isTextureCompressionS3TCSupported() // This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG. && !osg::isGLExtensionSupported(0, "GL_S3_s3tc")) +#endif { std::cerr << "Error loading " << filename << ": no S3TC texture compression support installed" << std::endl; return false; From 77a3a52b4e5d154d55c50c728410c809aa137a8c Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 30 Jul 2015 12:16:15 +0200 Subject: [PATCH 2/3] What's wrong with this statement? --- components/resource/texturemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/resource/texturemanager.cpp b/components/resource/texturemanager.cpp index 252456fb1..750dfaab7 100644 --- a/components/resource/texturemanager.cpp +++ b/components/resource/texturemanager.cpp @@ -118,7 +118,7 @@ namespace Resource case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): { -#if OSG_MIN_VERSION_REQUIRED(3, 3, 3) +#if OSG_MIN_VERSION_REQUIRED(3,3,3) osg::GLExtensions* exts = osg::GLExtensions::Get(0, false); if (exts && !exts->isTextureCompressionS3TCSupported // This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG. From 1f78ebd3c98bf9759f5573a76279e44eab8cec61 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 30 Jul 2015 12:22:51 +0200 Subject: [PATCH 3/3] Oops? --- components/resource/texturemanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/resource/texturemanager.cpp b/components/resource/texturemanager.cpp index 750dfaab7..d29aa2812 100644 --- a/components/resource/texturemanager.cpp +++ b/components/resource/texturemanager.cpp @@ -2,6 +2,7 @@ #include #include +#include #include