2024年4月18日 星期四

11160933week09

0. week09-0-sample

download opencv

remember add path

reload codeblocks

add compiler



1.git bash

cd desktop

git clone https://github.com/dandandandandanda/2024graphicsa

cd 2024graphicsa

start.



2. copy week08-4_glm_gundam_opencv_texture_lighting

open cbp

3.close project

copy week08 file

rename as week09-1 and open notepad rename 09-1

open cbp


4.new file week09-2-glutSoildTeapot_glutSoildCube_glutSoildSphere

copy 11line

#include <GL/glut.h>

void display()

{

     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

     glutSolidTeapot( 0.3 );

     glutSwapBuffers();

}

int main(int argc, char *argv[])

{

glutInit(&argc, argv);

glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);

glutCreateWindow("week09 glutSoild");

glutDisplayFunc(display);

glutMainLoop();

}

5.add Cube and Sphere

     //glutSolidTeapot( 0.3 );

     //glutSolidCube( 0.3 );

     glutSolidSphere( 0.3 );


6.Translate Push Pop


7.new file week09-3-glutWireTeapot_glutWireCube_glutWireSphere

copy last

+ into -

Solid into Wire


















沒有留言:

張貼留言