It's needed for ManualObject.BeginUpdate(sectionNumber).
First way would be:
ManualObject.Update() returns the value as integer.
Second way would be:
ManualObjectSection would have a property (or get method) to receive the section number.
By the way - here is a related quote with an usage example:
SpaceDude wrote: I was just looking through the ManualObject class and I thought it would be nice if the function:
void Ogre::ManualObject::begin
would return an int which refers to the section number so that it can subsequently be passed to
void Ogre::ManualObject::beginUpdate(size_t sectionIndex)
So the following code would be possible:
Code: Select all
int iHeadSection = ManObj->begin(...); // create head section... ManObj->end(...); int iBodySection = ManObj->begin(...); // create body section... ManObj->end(...); ManObj->beginUpdate(iHeadSection); // update body section... ManObj->end(...);