Early return for renderNode;
@@ -9,6 +9,7 @@ static void renderNode(Model* model, int nodeIndex) {
Material* currentMaterial = lovrGraphicsGetMaterial();
bool useMaterials = currentMaterial->isDefault;
+ if (node->primitives.length > 0) {
lovrGraphicsPush();
lovrGraphicsMatrixTransform(MATRIX_MODEL, model->globalNodeTransforms + 16 * nodeIndex);
@@ -49,6 +50,7 @@ static void renderNode(Model* model, int nodeIndex) {
}
lovrGraphicsPop();
+ }
for (int i = 0; i < node->children.length; i++) {
renderNode(model, node->children.data[i]);
