Search   Feed   Browse   Add
Feed items 1 - 1 of 1 for February 2008

Io

Io programming language

Screenshot - February 27, 2008

Some sample code for taking a screenshot in an OpenGL app: First, let us add a Image method to help: Image grabScreen := method( data := Sequence clone width := glutGet(GLUT_WINDOW_WIDTH) height := glutGet(GLUT_WINDOW_HEIGHT) glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data) self setDataWidthHeightComponentCount(data, width, height, 4) self flipY ) Now we can use it (within a running GL application): Image clone grabScreen.
http://www.iolanguage.com/blog/blog.cgi?do=item&id=109
Available Archives
- January (1 item)
- February (1 item)
- March (1 item)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact