Commit 78d20a62 authored by Christopher Tenter's avatar Christopher Tenter

union cast instead of reinterpreting address refs #2368

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20175 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b81401c8
......@@ -867,7 +867,16 @@ void SkeletonNodeT<SkeletonType>::getRenderObjects(IRenderer* _renderer,
uicolor |= ((unsigned int)(vcolor[1] * 255.0f) << 8) & 0x0000ff00;
uicolor |= ((unsigned int)(vcolor[2] * 255.0f) << 16) & 0x00ff0000;
instanceData[instanceDataOffset++] = *(float*)&uicolor;
// union instead of pointer casting
union ufunion
{
unsigned int u;
float f;
} uitofloat;
uitofloat.u = uicolor;
instanceData[instanceDataOffset++] = uitofloat.f;
}
// store instance data in vbo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment