MCPcopy Create free account
hub / github.com/RenderKit/embree / run

Method run

tutorials/verify/verify.cpp:922–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920 : VerifyApplication::Test(name,isa,VerifyApplication::TEST_SHOULD_PASS), gtype(gtype) {}
921
922 VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent)
923 {
924 std::string cfg = state->rtcore + ",isa="+stringOfISA(isa);
925 RTCDeviceRef device = rtcNewDevice(cfg.c_str());
926 errorHandler(nullptr,rtcGetDeviceError(device));
927
928 RTCGeometry geom = nullptr;
929 switch (gtype) {
930 case TRIANGLE_MESH : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE); break;
931 case TRIANGLE_MESH_MB : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE); break;
932 case QUAD_MESH : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_QUAD); break;
933 case QUAD_MESH_MB : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_QUAD); break;
934 case SUBDIV_MESH : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_SUBDIVISION); break;
935 case SUBDIV_MESH_MB : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_SUBDIVISION); break;
936 case BEZIER_GEOMETRY : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE); break;
937 case BEZIER_GEOMETRY_MB : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE); break;
938 case BSPLINE_GEOMETRY : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE); break;
939 case BSPLINE_GEOMETRY_MB: geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE); break;
940 case CATMULL_GEOMETRY : geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE); break;
941 case CATMULL_GEOMETRY_MB: geom = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE); break;
942 default : return VerifyApplication::PASSED;
943 }
944 AssertNoError(device);
945
946 RTCFormat indexFormat;
947 RTCFormat vertexFormat;
948 switch (gtype) {
949 case TRIANGLE_MESH:
950 case TRIANGLE_MESH_MB:
951 indexFormat = RTC_FORMAT_UINT3;
952 vertexFormat = RTC_FORMAT_FLOAT3;
953 break;
954
955 case QUAD_MESH:
956 case QUAD_MESH_MB:
957 indexFormat = RTC_FORMAT_UINT4;
958 vertexFormat = RTC_FORMAT_FLOAT3;
959 break;
960
961 case SUBDIV_MESH:
962 case SUBDIV_MESH_MB:
963 indexFormat = RTC_FORMAT_UINT;
964 vertexFormat = RTC_FORMAT_FLOAT3;
965 break;
966
967 case BEZIER_GEOMETRY:
968 case BEZIER_GEOMETRY_MB:
969 case BSPLINE_GEOMETRY:
970 case BSPLINE_GEOMETRY_MB:
971 case CATMULL_GEOMETRY:
972 case CATMULL_GEOMETRY_MB:
973 indexFormat = RTC_FORMAT_UINT;
974 vertexFormat = RTC_FORMAT_FLOAT4;
975 break;
976
977 default:
978 indexFormat = RTC_FORMAT_UNDEFINED;
979 vertexFormat = RTC_FORMAT_UNDEFINED;

Callers

nothing calls this directly

Calls 10

stringOfISAFunction · 0.85
rtcNewDeviceFunction · 0.85
errorHandlerFunction · 0.85
rtcGetDeviceErrorFunction · 0.85
AssertNoErrorFunction · 0.85
AssertErrorFunction · 0.85
rtcReleaseGeometryFunction · 0.85
c_strMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected