Revision: 50614
          http://brlcad.svn.sourceforge.net/brlcad/?rev=50614&view=rev
Author:   bob1961
Date:     2012-05-18 16:07:46 +0000 (Fri, 18 May 2012)
Log Message:
-----------
Added calls to glPixelStorei(GL_PACK_ALIGNMENT, 1) in both to_png() and 
to_pix().

Modified Paths:
--------------
    brlcad/trunk/src/libtclcad/tclcad_obj.c

Modified: brlcad/trunk/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/trunk/src/libtclcad/tclcad_obj.c     2012-05-18 14:10:10 UTC (rev 
50613)
+++ brlcad/trunk/src/libtclcad/tclcad_obj.c     2012-05-18 16:07:46 UTC (rev 
50614)
@@ -8745,6 +8745,7 @@
 
     pixels = (unsigned char *)bu_calloc(width * height, bytes_per_pixel, 
"pixels");
     glReadBuffer(GL_FRONT);
+    glPixelStorei(GL_PACK_ALIGNMENT, 1);
     glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels);
 
     for (i = 0; i < height; ++i) {
@@ -8855,6 +8856,7 @@
 
     pixels = (unsigned char *)bu_calloc(width * height, bytes_per_pixel, 
"pixels");
     glReadBuffer(GL_FRONT);
+    glPixelStorei(GL_PACK_ALIGNMENT, 1);
     glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels);
     rows = (unsigned char **)bu_calloc(height, sizeof(unsigned char *), 
"rows");
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to