mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 21:43:34 +00:00
Fix Pass:roundrect bug;
It would draw a plane when radius was zero, even if it was supposed to be thick.
This commit is contained in:
parent
34c3e2c309
commit
024ea094a4
|
@ -4977,7 +4977,7 @@ void lovrPassRoundrect(Pass* pass, float* transform, float r, uint32_t segments)
|
||||||
float ry = MIN(r / h, .5f);
|
float ry = MIN(r / h, .5f);
|
||||||
uint32_t n = segments + 1;
|
uint32_t n = segments + 1;
|
||||||
|
|
||||||
if (r <= 0.f || w == 0.f || h == 0.f) {
|
if (!thicc && (r <= 0.f || w == 0.f || h == 0.f)) {
|
||||||
lovrPassPlane(pass, transform, STYLE_FILL, 1, 1);
|
lovrPassPlane(pass, transform, STYLE_FILL, 1, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue