Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)

Reload 3D Model to the existing scene

Proof_K_
Beginner
243 Views

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
243 Views

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

0 Kudos
Proof_K_
Beginner
243 Views

Thanks Sven it worked ......

0 Kudos
Reply