[osg-users] Geode, Geometry, glCallList, glMultMatrix and so on :)
robert.osfield at gmail.com
Sat Mar 14 08:38:48 PDT 2009
Hi Quanteek? Could you sign with the name you wish to be addressed as please.
With drawing the type of model you want to I would recommend avoiding
using lots of transforms and separate chunks of geometry as it both
loads the CPU and GPU a great deal. Modern GPU's prefer a relatively
large chunks of geometry, so a whole branch network or a whole tree
might be best placed into a single geometry.
Another area you could look into is using the OSG draw instanced
support, and apply transforms for a series of elements draw of an
array of transforms.
On Sat, Mar 14, 2009 at 3:13 PM, Quanteek <osgforum at tevs.eu> wrote:
> Hey everyone,
> I am new to OSG and I am sure that I have misunderstood something about rendering into OSG.
> I have got two models of pattern : one for a cylinder, and one for a leaf of a tree.
> The openGl way would be to use a display List and store my pattern into and when I have to redraw the thing into a different place than pre-calculated one I use glMultMatrix and glCallList with the good number.
> In osg I load them into a osg::Geometry thanks to a PrimitiveSet (ElementUInt + Polygon) but I create a Geometry for every new place.
> So typically I have got a Geode for cylinder and a Geode for leaf because I will not use same material. And into the Geode cylinder I attach a lot of different geometries, same thing into leaf.
> Am I wrong ? (I am sure I am :p) Is the good way to create a Geode with a unique Geometry and then using the MatrixTransform ? Is it not to heavy for rendering a big scene ? And is collada plugin will export correctly the scene ?
> Sorry for all these begineers questions but I have looked into documentation and I am a little bit confusing with all informations.
> P.S. : My scene is only a real tree but with a lot of informations (i.e. each branch are divided into several (100) cylinders and I have got each leaf too draw) I have put a screen of wireframe mode
> Read this topic online here:
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users