Two basic questions about WebGL

Dear All,

I have two basic questions about WebGL.

First, when the WebGL applications are displayed in the browser, all the graphic data (e.g. mesh) are downloaded to the client PC or only the frame images are downloaded?

Second, can I use any input devices, such as game panel, to interact with the WebGL applications?

Thanks a lot!


WebGL runs inside the client’s PC. It has a fancy name - but all it really is is a set of OpenGL-ES bindings for JavaScript. What happens is that JavaScript (running on the client machine) makes OpenGL-ES calls that are run on the native graphics hardware (the GPU on your graphics chip). Graphics are as fast as the underlying hardware…providing you can write JavaScript code that’s fast enough to keep the hardware busy!

Check out my game on to get an idea of what’s possible.

Obviously you’ll probably want to download texture maps and model geometry from the web - but once it’s all there, all of the rendering happens inside the browser - just like any other JavaScript program. In most cases, the application runs without any further communication with the server (unless you want to make it multi-player or something).

I’m not sure what you mean by “a game panel” - JavaScript can create mouse and keyboard events - so you can interact with the program easily. Game pads and joysticks are not supported natively by any of the browsers yet…but there is a project:

…that seems to allow access to the joystick/gamepad using a plugin - I haven’t used it, so that’s all I know. There is also an ActiveX thing for IE - but IE doesn’t support WebGL, so that’s no use.

Some browsers also have support for touch-screens…for phones and pad computers. I haven’t played with those either.