2016年3月7日 星期一

week 3 Jim_c OpenGL

Class work -01
open (jsyeh/3dcg10)>download>data,window32,glut32> 
>extract window 32 file 
>extract data file into window 32
>place glut 32 into window 32


open shapes apps to run cmd

Class work-02
Download>freeglut MinGW
 from http://www.transmissionzero.co.uk/software/freeglut-devel/
reeflut->lib->copy libfreeglut.a paste
>rename to libglut32.a

>open code blocks
>new project>glut project
>choose freeglut for glut location




















{
     
        glBegin(GL_POLYGON); //call triangle shape
        glColor3f(255,255,255);    //object color
        glVertex2f(0.5,0.5);   // angle destination
        glVertex2f(0.5,-0.5);
        glVertex2f(0,0);
        glEnd();
        glutSwapBuffers();

}

changing color

















glBegin(GL_POLYGON);
        glColor3f(1,0,0);//3f(3 value)ex:RGB
        glVertex2f(0.5,0.5);//vertex(*point//顶点)xf(浮点数)
        glColor3f(1,1,0);//xf(浮点数)
        glVertex2f(0.5,-0.5);
        glColor3f(1,0,1);
        glVertex2f(0,0);

沒有留言:

張貼留言