if(!pass)
return;
+ const Mesh *mesh = lods.front().mesh.get();
+ if (!mesh)
+ throw logic_error("no mesh");
+
Renderer::Push push(renderer);
pass->apply(renderer);
setup_render(renderer, tag);
- lods.front().mesh->draw(renderer);
+ mesh->draw(renderer);
finish_render(renderer, tag);
}
if(!pass)
return;
+ const Mesh *mesh = lods[lod].mesh.get();
+ if (!mesh)
+ throw logic_error("no mesh");
+
Renderer::Push push(renderer);
pass->apply(renderer);
setup_render(renderer, tag);
inst.setup_render(renderer, tag);
- lods[lod].mesh->draw(renderer);
+ mesh->draw(renderer);
inst.finish_render(renderer, tag);
finish_render(renderer, tag);
}