openGL常见图形函数(未完)

圆形
void circleMidpint(scrPt circ, GLint radius) {
	glClear(GL_COLOR_BUFFER_BIT);
	glClearColor(0, 0, 0, 0);
	glColor3f(0.0, 0.0, 0.0);
	glBegin(GL_LINE_STRIP);
	GLint n = 3600;
	for (GLint i = 0; i < n; i++) {
		glVertex2f(circ.x+radius*cos(twoPi*i/n), circ.y+radius*sin(twoPi*i / n));
	}
	glEnd();
	glFlush();
}

你可能感兴趣的:(openGL常见图形函数(未完))