CDS 301 Spring, 2013 CH3: MATLAB OpenGL Samples February 28, 2013 Jie Zhang Copyright ©
References: OpenGL Red book (online) “
Sample C files, and the resulting images s/glut/examples/
C/C++ & OpenGL To compile in cds##.gmu.edu % forming the object file “test.o” from source code “test.c” $gcc –c –Wall –D_LINUX_ test.c %form the executable from the object “test.o” %through linking OpenGL library files $gcc –lglut –lGLU test.o –o test %run the executable $./test &
“test.c”
“cube.c”
OpenGL project Produce the 2-D Gaussian function using C/OpenGL. A prototype c program will be provided
The End