Hi,
I am in need for a map of string to FieldContainer in some context. OpenSG does
not provide such a mapping, but I have found some examples that tells me
roughly how to proceed:
OSGFieldContainerMap*:
typedef std::map<Int32, FieldContainerRecPtr>
FieldContainerMap;
OSGAttachmentMap*:
typedef std::map<UInt32, Attachment *> AttachmentMap;
OSGStringToUInt32Map*:
typedef std::map<std::string, UInt32> StringToUInt32Map;
What I do not understand/know is the difference/consequences between the
following two approaches:
typedef std::map<std::string, FieldContainerRecPtr>
MyFieldContainerMap;
typedef std::map<std::string, FieldContainer*>
MyFieldContainerMap;
The first implementation based on OSGFieldContainerMap* seems much simpler, but
the types are not used in OpenSG at all.
I would like to store some ShaderProgram objects in the map and have them
readily available after loading a field container from file that contains such
a map.
Which of the two approaches are recommended for a general mapper of string to
Fieldcontainer? What are the pros and cons?
Any help is appreciated.
Best,
Johannes
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users