Hi Ivan,
On 12/12/06, Ivan Bolčina <[EMAIL PROTECTED]> wrote:
About my problem. Simple. There are bullets on scene(laser beams). Their number can be in typical range from 1 to 1000. They are represented with lines. Line has a length of 10, and two colors. I ment to draw them using a single drawable that is in geode. Drawable would use glbegin,glvertex....,glend stuff. I would'n do any geometry transformation etc.. For culling I would relly on openGL. At least that was my idea.
A couple of suggestions: 1) if you are concerned about performance don't use glBegin/glEnd. 2) osg::Geometry supports rendering of lines, you can update the vertex positions on the fly. See the osggeometry example. For updating geometry on the fly you'll need to disable display lists via geometry->setUseDisplayList(false). 3) Perhaps osgParticle is appropriate. 4) Finally if you really want great performance but low CPU dispatch overhead consider using a static geometry but animating the vertex position via shaders. The rain and snow precipitations effects work this way and are able to handle hundreds of thousands or particles per frame at 60Hz with minimal load on the CPU and pretty light load on the GPU. Personally I creating a subclass from osg::Drawable for this task would be anywhere on my possible range of ways of tackling the task. Robert. Fo
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
