Creating a WebGL wrapper to simplify the WebGL API

If you've already looked ahead and peeked at the code for this recipe, and you're not very familiar with OpenGL or WebGL, you're probably feeling pretty overwhelmed, and for good reason. WebGL, although extremely powerful, has quite a steep learning curve when diving into it for the first time. Frankly speaking, it takes many lines of code to perform simple tasks. Therefore, I've found it extremely convenient to work with a WebGL wrapper that essentially shrink wraps blocks of tedious code into simple methods. This recipe provides steps for creating a simple WebGL wrapper that will be used for all of the recipes in this chapter. Let's get started!

Tip

As the WebGL wrapper is quite complex, you might ...

Get HTML5 Canvas Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.