Page 1 of 1

HardwareVertexBuffer vertex colour format conversion...

Posted: Sat Feb 12, 2005 9:03 am
by tisba
How does one go back and forth between the render system packed colour representation and an Ogre::Colour (to manipulate VET_COLOUR element in the hardware vertex buffer) ?

On the forum, I managed to find that to convert an Ogre::Colour to a render system packed representation, one should do:

Code: Select all

    Root::getSingleton().getRenderSystem()->convertColourValue(c, &p->currentColour); 
(this should really be in the HardwareVertexBuffer API doc), but I couldn't find anyway to convert a render system packed colour into an OgreColour (e.g. when reading back the buffer).

How does one do this ?

--tisba