From: ouv Date: Thu, 5 Apr 2012 15:31:19 +0000 (+0400) Subject: 0023000: Improve the way the gradient and textured background is managed in 3d viewer X-Git-Tag: V6_5_3~23 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=1b1ab324bc04ccf2708cbb055022b181288aa78a;p=occt-copy.git 0023000: Improve the way the gradient and textured background is managed in 3d viewer --- diff --git a/src/OpenGl/OpenGl_View_2.cxx b/src/OpenGl/OpenGl_View_2.cxx index 6a1813eabb..dee9a49afd 100644 --- a/src/OpenGl/OpenGl_View_2.cxx +++ b/src/OpenGl/OpenGl_View_2.cxx @@ -1455,6 +1455,8 @@ void OpenGl_View::CreateBackgroundTexture (const Standard_CString AFileName, con *pdata++ = (GLubyte)( 255 * color.Blue() ); } + glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); + GLuint texture = 0; glGenTextures( 1, &texture ); glBindTexture( GL_TEXTURE_2D, texture );