How to save OpenGL scenegraphs as BMP, JPG... or as any other raster formats please?
06-15-2000, 08:15 AM
Render it, do a glReadPixels(x, y, w, h, GL_RGB, GL_UNSIGNED_BYTE, ptr) to a memory area, add a suitable (uncompressed, 24 bit) BITMAPINFO header and save it as a BMP file. No alpha supported.
TGA is identical with B and R swapped, but the header is a simple 18 bytes and supports RGBA, too.
For JPG you need some additional image compression lib.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.