MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / LoadDetailModel

Method LoadDetailModel

Source/Graphics/detailobjectsurface.cpp:272–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void DetailObjectSurface::LoadDetailModel(const std::string& path) {
273 ofr = Engine::Instance()->GetAssetManager()->LoadSync<ObjectFile>(path);
274 double_sided = ofr->double_sided;
275 if (Graphics::Instance()->config_.detail_object_lowres()) {
276 std::string model_name = ofr->model_name.substr(0, ofr->model_name.rfind('.')) + "_low" + ofr->model_name.substr(ofr->model_name.rfind('.'));
277 if (FindFilePath(model_name, kAnyPath, false).isValid())
278 detail_model_id = Models::Instance()->loadModel(model_name);
279 else
280 detail_model_id = Models::Instance()->loadModel(ofr->model_name);
281 } else
282 detail_model_id = Models::Instance()->loadModel(ofr->model_name);
283}
284
285#ifdef USE_SSE
286static vec4 Mat4Vec4SimdMul(const mat4& lhsMat, const vec4& rhsVec) {

Callers 2

SetDetailObjectLayersMethod · 0.80

Calls 5

FindFilePathFunction · 0.85
GetAssetManagerMethod · 0.80
detail_object_lowresMethod · 0.80
isValidMethod · 0.45
loadModelMethod · 0.45

Tested by

no test coverage detected