Type of curveArray.flag?


In OptiX 7.1.0 SDK sample optixHair (line 104 of optixHair.cpp):

buildInput.curveArray.flag = OPTIX_GEOMETRY_FLAG_NONE;

The docs say:
[…]unsigned int OptixBuildInputCurveArray::flag
Combination of OptixGeometryFlags describing the primitive behavior.[…]

Its clear, the sample is for demonstration only, but I did not find any information what type
of flags is set there. So is it safe to use it this way (I added no anyhit program there) :

buildInput.curveArray.flag = OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT;

Thank you.

Yes, that works like the flags in the other OptixBuildInputs and takes OptixGeometryFlags.

Just that the flag field is not an array in this case because there is only one SBT entry per OptixBuildInputCurveArray supported.

More information about the differences and current limitations here:

1 Like