08.01.2015 Views

OpenGL viewing notes - Bryn Mawr Computer Science

OpenGL viewing notes - Bryn Mawr Computer Science

OpenGL viewing notes - Bryn Mawr Computer Science

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Initialization<br />

<br />

<br />

Using the same color and vertex data, first we<br />

enable<br />

glEnableClientState(GL_COLOR_ARRAY);<br />

glEnableClientState(GL_VERTEX_ARRAY);<br />

Identify location of arrays<br />

glVertexPointer(3, GL_FLOAT, 0, vertices);<br />

3d arrays<br />

stored as floats data contiguous data array<br />

glColorPointer(3, GL_FLOAT, 0, colors);

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

Saved successfully!

Ooh no, something went wrong!