GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


A Paste by Anonymous
// Arc at top of outline
    glBegin(GL_LINE_STRIP);    
        /* draw a circle from a bunch of short lines */
        float radius = 245;
        float originX = 305.0;
        float originY = 440.0;
        float vectorX = 0;
        float vectorY = 0;
        
        for(float angle=(-3.14159/2); angle<=(3.14159/2); angle+=0.01f){        
            vectorX=originX+(radius*(float)sin((double)angle));
            vectorY=originY+(radius*(float)cos((double)angle));        
            glVertex2d(vectorX,vectorY);
        }
    glEnd();