From: Hector Martin Date: Sat, 18 Dec 2010 19:54:50 +0000 (+0100) Subject: Allow object inversion in the final render pass and fix flickering issue X-Git-Url: https://gitweb.aptx.org/?a=commitdiff_plain;h=9e07e24872a81884189979b038e74a36a3d3cd0e;p=openlase-old.git Allow object inversion in the final render pass and fix flickering issue --- diff --git a/libol/libol.c b/libol/libol.c index f95e3be..1eb389b 100644 --- a/libol/libol.c +++ b/libol/libol.c @@ -712,6 +712,8 @@ float olRenderFrame(int max_fps) int clinv = 0; if (!(params.render_flags & RENDER_NOREORDER)) { + Point closest_to = {-1,-1,0}; // first look for the object nearest the topleft + //Point closest_to = last_render_point; while(cnt) { Object *closest = NULL; for (i=0; ipoints; int cnt = closest->pointcnt; @@ -750,13 +753,12 @@ float olRenderFrame(int max_fps) pt[cnt-i-1] = tmp; } } - if (!closest) - break; //olLog("%d (%d) (nearest to %f,%f)\n", closest - wframe.objects, closest->pointcnt, closest_to.x, closest_to.y); render_object(closest); //olLog("[%d] ", frames[cwbuf].pnext); //olLog("[LRP:%f %f]\n", last_render_point.x, last_render_point.y); closest->pointcnt = 0; + closest_to = last_render_point; cnt--; last_info.objects++; }