[AD] New poly3d routine |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
I'm not sure if anyone is interested in, but here
is a new poly3d.c file : I have completly rewritten it in order to
:
1. Get speed enhancements
2. Add triangle3d() functions which take constant
gradients into account (gradients are calculated once at the beginning of the
routine)
3. Add subpixel and subtexel accuracy
If you want to put it in the Allegro library just
replace the old 'poly3d.c' file by the attached one and then recompile the
library. That's all !!! I have taken 'Const'-correctness into
account.
At the very beginning of the file, there is a
function called fceil() which is a fixed point version of ceil(). I wrote a C
version and a ASM 386 version in GCC format (sorry for MSVC and Watcom owners :
I couldn't write a version for those compilers since I don't know their asm
format). If you think anyone can use fceil() in any way, it can be moved in
alinline.h and al386gcc.h (and also in al386vc.h and al386wat.h provided that
someone write the corresponding versions).
Bertrand. |
Attachment:
poly3d.zip
Description: Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |