introduction to opengl pipeline from programmer view
DESCRIPTION
Introduction to OpenGL Pipeline From Programmer View. Tong-Yee Lee. OpenGL Transformation Pipeline. normalized device. eye. object. clip. window. v e r t e x. Modelview Matrix. Projection Matrix. Perspective Division. Viewport Transform. Modelview. Projection. Modelview. - PowerPoint PPT PresentationTRANSCRIPT
Introduction to OpenGL Introduction to OpenGL Pipeline From Pipeline From
Programmer ViewProgrammer ViewTong-Yee Lee
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 ) )
3D Transformations3D Transformations
OpenGL transformation OpenGL transformation MatricesMatrices
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
Changes of Coordinate Changes of Coordinate SystemSystem
World coordinate system
Camera (eye) coordinate system
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
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 ) )
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
glMaterialfv( glMaterialfv( face, property, valueface, property, value ); );
glLightfv( glLightfv( light, property, valuelight, property, value ); );
glNormal3f( glNormal3f( x, y, zx, y, z ) )
64
Depth Buffering andHidden Surface Removal
12
48
16
12
48
16ColorBuffer
DepthBuffer
Display