What libraries were/are used to make 2D/3D graphics and Graphical User Interface on DOS(console) ? I mean the poor graphic that was used in games like Wolfenstein 3D, Shadow Warrior, etc.
The idea of hardware acceleration didn't really catch on until around the days of Windows. So most graphics cards ran in modes that were simply large arrays of memory mapped into specific address ranges. So you'd poke numbers into certain locations and that would cause corresponding changes to the pixels.
A setPixel
style operation would often have to read information off the graphics card in order to mask the information to make sure it only disrupted a single pixel. It was a lot faster to fill ranges of adjacent pixels together to avoid the read/mask/write cycle. The infamous "mode 13h" on VGA cards was especially convenient, because each byte corresponded to an independent 256-color pixel:
http://en.wikipedia.org/wiki/Mode_13h
There were a hodgepodge of different libraries--mostly proprietary--that implemented fast line or circle drawing algorithms which would work in different graphics modes. For instance, there was Genus Microprogramming's GX Graphics and Ted Gruber's Fastgraph (which is apparently still around today). By today's standards these were nothing fancy, but certainly trounced the likes of the Borland Graphics Interface in terms of performance.
These libraries were marketed for hundreds of dollars in programming magazines of the time. The ethos of that era generally was much more secretive than the new generation of programmers like to be...which means even if you bought one of these libraries you probably didn't get the source code, unless you paid even more. And certainly game companies didn't want competitors to know what they used or how much they'd developed in-house.
Late in the DOS days the arrival of the ModeX libraries heralded in some new undocumented video modes, and interesting tricks (like "compiled bitmaps"). These were often open source and shared over the Internet by people in the demoscene:
http://www.ascotti.org/programming/modex.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With