SlideShare a Scribd company logo
Thursday, November 3, 2011
WebGL Fundamentals
                             Nicolas Garcia Belmonte, Sencha




                                         @philogb

                                 http://philogb.github.com/
Thursday, November 3, 2011
Agenda




Thursday, November 3, 2011
Agenda


                              What is WebGL ?

                        What can WebGL be used for ?

               How can I get started with WebGL ?



Thursday, November 3, 2011
What is WebGL ?




Thursday, November 3, 2011
What is WebGL ?




Thursday, November 3, 2011
What is WebGL ?

                             OpenGL




                       OpenGL ES




                             WebGL


Thursday, November 3, 2011
What is WebGL ?
                                         JavaScript



                    WebGL JS API



                                   GPU (Compiled Program)




Thursday, November 3, 2011
What is WebGL ?
                                     JavaScript


                    WebGL JS API


                   GLSL API         Vertex Shader




                   GLSL API        Fragment Shader




Thursday, November 3, 2011
What is WebGL ?
                                     JavaScript      [x1, y1, z1, x2, y2, z2, ...]


                    WebGL JS API

                                                                     attribute
                   GLSL API         Vertex Shader
                                                                     uniform




                   GLSL API        Fragment Shader   uniform         varying




Thursday, November 3, 2011
What is WebGL ?
                                    JavaScript      [x1, y1, z1, x2, y2, z2, ...]




                                                                    attribute
             Triangle Assembly     Vertex Shader
                                                                    uniform




                 Rasterization    Fragment Shader   uniform         varying




Thursday, November 3, 2011
What is WebGL ?

                        Vertex Shader




                    Triangle Assembly




                         Rasterization




                     Fragment Shader



Thursday, November 3, 2011
What can WebGL be
                                 used for ?




Thursday, November 3, 2011
What can WebGL be used for ?




Thursday, November 3, 2011
What can WebGL be used for ?

                                     Interactive games

                                     Data visualization

                                      Creative coding

                                    Physics simulations

                                        Music videos

                             ... very fast processing of any data.
Thursday, November 3, 2011
What can WebGL be used for ?




Thursday, November 3, 2011
What can WebGL be used for ?
                             Interactive games




Thursday, November 3, 2011
Thursday, November 3, 2011
What can WebGL be used for ?




Thursday, November 3, 2011
What can WebGL be used for ?
                             Data visualization




Thursday, November 3, 2011
What can WebGL be used for ?




Thursday, November 3, 2011
What can WebGL be used for ?
                             Creative coding




Thursday, November 3, 2011
What can WebGL be used for ?




Thursday, November 3, 2011
What can WebGL be used for ?
                             Physics simulations




Thursday, November 3, 2011
What can WebGL be used for ?




Thursday, November 3, 2011
What can WebGL be used for ?
                             Music videos




Thursday, November 3, 2011
Thursday, November 3, 2011
PhiloGL


                      A WebGL framework for data
                    visualization, creative coding and
                           game development.




Thursday, November 3, 2011
PhiloGL


                      A WebGL framework for data
                    visualization, creative coding and
                           game development.




                   http://senchalabs.github.com/philogl/

Thursday, November 3, 2011
PhiloGL


                      A WebGL framework for data
                    visualization, creative coding and
                           game development.




Thursday, November 3, 2011
PhiloGL


                      A WebGL framework for data
                    visualization, creative coding and
                           game development.




                   http://senchalabs.github.com/philogl/

Thursday, November 3, 2011
HTML Document




Thursday, November 3, 2011
How most people see a WebGL app:




                             WebGL Canvas
                              HTML Document




Thursday, November 3, 2011
How we see a WebGL app:

                                 Web Workers   Forms



                                               Images



                                WebGL Canvas   Audio



                                               Video



                                  2D Canvas    XHR(2)



Thursday, November 3, 2011
Examples




Thursday, November 3, 2011
PhiloGL




Thursday, November 3, 2011
PhiloGL



                                   Idiomatic JavaScript

                                   Rich Module System

                             Flexible and Performance Focused




Thursday, November 3, 2011
Idiomatic JavaScript




Thursday, November 3, 2011
Idiomatic JavaScript
                             Concise & Expressive




Thursday, November 3, 2011
  //Create application
                               PhiloGL('canvasId', {
                                 program: {
                                   from: 'uris',
                                   vs: 'shader.vs.glsl',
                                   fs: 'shader.fs.glsl'
                                 },
                                 camera: {
                                   position: {
                                     x: 0, y: 0, z: -50
                                   }
                                 },
                                 textures: {
                                   src: ['arroway.jpg', 'earth.jpg']
                                 },
                                 events: {
                                   onDragMove: function(e) {
                                     //do things...
                                   },
                                   onMouseWheel: function(e) {
                                     //do things...
                                   }
                                 },
                                 onError: function() {
                                   alert("There was an error creating the app.");
                                 },
                                 onLoad: function(app) {
                                   /* Do things here */
                                 }
                               });
Thursday, November 3, 2011
Module System
                                 Core
                                 Math
                                 WebGL
                                 Program
                                 Shaders
                                 O3D
                                 Camera
                                 Scene
                                 Event
                                 Fx
                                 IO
                                 Workers
                                 Media




Thursday, November 3, 2011
Other Examples




Thursday, November 3, 2011
Thanks!




Thursday, November 3, 2011
Thanks!


                                     @philogb

                             http://philogb.github.com/

              http://senchalabs.github.com/philogl/



Thursday, November 3, 2011

More Related Content

PDF
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
PPTX
레벨 디자인의 구성
PDF
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
PDF
Game Development workshop with Unity3D.
PPTX
GDC Europe 2014: Unreal Engine 4 for Programmers - Lessons Learned & Things t...
PDF
게임서버 구축 방법비교 : GBaaS vs. Self-hosting
PPT
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
PDF
Recommender system algorithm and architecture
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
레벨 디자인의 구성
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Game Development workshop with Unity3D.
GDC Europe 2014: Unreal Engine 4 for Programmers - Lessons Learned & Things t...
게임서버 구축 방법비교 : GBaaS vs. Self-hosting
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Recommender system algorithm and architecture

What's hot (20)

PPTX
Game Design Document - Step by Step Guide
PDF
Practical Spherical Harmonics Based PRT Methods
PDF
06. Game Architecture
PPT
Game genres
PDF
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
PDF
Game Programming 07 - Procedural Content Generation
PDF
Netflix Recommendations - Beyond the 5 Stars
PPTX
Firebase
PDF
Deeper Things: How Netflix Leverages Deep Learning in Recommendations and Se...
PPTX
Introduction to game development
PPT
Game development Pre-Production
PPT
Introduction to Unity3D Game Engine
PPTX
Game Architecture and Programming
PDF
재미이론의 시사점과 게임 플레이 개선에 적용방안
PDF
Unity 2D game development
ODP
Introduction to webGL
PDF
Design your 3d game engine
PDF
Game Thinking Fundamentals
PPT
NVIDIA OpenGL and Vulkan Support for 2017
PDF
[NDC08] 최적화와 프로파일링 - 송창규
Game Design Document - Step by Step Guide
Practical Spherical Harmonics Based PRT Methods
06. Game Architecture
Game genres
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
Game Programming 07 - Procedural Content Generation
Netflix Recommendations - Beyond the 5 Stars
Firebase
Deeper Things: How Netflix Leverages Deep Learning in Recommendations and Se...
Introduction to game development
Game development Pre-Production
Introduction to Unity3D Game Engine
Game Architecture and Programming
재미이론의 시사점과 게임 플레이 개선에 적용방안
Unity 2D game development
Introduction to webGL
Design your 3d game engine
Game Thinking Fundamentals
NVIDIA OpenGL and Vulkan Support for 2017
[NDC08] 최적화와 프로파일링 - 송창규
Ad

Viewers also liked (7)

PDF
Data visualization for the web
PDF
Child Theme
PDF
Principles of Analytical Design - Visually Meetup - Sept. 2011
PDF
OpenVisConf - WebGL for graphics and data visualization
PDF
Wordpress Underscores & foundation5
PDF
Leaving Flatland: Getting Started with WebGL- SXSW 2012
PDF
Bootstrap 3 Basic - Bangkok WordPress Meetup
Data visualization for the web
Child Theme
Principles of Analytical Design - Visually Meetup - Sept. 2011
OpenVisConf - WebGL for graphics and data visualization
Wordpress Underscores & foundation5
Leaving Flatland: Getting Started with WebGL- SXSW 2012
Bootstrap 3 Basic - Bangkok WordPress Meetup
Ad

Similar to WebGL Fundamentals (20)

PDF
A Look at the Future of HTML5
PDF
3D in the Browser via WebGL: It's Go Time
PDF
Introducing Ext GWT 3.0
PDF
Caridy patino - node-js
PDF
Conquistando el Servidor con Node.JS
PDF
Hacking Webkit & Its JavaScript Engines
PDF
Javascript - How to avoid the bad parts
PDF
Community Code: Xero
PDF
Visualizations of Spatial and Social Data
PDF
PDF
Ext JS 4.1: Layouts, Performance, and API updates
PDF
Node at artsy
PDF
What's new in HTML5, CSS3 and JavaScript, James Pearce
PDF
Performance Optimization for Ext GWT 3.0
PDF
Community Code: The TouchForums App
PDF
Mapnik2 Performance, September 2011
PDF
Moving to Dojo 1.7 and the path to 2.0
PDF
TorqueBox - Ultrapassando a fronteira entre Java e Ruby
PDF
Cross-Platform, Native Mobile Development with a DSL
PDF
Hardware Acceleration on Mobile, Ariya Hidayat & Jarred Nicholls
A Look at the Future of HTML5
3D in the Browser via WebGL: It's Go Time
Introducing Ext GWT 3.0
Caridy patino - node-js
Conquistando el Servidor con Node.JS
Hacking Webkit & Its JavaScript Engines
Javascript - How to avoid the bad parts
Community Code: Xero
Visualizations of Spatial and Social Data
Ext JS 4.1: Layouts, Performance, and API updates
Node at artsy
What's new in HTML5, CSS3 and JavaScript, James Pearce
Performance Optimization for Ext GWT 3.0
Community Code: The TouchForums App
Mapnik2 Performance, September 2011
Moving to Dojo 1.7 and the path to 2.0
TorqueBox - Ultrapassando a fronteira entre Java e Ruby
Cross-Platform, Native Mobile Development with a DSL
Hardware Acceleration on Mobile, Ariya Hidayat & Jarred Nicholls

More from Sencha (20)

PDF
Breathe New Life into Your Existing JavaScript Applications with Web Components
PDF
Ext JS 6.6 Highlights
PDF
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
PDF
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
PDF
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
PDF
Sencha Roadshow 2017: What's New in Sencha Test
PDF
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
PDF
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
PDF
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
PDF
Sencha Roadshow 2017: Mobile First or Desktop First
PDF
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
PDF
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
PDF
Learn Key Insights from The State of Web Application Testing Research Report
PPTX
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
PPTX
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
PPT
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
PPT
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
PPT
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
PPTX
Ext JS Architecture Best Practices - Mitchell Simeons
PPTX
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
Breathe New Life into Your Existing JavaScript Applications with Web Components
Ext JS 6.6 Highlights
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Learn Key Insights from The State of Web Application Testing Research Report
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
Ext JS Architecture Best Practices - Mitchell Simeons
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PPTX
Machine Learning_overview_presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Machine Learning_overview_presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

WebGL Fundamentals

  • 2. WebGL Fundamentals Nicolas Garcia Belmonte, Sencha @philogb http://philogb.github.com/ Thursday, November 3, 2011
  • 4. Agenda What is WebGL ? What can WebGL be used for ? How can I get started with WebGL ? Thursday, November 3, 2011
  • 5. What is WebGL ? Thursday, November 3, 2011
  • 6. What is WebGL ? Thursday, November 3, 2011
  • 7. What is WebGL ? OpenGL OpenGL ES WebGL Thursday, November 3, 2011
  • 8. What is WebGL ? JavaScript WebGL JS API GPU (Compiled Program) Thursday, November 3, 2011
  • 9. What is WebGL ? JavaScript WebGL JS API GLSL API Vertex Shader GLSL API Fragment Shader Thursday, November 3, 2011
  • 10. What is WebGL ? JavaScript [x1, y1, z1, x2, y2, z2, ...] WebGL JS API attribute GLSL API Vertex Shader uniform GLSL API Fragment Shader uniform varying Thursday, November 3, 2011
  • 11. What is WebGL ? JavaScript [x1, y1, z1, x2, y2, z2, ...] attribute Triangle Assembly Vertex Shader uniform Rasterization Fragment Shader uniform varying Thursday, November 3, 2011
  • 12. What is WebGL ? Vertex Shader Triangle Assembly Rasterization Fragment Shader Thursday, November 3, 2011
  • 13. What can WebGL be used for ? Thursday, November 3, 2011
  • 14. What can WebGL be used for ? Thursday, November 3, 2011
  • 15. What can WebGL be used for ? Interactive games Data visualization Creative coding Physics simulations Music videos ... very fast processing of any data. Thursday, November 3, 2011
  • 16. What can WebGL be used for ? Thursday, November 3, 2011
  • 17. What can WebGL be used for ? Interactive games Thursday, November 3, 2011
  • 19. What can WebGL be used for ? Thursday, November 3, 2011
  • 20. What can WebGL be used for ? Data visualization Thursday, November 3, 2011
  • 21. What can WebGL be used for ? Thursday, November 3, 2011
  • 22. What can WebGL be used for ? Creative coding Thursday, November 3, 2011
  • 23. What can WebGL be used for ? Thursday, November 3, 2011
  • 24. What can WebGL be used for ? Physics simulations Thursday, November 3, 2011
  • 25. What can WebGL be used for ? Thursday, November 3, 2011
  • 26. What can WebGL be used for ? Music videos Thursday, November 3, 2011
  • 28. PhiloGL A WebGL framework for data visualization, creative coding and game development. Thursday, November 3, 2011
  • 29. PhiloGL A WebGL framework for data visualization, creative coding and game development. http://senchalabs.github.com/philogl/ Thursday, November 3, 2011
  • 30. PhiloGL A WebGL framework for data visualization, creative coding and game development. Thursday, November 3, 2011
  • 31. PhiloGL A WebGL framework for data visualization, creative coding and game development. http://senchalabs.github.com/philogl/ Thursday, November 3, 2011
  • 33. How most people see a WebGL app: WebGL Canvas HTML Document Thursday, November 3, 2011
  • 34. How we see a WebGL app: Web Workers Forms Images WebGL Canvas Audio Video 2D Canvas XHR(2) Thursday, November 3, 2011
  • 37. PhiloGL Idiomatic JavaScript Rich Module System Flexible and Performance Focused Thursday, November 3, 2011
  • 39. Idiomatic JavaScript Concise & Expressive Thursday, November 3, 2011
  • 40.   //Create application   PhiloGL('canvasId', {     program: {       from: 'uris',       vs: 'shader.vs.glsl',       fs: 'shader.fs.glsl'     },     camera: {       position: {         x: 0, y: 0, z: -50       }     },     textures: {       src: ['arroway.jpg', 'earth.jpg']     },     events: {       onDragMove: function(e) {         //do things...       },       onMouseWheel: function(e) {         //do things...       }     },     onError: function() {       alert("There was an error creating the app.");     },     onLoad: function(app) {       /* Do things here */     }   }); Thursday, November 3, 2011
  • 41. Module System Core Math WebGL Program Shaders O3D Camera Scene Event Fx IO Workers Media Thursday, November 3, 2011
  • 44. Thanks! @philogb http://philogb.github.com/ http://senchalabs.github.com/philogl/ Thursday, November 3, 2011