Upload
imogen-coral-perry
View
226
Download
0
Embed Size (px)
Citation preview
1
Welcome
Alireza Moghaddam
Humber CollegeLectureLecture 11 Game 540
Alireza Moghaddam http://mycourses.humber.ca
[email protected]@humber.ca
2
Assignments, Labs, Practice Tests, Quiz, Exam
Extra Text: Wright, Richard S., 2011 OpenGL superbible : comprehensive tutorial and reference”
Good to have, but not needed for this course.
Course Material
3
Course Material (2)
• I’ll introduce some resources corresponding to each chapter:– Source codes, 3D models, examples, etc.– You are more than welcome to examine them at
home to understand the material better.– But, never use them for your labs, assignments
or projects. (No Copy & paste)
4
Grading Scheme
Assignments: 4 x 5% = 20%
Project: 20%
Mid-Term: 25%
Final: 35%
Do not wait for the deadlines to come.
Sometimes, debugging may take lots of time.
5
Practice
• The best way to become an expert in OpenGL is:– To read and understand– To exercise
• Try to understand the infrastructure.
• Review matrices, Matrix operations, Rotation, Translation, etc.
6
Office Hours
• I’m always here to help you.
• You can always contact me by email. – I try to be a fast responder – You will get a reply by not more than a day.
• My office hours will be
???????
7
Together
Ask me anything!•Class material•Help YOU solve the assignment questions.•Material missed from previous courses
8
Before reading the solutions to the assignments.
Useful Learning Techniques
•Work hard on solving them on your on. •Study the text and slides.•Get help, but not answers from friends, Instructor, …
9
After reading the solutions to the assignments.
Useful Learning Techniques
• Study the solutions. • Understand the solutions. • Memorize the solutions. • The questions on the tests will be different. • But the answers will be surprisingly close.
11
OpenGL
• Software Interface to graphics hardware
• OpenGL library (200 commands)
• Hardware independent interface
• Contains geometric primitives:– Points– Lines– Polygons
12
OpenGL Utility Library (GLU)
• Sophisticated Library (extends OpenGL)
• Contains 50 commands
• Provides modeling features– Quadric surfaces– NURBS (Non-Uniform Rational B-Spline)
• Standard part of every OpenGL library
15
Rendering Pipeline
• Evaluators– Deriving vertices from basis functions– Vertices can be used to represent a surface
• Per-Vertex Operations– Converts vertices into primitives i.e. line,
polygon, etc.– Does mathematical operations, i.e.
transformation, rotation, projection, etc.
16
Rendering Pipeline
• Rasterization: Conversion of geometric and pixel data into fragments.
• Each fragment corresponds to a pixel in frame buffer.
• When creating models, many parameters have to be considered, e.g. shading model, color, point size, etc.
17
Fragment Operations
• Before a fragment be placed in frame buffer, the following can be controlled:– Texture Mapping– Fog calculations– Alpha Test, depth buffer test– Blending, masking, etc.
18
OpenGL Command Syntax
• Start with glCaptial letter e.g. glVertex
• Followed by the number of parameters, e.g. glVertex3
• Followed by type of parameters, e.g. glVertex3f(1.0, 2.0, 3.0)
• Constants start with GL_, e.g. GL_COLOR_BUFFER_BIT