Over a million developers have joined DZone.

Do WebGL Right: Recipes and Best Practices

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

Two simple ways of coding best: follow best practices, or use the best of other developers' code. Both are easier than understanding an API in depth, or tracing a technology from API to bytecode. 

High-powered graphics programming raises the performance stakes quite a bit -- so it demands either deep understanding of computer graphics or one of the easier methods of code-bettering.

For WebGL programming, you can read the spec, if you like, or break out the matrix algebra and slog through a free course in computer graphics (tons of great slides, btw).

Or for quicker improvement, ride on the shoulders of other giants, and digest these two resources:

  • WebGL Best Practices: from Mozilla, so slightly optimized for Firefox, but mostly not engine-specific. Includes useful list of things to avoid, things to think about, and general performance tips.
  • The WebGL Cookbook: from learningwebgl.com, includes recipes (how to initialize, include a function, draw a sphere, stuff on shaders), cheat sheets, matrix libraries (see, math not a problem), and quite a few frameworks I've seen used extensively online. (The frameworks section is particularly great.)

Either way, in different ways, should help you get started and write better WebGL in no time.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}