If I understand the GDI target correctly : basically it works by rendering triangles to a pixel buffer, which is then drawn to the screen by the GDI.

The clever bit is the use of multi-core processors. It splits drawing into different threads, to utilise the CPU to it's full potential.

At the moment, the drawing thread calls a "vertex shader" which calculates the scanline vertices. For each scanline, the vertex shader calls a "fragment shader" which draws the line.

My suggestion is to pass the shader functions as parameters to the drawing thread.

The advantage is that clanGDI can calculate the optimum shader (with specializations)

If we take this further, maybe we can take this out of clanGDI and move it into clanDisplay, for software rendering. So the user can use a mix of opengl and software rendering for optimum performance.

This could also be used for graphic cards that do not support frame buffer objects.

Also, in theory, it should be trivial to make the GDI target compatible with Linux.