Introduction to OpenGL Prof. Dr.-Ing. Lars Linsen - Faculty.jacobs ...
Introduction to OpenGL Prof. Dr.-Ing. Lars Linsen - Faculty.jacobs ...
Introduction to OpenGL Prof. Dr.-Ing. Lars Linsen - Faculty.jacobs ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Using <strong>OpenGL</strong> primitives<br />
• Primitives are specified using<br />
glBegin( primType );<br />
glEnd();<br />
– primType is any of the primitive types and determines how<br />
vertices are combined.<br />
GLfloat red, green, blue;<br />
Glfloat coords[3];<br />
glColor3f( red, green, blue );<br />
glBegin( glBegin(<br />
primType );<br />
for ( i = 0; i < nVerts; ++i ) {<br />
glVertex3fv( coords );<br />
}<br />
glEnd();<br />
Jacobs University<br />
Visualization and Computer Graphics Lab<br />
320621: Advanced Visualization Lab 56