This is just a stab in the dark, and will probably have no effect whatsoever, but why not try removing the () from the parameterless function calls, like glEnd, glGetError, etc.