Просмотр исходного кода

Reset glPixelStorei GL_UNPACK_ROW_LENGTH to 0 after texture upload, if it's been changed.

Jonathan Young 10 лет назад
Родитель
Сommit
ee5d73a328
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/renderer_gl.cpp

+ 6 - 0
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);