Selection has been giving me some grief.
I seem to be able to select the player and level but when i add my list of monsters. the program starts to get inaccurate results or none at all. any ideas?
void GameClass::PickScene()
{
glPushMatrix();
glTranslatef(0.0f, 0.0f, -28.0f);
glRotatef(45.0f, 1.0, 0.0f, 0.0f);
glPushMatrix();
camera->ApplyCameraTransform();
glInitNames();
glPushName(0);
// draw the ground
glLoadName(LEVEL);
m_theLevel->DrawLevel();
// draw the player
glLoadName(PLAYER);
m_player->DrawModel();
for(int i=0; i<monsters.getListSize();i++)
{
glLoadName(m_monsters.getData(i).name);
DrawMonster(m_monsters.getData(i));
}
glPopMatrix();
glPopMatrix();
SwapBuffers(m_hDC);
}