Increased support in ManualObject::textureCoord

What it says on the tin: a place to discuss proposed new features.
Post Reply
Error Handler
Halfling
Posts: 77
Joined: Tue May 26, 2009 7:41 pm
Location: Cambridge, United Kingdom

Increased support in ManualObject::textureCoord

Post by Error Handler » Tue May 04, 2010 8:21 pm

This is based on my experiences with the current stable release (1.7)

Hi all.

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:

Code: Select all

ManualObject* manual;
...
int ID = i;
manual->textureCoord(i);
This would make an additional element of type VET_SHORT2 (2x 16 bits).
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.

Thanks
0 x

Post Reply