18.07.2014 Views

An Interactive Introduction to OpenGL Programming

An Interactive Introduction to OpenGL Programming

An Interactive Introduction to OpenGL Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Reading the Framebuffer<br />

• Generated images can be read from the<br />

framebuffer<br />

– You get back a block of pixels<br />

• Read width×height rectangle of pixels<br />

– Lower-left corner of rectangle positioned<br />

at (x, y)<br />

glReadPixels( x, y, width, height,<br />

format, type, pixels );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!