From 1bbea43718737aad613a99e8a2cd210e16369f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 14 Dec 2020 21:18:22 +0100 Subject: l7 count calls to draw --- labb7/src/fast.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/labb7/src/fast.cpp b/labb7/src/fast.cpp index e0fcd0e..91c168a 100644 --- a/labb7/src/fast.cpp +++ b/labb7/src/fast.cpp @@ -64,6 +64,7 @@ int main(int argc, char *argv[]) { auto begin = chrono::high_resolution_clock::now(); vector> angles; + int draws = 0; for (int p1 = 0; p1 < N-1; p1++) { angles.clear(); for (int p2 = p1 + 1; p2 < N; p2++) { @@ -79,12 +80,14 @@ int main(int argc, char *argv[]) { num_in_row++; if (num_in_row >= 2) { render_line(scene, points.at(p1), angles[i].second); + draws++; } } else { num_in_row = 0; } } } + cout << draws << endl; auto end = chrono::high_resolution_clock::now(); cout << "Computing line segments took " -- cgit v1.2.1