SLIDE 1
Rendering
Fall 2016 - 591/691
SLIDE 2 Who am I?
Allan Rocha Email: rocha.allanc@gmail.com or acarocha@ucalgary.ca Subject: [CPSC591] Tutorial Page: http://pages.cpsc.ucalgary.ca/~acarocha/CPSC591/index.html Topics of Interest:
- Real-time Rendering
- Non-photorealistic Rendering
- Scientific Visualization
- Illustrative Visualization
SLIDE 3
SLIDE 4
SLIDE 5
SLIDE 6
SLIDE 7
SLIDE 8
SLIDE 9
SLIDE 10
What to render and how to render?
SLIDE 11
Old OpenGL vs New OpenGL References: OpenGL Insights - Chapter One Opengl Super Bible Red Book OpenGL Anton's OpenGL 4 Tutorials
SLIDE 12 OpenGL insights
○ Teaching Computer Graphics Starting with Shader-Based OpenGL
SLIDE 13
Hello World in OpenGL: Old Style
SLIDE 14 Hello World in OpenGL: Old Style
- Major issues with this code
○ Use of immediate mode ■ callings between CPU vs GPU ○ Reliance on the fixed-function pipeline ■ complex geometry == slow rendering, why??? ○ Use of default values for state variables ■ multitude of state variables
SLIDE 15
Simplified OpenGL pipeline - OLD vs NEW
SLIDE 16
Simplified OpenGL pipeline - OLD vs NEW
SLIDE 17 Programmable pipeline
- GLSL - OpenGL Shading Language
○ Glew library - http://glew.sourceforge.net/ ○ Similar to C/C++
SLIDE 18 Hello World: New Style
○ Setup shaders ■ Init, compile, link ○ Sends data to the CPU to GPU ■ Immediate-mode programing (VAO and VBO) ○ Render the data on the GPU
SLIDE 19
Hello World: New Style
SLIDE 20
Hello World: New Style
SLIDE 21
Hello World: New Style