Hi Shoeil,

With real-time graphics go often end up with 3 copies of your imagery
and vertex data, one on the CPU side, one on the OpenGL driver, and
one on GPU.

The OSG supports  deallocating imagery automatically once its passed
to OpenGL, so that only OpenGL retains it as a texture object.

Potentially you can do this on the geometry side too, but there are
more pitfalls as all your intersection code will fail.

As for passing custom geometry to osg::Geometry, perhaps subclassing
osg::Array will be sufficient.  Not all OSG ops will work though, even
if the graphics works fine.

The other route is to write your own custom Drawable.

Robert.


On 10/25/06, Soheil Sotoodeh <[EMAIL PROTECTED]> wrote:
Hi Robert,

Thanks, I've checked that, it is a quite extensive
documentation.

I also have two question about the basic types.

Consider that we have a point cloud (a set of points).
As far as I understood, in openGL when we add the
pointcloud by a sequence of glVertex calls, openGL
makes a copy of the coordinate values. Now when we
have OSG we add the points by a osg::Geometry object.

Q1: Is that right that we have 2 places in memory for
each coordinate (one for openGL and one for OSG)?

Since I have another layer of geometric processing I
have to keep the points somewhere else too (I'm
restricted to use my own point objects). So..

Q2: Is there any approach that I can use a custom
point/vec3 (my own type) instead of osg::Vec3 in
osg::Geometry?
By that I mean having shared point objects for both
OSG and my application.

Of course I don't want to do it just for less memory
occupation but to get easer access between the two
data sets (e.g. when I do interactive selection I can
select the points by OSG but I have to select them in
the other data set too).

Thanks for your suggestions,
Cheers,
Soheil

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to