• Advertisement
Sign in to follow this  

glReadPixels

This topic is 4273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I first use glReadPixels to read the pixels into the memory. Then I use glDrawPixels to draw the pixels on the screen. But I find the color of the picture is just white and black. why? glColor3f(1.0,0.0,0.0);//////////red glBegin();//////////////draw the graphics glVertex3f(); ... glEnd(); glReadPixels(); glDrawPixels(); glSwapBuffers();

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by dasan11
I first use glReadPixels to read the pixels into the memory.
Then I use glDrawPixels to draw the pixels on the screen.
But I find the color of the picture is just white and black.
why?

glColor3f(1.0,0.0,0.0);//////////red
glBegin();//////////////draw the graphics
glVertex3f();
...
glEnd();
glReadPixels();
glDrawPixels();
glSwapBuffers();
Because you're using weird functions that take no parameters. Post your actual code (including parameters) and we might be able to see what's wrong.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hahahahaha, good response. You New Yorkers crack me up!

Share this post


Link to post
Share on other sites
You may not have correctly set your pixel transfer mode for either the capture of the buffer or the display of the buffer. Just a thought.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement