On 07/05/2011 10:10 AM, Henn, Thomas wrote:
> Ah, sorry, that was only to be complete. Actually I use
>    GeoPositions3f::create()
>    GeoIndicesUI32::create()
> and so on...

ok.

>>>     GeometryPtr geo = makeTorusGeo(0.5,4,8,16);
>>>
>>> ...everything works fine.
>>> But I don't really understand why my first approach doesn't work.
>>
>> hmm, I'm not sure what the problem could be either. As a first check,
>> can you start your program with environment variable
>> OSG_LOG_LEVEL=DEBUG
>> set? You should see many lines of the form:
>>
>> DEBUG:  Registered type Geometry | 735 (-1645862464)
>> DEBUG:  Registered type GeometryPtr | 736 (-1645862208)
>> DEBUG:  Registered type SFGeometryPtr | 737 (-1645862112)
>> DEBUG:  Initialized FieldType : SFGeometryPtr 0x7f729de62320
>> DEBUG:  Registered type MFGeometryPtr | 738 (-1645861984)
>> DEBUG:  Initialized FieldType : MFGeometryPtr 0x7f729de623a0
>>
>> Can you check if the GeoProperties you are using (e.g. GeoPositions3f)
>> show up as registered types?
>
> All the types seem to be registered:
>
> DEBUG:  Registered type Geometry | 690 (34273824)
> DEBUG:  Registered type GeometryPtr | 691 (34273984)
> DEBUG:  Registered type SFGeometryPtr | 692 (34274048)
> DEBUG:  Initialized FieldType : SFGeometryPtr 0x20afb00
> DEBUG:  Registered type MFGeometryPtr | 693 (34274112)
> DEBUG:  Initialized FieldType : MFGeometryPtr 0x20afb40
> DEBUG:  Registered type GeoPositions | 694 (34271776)
> DEBUG:  Registered type GeoNormals | 695 (34271936)
> DEBUG:  Registered type GeoColors | 696 (34272096)
> DEBUG:  Registered type GeoTexCoords | 697 (34272256)
> DEBUG:  Registered type GeoIndices | 698 (34272416)
> DEBUG:  Registered type GeoPTypes | 699 (34272576)
> DEBUG:  Registered type GeoPLengths | 700 (34272736)

ok, but this shows Geometry (which is a type that works for you) and 
GeoPositions (which is an abstract base class). Do you also see a line 
for GeoPositions3f, i.e. a type that is not working for you?
Sorry for being pedantic about this, but about the only case I can 
imagine that you get NullFC from a create() call is if the type (and 
therefore the prototype instance) is not correctly registered with the 
system.

>> Perhaps you can also compare the output of your program with that of
>> one
>> of the test/tutorial programs that come with OpenSG, e.g.
>> testStatisticsRender.
>
> I'm already working on a simple program based on the 01hello example.

once you have that it might be interesting to create a diff between the 
startup of your regular program and the simple one.
I'd appreciate it if you could post the logs for those two runs (you may 
have to compress them or send to me directly due to ML attachment size 
limits).

>>> Another question is, whether it is possible to compile OpenSG itself
>> with -fvisibility=hidden and how the OpenSG sources have to be modified
>> for that.
>>
>> I imagine at the very least one would have to go through an annotate
>> all
>> types that are meant to be visible to applications linking with OpenSG.
>> Perhaps the macros used for adding dllexport/dllimport on windows can
>> be
>> used for that.
>> I wouldn't expect too much of an effect though, since the majority of
>> types are meant to be used by applications (e.g. practically all
>> FieldContainer should be visible) so only few types would actually end
>> up being hidden.
>
> That's the way I already tried it, but unfortunately I ended up with a lot of 
> unresolved externals when linking my executable to the modified OpenSG. 
> Probably I got lost in the jungle of OSGExportDefines.h :-(

hmm, I wouldn't have started with OSGExportDefines.h, but OSGBase.h and 
the OSG*Def.h files (which control whether dllimport or dllexport is 
used on windows, so hopefully can be extended more easily for visibility 
support).

        Cheers,
                Carsten

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to