Load and Save File

Hi, I just try to learn OpenGL at the moment and I have lots of fun with it. BUt I have some problem, about loading and saving a file so does anyone know how to load and save a standard file by using opengl code? I will be more appreciate if you can tell me where can i find that code. Thanks for your help.
Charlie Lim

OpenGL has no file access abilities, nor, for that matter, any I/O capabilities at all. Unless you call rendering an output capability–which it very much is–in which case I eat the small portion of that last sentence which was inaccurate.

Anyway, do you mean general file access, if so, refer to preceeding paragraph. If you mean loading objects or textures or whatnot, you’ll have to come up with your own routines for loading them, perhaps look up some information on graphics file formats and how 3D models are recorded.

[This message has been edited by Omaha (edited 03-20-2002).]

You can find examples of loading 3D object files at this site. http://nehe.gamedev.net
Depending on the format you need, you may need to look at other sites for the code.

Loading and saving objects is not really opengl function, but a function of the language you use. The main thing about loading and saving a file is understanding the format in which the file has been saved.
Then ether loading the file and converting the objects in the file to an opengl object.
The same for saving a file, you must know how to convert the opengl object to the format of the type file you wish to save.

Originally posted by Charlie:
Hi, I just try to learn OpenGL at the moment and I have lots of fun with it. BUt I have some problem, about loading and saving a file so does anyone know how to load and save a standard file by using opengl code? I will be more appreciate if you can tell me where can i find that code. Thanks for your help.
Charlie Lim