On Friday, 13 December 2013 at 13:24:43 UTC, Rikki Cattermole wrote:
Perhaps an alternative way to write it is like this:
double
 windX = 0,
 runTmr = 0;

You also have a lot of enums that like WIDTH and HEIGHT that could be transformed into a single enum.
e.g.
enum int WIDTH = 800;
enum int HEIGHT = 600;

Would become:
enum : int {
 WIDTH = 800,
 HEIGHT = 600
}

I didn't realise D could do that; I've updated the code to use that style of variable declaration. It's interesting to be able to declare two arrays at once like so:

double[RUNNING_TIME * 1000]
    frames,
    gpuTimes;

Is there some way to initialise multiple values to zero without writing the zero more than once, so that the following only needs one zero:

double
    windX = 0,
    runTmr = 0;

I am timing, there just isn't much different in results between the different implementations. Why would you say not to use Derelict for bindings?

Reply via email to