Howdoes allegro and others do thisso fast? if I try to just get/pupixel an image its alls slow, do they use some assembly stuff to machine gun an image onto the screen?
Howdoes allegro and others do thisso fast? if I try to just get/pupixel an image its alls slow, do they use some assembly stuff to machine gun an image onto the screen?
flashdaddee.com rocks!!!
I don't know if they do, but that's what I would do using rep stosd or something.
The function call for putpixel is much more costly then the changing of a single change of a variable. While they probably do use asm to blit, using straight C to blit large areas wouldn't be that much slower than using asm... just as long as you don't use a function call for each pixel.
aside from asm, there are many tricks you can do in straight C/++ that can help... for example using a dirty rectangles updating system... and #define directives for put_pixel pseudo-functioning...
hasafraggin shizigishin oppashigger...