Added glGetError utility function for debugging