replace glVertex3d with glVertex3f