Hi Aeron, Sorry for the slow turnaround, finally getting my submissions back log cleared now.
I have just merged your changes for transform feedback. The
osgtransformfeedback example just gives me a read quad, is this what I
should be expecting?
In terms of the core OSG changes, everything looks reasonable. Areas
that need a bit further work are:
1) void Program::addTransformFeedbackAttrib(char* name); doesn't
have an equivalent removeTransformFeedbackAttrib(char* name)
2) The typedef std::vector<const char*> TransformFeedbackBindingList;
doesn't have any memory management and will only ever work when static
c strings
are passed in, something which is absolutely not safe to do,
either memory will leak or we'll get dangling pointers.
3) No serializer support.
Item 2) is the real killer item that needs to be sorted. As we have
to pass the array to OpenGL we are stuck with a char** and probably
can get things working by making sure that the vector<char*> used for
this copies the strings passed in, and makes sure it deletes them when
finished with them. I'd suggest change the
addTransformFeedbackAttrib(const char*) method to be changed to
addTransformFeedbackAttrib(const str::string& name) and have the add
method create a copy C string copy of the std::string. It'd be a bit
of cludge but would allow passing in static C strings such as your
using in the example ie..
program->addTransformFeedbackAttrib("name");
Would still work fine.
I've attached a patch that I generated with:
OpenSceneGraph$ svn diff > transform_feedback.patch
This will merge you changes with svn/trunk, in case you or others want
to pitch in with resolving the above. I'll hang back from checking
these changes in. Please make sure any submissions are now based on
svn/trunk to avoid any issues like I had to deal with when merging the
changes.
Cheers,
Robert.
transform_feedback.patch
Description: Binary data
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
