mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Fixed stud rendering bug in pieces with a large number of vertices.
This commit is contained in:
parent
b86a9c1b9c
commit
fe7cb940b8
1 changed files with 751 additions and 751 deletions
|
@ -824,12 +824,12 @@ void PieceInfo::LoadInformation()
|
|||
|
||||
for (i = 0; i < SIDES; i++)
|
||||
{
|
||||
longs[j+i*3] = (lcuint16)verts + 2*SIDES;
|
||||
longs[1+j+i*3] = (lcuint16)verts + SIDES + i;
|
||||
longs[j+i*3] = (lcuint32)verts + 2*SIDES;
|
||||
longs[1+j+i*3] = (lcuint32)verts + SIDES + i;
|
||||
if (i == SIDES-1)
|
||||
longs[2+j+i*3] = (lcuint16)verts + SIDES;
|
||||
longs[2+j+i*3] = (lcuint32)verts + SIDES;
|
||||
else
|
||||
longs[2+j+i*3] = (lcuint16)verts + SIDES + i + 1;
|
||||
longs[2+j+i*3] = (lcuint32)verts + SIDES + i + 1;
|
||||
}
|
||||
|
||||
j += 3*SIDES;
|
||||
|
@ -1215,11 +1215,11 @@ void PieceInfo::LoadInformation()
|
|||
for (i = 0; i < SIDES; i++)
|
||||
{
|
||||
if (i == SIDES-1)
|
||||
longs[j+i*3] = (lcuint16)verts + SIDES;
|
||||
longs[j+i*3] = (lcuint32)verts + SIDES;
|
||||
else
|
||||
longs[j+i*3] = (lcuint16)verts + SIDES + i + 1;
|
||||
longs[1+j+i*3] = (lcuint16)verts + SIDES + i;
|
||||
longs[2+j+i*3] = (lcuint16)verts + 2*SIDES;
|
||||
longs[j+i*3] = (lcuint32)verts + SIDES + i + 1;
|
||||
longs[1+j+i*3] = (lcuint32)verts + SIDES + i;
|
||||
longs[2+j+i*3] = (lcuint32)verts + 2*SIDES;
|
||||
}
|
||||
|
||||
j += 3*SIDES;
|
||||
|
|
Loading…
Add table
Reference in a new issue