Open gl introduction
-
Upload
abigail-dayrit -
Category
Education
-
view
113 -
download
1
Transcript of Open gl introduction
![Page 1: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/1.jpg)
![Page 2: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/2.jpg)
WHAT IS OPENGL?
“a software interface to graphics hardware.”
Low- level graphics API
Fast and portable 3D graphics library
NOTE: OpenGL is ONLY a graphics library
![Page 3: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/3.jpg)
3 OPENGL LIBRARIES
OpenGL (GL) – used in modeling an object via a set of geometric primitives such as point, line and polygon.
OpenGL Utility Library (GLU)- important utilities (such as setting camera view and projection) and more building models (such as quadric surfaces and polygon tessellation).
![Page 4: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/4.jpg)
OpenGL Utilities Toolkit (GLUT) – used for creating a window, handling key and mouse inputs. It also provides more building models (such as sphere and torus).
![Page 5: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/5.jpg)
HOW TO INCLUDE OPENGL LIBRARY
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h>
![Page 6: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/6.jpg)
#include <gl/freeglut.h>
![Page 7: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/7.jpg)
Silicon Graphics Inc. (SGI) used “IRIS GL”, a 3D programming API in their high-end IRIS graphics workstations.
When SGI tried porting IRIS GL to other hardware platforms problems occurred :(
OpenGL is the result of SGI’s efforts to improve IRIS GL’s portability (came out in 1992).
HISTORY
![Page 8: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/8.jpg)
OpenGL 1.x - fixed function
OpenGL 2.x - early programmable
OpenGL 3.x/4.x - modern programmable,Core profile and deprecation
OpenGL ES 1.x - mobile fixed function
OpenGL ES 2.x - mobile programmable
FIVE GENERATIONS OF OPENGL
![Page 9: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/9.jpg)
HOW OPENGL WORKS
OpenGL is a procedural rather than a descriptive graphics language.
Instead of describing the scene and how it should appear, the programmer actually describes the steps necessary to achieve a certain appearance or effect.
![Page 10: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/10.jpg)
DESCRIPTIVE
PROCEDURAL
Orange cube rotated at 90°
1. Rotate at 90°2. Orange3. Cube4. Vertex 1 at [-1,1,1]5. Vertex 2 at [1,1,1]6. …. 7. ….
![Page 11: Open gl introduction](https://reader035.fdocuments.us/reader035/viewer/2022062412/58ea838b1a28ab0c0b8b64f3/html5/thumbnails/11.jpg)
POPULAR OPENGL-BASED PROGRAMSAdobe After Effects
Autodesk Maya
Autodesk AutoCAD
Google Earth
Counter-Strike
Minecraft
Left 4 Dead 2
Portal2