Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Do WebGL Right: Recipes and Best Practices

DZone's Guide to

Do WebGL Right: Recipes and Best Practices

· Web Dev Zone ·
Free Resource

Bugsnag monitors application stability, so you can make data-driven decisions on whether you should be building new features, or fixing bugs. Learn more.

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.

Monitor application stability with Bugsnag to decide if your engineering team should be building new features on your roadmap or fixing bugs to stabilize your application.Try it free.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}