mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Add command to enable NavMesh render
togglenavmesh or tnm
This commit is contained in:
parent
1caa18bb4f
commit
70a369f70e
25 changed files with 436 additions and 22 deletions
|
@ -42,4 +42,15 @@ osg::Vec4f colourFromRGB(unsigned int clr)
|
|||
return colour;
|
||||
}
|
||||
|
||||
osg::Vec4f colourFromRGBA(unsigned int value)
|
||||
{
|
||||
return osg::Vec4f(makeOsgColorComponent(value, 0), makeOsgColorComponent(value, 8),
|
||||
makeOsgColorComponent(value, 16), makeOsgColorComponent(value, 24));
|
||||
}
|
||||
|
||||
float makeOsgColorComponent(unsigned int value, unsigned int shift)
|
||||
{
|
||||
return float((value >> shift) & 0xFFu) / 255.0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue