Created
September 13, 2017 01:06
-
-
Save celsocelante/869ebb681fb8c11480a591a05a3f4512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(circ.getDisplayed()) { | |
glClear(GL_COLOR_BUFFER_BIT); | |
GLfloat twicePi = 2.0f * M_PI; | |
glEnable(GL_LINE_SMOOTH); | |
glLineWidth(0.001); | |
glBegin(GL_LINES); | |
glColor4f(1.0, 1, 1, 1.0); | |
for(int i = 0; i <= 1000; i++) { | |
glVertex3f(circ.getX(), circ.getY(), 0); | |
glVertex3f(circ.getX() + (circ.getRadius() * cos(i * twicePi / 1000)), | |
circ.getY() + (circ.getRadius() * sin(i * twicePi / 1000)), 0); | |
} | |
glEnd(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment