[osg-users] Is there a way to use a lump of user created memorywith Vec3Arrays or other osg Vec Arrays

Gordon Tomlinson gordon.tomlinson at sensor.com
Thu Jul 31 13:58:04 PDT 2008


Hi Jason
 
Super duper... just the sort of thing I was looking for but totally missed
 
I think this will certainly help
 
 
Thanks 
Gordon


  _____  

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Jason
Beverage
Sent: Thursday, July 31, 2008 3:52 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Is there a way to use a lump of user created
memorywith Vec3Arrays or other osg Vec Arrays


Hi Gordon,

I've never attempted to do what you are describing, but I believe the
osgsharedarray example is close to what you are trying to do if you want to
check that out for inspiration.

Good luck!

Jason


On Thu, Jul 31, 2008 at 3:41 PM, Gordon Tomlinson
<gordon.tomlinson at sensor.com> wrote:


Ok I know I'm reaching and hoping here ;)
 
typically with say Vec3Array you populate along the lines of
 
osg::ref_ptr<osg::Vec3Array> verts  = new osg::Vec3Array;
verts->push_back(1, 1, 1 ));
etc
 
 
Now I have a situation / need were we have and are still developing a system
to manage generic data in the billions of instances range, including
handling billions of vertex type data and this system manages all the
loading,  paging, storing, memory etc
 
So what I would really like to do is use the data directly from our system
for the vertex array data something like : 
 

 
osg::ref_ptr<osg::Vec3Array> object_verts  = new osg::Vec3Array;
 
object_verts ->setData( my_clever_merge_list_of_verts  )
 
objectNode->setVertexArray ( object_verts.get()  );
 
Or something 
 
 
 
I think I know the answer :(
 
 
We are wanting to avoid the duplication of the data  that we are already
managing  and then having to copy to the array  to visualise it
 
 
 

Best Regards 



Gordon

__________________________________________________________
Gordon Tomlinson
Product Manager (3d)

Email  : gordon.tomlinson @ overwatch.com


__________________________________________________________


"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 

_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080731/de8717d5/attachment-0003.htm>


More information about the osg-users mailing list