[osg-users] Polygon sorting
michele.bosi at gmail.com
Thu Sep 6 03:19:37 PDT 2007
I am still trying to find a way to sort real polygons since
performance in my case are not the main concern. Theoretically it
shouldn't be difficult at all (to do it for one single geometry) I
just need an hook that tells me "hey your geometry is going to be
drawn using this matrices/camera". I am not sure if node callbacks can
be used for this, then I would create a special Geode that sorts the
polygons of its Geometry objects. From Geode I can retrieve the local
to world transform, then to get the view transform I have to track the
camera object somehow.
If this doesn't work I will try subdividing the mesh in small blocks
each going in a different geometry so that OSG can sort them. The
result won't be spectacular but better than nothing.
My isosurface represent chemical energy fields so they can be quite
messy. Unfortunately I have to rely on conservative OpenGL features
for compatibility issues otherwise that would be the preferred way to
go also for the quality of the results.
More information about the osg-users