This is a (hopefully) minor addition that would make the interchangeability of the ManualObject and direct method of making meshes more complete, and would help my current project. Currently you can supply any type of data to the vertex declaration for a mesh as specified in VertexElementType (such as VET_SHORT1). However, the equivalent range of data types for manual objects does not exist. You cannot add a value in a format other than floating point as a texture coordinate channel through ManualObject::textureCoord. Only floats and vectors seem to be supported. It would be very useful to give an integer to a vertex through usage like the following:
This would make an additional element of type VET_SHORT2 (2x 16 bits).
Code: Select all
ManualObject* manual; ... int ID = i; manual->textureCoord(i);
Looking through the OGRE source, it does not look likely that simply casting an int to a float will allow the element to be used correctly using textureCoord. If this is not the case and a cast will work please tell me, but the change would still be worth it for completeness' sake.