forked from teamnwah/openmw-tes3coop
Merge pull request #700 from ace13/osg-3.3.3-fixes
Fix OSG 3.3.3+ build issue
This commit is contained in:
commit
a391579382
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <osgDB/Registry>
|
#include <osgDB/Registry>
|
||||||
#include <osg/GLExtensions>
|
#include <osg/GLExtensions>
|
||||||
|
#include <osg/Version>
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
@ -118,10 +119,17 @@ namespace Resource
|
||||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_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);
|
osg::Texture::Extensions* exts = osg::Texture::getExtensions(0, false);
|
||||||
if (exts && !exts->isTextureCompressionS3TCSupported()
|
if (exts && !exts->isTextureCompressionS3TCSupported()
|
||||||
// This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG.
|
// This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG.
|
||||||
&& !osg::isGLExtensionSupported(0, "GL_S3_s3tc"))
|
&& !osg::isGLExtensionSupported(0, "GL_S3_s3tc"))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
std::cerr << "Error loading " << filename << ": no S3TC texture compression support installed" << std::endl;
|
std::cerr << "Error loading " << filename << ": no S3TC texture compression support installed" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue