Webgl Microsoft Edge



WebGL (Web Graphics Library) is a JavaScript API for rendering high-performance interactive 3D and 2D graphics within any compatible web browser without the use of plug-ins. WebGL does so by introducing an API that closely conforms to OpenGL ES 2.0 that can be used in HTML5 <canvas> elements. This conformance makes it possible for the API to take advantage of hardware graphics acceleration provided by the user's device.

This wikiHow teaches you how to enable Webgl. Webgl (Web Graphics Library) is a JavaScript API that is used to render 2D and 3D graphics within a compatible web browser. Open Google Chrome. It has an icon that resembles a red, yellow,. WebGL is generally enabled by default in Safari. However, if you are using a computer on which WebGL may present a security risk, you may have to enable WebGL manually by taking the following steps: From the menu bar, click Safari and then select Preferences. Select the Websites tab. Select WebGL from the list on the left side of the window.

Support for WebGL is present in Firefox 4+, Google Chrome 9+, Opera 12+, Safari 5.1+, Internet Explorer 11+, and Microsoft Edge build 10240+; however, the user's device must also have hardware that supports these features.

Extension

The WebGL 2 API introduces support for much of the OpenGL ES 3.0 feature set; it's provided through the WebGL2RenderingContext interface.

The <canvas> element is also used by the Canvas API to do 2D graphics on web pages.

Reference

Standard interfaces

Extensions

Webgl Microsoft Edge Browser

Events

Constants and types

WebGL 2

WebGL 2 is a major update to WebGL which is provided through the WebGL2RenderingContext interface. It is based on OpenGL ES 3.0 and new features include:

  • 3D textures,
  • Sampler objects,
  • Uniform Buffer objects,
  • Sync objects,
  • Query objects,
  • Transform Feedback objects,
  • Promoted extensions that are now core to WebGL 2: Vertex Array objects, instancing, multiple render targets, fragment depth.

See also the blog post 'WebGL 2 lands in Firefox' and webglsamples.org/WebGL2Samples for a few demos.

Guides and tutorials

Below, you'll find an assortment of guides to help you learn WebGL concepts and tutorials that offer step-by-step lessons and examples.

Guides

Webgl For Facebook Gameroom

Webgl Microsoft Edge
Data in WebGL
A guide to variables, buffers, and other types of data used when writing WebGL code.
WebGL best practices
Tips and suggestions to help you improve the quality, performance, and reliability of your WebGL content.
Using extensions
A guide to using WebGL extensions.

Tutorials

WebGL tutorial
A beginner's guide to WebGL core concepts. A good place to start if you don't have previous WebGL experience.

Examples

A basic 2D WebGL animation example
This example demonstrates the simple animation of a one-color shape. Topics examined are adapting to aspect ratio differences, a function to build shader programs from sets of multiple shaders, and the basics of drawing in WebGL.
WebGL by example
A series of live samples with short explanations that showcase WebGL concepts and capabilities. The examples are sorted according to topic and level of difficulty, covering the WebGL rendering context, shader programming, textures, geometry, user interaction, and more.

Advanced tutorials

WebGL model view projection
A detailed explanation of the three core matrices that are typically used to represent a 3D object view: the model, view and projection matrices.
Matrix math for the web
A useful guide to how 3D transform matrices work, and can be used on the web — both for WebGL calculations and in CSS3 transforms.

Resources

Edge
  • Khronos WebGL site The main web site for WebGL at the Khronos Group.
  • WebGL Fundamentals A basic tutorial with fundamentals of WebGL.
  • Raw WebGL: An introduction to WebGL A talk by Nick Desaulniers that introduces the basics of WebGL.
  • WebGL playground An online tool for creating and sharing WebGL projects. Good for quick prototyping and experimenting.
  • WebGL Academy An HTML/JavaScript editor with tutorials to learn basics of webgl programming.
  • WebGL Stats A site with statistics about WebGL capabilities in browsers on different platforms.

Libraries

  • three.js is an open-source, fully featured 3D WebGL library.
  • Babylon.js is a powerful, simple, and open game and 3D rendering engine packed into a friendly JavaScript framework.
  • Pixi.js is a fast, open-source 2D WebGL renderer.
  • Phaser is a fast, free and fun open source framework for Canvas and WebGL powered browser games.
  • PlayCanvas is an open-source game engine.
  • glMatrix is a JavaScript matrix and vector library for high-performance WebGL apps.
  • twgl is a library for making webgl less verbose.
  • RedGL is an open-source 3D WebGL library.
  • vtk.js is a JavaScript library for scientific visualization in your browser.
  • webgl-lint will help find errors in your WebGL code and provide useful info

Specifications

SpecificationStatusComment
OpenGL ES 3.0Standard
OpenGL ES 2.0Standard
WebGL 2.0Editor's DraftBuilds on top of WebGL 1. Based on OpenGL ES 3.0.
WebGL 1.0RecommendationInitial definition. Based on OpenGL ES 2.0

Browser compatibility

WebGL 1

BCD tables only load in the browser

WebGL 2

BCD tables only load in the browser

Compatibility notes

In addition to the browser, the GPU itself also needs to support the feature. So, for example, S3 Texture Compression (S3TC) is only available on Tegra-based tablets. Most browsers make the WebGL context available through the webgl context name, but older ones need experimental-webgl as well. In addition, the upcoming WebGL 2 is fully backwards-compatible and will have the context name webgl2.

Gecko notes

WebGL debugging and testing

Starting with Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7), there are two preferences available which let you control the capabilities of WebGL for testing purposes:

webgl.min_capability_mode
A Boolean property that, when true, enables a minimum capability mode. When in this mode, WebGL is configured to only support the bare minimum feature set and capabilities required by the WebGL specification. This lets you ensure that your WebGL code will work on any device or browser, regardless of their capabilities. This is false by default.
webgl.disable_extensions
A Boolean property that, when true, disables all WebGL extensions. This is false by default.

See also