Add boundingSphere for RenderablePrism

This commit is contained in:
Malin Ejdbo
2021-06-11 09:39:32 +02:00
parent 4d02b02081
commit 573ebe5ed5

View File

@@ -329,7 +329,7 @@ void RenderablePrism::render(const RenderData& data, RendererTasks&) {
_shader->deactivate();
}
void RenderablePrism::update(const UpdateData&) {
void RenderablePrism::update(const UpdateData& data) {
if (_shader->isDirty()) {
_shader->rebuildFromFile();
ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);
@@ -337,6 +337,7 @@ void RenderablePrism::update(const UpdateData&) {
if (_prismIsDirty) {
updateVertexData();
updateBufferData();
setBoundingSphere(_length * glm::compMax(data.modelTransform.scale));
_prismIsDirty = false;
}
}