Hello,
this is my program :
scene.h
GLunit _model_init;
/*********/
scene.cpp
Scene::Scene()
{ _model_init=0;}
////////////
void Scene::loadModel(int id){
GLuint idModel;
idModel=id+1;
if (_model_init==0)
{
_model_init=glGenLists(1); // _model_init doesn't increase _model_init=0 all over the time ???
}
if (_model_init!=0) //'if' hasn't checked because _model_init value is always worth 0
{
glNewLists(idModel, GL_COMPILE);
(...); //there isn't glBegin() glEnd();
glEndLists();
}
}
////////////
void Scene::painGL(){
idStock=idModel;
glCallLists(idStock);}
have you a solution for my problem, please?
thanks
Bunny