From e2ee1d5689e1803cd7f63b94dbcfb7ff70b07f13 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 5 Feb 2016 18:58:22 +0100 Subject: [PATCH] Use separate textures for the MyGUI RenderManager This means we can more reliably set the filter parameters. I believe this commit creates a regression where non-DDS GUI textures would display upside down, which will be addressed by further refactoring in the next commits. --- components/myguiplatform/myguitexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/myguiplatform/myguitexture.cpp b/components/myguiplatform/myguitexture.cpp index 50ac5c1f3..a42568cf8 100644 --- a/components/myguiplatform/myguitexture.cpp +++ b/components/myguiplatform/myguitexture.cpp @@ -86,7 +86,9 @@ namespace osgMyGUI if (!mTextureManager) throw std::runtime_error("No texturemanager set"); - mTexture = mTextureManager->getTexture2D(fname, osg::Texture2D::CLAMP_TO_EDGE, osg::Texture2D::CLAMP_TO_EDGE); + mTexture = new osg::Texture2D(mTextureManager->getImage(fname)); + mTexture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); + mTexture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); // disable mip-maps mTexture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);