kschroed
10-10-2001, 03:33 AM
hi there.
i want to add a 'save as' feature to my nice GL-scene. but i don't get glReadPixels() run. i use a double buffered window and it is NOT overlapped. glReadPixels does not fill the pixels array and sometimes it results in an 'int 3' ....
// PixelStore and PixelTransfer are
// at defaults;
// r containes window size
unsigned char * pixels_rgba = (unsigned char *) malloc (r.right * r.bottom * 4);
glReadPixels(0, 0, 2, 2, GL_RED, GL_UNSIGNED_BYTE, &pixels_rgba);
free(pixels_rgba);
any hints??
thanks a lot
Kai
i want to add a 'save as' feature to my nice GL-scene. but i don't get glReadPixels() run. i use a double buffered window and it is NOT overlapped. glReadPixels does not fill the pixels array and sometimes it results in an 'int 3' ....
// PixelStore and PixelTransfer are
// at defaults;
// r containes window size
unsigned char * pixels_rgba = (unsigned char *) malloc (r.right * r.bottom * 4);
glReadPixels(0, 0, 2, 2, GL_RED, GL_UNSIGNED_BYTE, &pixels_rgba);
free(pixels_rgba);
any hints??
thanks a lot
Kai