From eefec7a70c96e20e3920fb2adea6c4da77c26170 Mon Sep 17 00:00:00 2001 From: Morten Hustveit Date: Fri, 12 Dec 2014 15:41:38 -0800 Subject: Render to window dimensions --- main_headless.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main_headless.c') diff --git a/main_headless.c b/main_headless.c index ab38414..0fd5938 100644 --- a/main_headless.c +++ b/main_headless.c @@ -9,15 +9,18 @@ static const size_t kFramesToRender = 100; int main(int argc, char** argv) { + const size_t kWidth = 1000; + const size_t kHeight = 1000; + fprintf(stderr, "Rendering %zu frames\n", kFramesToRender); - unsigned char* buffer = calloc(4, WIDTH * HEIGHT); + unsigned char* buffer = calloc(4, kWidth * kHeight); struct timeval start; gettimeofday(&start, NULL); for (size_t i = 0; i < kFramesToRender; ++i) - trace_scene(i * 0.01f, buffer, 0); + trace_scene(i * 0.01f, kWidth, kHeight, buffer, 0); struct timeval end; gettimeofday(&end, NULL); -- cgit v1.2.3