I`m displaying 2048 tris, colored, and my framerates are awful.

I`m getting 17 fps with colors, and like 26 fps without color.

I`m not doing anything fancy, just glVertex()ing in a for loop.

Basically, I`m running in windowed mode using GLUT, calling Main() each frame, which calls Render(), which calls map.Draw()

map.draw() is this.

//MAPSZ = 32

glBegin(GL_TRIANGLES);

// int i = 0, j = 0;

for(int i = 0; i < MAPSZ - 1; i++)

{

for(int j = 0; j < MAPSZ - 1; j++)

{

//Tri 1.

glColor3b(color

*[j].r, color[i][j].g, color[i][j].b);*

glVertex3f(i, j, zdata[i][j]);

glColor3b(color[i+1][j].r, color[i+1][j].g, color[i+1][j].b);

glVertex3f(i + 1, j, zdata[i+1][j]);

glColor3b(color[i][j+1].r, color[i][j+1].g, color[i][j+1].b);

glVertex3f(i, j + 1, zdata[i][j+1]);

//Tri 2.

glColor3b(color[i+1][j].r, color[i+1][j].g, color[i+1][j].b);

glVertex3f(i + 1, j, zdata[i+1][j]);

glColor3b(color[i+1][j+1].r, color[i+1][j+1].g, color[i+1][j+1].b);

glVertex3f(i + 1, j + 1, zdata[i+1][j+1]);

glColor3b(color[i][j+1].r, color[i][j+1].g, color[i][j+1].b);

glVertex3f(i, j+1, zdata[i][j+1]);

}

}

glEnd();

Hw come my framerate is so abysmal ?

glVertex3f(i, j, zdata[i][j]);

glColor3b(color[i+1][j].r, color[i+1][j].g, color[i+1][j].b);

glVertex3f(i + 1, j, zdata[i+1][j]);

glColor3b(color[i][j+1].r, color[i][j+1].g, color[i][j+1].b);

glVertex3f(i, j + 1, zdata[i][j+1]);

//Tri 2.

glColor3b(color[i+1][j].r, color[i+1][j].g, color[i+1][j].b);

glVertex3f(i + 1, j, zdata[i+1][j]);

glColor3b(color[i+1][j+1].r, color[i+1][j+1].g, color[i+1][j+1].b);

glVertex3f(i + 1, j + 1, zdata[i+1][j+1]);

glColor3b(color[i][j+1].r, color[i][j+1].g, color[i][j+1].b);

glVertex3f(i, j+1, zdata[i][j+1]);

}

}

glEnd();

Hw come my framerate is so abysmal ?

I came, I saw, I got programmers block.

~V''''lion