http://www.ogre3d.org/forums/viewtopic.php?f=2&t=60365
See the following switch statement that is in void InstancedGeometry::GeometryBucket::build() :
Code: Select all
switch (elem.getSemantic())
{
case VES_POSITION:
tmp.x = *pSrcReal++;
tmp.y = *pSrcReal++;
tmp.z = *pSrcReal++;
*pDstReal++ = tmp.x;
*pDstReal++ = tmp.y;
*pDstReal++ = tmp.z;
if(tmp.x<Xmin)
Xmin = tmp.x;
if(tmp.y<Ymin)
Ymin = tmp.y;
if(tmp.z<Zmin)
Zmin = tmp.z;
if(tmp.x>Xmax)
Xmax = tmp.x;
if(tmp.y>Ymax)
Ymax = tmp.y;
if(tmp.z>Zmax)
Zmax = tmp.z;
default:
// just raw copy
memcpy(pDstReal, pSrcReal,
VertexElement::getTypeSize(elem.getType()));
break;
};
Removing the following 3 lines fixes the issue:
Code: Select all
*pDstReal++ = tmp.x;
*pDstReal++ = tmp.y;
*pDstReal++ = tmp.z;