PDA

View Full Version : What is OpenGL



prominiskater
12-23-2003, 03:19 PM
I've been programming using C++ for about 2 years now, but i'm tired of using the graphics library provided by Broland's Turbo C++. I started looking around the internet and came across OpenGL. I've read a lot of sites but none of them really say what OpenGL is. Is OpenGL and C++ related? Is OpenGL strictly for graphics? Can somebody please tell me.

-Chris

12-23-2003, 03:49 PM
Yes OpenGL is strictly a 2D/3D graphic API, mostly oriented toward 3D hardware acceleration.

The API have plain C bindings, so that you can use OpenGL with almost any langage, from C++ to Java, and from Basic to Python.

Some sites are very useful to start : http://nehe.gamedev.net
Look for the OpenGL tutorial section, the famous NeHe lessons.

For reference, browse the www.opengl.org (http://www.opengl.org) developper section, they have the complete spec, some (old) advices and tutorials.

See the Extension Registry : http://oss.sgi.com/projects/ogl-sample/registry/
You will soon have to deal with OpenGL extensions to do some decent stuff. Without extensions, you are stuck with OpenGL 1.1 .

You don't need any particular SDK to start coding, but you might find it useful to use libraries such as GLUT (or GLFW for more advanced stuff) to simplify the GL window creation and events handling.

I wish you good luck in the world of OpenGL !

Deiussum
12-25-2003, 10:48 AM
If you are using Turbo C++, you will probably need to find a newer compiler to use for OpenGL programming. Turbo C++ is strictly a DOS compiler, and to use OpenGL under Windows you need to be able to compile Win32 executables. (Unless you get DGJPP and Mesa, but that is a software implementation, and won't take as much advantage of your video card's capabilities.)

There are a number of free compilers, available, though. Cygwin gives you a linux-like environment under Windows, including the gnu compiler. There is also Dev-C++, which I haven't used but a few other people here do, so they could probably help you get started on it.

[This message has been edited by Deiussum (edited 12-25-2003).]