Sebastian Knödel schrieb:
> Andreas Zieringer wrote:
>> Hi Sebastian,
>>
>>   
>>> Hi there,
>>>
>>> I would like to access the Display Lists generated by OpenSG.
>>> For the moment I use OpenSG only to handle the geometry using the 
>>> scenegraph infrastructure, but I do the rendering using my own tool.
>>> To do so I need the geometry as a display list and as far as I know 
>>> OpenSG stores the geometry by default in such a list.
>>> But I wasn't able to get the Display List Id. There is a member of 
>>> GeometryBase getGLId() but its protected and I couldn't find a way to 
>>> acces it even by reimplementing my own Geometry class, which I derived 
>>> from GeometryBase.
>>> My question is:
>>> Is there a possibility to access the display lists, created by OpenSG?
>>> If yes, how does it work?
>>>
>>> Thank you for any feedback
>>>
>>>
>>> Sebastin Knödel
>>>     
>> you can use the reflective interface just search for the "GLId" field 
>> and read the value.
>>
>> Andreas
>>
>>   
> If I understand you right I just read out the GLIdFieldId value of my 
> geometry like
> 
> int DLid = anyGeo->GLIdFieldId;
> 
> but this gives me only the "Field value" which is 21 all the time, 
> because its the 21. field in the set.
> Any clue?

this should do the trick.

SFField<Int32> *field = dynamic_cast<SField<Int32> 
*>(geo->getField("GLId"));

Int32 glid = field->getValue();

Andreas


> I also tried to cast the GeometryPtr to my own Type myGeometry, which 
> doesn't work out right know.
> The compiler tells me that I cannot convert from 'osg::GeometryPtr' to 
> 'myGeometry *'.
> The code looks like that
> 
> -----
> class myGeometry : public Geometry
> {
> public:
>     myGeometry(){};
> 
>     inline int getDListID(PassiveWindowPtr win)    {return 
> win->getGLObjectId(getGLId());}
> };
> 
> myGeometry* myGeo;
> .
> .
> .
> myGeo = static_cast<myGeometry*>( anyOSGGeo);
> int DLid = myGeo->getDListID(win);
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
> 


-- 
VREC
Robert-Bosch-Straße 7
D-64293 Darmstadt
Tel. 06151-4921035

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to