How to draw polygon with 3D points in modern openGL?
问题 I know in 2.0- openGL we can draw a line simply like this. glBegin(GL_LINES); glVertex3f(20.0f,150.0f,0.0f); glVertex3f(220.0f,150.0f,0.0f); glVertex3f(200.0f,160.0f,0.0f); glVertex3f(200.0f,160.0f,0.0f); glEnd(); but how to do similar thing in modern openGL(3.0+) I have read Drawing round points using modern OpenGL but the answer is not about certain point,since I want to draw polygon with points have certain coordinates,it's not quite helpful. I use this code,but it shows nothing except a