"fix" buffer overflow on mesh clipping

This commit is contained in:
Lephenixnoir 2023-01-01 22:06:06 +01:00
parent 0cf9a6c9af
commit a26f8e9e4a
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 3 deletions

View File

@ -137,7 +137,7 @@ void Windmill::draw_objects()
if (object-> visible && object_in_frustrum(object))
{
// copie le mesh avec plus de memoires disponible pour possiblement ajouter des points au clipping
WMesh mesh; mesh.from_mesh(object->mesh, 10);
WMesh mesh; mesh.from_mesh(object->mesh, 20);
// calcul des coordonnees dans le repère monde apres rotation et translation de l objet
transform_model_to_world(object, mesh.v, mesh.v_length);
@ -212,7 +212,7 @@ void Windmill::draw_post_treatment()
if (right < MAX_DEPTH_Z_BUFFER)
{
mask = 128 >> ((x+1) & 7);
vram[address>>3] |= mask;
vram[address>>3] |= mask; // FIXME: Wrong VRAM offset if viewport isn't (0,0)
//ML_pixel(x+1, y, ML_BLACK);
}
@ -300,7 +300,7 @@ void Windmill::draw_post_treatment()
}
}
}
} // 24 fps
} // 24 fps
// avec astuce +=2 : 25 fps
/*bool flag = false;