Installing Games Sucks!
Learn WebGL
@CoreyClarkPhD
@GameTheoryLabs
Audience Survey Link: meetup.GameTheoryLabs.com
Who Am I?
!   Founder of Game Theory
Labs
!   Professor of Game and
Simulation Programming
! Nanoscale Semiconductor
Growth Kinetics
!   Flexible Embedded
Electronics for ABL
!   SWARM and C4ISR
Embedded Systems
!   Building HTML5 Web
Apps Utilizing:
!   Cloud Cluster
Computing
!   Game Technology
!   Artificial Intelligence
Modeling, Learning and
Optimization
What I Do:What I Did:
Experience with Matrix or Vector Math?
Survey Link: meetup.gametheorylabs.com
Experience with Canvas (2D or 3D)?
Survey Link: meetup.gametheorylabs.com
What Experience Do You Have With 3D
Graphics?
Survey Link: meetup.gametheorylabs.com
What is WebGL?
OpenGL ES 2.0
Back To Future?
WebGL != Undefined
* **!
* Requires user to enable flag in developer menu
** Requires Plugin (IEWebGL), I know, defeats the point
! IE 11 looks to have WebGL added, WHOO HOO!
So Why The Hype?
GPU Acceleration == FAST
How Fast?
http://goo.gl/ukEPV
How Fast?
http://goo.gl/ukEPV
ACHIEVMENT UNLOCKED
You are now smarter than a 5th grader
3D Basics:
Objects
Vertices à Triangles à Surface
viewer.gametheorylabs.com
3D Basics:
Objects and File Type
! WebGL does not have an
defined model format
! Collada, glTF
!   OBJ, FBX, DAE
!   Stores
!   Relative Position
! Normals
!   Texture
!   Animation
!   Materials
tri.gametheorylabs.com
3D Basics:
Scale, Translate and Rotate
matrix.gametheorylabs.com
Euler Angles
Gimbal Lock
Quaternions
3D Basics:
View Matrix
3D Basics:
Projection Matrix
Level UP
Performance
Blog: goo.gl/hofS2 Demo: http://goo.gl/q2jA7
Show Me The …
Data?
Verts Polys Draw FPS CPU RAM Video OS
858,750 485,292 654 30 2.2GHz
i7 Quad
Core
4GB Radeon
6750M 1GB
OSX
634,179 353,386 483 30 2.53GHz
Core 2 Duo
4GB 9800+ 1GB Win 7
590,898 333,924 450 33.3 2.53GHz
Core 2 Duo
8GB 9600M GT
512MB
OSX
Show Me The …
Data?
Browser Verts Polys Draw Calls
Chrome 590,898 333,924 450
Aurora 426,773 241,174 325
WebKit
Nightly
393,948 222,624 300
Safari 295,473 166,974 225
Firefox 262,648 148,424 200
So All Of This Is JavaScript?
Not Exactly…
… GLSL
Shaders
Vertex Shader Pixel/Fragment Shader
Vertex Shader
Fragment Shader
Shaders and Gfx Pipeline
http://dev.opera.com/articles/view/an-introduction-to-webgl/
1 Up:
Programming Language
WebGL Initialization
!  Canvas
! Shaders
!  Models
WebGL
Canvas Initialization
!  Create HTML Canvas Object
!  Set Width Height
!  Get 3D Context
!  Set Viewport dimensions to match canvas
dimensions
!  Set Clear Color (and any other properties)
WebGL
Shader Initialization
!  Create Shaders
!   Get Copy of Shader Code (Vertex and Fragment)
!   Create GL Fragment and Vertex Shader Objects
!   Add Source to Shader
!   Compile Shader
WebGL
Shader Initialization
!  Create Program
!   Create GL Shader Program
!   Attach Vertex and Fragment Shaders to Program
!   Link Program
!   Call useProgram to set Linked Program Active
WebGL
Shader Initialization
!  Connect JavaScript and GLSL Variables
!   Attributes
! getAttribLocation
! enableVertexAttribArray
!   Uniforms
! getUniformLocation
!   gl.uniformMatrix4fv(u.location, false, u.value);
!   gl.uniform3fv(u.location, u.value);
!   gl.uniform1i(u.location, u.value);
WebGL
Mesh Initialization
!  Create GL Buffer Object
!  Bind Buffer
!  Fill Buffer with Data
!   Position
!   Color
!   Texture
! Normals
!   Etc…
WebGL
Update and Draw
!   Use requestAnimFrame
!   Update
!   Position, Scale, Rotation, AI, Physics, etc…
!   Draw
!   Set Uniforms
!   Bind and Set Vertex Buffers
!   Call glDrawElements
WebGL Boss Defeated
Omega Resistance 0v2
! WebGL
!   Gamepad API
!   3D Rigid Body Physics
!   AI Autonomous
Movement
! WebWorkers
Blog: goo.gl/5nR0H Game: or.gametheorylabs.com
http://or.gametheorylabs.com
WebGL Alternatives
!  3D CSS
!  2.5D (Isometric)
!  2D Top Down
http://goo.gl/L8lwb
WebGL Libraries
! ThreeJS
!   GLGE
! CopperLicht
! CubicVR
And Many Many More….
WebGL Tid Bits
! DebugContex
! WebGL Inspector
! requestAnimFrame
!   Twitter
!   Start with ThreeJS or Learning WebGL
Questions?
Twitter/Facebook:
@CoreyClarkPhD
@GameTheoryLabs
Web: gametheorylabs.com
Dev Wiki: wiki.gametheorylabs.com
Git: git.gametheorylabs.com

More Related Content

PPTX
Hack'n Break Android Workshop
PDF
React native first impression
PPTX
What's new in Android at I/O'16
PDF
Drag and Drop UI Development with React Native
PPTX
Вредные советы .NET разработчикам, Сергей Калинец
PDF
Angular vs React Smackdown - Devoxx BE 2017
PPTX
Secrets of a Blazor Component Artisan
PDF
Flutter for web
Hack'n Break Android Workshop
React native first impression
What's new in Android at I/O'16
Drag and Drop UI Development with React Native
Вредные советы .NET разработчикам, Сергей Калинец
Angular vs React Smackdown - Devoxx BE 2017
Secrets of a Blazor Component Artisan
Flutter for web

What's hot (9)

PPT
MVP with GWT and GWTP
PPTX
История одного успешного ".NET" проекта, Александр Сугак
ODP
GG WORKSHOP GAMES & APPS IN JAVASCRIPT
PPSX
Global Windows Azure Bootcamp : Samuel et Emilien Pécoul, Florent Pelet Legac...
PPTX
Nativescript with angular 2
PDF
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
KEY
Grails at DMC Digital
PDF
What I learned teaching programming to 150 beginners
PPTX
Pain Driven Development by Alexandr Sugak
MVP with GWT and GWTP
История одного успешного ".NET" проекта, Александр Сугак
GG WORKSHOP GAMES & APPS IN JAVASCRIPT
Global Windows Azure Bootcamp : Samuel et Emilien Pécoul, Florent Pelet Legac...
Nativescript with angular 2
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
Grails at DMC Digital
What I learned teaching programming to 150 beginners
Pain Driven Development by Alexandr Sugak
Ad

Similar to Installing Games Sucks, Learn WebGL (20)

PPTX
HTML5DevConf 2013 (October): WebGL is a game changer!
PDF
Leaving Flatland: Getting Started with WebGL- SXSW 2012
PDF
Computer Graphics - Lecture 01 - 3D Programming I
PDF
Creating Applications with WebGL and Three.js
PPTX
Intro to WebGL and BabylonJS
PDF
3D in the Browser via WebGL: It's Go Time
PDF
WebGL and three.js
PPT
CS 354 Programmable Shading
PDF
Open gl
PPT
Advanced Graphics Workshop - GFX2011
KEY
WebGL Awesomeness
PDF
lectureAll-OpenGL-complete-Guide-Tutorial.pdf
PPT
Rendering: Vertices, Indices, UVs and Shaders
KEY
Leaving Flatland: getting started with WebGL
PDF
WebGL Fundamentals
PDF
Power of WebGL (FSTO 2014)
PDF
WebGL
KEY
Getting Started with WebGL
PDF
The Power of WebGL - Hackeando sua GPU com JavaScript
PDF
Gdc 14 bringing unreal engine 4 to open_gl
HTML5DevConf 2013 (October): WebGL is a game changer!
Leaving Flatland: Getting Started with WebGL- SXSW 2012
Computer Graphics - Lecture 01 - 3D Programming I
Creating Applications with WebGL and Three.js
Intro to WebGL and BabylonJS
3D in the Browser via WebGL: It's Go Time
WebGL and three.js
CS 354 Programmable Shading
Open gl
Advanced Graphics Workshop - GFX2011
WebGL Awesomeness
lectureAll-OpenGL-complete-Guide-Tutorial.pdf
Rendering: Vertices, Indices, UVs and Shaders
Leaving Flatland: getting started with WebGL
WebGL Fundamentals
Power of WebGL (FSTO 2014)
WebGL
Getting Started with WebGL
The Power of WebGL - Hackeando sua GPU com JavaScript
Gdc 14 bringing unreal engine 4 to open_gl
Ad

Recently uploaded (20)

PDF
GDG Cloud Southlake #45: Patrick Debois: The Impact of GenAI on Development a...
PDF
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
PDF
Be ready for tomorrow’s needs with a longer-lasting, higher-performing PC
PDF
Optimizing bioinformatics applications: a novel approach with human protein d...
PDF
Addressing the challenges of harmonizing law and artificial intelligence tech...
PPTX
Strategic Picks — Prioritising the Right Agentic Use Cases [2/6]
PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PDF
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
PDF
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
PDF
Human Computer Interaction Miterm Lesson
PPTX
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
PDF
TicketRoot: Event Tech Solutions Deck 2025
PPT
Overviiew on Intellectual property right
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
PDF
Technical Debt in the AI Coding Era - By Antonio Bianco
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PPTX
CRM(Customer Relationship Managmnet) Presentation
PPTX
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
PDF
Secure Java Applications against Quantum Threats
PDF
Examining Bias in AI Generated News Content.pdf
GDG Cloud Southlake #45: Patrick Debois: The Impact of GenAI on Development a...
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
Be ready for tomorrow’s needs with a longer-lasting, higher-performing PC
Optimizing bioinformatics applications: a novel approach with human protein d...
Addressing the challenges of harmonizing law and artificial intelligence tech...
Strategic Picks — Prioritising the Right Agentic Use Cases [2/6]
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
Human Computer Interaction Miterm Lesson
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
TicketRoot: Event Tech Solutions Deck 2025
Overviiew on Intellectual property right
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
Technical Debt in the AI Coding Era - By Antonio Bianco
Report in SIP_Distance_Learning_Technology_Impact.pptx
CRM(Customer Relationship Managmnet) Presentation
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
Secure Java Applications against Quantum Threats
Examining Bias in AI Generated News Content.pdf

Installing Games Sucks, Learn WebGL