introduction to opengl pipeline from programmer view tong-yee lee
Post on 22-Dec-2015
247 views
TRANSCRIPT
![Page 1: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/1.jpg)
Introduction to OpenGL Introduction to OpenGL Pipeline From Pipeline From
Programmer ViewProgrammer ViewTong-Yee Lee
![Page 2: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/2.jpg)
vertex
ModelviewMatrix
ProjectionMatrix
PerspectiveDivision
ViewportTransform
Modelview
Modelview
Projection
object eye
clip normalizeddevice
window
OpenGL Transformation OpenGL Transformation PipelinePipeline
glTranslate{fd}( glTranslate{fd}( x, y, zx, y, z ) )
glRotate{fd}( glRotate{fd}( angle, x, y, zangle, x, y, z ) )
glScale{fd}( glScale{fd}( x, y, zx, y, z ) )
![Page 3: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/3.jpg)
3D Transformations3D Transformations
![Page 4: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/4.jpg)
OpenGL transformation OpenGL transformation MatricesMatrices
![Page 5: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/5.jpg)
vertex
ModelviewMatrix
ProjectionMatrix
PerspectiveDivision
ViewportTransform
Modelview
Modelview
Projection
object eye
clip normalizeddevice
window
OpenGL Transformation OpenGL Transformation PipelinePipeline
gluLookAt( eyegluLookAt( eyexx, eye, eyeyy, eye, eyezz,, aim aimxx, aim, aimyy, aim, aimzz,, up upxx, up, upyy, up, upzz ) )
tripod
![Page 6: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/6.jpg)
Changes of Coordinate Changes of Coordinate SystemSystem
World coordinate system
Camera (eye) coordinate system
![Page 7: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/7.jpg)
vertex
ModelviewMatrix
ProjectionMatrix
PerspectiveDivision
ViewportTransform
Modelview
Modelview
Projection
object eye
clip normalizeddevice
window
OpenGL Transformation OpenGL Transformation PipelinePipeline
model
viewingvolume
Perspective Perspective projectionprojectionOrthographic Orthographic parallel projectionparallel projection
![Page 8: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/8.jpg)
![Page 9: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/9.jpg)
Perspective projectionPerspective projectiongluPerspective( gluPerspective( fovy, aspect, zNear, zFarfovy, aspect, zNear, zFar ) )
glFrustumglFrustum(( left,left, right,right, bottom,bottom, top,top, zNear,zNear, zFarzFar ))
Orthographic parallel projectionOrthographic parallel projectionglOrtho(glOrtho( left,left, right,right, bottom,bottom, top,top, zNear,zNear, zFarzFar ))
gluOrtho2D( gluOrtho2D( left, right, bottom, topleft, right, bottom, top ) )
![Page 10: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/10.jpg)
vertex
ModelviewMatrix
ProjectionMatrix
PerspectiveDivision
ViewportTransform
Modelview
Modelview
Projection
object eye
clip normalizeddevice
window
glViewport( 0, 0, (GLsizei) w, (GLsizei) h );glViewport( 0, 0, (GLsizei) w, (GLsizei) h );ww
hh
![Page 11: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/11.jpg)
glMaterialfv( glMaterialfv( face, property, valueface, property, value ); );
glLightfv( glLightfv( light, property, valuelight, property, value ); );
glNormal3f( glNormal3f( x, y, zx, y, z ) )
![Page 12: Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee](https://reader035.vdocuments.mx/reader035/viewer/2022081506/56649d7e5503460f94a605e7/html5/thumbnails/12.jpg)
64
Depth Buffering andHidden Surface Removal
12
48
16
12
48
16ColorBuffer
DepthBuffer
Display