An interactive Mandelbrot using a thread farm/pool made using SFML and STL threads.
WSAD, Arrow Keys, or Numpad 8, 6, 4, 2 to move; Plus and Minus (including numpad) to zoom; R to reset view.
The screen is divided up into tiles. Each of them is re-rendered when input happens.
The rendering is done on the CPU using a thread pool. Each of the threads gets a task allocated.
Key tasks are:
- Redraw tile (render it again with new paramaters)
- 'Desaturate tile' (Dim the tile to tell the user that it's out of date)
Uses SFML to not spend time implementing repetitive things.
Signalling the thread to wake up is done using a condition variable.
Mutexes are used for the queue.
The number of threads in minimum two, but otherwise automatically set to the amount of cores the operating system sees.
The Drawing Manager class handles drawing, input, and scheduling.
The Mandelbrot static class contains functions. Made static as it doesn't need to be instanced.
The logger class is for taking notes of time in CSV's, which can later be made into graphs.
Uncomment RunStatistics in the main function. This probably should've been made a mode.