Development news: first milestone of new renderer reached, GLSL attributes and other new features

January 18, 2011
GLSL demo "flutter" (from FreeWRL examples)
Venus model with environment sphere mapping (model referenced from FreeWRL examples)

I have committed to SVN a large rework of our renderer. Everything is now rendered through locked interleaved vertex arrays. And I mean everything, really every feature of VRML/X3D shapes — all colors, normals, texture coords etc. are loaded through vertex arrays. This opens wide the door for much more optimized, modern renderer using exclusively VBOs for nearest release. It will also eventually allow OpenGL ES version for modern mobile phones. (But shhhhh, this is all not ready yet.)

Improvements already done while improving our renderer:

  • GLSL attributes from VRML/X3D nodes: support for FloatVertexAttribute, Matrix3VertexAttribute, Matrix4VertexAttribute nodes.
  • Bump mapping extensions support for every shape (including X3D triangle/quad sets/strips/fans).
  • ElevationGrid.creaseAngle is now working correctly (previously only all smooth or all flat normals were possible for ElevationGrid).
  • FogCoordinate node support (explicit per-vertex fog intensities).
  • Loading GLSL shader source from data URI. For example, you can prefix inline shader source with line "data:text/plain,", which is a spec-conforming method of putting shader source inline (even though you can still omit it for our engine). For a demo, see the "GLSL Vertex Shader" example in FreeWRL examples.

As always, you can test the latest development version by downloading binary from our nightly builds.

(Note that the Text nodes are an exception, they don't benefit from new renderer features. Parts of Text geometry are rendered through a different method, that is not integrated with vertex arrays. This will not be touched for next release, text nodes are not that much important.)

(Note that the fglrx (ATI Radeon proprietary drivers under Linux) sucks, as always. GLSL vertex attributes, and bump mapping, currently require that you change Preferences -> Rendering Optimizaton to None. That's because glEnableVertexArrayARB seemingly doesn't work inside display lists. This problem doesn't occur with any other drivers (even with Radeon drivers for the same graphic card but on Mac OS X), so it's another clear fglrx fault. This will be fixed nicer before release, as VBO renderer without display lists will probably avoid these problems entirely.)