optimize ogl polyobjs slightly

This commit is contained in:
Alug committed 2024-07-03 13:06:22 +02:00
1 parent ec2fd5b38f
commit 008a9b9b3f
1 file changed
+1 -16
+1 -16
View File
@@ -2854,9 +2854,6 @@ static boolean HWR_CheckBBox(const fixed_t *bspcoord)
void HWR_AddPolyObjectSegs(void)
{
size_t i, j;
seg_t gr_fakeline;
polyvertex_t pv1;
polyvertex_t pv2;
// Sort through all the polyobjects
for (i = 0; i < numpolys; ++i)
@@ -2864,19 +2861,7 @@ void HWR_AddPolyObjectSegs(void)
// Render the polyobject's lines
for (j = 0; j < po_ptrs[i]->segCount; ++j)
{
// Copy the info of a polyobject's seg, then convert it to OpenGL floating point
M_Memcpy(&gr_fakeline, po_ptrs[i]->segs[j], sizeof(seg_t));
// Now convert the line to float and add it to be rendered
pv1.x = FIXED_TO_FLOAT(gr_fakeline.v1->x);
pv1.y = FIXED_TO_FLOAT(gr_fakeline.v1->y);
pv2.x = FIXED_TO_FLOAT(gr_fakeline.v2->x);
pv2.y = FIXED_TO_FLOAT(gr_fakeline.v2->y);
gr_fakeline.pv1 = &pv1;
gr_fakeline.pv2 = &pv2;
HWR_AddLine(&gr_fakeline);
HWR_AddLine(po_ptrs[i]->segs[j]);
}
}
}