Skip to Navigation | Skip to Content



Archive for the 'FireFox' Category

Cube Defense on FireFox | November 10th, 2009

I have just updated my Cube Defense Demo to work in both WebGL enabled WebKit and FireFox. It is still 10-20fps slower compared to WebKit, but hey, at least it works! I would like to thank those who emailed me tips on making it compatible for both.

To share my experience, these are some of the things I had to change to make it work for WebKit and FireFox:
• Use UNSIGNED_SHORT instead of UNSIGNED_BYTE
• Use CanvasUnsignedShortArray instead of CanvasUnsignedByteArray
• For FireFox, use WebGLFloatArray instead of CanvasFloatArray. This will make things faster.
• ARRAY_BUFFER rather than ELEMENT_ARRAY_BUFFER
• “clearDepth” for WebKit, “clearDepthf” for FireFox
• In “bindBuffer” function use null instead of 0

If you have anything else to add, share your thoughts!

*Update: (November 18th, 09)
This is a little outdated now, so I crossed out some irrelevent stuff. Also, in the lastest WebKit, anything that was CanvasXXXXXArray is now WebGLXXXXXArray.

Posted in 3d, FireFox, WebGL, WebKit, javascript, openGL | 8 Comments » | Add to Delicious | Digg It


Search Posts

You are currently browsing the archives for the FireFox category.

  • Links

  • Categories