Reload 3D Model to the existing scene

Reload 3D Model to the existing scene

Hi Everyone,
I have developed an application which uses the method below to load and display a 3d model. Now when I reload the new 3d model using same method, then the application exits. Please someone guide me in this regards so I can reload the 3D model.Thanks.
Regards,Proof.

g_device = Device::rtCreateDevice("default",g_numThreads);
createGlobalObjects();
g_pathTOECSFile = FileName(pathToECSFile);
g_pathToModelFile = g_pathTOECSFile.path() + getModelFileName(pathToECSFile);

std::vector<Device::RTPrimitive> prims = loadScene(g_pathToModelFile, g_device);
g_prims.insert(g_prims.end(), prims.begin(), prims.end());
size_t primSize = g_prims.size();

parseCommandLine( new ParseStream(new LineCommentFilter(g_pathTOECSFile, "#")), g_pathTOECSFile.path());

displayMode();

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Try not to create the device twice when you reload. Do you know where the application exists?

Thanks Sven it worked ......

Leave a Comment

Please sign in to add a comment. Not a member? Join today