lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



We had a similar problem when saving images from an OpenGL canvas, and the solution was to call

      glPixelStorei(GL_PACK_ALIGNMENT,1);

  before calling

      glReadPixels(xmin,ymin,width,height,GL_RED,GL_UNSIGNED_BYTE,red);
      glReadPixels(xmin,ymin,width,height,GL_GREEN,GL_UNSIGNED_BYTE,green);
      glReadPixels(xmin,ymin,width,height,GL_BLUE,GL_UNSIGNED_BYTE,blue);

  But It may be not the solution of your case.

Regards,
Antonio Scuri