Wednesday 17 October 2012

HTML5 and WebGL

I won't be having a blog next Monday as I am not in the office, so I have decided to post now to report on a cool tool that just saved me a heap of work. It is called WebGL Inspector and is a Chromium Extension for HTML5 developers using WebGL.

The link is : https://chrome.google.com/webstore/detail/webgl-inspector/ogkcjmbhnfmlnielkjhedpcjomeaghda

Without this valuable way to step through every single event the WebGL performed during a single rendered frame, I would probably have never noticed the absence of two small state changes in the 150 state changes that represented by very simple 3D scene.

For those keeping up with Freedom-Engine progress (www.freedom-engine.com) this was the tool that helped me solve the 'missing 3D on a Mac' issue, as it turns out when the uniforms (like global constants) for the shader are collected, they are collected in a different order on the PC as they are on the Mac. In addition, it also highlighted a bug where I was only collecting the first of the shader uniforms meaning subsequent uniforms where being ignored. 

I often say that when you understand the question thoroughly, the answer presents itself.  Within every question lies the answer!

No comments:

Post a Comment