SlideShare a Scribd company logo
1 of 136
Download to read offline
Graphics and Libraries
Dominic Farolino
• twitter.com/domfarolino

• github.com/domfarolino

• dom@chromium.org
• Senior

• Chromium Committer

• WHATWG Editor
What is this talk?
@domfarolino
Rendering
@domfarolino
Graphics APIs
@domfarolino
OpenGL + Graphics Pipeline
@domfarolino
Pixel Buffering & V-Sync
@domfarolino
WebGL
@domfarolino
–some smart person
“Converting object description > 2D image plane representation”
Rendering
“Object Description”
“Object Description”
Geometric
serialization of
shape to be painted
“Object Description”
Geometric
serialization of
shape to be painted
= Vector graphic
–some smart person
“Converting vector graphic > 2D image plane representation”
Rendering
Raster vs Vector {ization}
Raster vs Vector {ization}
Raytracing
Raster vs Vector {ization}
Raytracing
Radiosity
Vectorization
Vectorization
Rasterization
Rasterization
Practical Difference
Practical Difference
• Rasterizations

• Complex shapes + filled areas

• Trouble producing smooth lines = blocky
Practical Difference
• Rasterizations

• Complex shapes + filled areas

• Trouble producing smooth lines = blocky
• Vectorizations

• Perfectly smooth lines

• Less versatile
How do we actually do this
stuff?
GFX APIs
Why?
DirectX
DirectX
• Released with Windows 95
DirectX
• Released with Windows 95
• Included in every version of Windows
DirectX
• Released with Windows 95
• Included in every version of Windows
• Tons of APIs
DirectX
• Released with Windows 95
• Included in every version of Windows
• Tons of APIs
• 3D GFX API (Direct3D)
DirectX
• Released with Windows 95
• Included in every version of Windows
• Tons of APIs
• 3D GFX API (Direct3D)
• 2D | |
DirectX
• Released with Windows 95
• Included in every version of Windows
• Tons of APIs
• 3D GFX API (Direct3D)
• 2D | |
• Input
DirectX
• Released with Windows 95
• Included in every version of Windows
• Tons of APIs
• 3D GFX API (Direct3D)
• 2D | |
• Input
• Audio
OpenGL
OpenGL
• Alternative to DirectX
OpenGL
• Alternative to DirectX
• Basically same functionality
OpenGL
• Alternative to DirectX
• Basically same functionality
• Pros:
OpenGL
• Alternative to DirectX
• Basically same functionality
• Pros:
• Very-cross platform
OpenGL
• Alternative to DirectX
• Basically same functionality
• Pros:
• Very-cross platform
• OPEN STANDARD (Khronos Group)
Graphics Card
Graphics Card
Graphics Card Drivers
Graphics Card
Graphics Card Drivers
Graphics APIs
Graphics Card
Graphics Card Drivers
Graphics APIs
Game Engines
Graphics Card
Graphics Card Drivers
Graphics APIs
Game Engines
You, the gamer!!
Graphics APIs
Game Engines
You, the gamer!!
Graphics APIs
Game Engines
You, the gamer!!
Physics
Graphics APIs
Game Engines
You, the gamer!!
A.I.Physics
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Collision
Detection
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Collision
Detection
Audio Manip.
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Collision
Detection
Audio Manip.
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Collision
Detection
Audio Manip.
SDL2
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Collision
Detection
Audio Manip.
SDL2 SFML
Graphics APIs
Game Engines
You, the gamer!!
LightingA.I.Physics
Collision
Detection
Audio Manip.
SDL2 SFML GLFW
SDL(2)
SDL(2)
• Simple DirectMedia Layer 2
SDL(2)
• Simple DirectMedia Layer 2
• macOS, Linux, Android, iOS, Windows
SDL(2)
• Simple DirectMedia Layer 2
• macOS, Linux, Android, iOS, Windows
• Game development library
SDL(2)
• Simple DirectMedia Layer 2
• macOS, Linux, Android, iOS, Windows
• Game development library
• ⌨ + 🐭 + 📢 + 🕹 + 🖥
SDL(2)
• Simple DirectMedia Layer 2
• macOS, Linux, Android, iOS, Windows
• Game development library
• ⌨ + 🐭 + 📢 + 🕹 + 🖥
• Game engine??
SDL(2)
• Simple DirectMedia Layer 2
• macOS, Linux, Android, iOS, Windows
• Game development library
• ⌨ + 🐭 + 📢 + 🕹 + 🖥
• Game engine??
• Used in many game engines (Valve Source)
SDL(2)
• Simple DirectMedia Layer 2
• macOS, Linux, Android, iOS, Windows
• Game development library
• ⌨ + 🐭 + 📢 + 🕹 + 🖥
• Game engine??
• Used in many game engines (Valve Source)
Why SDL?
Why SDL?
• OpenGL doesn’t specify:
Why SDL?
• OpenGL doesn’t specify:
• Window creation
Why SDL?
• OpenGL doesn’t specify:
• Window creation
• Input handling
Why SDL?
• OpenGL doesn’t specify:
• Window creation
• Input handling
• More…
Vertices
(VBO)
Data of any format
Vertices
(VBO)
Data of any format
Vertex
Shader
(On the GPU)
Vertices
(VBO)
Data of any format
Vertex
Shader
(On the GPU)
Vertices
(VBO)
Data of any format
Vertex
Shader
(On the GPU)
Rasterization
(On the GPU)
Vertices
(VBO)
Data of any format
Vertex
Shader
(On the GPU)
Rasterization
(On the GPU)
Vertices
(VBO)
Data of any format
Vertex
Shader
(On the GPU)
Rasterization
(On the GPU)
Fragment
Shader
(On the GPU)
Fragment
Shader
(On the GPU)
Fragment
Shader
Blending and
sampling
(On the GPU)(On the GPU)
Fragment
Shader
Blending and
sampling
(On the GPU)
Final output
image!
(On the GPU)
Vertex Data
@domfarolino
Vertex Data
Vertex Data
Vertex Data
Interpreting Vertices
@domfarolino
Vertex Shader
Vertex Shader
Vertex Shader
Vertex Shader
Vertex Shader
Attach/Compile
Interpreting Color
@domfarolino
Fragment Shader
Fragment Shader
Fragment Shader
Example
Pixel buffering & V-Sync
@domfarolino
Getting rid of screen tears?
@domfarolino
Synchronizing Vertical Refresh
Rate
@domfarolino
V-Sync
@domfarolino
Slower FPS?
@domfarolino
Cool, but what about the web?
@domfarolino

More Related Content

Similar to Low Level Graphics & OpenGL

ngGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and TokyongGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and Tokyo
notolab
 
Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012
Xamarin
 

Similar to Low Level Graphics & OpenGL (20)

Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGL
 
Phillip Heckinger (Microsoft): Empowering AR & VR with Tech Art
Phillip Heckinger (Microsoft): Empowering AR & VR with Tech ArtPhillip Heckinger (Microsoft): Empowering AR & VR with Tech Art
Phillip Heckinger (Microsoft): Empowering AR & VR with Tech Art
 
Write retrogames in the web and add something more with Azure
Write retrogames in the web and add something more with AzureWrite retrogames in the web and add something more with Azure
Write retrogames in the web and add something more with Azure
 
Game development -session on unity 3d
Game development -session on unity 3d Game development -session on unity 3d
Game development -session on unity 3d
 
Lets have a look at Apple's Metal Framework
Lets have a look at Apple's Metal FrameworkLets have a look at Apple's Metal Framework
Lets have a look at Apple's Metal Framework
 
iOS and Android Development with Unity3D
iOS and Android Development with Unity3DiOS and Android Development with Unity3D
iOS and Android Development with Unity3D
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
 
Brewing Your Own Game Engie eng
Brewing Your Own Game Engie engBrewing Your Own Game Engie eng
Brewing Your Own Game Engie eng
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
 
Knock Knock on GameDev Gate
Knock Knock on GameDev GateKnock Knock on GameDev Gate
Knock Knock on GameDev Gate
 
Knock knock on GameDev gateway! - Introduction to Game development
Knock knock on GameDev gateway! - Introduction to Game developmentKnock knock on GameDev gateway! - Introduction to Game development
Knock knock on GameDev gateway! - Introduction to Game development
 
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation Vita
 
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
 
Ferguson VR Hackathon - May 6, 2017
Ferguson VR Hackathon - May 6, 2017Ferguson VR Hackathon - May 6, 2017
Ferguson VR Hackathon - May 6, 2017
 
ngGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and TokyongGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and Tokyo
 
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
 
Native Code is Dead AKA Cross Platform Development with Unity3D
Native Code is Dead AKA Cross Platform Development with Unity3DNative Code is Dead AKA Cross Platform Development with Unity3D
Native Code is Dead AKA Cross Platform Development with Unity3D
 
Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012
 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
hublikarsn
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 

Low Level Graphics & OpenGL