View Full Version : Webgl Custom Inputs
03-21-2011, 12:13 PM
03-21-2011, 04:39 PM
I played with both for my Barfight game (http://tubagames.net) - and eventually decided that HTML controls were the best. I'm not sure that they are necessarily the fastest - but the ability to theme them with CSS3 and have standard fonts and such won me over.
I ended up with a much higher quality GUI than I'd otherwise have gone for - and it took only a matter of hours to write.
I would expect you could maybe get better frame rates by rendering them using a texture-mapped font in WebGL...but with hardware HTML rendering & compositing in the latest wave of browsers, I could be wrong about that too.
You can use the CSS style element to set a "z-index" property (which is really a "layer" number rather than true Z value) - that's how I get my menu to hover over the 3D scene...then I use the DOM to set the "visibility" property to hide or reveal the HTML object as I need it in-game.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.