void TibasVpOgl::ProcessHits(const GLint _iHits)
{
// pActHit[0] := hit count for hit 0
// pActHit[1] := Minimum depth for hit
// pActHit[2] := Maximum depth for hit
// pActHit[3] := name for 1. hit in this group
// pActHit[4] := name for 2. hit in this group... until hit count
// pActHit[5] := hit count for hit 1
// ...
// ... until _iHits
s32 s32ActHit;
s32 s32ActName;
GLuint *pActValue = m_arPickingBuffer;
GLuint uiNamesCount;
GLuint uiZ1, uiZ2, uiName;
RefPtr<TreeItem> pTI;
qDebug() << "//////////////// hits:" << _iHits; !!! result is correct !!!
// iter over all hits
for (s32ActHit=0; s32ActHit<_iHits; s32ActHit++)
{
// number of names for this hit
uiNamesCount = *pActValue++; !!! result is correct !!!
qDebug() << "number of names for this hit: " << uiNamesCount;
// z1
uiZ1 = *pActValue++; !!! result is wrong, always 2147483648 !!!
qDebug() << "z1: " << uiZ1;
// z2
uiZ2 = *pActValue++; !!! result is wrong, always 2147483648 !!!
qDebug() << "z2: " << uiZ2; !!! always 2147483648 !!!
// iter over all names
qDebug() << "names for hit " << s32ActHit << ": ";
for (s32ActName = 0; s32ActName < (s32) uiNamesCount; s32ActName++)
{
// get the next name
uiName = *pActValue++;
qDebug() << "uiName: " << uiName; !!! result is correct !!!
}
}
} // TibasVpOgl::ProcessHits