PDA

View Full Version : force to show the results after storing in displaylist??



grodslukaren
08-09-2001, 12:21 PM
I have a problem to see the results of the object Iīm painting...

I create a new object everytime I re-calculate my object and store the resulting object in a displaylist so that one can repaint it fast when I want to move my object... The thing is that it doesnīt repaint the object when I store it in a displaylist. But if I run the procedure twice, it does work fine... whatīs wrong???

/grodslukaren

code:
::::::::::::::::::::::::::::::
void CResultCanvas::UpdateScalp()
{
// create the scalp displaylist, overwrite the old one, data from m_pScalpMesh
glNewList(3,GL_COMPILE_AND_EXECUTE);
m_pBody = new CBody3D(m_pScalpMesh->m_pMesh,2); //polygon=2 => quadrats
delete m_pBody; // destroy the body, donīt needed when stored in displaylist
glEndList();
m_pBody = NULL;
// update the screen
SwapBuffers();
Refresh(true);
}