BufferObject Configuration serialization #234
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
-add a flag in Outpustream in order to know whether or not BufferObject associated with BufferData should be serialized
It can be usefull in order to save custom BufferObject configuration.
-Changes involved in BufferData serializers
Details
in bd serilializer (use a trick not to add BufferData to BufferObject
///don't add BufferData to BufferObject (let BufferObject Serializer::readBufferData do it)
static bool readBufferObject( osgDB::InputStream& is, osg::BufferData& bd );
in bo serializer (do the job of adding BufferData to BufferObject)
/// add BufferData to BufferObject (finish job began in BufferData serilizer::readBufferObject)
static bool readBufferData( osgDB::InputStream& is, osg::BufferObject& node )
I doubt adding a bool flag in Outpustream dedicated to BufferObject serializer is the cleaner way to control bo serilization but you surely the my point.
With It I'm able to serialize complex patterns such as transformfeedback or indirectdraw so i though it was cool enough to raise your interest for this feature