From febca65ee499bc7c08da3d00a4cdcc38043eeeca Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 1 Sep 2016 17:27:12 +0000
Subject: [PATCH] trying to fix textues on macos with latest fltk

---
 Graphics/drawContext.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp
index 0827f40e35..4734f2471b 100644
--- a/Graphics/drawContext.cpp
+++ b/Graphics/drawContext.cpp
@@ -417,6 +417,7 @@ bool drawContext::generateTextureForImage(const std::string &name, int page,
         return false;
       }
       Fl_RGB_Image *img2 = (Fl_RGB_Image*)img->copy(2048, 2048);
+      glPixelStorei(GL_UNPACK_ROW_LENGTH, img2->w());
       glGenTextures(1, &imageTexture);
       glBindTexture(GL_TEXTURE_2D, imageTexture);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-- 
GitLab