From ee5d73a3286b22d3e50b5d27fa70130b3eef7d4f Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Tue, 12 May 2015 13:09:31 +1000 Subject: [PATCH] Reset glPixelStorei GL_UNPACK_ROW_LENGTH to 0 after texture upload, if it's been changed. --- src/renderer_gl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index c790ecb4..343d87ca 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -3837,6 +3837,12 @@ namespace bgfx { namespace gl ) ); } + if (!convert + && unpackRowLength) + { + GL_CHECK(glPixelStorei(GL_UNPACK_ROW_LENGTH, 0) ); + } + if (NULL != temp) { BX_FREE(g_allocator, temp);