#include<GL/glut.h>
void Display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
/*glBegin支持的方式除了GL_POINTS和GL_LINES,
还有GL_LINE_STRIP,GL_LINE_LOOP,GL_TRIANGLES,GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN
*/
glVertex2f(0.0f, 0.0f);
glVertex2f(0.5f, 0.0f);
/*
glVertex2d //glVertex2i(1,3);
glVertex2f
glVertex3f // GL float VertexArr3[]={1.0f,3.0f,4.0f};
void Display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
/*glBegin支持的方式除了GL_POINTS和GL_LINES,
还有GL_LINE_STRIP,GL_LINE_LOOP,GL_TRIANGLES,GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN
*/
glVertex2f(0.0f, 0.0f);
glVertex2f(0.5f, 0.0f);
/*
glVertex2d //glVertex2i(1,3);
glVertex2f
glVertex3f // GL float VertexArr3[]={1.0f,3.0f,4.0f};