Code: Select all
void DrawSquare( float left, float right, float top, float bot )
{
GFXBegin( GFXQUAD );
GFXVertex3f( left, top, 0 );
GFXVertex3f( left, bot, 0 );
GFXVertex3f( right, bot, 0 );
GFXVertex3f( right, top, 0 );
GFXVertex3f( right, top, 0 );
GFXVertex3f( right, bot, 0 );
GFXVertex3f( left, bot, 0 );
GFXVertex3f( left, top, 0 );
GFXEnd();
}
I tried to remove the last four vertices, and I can see no difference (except that it makes the function use 10% less CPU.)