Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Proof_K_
Beginner
69 Views

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();

0 Kudos
2 Replies
SvenW_Intel
Moderator
69 Views

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

Proof_K_
Beginner
69 Views

Thanks Sven it worked ......

Reply