optimization for glwrapper.c - see glEnd() function