Hi Jesse, hi Marcus,
Marcus Lindblom wrote:
> Hi Jesse,
>
> You could always give it a position outside of your view frustum (like
> (inf,inf,inf) and have the gfx-card discard the particle. I think that's
> probably the easiest way to simply 'cull' selected particles without
> explicit removing from the list (which could be expensive as they are
> stored in a contigous array).
The standard OpenSG particles actually have a size field, and if the size is 0
they are not rendered. Note that this (like all the particle rendering) goes
through immediate mode and is therefore not the fastest way of doing things,
but
for now it's the easiest way.
Sideline: the standard trick to avoid overhead when removing pieces of a
contiguous array is to just move the last used one into spots that opened up.
Works fine as long as the order of elements is not important, which I assume
it's not in your case.
> You could also render particles with several cores (say about 1k in
> each) and use these pools to make removals faster (smaller list is
> easier to remove from, 1k particles is enough that you shouldn't get
> cpu-bound by the driver)
In general a good idea, also in respect to view-frustum culling.
Yours
Dirk
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users