From 6bb2251faf89661106eef8f8a7333831687dc4e5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 21 Jul 2014 13:45:58 +0000 Subject: [PATCH] Added setting of glPixelStore before glTexSubImage2D call. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14374 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgText/Glyph.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osgText/Glyph.cpp b/src/osgText/Glyph.cpp index 339b47f8f..7faa4d25f 100644 --- a/src/osgText/Glyph.cpp +++ b/src/osgText/Glyph.cpp @@ -372,6 +372,12 @@ void GlyphTexture::apply(osg::State& state) const // clear the list since we have now subloaded them. glyphsWereSubloading.clear(); + glPixelStorei(GL_UNPACK_ALIGNMENT,1); + + #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) + glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth()); + #endif + // Subload the image once glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, getTextureWidth(),