0023000: Improve the way the gradient and textured background is managed in 3d viewer
authorouv <ouv@quintex.nnov.opencascade.com>
Thu, 5 Apr 2012 15:31:19 +0000 (19:31 +0400)
committerouv <ouv@opencascade.com>
Fri, 6 Apr 2012 13:43:55 +0000 (17:43 +0400)
src/OpenGl/OpenGl_View_2.cxx

index 6a1813e..dee9a49 100644 (file)
@@ -1455,6 +1455,8 @@ void OpenGl_View::CreateBackgroundTexture (const Standard_CString AFileName, con
         *pdata++ = (GLubyte)( 255 * color.Blue() );
       }
 
         *pdata++ = (GLubyte)( 255 * color.Blue() );
       }
 
+    glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
+
     GLuint texture = 0;
     glGenTextures( 1, &texture );
     glBindTexture( GL_TEXTURE_2D, texture );
     GLuint texture = 0;
     glGenTextures( 1, &texture );
     glBindTexture( GL_TEXTURE_2D, texture );