Exploring Graphics Design in C/C++ with OpenGL

General Information:

Programming Resources:

 

Sample Programs:

Playing Cards Module:

 

Instruction for compilation on Unix or Windows platforms!

Playing Cards executable file for Windows platform:

* NOTE: GLUT32.DLL file has to be placed in the same diractory as CARDS.exe

 


What is OpenGL? [Back to Top]

 

Where do you get OpenGL?

OpenGL Features [Back to Top]


How OpenGL Works? [Back to Top]

· the same way that GDI ( Graphics Device Interface) work
whenever a program makes an OpenGL call, the OPENGL32 and GLU32 DLLs are loaded.

What is not in OpenGL?

Limitation of OpenGL?

Microsoft Generic implementation of OpenGL
- no direct support for printing OpenGL graphics to a monochrome printer or a color printer with less than 4 bit planes of color
- hardware palettes for various windows are not supported
- some OpenGL features are not implemented, including stereoscopic images, auxiliary buffers, and alpha bit planes.


Compiling OpenGL program on Sun Machine [Back to Top]

The most easiest way to compile C++ program with OpenGL library is to create a script.
Step 1: Create a file called “make” or give it any name
Step 2: Type in: g++ -I/sw8/include $1 –L/sw8/lib –lglut –lGLU –lGL –lm –lXext
-lXmu –lXi –lX11 –o
(for compiling multiple files add $2,$3… Example: g++ -I/sw8/include $1 –L/sw8/lib –lglut –lGLU –lGL –lm –lXext -lXmu –lXi –lX11 $2 $3 –o $4 , where $4 is the same as A.OUT)
Step 3: Change the mode of the file> chmod 711 make
Step 4: Compile your file> make filename.cpp
Step 5: (for multiple files)> make file1.cpp file2.cpp file3.cpp A_OUT