Start addressing PR comments

This commit is contained in:
Malin E
2022-09-22 12:01:01 +02:00
parent 34aa515f16
commit ac79e4dc07
14 changed files with 31 additions and 56 deletions
@@ -137,12 +137,7 @@ RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictio
}
bool RenderableSphericalGrid::isReady() const {
bool isReady = _gridProgram != nullptr;
if (_hasLabels) {
isReady = isReady && _labels->isReady();
}
return isReady;
return _hasLabels ? _gridProgram && _labels->isReady() : _gridProgram != nullptr;
}
void RenderableSphericalGrid::initialize() {
@@ -249,7 +244,7 @@ void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){
);
if (orthoRight == glm::vec3(0.0)) {
glm::vec3 otherVector(lookup.y, lookup.x, lookup.z);
glm::vec3 otherVector = glm::vec3(lookup.y, lookup.x, lookup.z);
right = glm::cross(viewDirection, otherVector);
orthoRight = glm::normalize(
glm::vec3(worldToModelTransform * glm::vec4(right, 0.0))