I am working on my small University project. I've done optimisation of rendering Mandelbrot Set and now I want to add testing function which will be change position of the Set and check fps. So I ran into problems: I want to start for
loop like this:
for(int i = 0; i < maxPositionChangeX; i++)
{
fillMandelbrotSet(...);
}
but this loop will be in test function like testMandelbrot(...)
, so I can render every changes. I thouhgt that I can use in this function clear - draw - display
methods of sf::Window class but I don't know is it correctly. And the second problem is the fact that if I want interrupt this function with some event - I can't because the next event loop iteration will be only after test function end. But creating the second event loop - is not good idea as I read. So, how I can do this?
Oh, and I have to say that I use SFML but I'm programming in "C" style, because we don't leaned c++ in University yet