introduction to opengl
DESCRIPTION
Introduction to OpenGL. OpenGL/GLU/GLUT/GLUI. OpenGL v1.4 (latest) is the “ core ” library that is platform independent GLUT v3.6 or v3.7 (beta) is an auxiliary library that handles window creation, OS system calls (mouse buttons, movement, keyboard, etc), callbacks. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/1.jpg)
168 471 Computer Graphics, KKU. Lecture 10
1
Introduction to OpenGL
![Page 2: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/2.jpg)
168 471 Computer Graphics, KKU. Lecture 10
2
![Page 3: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/3.jpg)
168 471 Computer Graphics, KKU. Lecture 10
3
![Page 4: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/4.jpg)
168 471 Computer Graphics, KKU. Lecture 10
4
![Page 5: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/5.jpg)
168 471 Computer Graphics, KKU. Lecture 10
5
OpenGL/GLU/GLUT/GLUI
• OpenGL v1.4 (latest) is the “core” library that is platform independent
• GLUT v3.6 or v3.7 (beta) is an auxiliary library that handles window creation, OS system calls (mouse buttons, movement, keyboard, etc), callbacks.
• GLU is an auxiliary library that handles a variety of graphics accessory functions
• GLUI v1.0 or v2.0 (beta)is a GUI manager written by Paul Rademacher ([email protected]).
![Page 6: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/6.jpg)
168 471 Computer Graphics, KKU. Lecture 10
6
![Page 7: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/7.jpg)
168 471 Computer Graphics, KKU. Lecture 10
7
![Page 8: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/8.jpg)
168 471 Computer Graphics, KKU. Lecture 10
8
GLUT 3D Primitives
![Page 9: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/9.jpg)
168 471 Computer Graphics, KKU. Lecture 10
9
![Page 10: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/10.jpg)
168 471 Computer Graphics, KKU. Lecture 10
10
![Page 11: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/11.jpg)
168 471 Computer Graphics, KKU. Lecture 10
11
![Page 12: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/12.jpg)
168 471 Computer Graphics, KKU. Lecture 10
12
![Page 13: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/13.jpg)
168 471 Computer Graphics, KKU. Lecture 10
13
![Page 14: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/14.jpg)
168 471 Computer Graphics, KKU. Lecture 10
14
![Page 15: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/15.jpg)
168 471 Computer Graphics, KKU. Lecture 10
15
Double Buffer
• Graphics card scans out the image on the frame buffer. What rate is this done at?
• So what is the problem with this?• You might be in the middle of drawing a frame
when it decides to scan out the image• What is a solution?• Have two separate frame buffers, one that
the card scans out of, and the other you draw into. When you are done drawing a frame, you switch their roles
• What are the memory requirements?
![Page 16: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/16.jpg)
168 471 Computer Graphics, KKU. Lecture 10
16
Double Buffering
...
glVertex3f(0.1,0.1,0.1)
glutSwapBuffers();
...
![Page 17: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/17.jpg)
168 471 Computer Graphics, KKU. Lecture 10
17
Double Buffering...
glVertex3f(0.1,0.1,0.1)
glutSwapBuffers();
...
![Page 18: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/18.jpg)
168 471 Computer Graphics, KKU. Lecture 10
18
![Page 19: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/19.jpg)
168 471 Computer Graphics, KKU. Lecture 10
19
![Page 20: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/20.jpg)
168 471 Computer Graphics, KKU. Lecture 10
20
![Page 21: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/21.jpg)
168 471 Computer Graphics, KKU. Lecture 10
21
![Page 22: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/22.jpg)
168 471 Computer Graphics, KKU. Lecture 10
22
![Page 23: Introduction to OpenGL](https://reader036.vdocuments.mx/reader036/viewer/2022062322/56814cfd550346895dba1eb8/html5/thumbnails/23.jpg)
168 471 Computer Graphics, KKU. Lecture 10
23