PDA

View Full Version : 1st time coder needs help ?



Nyanz
03-24-2008, 08:22 AM
Hi all...I'm new to coding and OpenGL as a whole. I was wondering if someone can direct me the method to creating and implementing a circle in openGL, as I'm very new and am just tinkering around with creating a simple image of a sun.

zed
03-24-2008, 12:53 PM
glBegin( GL_LINE_LOOP );
for ( float f=0.0; f<TWO_PI; f+=circle_step )
glVertex3f( sin(f)*radius, cos(f)*radius, 0.0 );
glEnd();