Check if torus shape is cached

This commit is contained in:
Josip Miskovic 2022-12-22 17:25:55 +01:00
parent 886e3bb42f
commit bc1308c463
1 changed files with 4 additions and 0 deletions

View File

@ -4935,6 +4935,10 @@ void lovrPassTorus(Pass* pass, float* transform, uint32_t segmentsT, uint32_t se
.index.count = indexCount
});
if (!vertices) {
return;
}
// T and P stand for toroidal and poloidal, or theta and phi
float dt = (2.f * (float) M_PI) / segmentsT;
float dp = (2.f * (float) M_PI) / segmentsP;