HardwareVertexBuffer vertex colour format conversion...

Problems building or running the engine, queries about how to use features etc.
Post Reply
tisba
Kobold
Posts: 37
Joined: Sun Jan 26, 2003 1:17 am
Location: France (Paris)

HardwareVertexBuffer vertex colour format conversion...

Post 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
Post Reply