PDA

View Full Version : How to create and control table in OpenGL



wzhao53
11-27-2003, 05:18 PM
I will like to create something like a table in OpenGL, then use something like (m,n) or other method to control each cell, like background color and write a number in cell.

How can I do that?

Thanks!

mikael_aronsson
11-27-2003, 11:31 PM
Have a peek at the documentation on:

glBegin( GL_QUADS);
glColor3f( r, g, b);
glVertex3f( x, y, z);
glVertex3f( x, y, z);
glVertex3f( x, y, z);
glVertex3f( x, y, z);
glEnd();

Mikael