OpenGL Code Samples
Code Samples released by SGI with the OpenGL 1.1 distribution in 1997. These are very useful for beginning OpenGL coding and learning OpenGL program structure. Advanced rendering and later extensions are not covered in these examples.
Simple program to test accumulation. Source code: accum.c. |
Simple program to test bitmap rendering. Source code: bitmap1.c. |
Simple program to test bitmap rendering. Source code: bitmap2.c. |
Colors in OpenGL are generally represented as floating point numbers between 0.0 and 1.0 instead of the common 0 and 255. Compiling shaders. Compiling shaders is easy once you have loaded the source code (either from file or as a hard-coded string). You can easily include your shader source in the C code through C11 raw string literals. The program.c file would contain the OpenGL generated code for drawing the primitive. In case an extra file named skeleton.c is supplied, the program will read its contents, replace the first HTML comment it finds with the generated C code, and then write the results to the new file program.c file. Tux Paint is a free, award-winning drawing program for children ages 3 to 12. It combines an easy-to-use interface, fun sound effects, and an encouraging cartoon mascot who guides children as they use the program. Kids are presented with a blank canvas and a variety of drawing tools to help them be creative. Source Code / OpenGL Paint ball with recursive subdivision. 1 Points Download Earn points. First statement is that if want to run the above program, in the. Here you can download the source code of the Warli Painting Computer Graphics Project in OpenGL – 18CSL67 academic mini-project. Project Description of Warli painting of CGV mini-project The basic objective of our project is to draw a Warli painting.
Program that demonstrates reading back the framebuffer and zooming the pixels. Source code: copy.c. |
Simple program to test depth buffering. Source code: depth.c. |
Not so simple test that does all sorts of stuff (see the source for more details). Source code: logo.c. |
Simple nurb (non-uniform rational b-spline) program. Source code: nurb.c. |
Program that uses packed pixel types for DrawPixels, ReadPixels, TexImage2D, and GetTexImage. Use -h option to display a list of command line options. Use Key h in the created window for key options. Source code: packedpix.c. |
All the OpenGL primitives all in a row. Source code: prim.c. |
Another 'megatest' with lots of options. Source code: quad.c. |
Test of auto texture coordinate generation. Source code: sphere.c. |
Neat little warping program. Click in the window to add control points, and press space bar to start warping. Source code: stretch.c. |
Ye 'ole classic (red in this case) teapot. Source code: teapot.c. |
Simple example of using two textures. Source code: twotextures.c. |
Opengl Paint Program Source Code Generator
Neat wave program with some contouring options (press 'c'). Source code: wave.c. |