Hi Manju,

On Fri, 2005-06-03 at 18:22 +0530, Manjunath Sripadarao wrote:
> I am trying to (still) load a huge model using opensg. I had a
> question regarding
> geometry creation in opensg. Does opensg have 2 copies of vertices and
> indices in memory ?
> That is one that is loaded into opengl using
> glBegin(...)
> glVertex
> glend(...)

This only consumes memory if it's inside a display list (which OpenSG
uses by default).

> and another that is 
> GeoPositions3fPtr pnts = GeoPositions3f::create();
> beginEditCP(pnts, GeoPositions3f::GeoPropDataFieldMask);
>     {
>     pnts->addValue(Pnt3f(x, y, z));
>     }
> endEditCP(pnts, GeoPositions3f::GeoPropDataFieldMask);
> Are there 2 copies in memory that are kept ? Or is there only one copy
> in memory ?

If you use dlists yes, there are two copies in memory.

> Is there a way to make it use a opengl display list directly ?

Not currently.

> That is I create an opengl display list and pass to opensg and opensg
> uses this display
> list to render geometry.

Not currently. The problem is that it's impossible to read display
lists, there is no way to get at the information for e.g. normal
calculation, bounding volume calculation or intersection.

You can turn display lists off before rendering to see if that fixes
your problem (geo->setDlistCache(false);, or add the attached code to
just turn it off). 

But AFAIK you're on a cluster anyway, so no single node should need to
render the full model. Can you give us a little more background on when
exactly you're having problems?

        Dirk


Add this before Geometry creation to turn off all dlists:
    
    FieldContainerPtr pProto = Geometry::getClassType().getPrototype();
    GeometryPtr pGeoProto = GeometryPtr::dcast(pProto);
    if(pGeoProto != NullFC)
    {
        pGeoProto->setDlistCache(false);
    }




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to