if you want only to remove/show blocks, you can use the nodeMask ....

-Nick


On Sun, Nov 21, 2010 at 4:01 PM, David Wilson <[email protected]> wrote:

> Hi everyone,
>
> I'm working on a game engine using OSG in which I can load very large game
> worlds and have it run at a high framerate.
>
> My game world is made up of cubes, and I am building vertex arrays for each
> "cell" in the level - each cell is 64x64x64 blocks in size.
>
> Now I would like to be able to add and remove blocks in-game with minimal
> impact on my framerate.
> At the moment I am doing this by destroying the cell's geometry and
> recreating it again - adding it back into the scenegraph using
> setVertexArray() (and setNormalArray, setNormalIndices, etc.)
>
> This is quite a horrendous operation but remarkably it only takes about
> 100ms or so. Still, my framerate takes a very noticeable hit when this
> occurs.
>
> How would I best modify my vertex/face/etc. arrays on the fly without the
> dip in framerate? Should I be looking to farm this operation out to another
> thread? Is there a way to add and remove vertex data from my arrays so that
> I do not have to push such a large chunk of data to the video card each time
> this happens?
>
> Apologies if my terminology isn't correct - I'm still learning how OSG (and
> graphics rendering in general) works!
>
> And thanks to all who have put so much work into OSG, I hope to make an F1
> racer of a game engine with it someday!
>
> Cheers,
> David Wilson
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=33898#33898
>
>
>
>
>
> _______________________________________________
> 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