20/10/12

WebGL tinysample

 Tiny WebGL/Elemental sample

  1. Donwload latest GWT  (here) and setup a new project.
     
  2. Add to the build path gwt-elemental.jar (is in the unpacked gwt 2.5 archive).
     
  3. Add to the gwt.xml file the line  <inherits name='elemental.Elemental'/>.
     
  4. Use TestWGLdrawrectangles.java as EntryPoint.
     
  5. Compile and enjoy.



DevMode, at least in our setup, do not works so you need to compile and run
the compiled code. Chrome has an issue in loading local files that do not let
you play wiht the (any) webapp from the local filesystem thus you have to use ff or
start  devmode but when loading in the browser use the url without  ?gwt.codesvr=127.0.0.1:9997
in my case
   http://127.0.0.1:8888/TestWGLdrawrectangles.html
instead of
   http://127.0.0.1:8888/TestWGLdrawrectangles.html?gwt.codesvr=127.0.0.1:9997




References:
http://www.khronos.org/webgl
https://www.khronos.org/registry/webgl/specs/1.0/
http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.24.pdf

http://www.html5rocks.com/en/tutorials/webgl/webgl_fundamentals/




The content of this post is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the Apache 2.0 License.