mirror of https://github.com/bjornbytes/lovr.git
Check if torus shape is cached
This commit is contained in:
parent
886e3bb42f
commit
bc1308c463
|
@ -4935,6 +4935,10 @@ void lovrPassTorus(Pass* pass, float* transform, uint32_t segmentsT, uint32_t se
|
||||||
.index.count = indexCount
|
.index.count = indexCount
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!vertices) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// T and P stand for toroidal and poloidal, or theta and phi
|
// T and P stand for toroidal and poloidal, or theta and phi
|
||||||
float dt = (2.f * (float) M_PI) / segmentsT;
|
float dt = (2.f * (float) M_PI) / segmentsT;
|
||||||
float dp = (2.f * (float) M_PI) / segmentsP;
|
float dp = (2.f * (float) M_PI) / segmentsP;
|
||||||
|
|
Loading…
Reference in New Issue