TriangleBuffers with polygons

JayMcBee

20-01-2013 13:03:48

I'm currently defining a bunch of primitives using Ogre::Manual (triangle strips) but I'd rather use a higher-level construct, in particular to have more convenient control over texturing and normal-vector calculation.
Is TriangleBuffer the way to go? Do we have an example on how to use it to build a shape from a number of vertices?

Thanks again,
Jay

JayMcBee

21-01-2013 10:02:56

Having looked at what TriangleBuffer does though it doesn't seem to have any advantage over directly using Ogre::Manual.
However, any thoughts appreciated!

Cheers,
Jay

mikachu

21-01-2013 10:12:31

The TriangleBuffer is just a common format used everywhere in OgreProcedural, for the moment it's rather similar to ManualObject.

Regarding UV generation, you have PlaneUVModifier, SphereUVModifier, HemisphereUVModifier, CylinderUVModifier and BoxUVModifier at your disposal (they compute UVs based on vertex normals and positions)

Normal generation is currently being implemented.

JayMcBee

21-01-2013 12:15:36

Normal generation is currently being implemented.

Sweet - looking forward to that!
And heaps of thanks for the Procedural library, I'm in in the process of using it extensively for my 3D editor :D

Cheers,
Jay