Set is_rendered flag after scene rendering completes.
This commit is contained in:
parent
9ad6bb7656
commit
9d6c293cad
1 changed files with 5 additions and 0 deletions
|
@ -77,6 +77,9 @@ scene_render(Scene *scene)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scene->width = 640;
|
||||||
|
scene->height = 480;
|
||||||
|
|
||||||
float fov = 30.0;
|
float fov = 30.0;
|
||||||
float aspect_ratio = scene->width / scene->height;
|
float aspect_ratio = scene->width / scene->height;
|
||||||
float angle = tan(M_PI * 0.5 * fov / 180.0);
|
float angle = tan(M_PI * 0.5 * fov / 180.0);
|
||||||
|
@ -96,6 +99,8 @@ scene_render(Scene *scene)
|
||||||
scene->pixels[y * scene->height + x] = _scene_trace(scene, primary_ray, 0);
|
scene->pixels[y * scene->height + x] = _scene_trace(scene, primary_ray, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scene->is_rendered = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue