- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Below is the code that I am using, my code gets stuck at rtcCommit(). I am not sure why this is happening...any clue would be great help.
Thanks
geomID = rtcNewTriangleMesh(Scene, RTC_GEOMETRY_STATIC, nTriangles, embVertices.size(), 1);
EmbVertex* vertices = (EmbVertex*) rtcMapBuffer(Scene, geomID, RTC_VERTEX_BUFFER);
for(unsigned int i = 0; i < embVertices.size(); i++)
{
vertices.x = embVertices.x;
vertices.y = embVertices.y;
vertices.z = embVertices.z;
}
rtcUnmapBuffer(Scene, geomID, RTC_VERTEX_BUFFER);
cout<<"\nCompleted mapping vertices.\n";
EmbTriangle* triangles = (EmbTriangle*) rtcMapBuffer(Scene, geomID, RTC_INDEX_BUFFER);
int t = 0;
for(unsigned int i = 0; i < Triangles.size(); i++)
{
if(valid)
{
triangles
triangles
triangles
embTriangles.push_back(Triangles);
t++;
}
}
rtcUnmapBuffer(Scene, geomID, RTC_INDEX_BUFFER);
cout<<"\nCompleted mapping triangles.\n";
rtcCommit(Scene);
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the message I get from Embree:
Embree Ray Tracing Kernels 2.3 (Jun 11 2014)
Compiler : Visual C++ Compiler 17.00.6103.0
Platform : Windows (32bit)
CPU : SSE SSE2 SSE3 SSSE3 SSE41 SSE42 POPCNT AVX F16C RDRAND AVX2 FMA3 LZ
CNT BMI1 BMI2
Features : intersection_filter bufferstride
WARNING: enabled 'intersection filter' support will reduce hybrid traversal pe
rformance
Embree: Unknown error, (cannot create thread)
I do not understand why it cannot create the threads
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do the tutorials run? e.g. ./tutorial00 -rtcore verbose=2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes tutorials are running fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry but I have no idea why the CreateThreads function fails. Look at the CreateThreads call in file embree/common/sys/thread.cpp, maybe you can find the problem there. Also, try to figure out what you do different than the tutorials.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is a good place to do rtcInit()?
Is it possible to do this inside a constructor of a class and then call rtcExit() inside the destructor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can call rtcInit and rtcExit in a constructor and destructor of a class. However, you should not call rtcInit from the constructor of a global variable, thus please create the class either with new or on the stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am actually creating the class object with new but this is a global variable, the reason for that is I am using OpenGL to display the scene geometry and so the callback functions can access the class object. What is the reason for rtcInit() to not work on global variables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because that way the rcInit could be called before initialization of global variables inside embree library
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page