Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee.

Similar presentations


Presentation on theme: "Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee."— Presentation transcript:

1 Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee

2 vertexvertex Modelview Matrix Projection Matrix Perspective Division Viewport Transform Modelview Projection object eye clip normalized device window OpenGL Transformation Pipeline glTranslate{fd}( x, y, z ) glRotate{fd}( angle, x, y, z ) glScale{fd}( x, y, z )

3 3D Transformations

4 OpenGL transformation Matrices

5 vertexvertex Modelview Matrix Projection Matrix Perspective Division Viewport Transform Modelview Projection object eye clip normalized device window OpenGL Transformation Pipeline gluLookAt( eye x, eye y, eye z, aim x, aim y, aim z, up x, up y, up z ) tripod

6 Changes of Coordinate System World coordinate system Camera (eye) coordinate system

7 vertexvertex Modelview Matrix Projection Matrix Perspective Division Viewport Transform Modelview Projection object eye clip normalized device window OpenGL Transformation Pipeline model viewing volume Perspective projection Orthographic parallel projection

8

9 Perspective projection gluPerspective( fovy, aspect, zNear, zFar ) glFrustum ( left, right, bottom, top, zNear, zFar ) Orthographic parallel projection glOrtho( left, right, bottom, top, zNear, zFar ) gluOrtho2D( left, right, bottom, top )

10 vertexvertex Modelview Matrix Projection Matrix Perspective Division Viewport Transform Modelview Projection object eye clip normalized device window glViewport( 0, 0, (GLsizei) w, (GLsizei) h ); w h

11 glMaterialfv( face, property, value ); glLightfv( light, property, value ); glNormal3f( x, y, z )

12


Download ppt "Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee."

Similar presentations


Ads by Google