Ian Mallett wrote:
On Sun, Mar 9, 2008 at 9:22 AM, Richard Goedeken
<[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
But be warned that it will be quite a bit
slower than a pure scaling function.
Why? 3D engines like OpenGL can do this operation for thousands of
quads each frame while maintaining a great framerate. Doing it for one
quad shouldn't be too hard.
Because I wrote vector assembly code in MMX to accelerate the smooth scaling
function, plus I used some algorithmic simplifications. But this warping
operation requires rasterization, which is a more complicated algorithm, and I
was only planning to write it in C. The execution time would be proportional to
the size of the transformed quad, so for a few small quads it would be fast.
But scalar C code can't get close to the performance of hand-written vector code
running on dedicated hardware (GPUs); not even MMX code can get close.
Richard