summaryrefslogtreecommitdiffstats
path: root/libdimension/raytrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/raytrace.c')
-rw-r--r--libdimension/raytrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index bb88940..6cb6d8b 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -133,7 +133,7 @@ dmnsn_raytrace_scene_multithread(dmnsn_raytrace_payload *payload)
dmnsn_new_progress_element(payload->progress,
nthreads*payload->scene->canvas->y);
- /* Create the threads */
+ /* Create the payloads */
for (i = 0; i < nthreads; ++i) {
payloads[i] = *payload;
payloads[i].index = i;
@@ -142,7 +142,10 @@ dmnsn_raytrace_scene_multithread(dmnsn_raytrace_payload *payload)
payloads[i].kD_splay_tree =
dmnsn_kD_splay_copy(payloads[0].kD_splay_tree);
}
+ }
+ /* Create the threads */
+ for (i = 0; i < nthreads; ++i) {
if (pthread_create(&threads[i], NULL,
&dmnsn_raytrace_scene_multithread_thread,
&payloads[i]) != 0)