Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Sun-Jeong Kim
OpenGL Programming (2)
11th Week, 2008
Computer Graphics2
Adding the Source Code
Computer Graphics3
Linking the Library Files
Project PropertiesConfiguration Properties Linker Input
Additional Dependencies: opengl32.lib glu32.libopengl32.lib glu32.lib
Computer Graphics4
실행 결과 – “main1.cpp”
Computer Graphics5
Drawing Primitives (1)
Computer Graphics6
실행 결과 – Lines
Computer Graphics7
Drawing Primitives (2)
Computer Graphics8
실행 결과 – Triangles
Computer Graphics9
Properties of Primitives (1)
Computer Graphics10
실행 결과 – Line’s Property (1)
Computer Graphics11
Properties of Primitives (2)
Computer Graphics12
실행 결과 – Line’s Property (2)
Computer Graphics13
연습 문제 (1)
glLineStipple( ) 함수의 입력 파라미터를 조절하여 다양한 모양의 점선을 만들어 보시오.
Computer Graphics14
Properties of Primitives (3)
Computer Graphics15
실행 결과 – Polygon’s Property (1)
Computer Graphics16
Properties of Primitives (4)
Computer Graphics17
실행 결과 – Polygon’s Property (2)
Computer Graphics18
Properties of Primitives (5)
Computer Graphics19
Properties of Primitives (6)
Computer Graphics20
실행 결과 – Polygon’s Property (3)
Computer Graphics21
연습 문제 (2)
변수 pattern[ ]의 값을 변경하여, 다양한 무늬로다각형 내부를 채색하시오.
Computer Graphics22
Polygons + Lines (1)
Computer Graphics23
실행 결과 – Polygons + Lines (1)
Computer Graphics24
Polygons + Lines (2)
Computer Graphics25
Polygons + Lines (3)
Computer Graphics26
실행 결과 – Polygons + Lines (2)
Computer Graphics27
연습 문제 (3)
지난 주에 구현한 프로그램에, Primitive들의 속성을 추가하시오.
마우스를 이용하여 점의 위치 입력
Points – 크기, 색상 지정
Lines – 너비, 색상, 무늬 지정
Triangles, Rectangles, N-Polygons – 색상, 무늬, 외곽선(무늬 포함) 지정