OMG, OMG, fixed. 4tw....
Congratulations to me, it runs UBER FAST... :d
Code:
void DrawSquare(int left, int top, int right, int bottom)
{
glBegin(GL_LINES);
glVertex2d(left, top);
glVertex2d(right, top);
glVertex2d(right, top);
glVertex2d(right, bottom);
glVertex2d(right, bottom);
glVertex2d(left, bottom);
glVertex2d(left, bottom);
glVertex2d(left, top);
glEnd();
}
void DrawGrid(int left, int top, int right, int bottom, int w, int h)
{
for(int i=left; i<right; i+= w)
{
for(int o=top; o<bottom; o+= h)
{
DrawSquare(i,o,i+w,o+h );
}
}
}
Bubba, you roxxors 4tw, , i still don't understand WHY it is faster, but it is :d