Original Post
hello everyone: I would like to load the object in and delete it freely. e.g. Load the object by File->Load (which i have already done) and then the other things is to delete the selected object. could anyone help me or give me some hints on how to delete the object in memory. all the loaded objects are stored in "vector vObjects". Millions of thanks
C3dsLoader obj3dsLoader;
vector<C3dsLoader> vObjects;
//when loading object, this will load the objects geometry into vObjects.
ZeroMemory(szPath, 200);
GetWindowsDirectory(szPath, 200);
if(!GetFilename(szPath))
return 0 ;
else
{
vObjects.push_back( obj3dsLoader );
vObjects[vObjects.size()-1].Init_3ds(szPath);
Load = TRUE;
}
break;
//When I draw the objects out in render scene
if(load)
{
for ( int i =0 ; i< vObjects.size(); i++ )
{
if (mode == GL_SELECT)
{
glPushName(i);
vObjects.Render_3ds();
glPopName();
}
else
if(mode == GL_RENDER)
vObjects.Render_3ds();
}
}