View Single Post
Old 06-13-2012, 04:44 PM   #54
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by PoP View Post
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.

Last edited by geekmaster; 10-13-2012 at 01:04 PM.
geekmaster is offline   Reply With Quote