PDA

View Full Version : using glMap2f(...)



03-30-2003, 02:50 PM
Looking at code from the redbook ('cos' I'm new) I wish to fully understand just how glMap2f works. How would I use it to make flat (level) set of squares (like a chess board). I said "like a Chess board", I'm not using it as a chess board!

Can someone explain how the point set (ctrlPoints[][][]) works? TIA!

float ctrlPoints[4][4][3] = {
{{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0}},
{{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0}},
{{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0}},
{{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0}}
};


glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &ctrlPoints[0][0][0]);
glEnable(GL_MAP2_VERTEX_3);