| 942 | typedef ISPCGeometry* ISPCGeometry_ptr; |
| 943 | |
| 944 | RTCScene convertScene(ISPCScene* scene_in) |
| 945 | { |
| 946 | for (unsigned int i=0; i<scene_in->numGeometries; i++) |
| 947 | { |
| 948 | ISPCGeometry* geometry = scene_in->geometries[i]; |
| 949 | if (geometry->type == SUBDIV_MESH) { |
| 950 | g_subdiv_mode = true; break; |
| 951 | } |
| 952 | } |
| 953 | |
| 954 | assignShadersFunc = assignShaders; |
| 955 | |
| 956 | RTCScene scene_out = ConvertScene(g_device, g_ispc_scene, RTC_BUILD_QUALITY_MEDIUM, RTC_SCENE_FLAG_NONE, &g_used_features); |
| 957 | #if ENABLE_FILTER_FUNCTION |
| 958 | #if USE_ARGUMENT_CALLBACKS |
| 959 | g_used_features = (RTCFeatureFlags)(g_used_features | RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS); |
| 960 | #else |
| 961 | g_used_features = (RTCFeatureFlags)(g_used_features | RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY); |
| 962 | #endif |
| 963 | #endif |
| 964 | |
| 965 | /* commit changes to scene */ |
| 966 | //progressStart(); |
| 967 | //rtcSetSceneProgressMonitorFunction(scene_out,progressMonitor,nullptr); |
| 968 | rtcCommitScene (scene_out); |
| 969 | //rtcSetSceneProgressMonitorFunction(scene_out,nullptr,nullptr); |
| 970 | //progressEnd(); |
| 971 | |
| 972 | return scene_out; |
| 973 | } // convertScene |
| 974 | |
| 975 | inline Vec3fa face_forward(const Vec3fa& dir, const Vec3fa& _Ng) { |
| 976 | const Vec3fa Ng = _Ng; |
no test coverage detected