Hi,
see sample code below. Calling rtuCreateClusteredMesh fails with this error message:
Unknown error (Details: Function “RTresult _rtProgramCreateFromPTXString(RTcontext, const char*, const char*, RTprogram_api**)” caught exception: Compile Error: Call to rtReportIntersection is not directly controlled by a call to rtPotentialIntersection)
The same for rtuCreateClusteredMeshExt
Ubuntu 16.04, Driver 370.28, Optix 4.0.1
Sample code:
optix::Geometry
makeMesh(optix::Context& context)
{
constexpr unsigned int usePTX32InHost64 = 0;
const std::vector<optix::float3> vertexes(1);
const std::vector<optix::uint3> faces(1);
RTgeometry geometry;
const RTresult result = rtuCreateClusteredMesh
(
context->get(), usePTX32InHost64, &geometry,
vertexes.size(), (const float*) vertexes.data(),
faces.size(), (const unsigned int*) faces.data(),
nullptr
);
if (result != RT_SUCCESS)
throw std::runtime_error(context->getErrorString(result));
return optix::Geometry::take(geometry);
}
int
main()
{
try
{
optix::Context context = optix::ContextObj::create();
optix::Geometry geometry = makeMesh(context);
}
catch (const std::exception& exception)
{
std::cerr << "error: " << exception.what() << std::endl;
}
return 0;
}