Hi Robert

robertosfield wrote:
> 
> Any chance you could write an example to test out the new functionality?
> 


I'm sending you a modified osgforest example that uses
geometry instancing with texture buffer objects.
In this example TBOs are holding information about position, color
and size of each tree. Also all steps necessary to use geometry
instancing are shown ( setUseVertexBufferObjects(true), 
setUseDisplayList(false),
setNumInstances(), setInitialBound() ).

I have few issues with that example :

- dividing cells to maximum 10 trees in a cell is against geometry instancing 
idea 
  ( draw maximum quantity of objects in one glDraw call ) and with such small 
cells
  this example renders very slow. I added parameter "--trees_per_cell" which 
changes 
  the default cell size. Following command shows that geometry instancing works 
as
  expected :

   osgforest --trees_per_cell 200 

- this example uses one osg::TextureBuffer per cell. It may be further 
optimized 
  by introducing only one osg::TextureBuffer per whole forest, but the example 
will
  become less understandable and not analogous to other forest techniques.

- I used shaders with GLSL version 420. Is it a problem ?

Cheers
Paweł Księżopolski

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54115#54115




Attachments: 
http://forum.openscenegraph.org//files/osgforest_204.zip


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to