continous update, "video"

Hi,

I try to update my OpenGl window let´s say 10 times to make a “video”, everything depends on the values I´ve got. I´m looking
in my debugger and I do go through the function below 10 times when I create the object 10 times and do Refresh() of the OpenGLwindow (wxWindows)

It does only show the last “picture” of the 10 scenes. Have you guys done this before?? What do I have to do??

Thanks!!
/grodslukaren

void C3DPaintCanvas::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);
delete m_pBody;
// destroy the body, don´t needed when stored in displaylist
glEndList();
m_pBody = NULL;
// update the screen
Refresh(true);
}

If I put a message box between every update it works fine, but I have to click my video manually, and taht´s not that fun…

The pictures are updated with values sent with events. Is there any problem to send to many events in a row??? I mean, It´s quiet obvious that it takes more times to create and display my OpenGL figure than it is to send the 10 events. But I thought they are stored in a stack and handled one at a time…

/grodslukaren

Maybe they just update so fast without the message boxes, that you don’t even notice the animation? Also, from the code you posted, it looks like you don’t actually store anything in the displaylist but it’s hard to know without seeing what goes on in the constructor. Btw, if you need to update a displaylist every frame, you shouldn’t really use display lists, they’re better for static geometry.