fixed division by 0 error, minimum color will be a bit more white

This commit is contained in:
raphael60650 2021-08-01 22:02:17 +02:00
parent a460298a12
commit 925ca86c8d

View file

@ -44,6 +44,10 @@ def get_display(scene_data: tuple) -> Image:
pix = glReadPixels(0, 0, *display, GL_RGB, GL_UNSIGNED_BYTE)
image = Image.frombytes(mode="RGB", size=display, data=pix)
pygame.display.quit()
pygame.quit()
return image
@ -65,7 +69,7 @@ def draw_model(scene_scale, scene_trans, scene):
elif height < min_height:
min_height = height
min_height -= (max_height - min_height) // 4
min_height -= (max_height - min_height) // 3
glBegin(GL_TRIANGLES)
for face in mesh.faces: