Repository navigation
Version 1.3
This implements multithreading, which provides a major performance boost! The way it works is by adding a second variant of camera::render() which takes a second argument specifying the number of threads to use. It then gives each thread a range of lines to work through, divided (mostly) evenly, except that the final thread gets a slightly larger chunk of the image. Multithreading causes a slight overhead in locking access to the remaining line count variable, so it will fall back to the single-threaded renderer when only 1 thread is requested.
By default, the program will use all threads available for high performance.
It also has a minor bugfix to make a camera::render() job wait for for a running job to complete if it is called twice on the same object while a render job is already running on that object. If you need to render multiple jobs at the same time, create separate camera objects for each one.