什么是用于在DOS上制作图形? [英] What is used to make graphics on DOS?

查看:153
本文介绍了什么是用于在DOS上制作图形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在DOS(控制台)上使用什么库来制作2D / 3D图形和图形用户界面?

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.

推荐答案

硬件加速的想法didn真的赶上了Windows的日子。所以大多数显卡运行模式,只是大的内存数组映射到特定的地址范围。因此,您会将数字插入某些位置,并导致像素的相应更改。

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操作通常必须从图形卡读取信息以便掩蔽信息以确保其仅中断单个像素。将相邻像素的范围填充在一起以避免读/掩码/写周期要快得多。在VGA卡上臭名昭着的模式13h特别方便,因为每个字节对应一个独立的256色像素:

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

不同的库 - 大多是专有的 - hodgepodge实现快速线或圆绘图算法,将工作在不同的图形模式。例如,有Genus Microprogramming的GX Graphics和Ted Gruber的 Fastgraph (显然还在今天)。按照今天的标准,这些都不是什么奇特的,但肯定是麻烦的 Borland图形界面性能。

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.

在DOS时代,ModeX的到来图书馆在一些新的未记录的视频模式,和有趣的技巧(如编译位图)。这些常常是开放源代码,并由人们在互联网上共享:

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

这篇关于什么是用于在DOS上制作图形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆