Drawing Circle with OpenGL

后端 未结 6 1622
时光取名叫无心
时光取名叫无心 2020-12-31 01:46

I\'m trying to draw simple circle with C++/OpenGl

my code is:

#include 
#include 

void Draw() {
    glClear(GL_COLOR_         


        
6条回答
  •  孤独总比滥情好
    2020-12-31 02:25

    It looks like immediately after you draw the circle, you go into the main glut loop, where you've set the Draw() function to draw every time through the loop. So it's probably drawing the circle, then erasing it immediately and drawing the square. You should probably either make DrawCircle() your glutDisplayFunc(), or call DrawCircle() from Draw().

提交回复
热议问题