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

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

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.

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}