OpenGL graphics: source code of an application.
RGraphics: a complete C++ project
Project RGraphics is an example of a C++ OpenGL graphics implementation. The source code is available for the complete C++Builder project. Those are not fragments of code, as given in the most of the OpenGL tutorials and examples available on the Web. You can use the code to execute the program, and then to see how it works and modify it as you wish.
The code includes the initialization procedure and most of the basic OpenGL features provided in the grlx.cpp program unit. You can create a sphere, ellipsoide, a box, a ring, a cone, a torus a rectangle, a disc or an arbitrary shape retrieved from an ASCII STL file. Moreover, the code for a reflective sphere is provided, as well as for a rectangular mirror that can be moved and rotated. The above image shows an example of several RGraphics figures reflected in a mirror.
Inserted in the code are comments that explain the main code lines. A more detailed explanation comes in the help file. Toatal of about 1800 code lines is provided. The platform is Windows XP, Vista, Windows7. Requirements: C++Builder installed on your computer, glut.h and glu.h.
On the figure below there are some boxes with textures, a mirror and some blue spheres. Whole scenary is in movement. The view angle changes and the spheres rotate over a circular trajectory. Understanding the source code for such models you can create your own animations, more complicated than those of the examples provided in RGraphics.
Use the following link to download the example demo program
Download the zip file and extract
all files to a new directory on your hard disc. Then, execute prglrx.exe. Do not execute it directly from the zipped file.
source code and the help file with explanation are not free, but the proce is very low (US $19). Use the button below to order the