Quote:
Originally Posted by PoP
As suggested by geekmaster I ported my demo to C, using gmlib 1.5a and newtrix 2.0 routines (and compiled with tccmake). I have been away the forum for a while and didn't read if there were more currrent updates from geekmaster.
It -- of course -- runs much faster now : while pressing the keyboard keys you can interact with the plotting in real time.
The 3D.c code is much more readable than the previous contrieved 3D.sh code. C being a "natural" for the job, I found the port less interesting but for the object structure which I kept identical forcing me into array indexing, type casting and rounding fun.
Happy to share it:
|
The latest dithering code is in the raw2gmv and gmplay video player programs... It supports both 5.0.x and 5.1.x firmware...
I have a newer version that does parallel processing (it dithers 32-bit words, with no lookup table). I need to finish that and publish it in some demo framework... Too many things to do.
But even the OLD versions are a bit faster than a script plotting pixels with "dd".
EDIT: Newtrix contains 256-color to 16-color dithering code too, so that is a good place to start for general usage as you have here. Now if you get bored, you can add texture mapping and multiple light sources too.