30.07.2013 Views

Basic Graphics Programming - University of Southern California

Basic Graphics Programming - University of Southern California

Basic Graphics Programming - University of Southern California

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example: Draw Square Outline<br />

• Type = GL_LINE_LOOP<br />

glBegin(GL_LINE_LOOP);<br />

glVertex3f(0.0, 0.0, 0.0);<br />

glVertex3f(1.0, 0.0, 0.0);<br />

glVertex3f(1.0, 1.0, 0.0);<br />

glVertex3f(0.0, 1.0, 0.0);<br />

glEnd();<br />

• Calls to other functions are allowed between<br />

glBegin(type) and glEnd();<br />

21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!