瀏覽代碼

Examples: OpenGL2, OpenGL3: Added glPixelStorei() calls borrowed from SDL examples.

omar 7 年之前
父節點
當前提交
42c32bf00c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      examples/imgui_impl_opengl2.cpp

+ 1 - 0
examples/imgui_impl_opengl2.cpp

@@ -141,6 +141,7 @@ bool ImGui_ImplOpenGL2_CreateFontsTexture()
     glBindTexture(GL_TEXTURE_2D, g_FontTexture);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
 
     // Store our identifier