Book Image

DART Cookbook

By : Ivo Balbaert
Book Image

DART Cookbook

By: Ivo Balbaert

Overview of this book

Table of Contents (18 chapters)
Dart Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using WebGL in your app


The HTML5 Canvas API allows you to draw in only two dimensions. Using Web Graphics Library (WebGL), you can show interactive 2D graphics and 3D graphics within any modern web browser (Internet Explorer 11 has only partial support for WebGL) without the use of plugins. WebGL elements are drawn on a canvas element, and can be combined with other HTML elements. Programs that use WebGL are a mixture of Dart (or JavaScript) code for control, and are of specific WebGL shader code. This shader code is executed on the computer's Graphic Processing Unit (GPU), allowing GPU-accelerated usage of physics effects and image processing as part of the web page canvas, so we have real parallel processing here!

WebGL provides a low-level 3D API; mastering it needs more than a recipe, probably a course or book on its own. However, this recipe will provide you with the basics in the webgl project and we point to some links to get further information.

Look at the code of the project webgl...