Skip to content
kripken edited this page Mar 10, 2012 · 20 revisions

WebGL Rendering

We will manually port the rendering code to use a subset of OpenGL we can easily translate to WebGL.

  • See here for ehsan's demo of his work on the Emscripten OpenGL ES 2.0 to WebGL bindings.
  • See the WebGL docs for differences between WebGL and OpenGL ES 2.0, and here for general OpenGL/OpenGL ES 2.0 differences.
  • WebGL calls cost more than OpenGL native calls, because of JS<->native code communication. We might need to optimize code to make fewer calls, or avoid certain types of rendering. For example, if some visual effect (explosions? water?) constantly uploads vertex data each frame, that might be slow. We should check if it is, because it might not be, but if it is then a simple optimization might be to previously upload all the needed values, etc.
Clone this wiki locally