Wow, harsh. I did stop. I did think. What I thought was "what methods do I have at my disposal that will do exactly what I want?" and the answer I came up was GDI+. I didn't have to download or compile anything extra.
Quote:
GDI+ makes absolutely no sense for a thing like this that doesn't even draw to the screen directly.
|
Why not? GDI+ doesn't
only draw to the screen. I create a Bitmap object and pass the AviSynth write pointer
directly to it for it to use as its pixel data. The GDI+ call writes
directly to the RGB32 clip. I get over 1000 frames per second for a 50-sided polygon at SD resolution (that's
faster than an SD blankclip call), and 190fps at HD resolution (vs 210fps for an HD blankclip). That's for an anti-aliased and spline-smoothed polygon, by the way, and I haven't even started optimising yet.
I started out using a naive scanline polygon algorithm I'd (independently) came up with many years ago. When that got a bit tedious and the limitations became obvious, I stripped the code back to the bare essentials and from there the additional code to support and implement the GDI+ method amounts to about
15 lines, if that.
Think
what? I don't understand what I've done that's so
wrong.