Interface Design

hello

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.

thanks!

PiRiTa

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?).

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.

Dave

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.