Hi Kevin,

I really have little clue why on earth you are doing what you are
doing, but for sure the doing a tessellation during the frame is
certainly not something you want to do.

Might I recommend that you take a step back and explain from a higher
level what you are trying to achieve without diving into some specific
implementation details.  Once others have this more useful guide to
what you are doing they'll have a better chance of being able to guide
you in the right direction.

Robert.

On Sun, Jul 26, 2009 at 6:35 PM, Kévin Faure<[email protected]> wrote:
> Hi,
>
> Firstly, I create a region of 6.000 points. They are computed randomly to 
> make an ellipsoid.
> Then, "I have to" build my Delaunay in a CullCallback.
> Each points are multiplied by the modelViewProjectionMatrix and send to 
> DelaunayTriangulator ( because with my points in 3d, delaunay doesn't work 
> !!!).
> Thus, Delaunay is computed at each frame ... I've only 15 FPS...
>
> It is possible to generate the Delaunay just once and note in a cullcallback ?
>
>
> My code in cullcallback :
>
>
> Code:
>
> // _vSmpPt : Vec3Array with points in 3D space
>
> for (unsigned int i = 0 ; i < _vSmpPt->size() ; ++i)
>      temp->push_back(_vSmpPt->at(i) * modelViewProjectionMatrix);
>
> osgUtil::DelaunayTriangulator* delo = new 
> osgUtil::DelaunayTriangulator(temp.get());
> bool result = delo->triangulate();
> osg::ref_ptr<osg::DrawElementsUInt> primitiveTriangles = delo->getTriangles();
>
>
> osg::Geometry* geom = dynamic_cast<osg::Geometry*>(drawable);
> geom->setVertexArray(temp.get());
> geom->removePrimitiveSet(0,geom->getNumPrimitiveSets());
> geom->addPrimitiveSet(primitiveTriangles.get()); 
> geom->setUseDisplayList(false);
> geom->setUseVertexBufferObjects(false);
>
>
>
>
>
> Thank you!
>
> Cheers,
> Kévin
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=15455#15455
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to