Hacker News new | past | comments | ask | show | jobs | submit login

I think AOE was using DirectX, so I assume that was one level up the stack, ie figuring out which sprites are visible to which extent by walking different data structures and then just throwing stuff at directdraw.



DirectDraw wasn't really meant as a drawing toolkit; you _did_ have blits, but they were not hardware accelerated AFAIK and not nearly flexible enough for what the article suggests (mirror, stiple, probably other stuff). In general, what DirectDraw gave you was a rectangle you could draw pixels into, and a way to get those pixels efficiently to the screen. In other words, more like a clean abstraction over the display driver.


DirectDraw did accelerate blits, but only simple cases, and even then only if the hardware and drivers supported it. Hazy memory is that accelerated blit support was sketchy for pre-3D GPUs, especially stretchblts. It also had significant overhead for drawing small sprites. DirectDraw was critical for video players at the time due to being much faster than GDI and even sometimes Direct3D.


Yeah, sounds about right. And yes, obviously it was much faster than GDI for games, since you had more or less direct access to a framebuffer. Not building up some device-independent bitmap and going through some slow path to convert it into the right format for the GPU (which wasn't called a GPU back then, of course).


DirectDraw did support hardware accelerated blitter, and speedup was quite significant.

http://www.roylongbottom.org.uk/directdraw%20results.htm

Even the oldest S3 VLB cards performed 8 bit copies 3-4x faster than CPU. Pretty much every VGA chipset from around 1993-94 onward had 2D accelerator, most popular were IBM 8514 derived like from S3 or ATI.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: