vcl/opengl/texture.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
New commits: commit f04b018871efeca10d4d89e7c20c33cd664de43d Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Thu Apr 7 14:22:51 2016 +0900 Revert "opengl: use GL_BGRA as default backend format on WNT" This reverts commit f80c2dd03d9d18c06ea0a9763ca59aeb1d2ed0e5. THis is wrong anyway... diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index 0a83661..1f270bc 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -30,15 +30,6 @@ #include "opengl/texture.hxx" #include "opengl/zone.hxx" -namespace -{ -#ifdef WNT -const GLenum constDefaultBackendFormat = GL_RGBA; -#else -const GLenum constDefaultBackendFormat = GL_BGRA; -#endif -} // end anonymous namespace - // texture with allocated size ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate ) : mnRefCount( 1 ), @@ -64,7 +55,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate ) CHECK_GL_ERROR(); if( bAllocate ) { - glTexImage2D( GL_TEXTURE_2D, 0, constDefaultBackendFormat, nWidth, nHeight, 0, constDefaultBackendFormat, GL_UNSIGNED_BYTE, nullptr ); + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr ); CHECK_GL_ERROR(); } glBindTexture( GL_TEXTURE_2D, 0 ); @@ -100,7 +91,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nX, int nY, int nWidth, int nHeight ) CHECK_GL_ERROR(); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); CHECK_GL_ERROR(); - glCopyTexImage2D( GL_TEXTURE_2D, 0, constDefaultBackendFormat, nX, nY, nWidth, nHeight, 0 ); + glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nX, nY, nWidth, nHeight, 0 ); CHECK_GL_ERROR(); glBindTexture( GL_TEXTURE_2D, 0 ); CHECK_GL_ERROR(); @@ -137,7 +128,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, int nFormat, int CHECK_GL_ERROR(); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); CHECK_GL_ERROR(); - glTexImage2D( GL_TEXTURE_2D, 0, constDefaultBackendFormat, mnWidth, mnHeight, 0, nFormat, nType, pData ); + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, mnWidth, mnHeight, 0, nFormat, nType, pData ); CHECK_GL_ERROR(); glBindTexture( GL_TEXTURE_2D, 0 ); CHECK_GL_ERROR(); commit e79882aaef5ba71d0feb72ae745bd577f7afb23a Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Thu Apr 7 14:21:49 2016 +0900 Revert "opengl: really use GL_BGRA as default backend format on WNT" This reverts commit 7aadf84225350df2e6814f57b7a27c5d39b0f7ef. We can't influence the internal texture format in that way. diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index 68d10a9..0a83661 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -33,9 +33,9 @@ namespace { #ifdef WNT -const GLenum constDefaultBackendFormat = GL_BGRA; -#else const GLenum constDefaultBackendFormat = GL_RGBA; +#else +const GLenum constDefaultBackendFormat = GL_BGRA; #endif } // end anonymous namespace
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits