際際滷

際際滷Share a Scribd company logo
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 + 鍖lled areas

 Trouble producing smooth lines = blocky
Practical Difference
 Rasterizations

 Complex shapes + 鍖lled areas

 Trouble producing smooth lines = blocky
 Vectorizations

 Perfectly smooth lines

 Less versatile
How do we actually do this
stuff?
GFX APIs
Why?
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
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)
Low Level Graphics & OpenGL
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 doesnt specify:
Why SDL?
 OpenGL doesnt specify:
 Window creation
Why SDL?
 OpenGL doesnt specify:
 Window creation
 Input handling
Why SDL?
 OpenGL doesnt specify:
 Window creation
 Input handling
 More
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
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
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Pixel buffering & V-Sync
@domfarolino
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Getting rid of screen tears?
@domfarolino
Synchronizing Vertical Refresh
Rate
@domfarolino
V-Sync
@domfarolino
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Slower FPS?
@domfarolino
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Low Level Graphics & OpenGL
Cool, but what about the web?
@domfarolino
Ad

Recommended

"Open Mapping on iOS" Justin Miller, MapBox
"Open Mapping on iOS" Justin Miller, MapBox
Yandex
What's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS X
Flatiron School
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
Prabindh Sundareson
2D graphics
2D graphics
Muhammad Rashid
Abc of DirectX
Abc of DirectX
Prabodh20
Displaying 3 d polygon animations
Displaying 3 d polygon animations
halo4robo
01 first
01 first
scythus
CS 354 GPU Architecture
CS 354 GPU Architecture
Mark Kilgard
Graphics Libraries
Graphics Libraries
Prachi Mishra
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko3D
Modern Graphics Pipeline Overview
Modern Graphics Pipeline Overview
slantsixgames
Java on the GPU: Where are we now?
Java on the GPU: Where are we now?
Dmitry Alexandrov
Sig13 ce future_gfx
Sig13 ce future_gfx
Cass Everitt
Minko - Flash Conference #5
Minko - Flash Conference #5
Minko3D
CS 354 Introduction
CS 354 Introduction
Mark Kilgard
Computer Graphics
Computer Graphics
Adri Jovin
Open gl
Open gl
EU Edge
際際滷share
際際滷share
Abu Sayem Sumon
OpenGL 4 for 2010
OpenGL 4 for 2010
Mark Kilgard
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
Mark Kilgard
The next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game Engines
Pooya Eimandar
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
Mark Kilgard
Getting started with open gl es 2
Getting started with open gl es 2
matthewgalaviz
Data structures graphics library in computer graphics.
Data structures graphics library in computer graphics.
Daroko blog(www.professionalbloggertricks.com)
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
Mark Kilgard
The Explanation the Pipeline design strategy.pdf
The Explanation the Pipeline design strategy.pdf
bijevo
Bouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdf
Kamal Acharya
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
JinTaek Seo
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1

More Related Content

Similar to Low Level Graphics & OpenGL (20)

Graphics Libraries
Graphics Libraries
Prachi Mishra
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko3D
Modern Graphics Pipeline Overview
Modern Graphics Pipeline Overview
slantsixgames
Java on the GPU: Where are we now?
Java on the GPU: Where are we now?
Dmitry Alexandrov
Sig13 ce future_gfx
Sig13 ce future_gfx
Cass Everitt
Minko - Flash Conference #5
Minko - Flash Conference #5
Minko3D
CS 354 Introduction
CS 354 Introduction
Mark Kilgard
Computer Graphics
Computer Graphics
Adri Jovin
Open gl
Open gl
EU Edge
際際滷share
際際滷share
Abu Sayem Sumon
OpenGL 4 for 2010
OpenGL 4 for 2010
Mark Kilgard
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
Mark Kilgard
The next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game Engines
Pooya Eimandar
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
Mark Kilgard
Getting started with open gl es 2
Getting started with open gl es 2
matthewgalaviz
Data structures graphics library in computer graphics.
Data structures graphics library in computer graphics.
Daroko blog(www.professionalbloggertricks.com)
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
Mark Kilgard
The Explanation the Pipeline design strategy.pdf
The Explanation the Pipeline design strategy.pdf
bijevo
Bouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdf
Kamal Acharya
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
JinTaek Seo
Graphics Libraries
Graphics Libraries
Prachi Mishra
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko3D
Modern Graphics Pipeline Overview
Modern Graphics Pipeline Overview
slantsixgames
Java on the GPU: Where are we now?
Java on the GPU: Where are we now?
Dmitry Alexandrov
Sig13 ce future_gfx
Sig13 ce future_gfx
Cass Everitt
Minko - Flash Conference #5
Minko - Flash Conference #5
Minko3D
CS 354 Introduction
CS 354 Introduction
Mark Kilgard
Computer Graphics
Computer Graphics
Adri Jovin
Open gl
Open gl
EU Edge
OpenGL 4 for 2010
OpenGL 4 for 2010
Mark Kilgard
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
Mark Kilgard
The next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game Engines
Pooya Eimandar
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
Mark Kilgard
Getting started with open gl es 2
Getting started with open gl es 2
matthewgalaviz
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
Mark Kilgard
The Explanation the Pipeline design strategy.pdf
The Explanation the Pipeline design strategy.pdf
bijevo
Bouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdf
Kamal Acharya
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
JinTaek Seo

Recently uploaded (20)

retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
Unit III_One Dimensional Consolidation theory
Unit III_One Dimensional Consolidation theory
saravananr808639
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Shabista Imam
How to Un-Obsolete Your Legacy Keypad Design
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
Shabista Imam
ElysiumPro Company Profile 2025-2026.pdf
ElysiumPro Company Profile 2025-2026.pdf
info751436
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
machine learning is a advance technology
machine learning is a advance technology
ynancy893
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
nnnnnnnnnnnn7777777777777777777777777777777.pptx
nnnnnnnnnnnn7777777777777777777777777777777.pptx
gayathri venkataramani
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
Proposal for folders structure division in projects.pdf
Proposal for folders structure division in projects.pdf
Mohamed Ahmed
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
Unit III_One Dimensional Consolidation theory
Unit III_One Dimensional Consolidation theory
saravananr808639
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Shabista Imam
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
Shabista Imam
ElysiumPro Company Profile 2025-2026.pdf
ElysiumPro Company Profile 2025-2026.pdf
info751436
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
machine learning is a advance technology
machine learning is a advance technology
ynancy893
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
nnnnnnnnnnnn7777777777777777777777777777777.pptx
nnnnnnnnnnnn7777777777777777777777777777777.pptx
gayathri venkataramani
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
Proposal for folders structure division in projects.pdf
Proposal for folders structure division in projects.pdf
Mohamed Ahmed
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
Ad

Low Level Graphics & OpenGL