unsigned char t0;
//it, save it with glReadPixels,
but get nothing but a GL_INVALID_OPERATION error !
if I want get GL_BITMAP,so how can I do?
You probably want:
(depending on how you want the RGBA valud ordered)
You can’t use GL_COLOR_INDEX on a RGBA surface (GLUT_RGBA)
Thanks I think so,but I want get bitmap by GL_BITMAP,so how can I do?
As he said, you cannot do that.
However, I suspect you’re confusing bitmaps as in BMP image files, with bitmaps as defined by OpenGL. They are not the same thing. A bitmap in OpenGL is a one bit image (therefore the name; bit-map), where a single bit represents, sort of, “pixel on” and “pixel off”.
To save a BMP image, you need to read back the image as sqrt[-1] said.
Yes,A bitmap in OpenGL is a one bit image ,How to get one bit image by GL_BITMAP?
So let’s say it a third time; you can’t.