ReWeb3D is a C++ framework to bring 3D rendering of OpenGLES2 applications to web applications, using WebGL. It consists of an adapted version of Wt and the wtgles2 wrapper library. It has been tested successfully with OpenSceneGraph and osgEarth applications.
OpenGLES2 is a subset of OpenGL developed especially for mobile and embedded devices. It does not provide "fixed functions" of OpenGL 2 and below, but is very close to WebGL, an OpenGL API for web browsers (Javascript).
ReWeb3D provides an OpenGLES2 implementation that you can link your application to. If you start the application, OpenGLES2 calls are captured and serialized as WebGL calls in an HTML page which is served over HTTP. The browser loads this page and renders the content of your application.
As examples, you can find basic OpenSceneGraph examples ported to ReWeb3D in the repository. Running versions may be found at http://demos.vicomtech.org/
- osgGeometry demonstrates different simple geometry types and animation on the server
- osgShape shows different OSG shapes
- osgLight includes two light sources and a server side animation
- [osgViewer] (http://demos.vicomtech.org/wt/examples/osgViewerWt.wt) is the generic viewer for OSG
- osgEarthViewer is the generic viewer for osgEarth
To build ReWeb3D you need CMake to create the project files for your platform. You need the following components:
- wtgles2 at https://github.com/ReWeb3D/wtgles2.git
- adapted version of Wt at https://github.com/ReWeb3D/wt.git
Optional but recommended to see the examples
- OpenSceneGraph at http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk
- osgEarth at https://github.com/ReWeb3D/osgearth.git
Build sequence
- build Wt (with WRaster support), see the Wt documentation
- build wtgles2 will provide an OpenGLES2 library and headers
- build OpenSceneGraph using the provided OpenGLES2 library and headers see osg documentation
- build osgEarth using the compiled OpenGLES2 and OSG versions
- build wtgles2 examples
You may use the library under the [GNU General Public License] (http://www.gnu.org/copyleft/gpl.html), just like Wt. Providing a more permissive license is not possible because of the OpenGLES2 license and Wt's license.
This work has been supported by Vicomtech.