View Full Version : Interface Design
03-14-2001, 08:41 AM
i have to design an interface which can open, save, print etc., bmp files. i am using VC++ interface. what i need to know is, whether i can do it using only the functions provided in OpenGL and its utility kit ( GLUT ). if yes, how? if no, then is it essential to use MFC. and the condition is, i want a visual interface.
OpenGL does not provide functions to open/load image files, if you want to load an image for display with OpenGL, you need to read the file and retrieve the pixel data.
Saving is the same problem, you can read data from the frame buffer and if you want to save it, you have to rebuild an image file from this data.
By printing, if you mean with a printer, the answer is no. If you mean to the screen, yes you can (OpenGL is a graphics library isn't it?).
03-14-2001, 12:00 PM
If all you want to do is work with bitmaps, then why use OpenGL at all? MFC and win32 have the full bitmap support and it can be extended to printing far easier than sampling an ogl viewport.
Otherwise, I'd recommend looking into glaux functions (glaux.lib and GL/glaux.h). There's one there for loading a bitmap rather painlessly. Also, check out NeHe's tutorial on loading bitmaps.
03-14-2001, 12:17 PM
I posted a similar response to this post on the beginner board... if all you want is to load/save/print bitmaps, using OpenGL is kind of senseless.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.