HOME

TheInfoList



OR:

The Borland Graphics Interface, also known as BGI, was a graphics library bundled with several Borland compilers for the DOS operating systems since 1987. BGI was also used to provide graphics for many other Borland products including the
Quattro Pro Quattro Pro is a spreadsheet program developed by Borland and now sold by Corel, most often as part of Corel's WordPerfect Office suite. Characteristics Historically, Quattro Pro used keyboard commands close to those of Lotus 1-2-3. While ...
spreadsheet. The library loaded graphic drivers (*.BGI) and vector fonts (*.CHR) from disk in order to provide device independent graphics support. It was possible for the programmer to embed the graphic driver into the executable file by linking the graphic driver as object code with the aid of a utility provided by the compiler (bgiobj.exe). There were graphic drivers for common graphic adapters and printers of that time, such as CGA, EGA and
VGA Video Graphics Array (VGA) is a video display controller and accompanying de facto graphics standard, first introduced with the IBM PS/2 line of computers in 1987, which became ubiquitous in the Personal computer, PC industry within three years ...
. There also were BGI drivers for some kinds of plotters. The last Borland's C++ IDE for DOS is Borland C++ 3.1 (1992). The last C++ environment which supports BGI is Borland C++ 5.02 (1997), which works under Windows but can compile DOS programs. BGI was accessible in C/C++ with graphics.lib / graphics.h, and in Pascal via the graph unit. BGI was less powerful than modern graphics libraries such as SDL or
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve ha ...
, since it was designed for 2D presentation graphics instead of event-based 3D applications. However, it has been considered simpler to code. BGI and Turbo C++, although obsolete, are still widely used in education in India.


Third-party BGI drivers

Given the popularity of Borland compilers, a few independent software developers produced BGI drivers for non-standard video modes, advanced video cards, plotters, printers, and graphics file output. In 1994 Jordan Hargraphix Software released
SVGA Super VGA (SVGA) is a broad term that covers a wide range of computer display standards that extended IBM's VGA specification. When used as shorthand for a resolution, as VGA and XGA often are, SVGA refers to a resolution of 800×600. History ...
BGI drivers version 5.5 that are compatible with some SVGA hardware like ATI or
Cirrus Logic Cirrus Logic Inc. is an American fabless semiconductor supplier that specializes in analog, mixed-signal, and audio DSP integrated circuits (ICs). Since 1998, the company's headquarters have been in Austin, Texas. The company's audio proces ...
cards and
VESA VESA (), formally known as Video Electronics Standards Association, is an American technical standards organization for computer display standards. The organization was incorporated in California in July 1989To retrieve the information, sear ...
VBE VESA BIOS Extensions (VBE) is a VESA standard, currently at version 3, that defines the interface that can be used by software to access compliant video boards at high resolutions and bit depths. This is opposed to the "traditional" INT 10H, in ...
-compatible cards. Also there are tweaked VGA drivers for non-standard graphic modes supported by VGA by writing directly into its registers,
protected mode In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units (CPUs). It allows system software to use features such as virtual memory, paging and safe multi-taskin ...
driver versions for
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
7.0 and mouse driver (actually cursor handler for unsupported video modes by standard mouse drivers). These drivers were
shareware Shareware is a type of proprietary software that is initially shared by the owner for trial use at little or no cost. Often the software has limited functionality or incomplete documentation until the user sends payment to the software developer ...
and buying them let receiving their source code and technical support; now they are no longer supported, but on 19 December 2020 Jordan Hargrave kindly released source code under the
MIT License The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license co ...
on
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
. Main bugs are lack of aligning bytes support in VESA true-color modes (so the true-color driver is not suitable for
Nvidia Nvidia CorporationOfficially written as NVIDIA and stylized in its logo as VIDIA with the lowercase "n" the same height as the uppercase "VIDIA"; formerly stylized as VIDIA with a large italicized lowercase "n" on products from the mid 1990s to ...
graphic cards) and
video memory Dynamic random-access memory (dynamic RAM or DRAM) is a type of random-access semiconductor memory that stores each bit of data in a memory cell, usually consisting of a tiny capacitor and a transistor, both typically based on metal-oxid ...
bank switching bug in mouse driver (since
real mode Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs. The mode gets its name from the fact that addresses in real mode always correspond to real locations in memory. Real mode is characterized by a 20-bit s ...
addressing space is 1 megabyte, but some video modes require up to 4 megabytes of memory, it is split into 64 kilobyte banks).


Legacy

A BGI-compatible library, named Graph, is included in the
Free Pascal Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, witexception clausesthat allow static linking against i ...
Pascal compiler. Several BGI implementations for present-day operating systems are also available (see External links.)


Example

The following program, written for
Borland Turbo C Turbo C is a discontinued integrated development environment (IDE) and compiler for the C programming language from Borland. First introduced in 1987, it was noted for its integrated development environment, small size, fast compile speed, com ...
, initialises the graphics and draws 1000 random lines: #include #include #include int main (int argc, char *argv[])


See also

* Allegro (software library), Allegro * Graphics System Extension (GSX) * Graphical Kernel System (GKS) * Raylib * SciTech SNAP *
UniVBE UniVBE (short for ''Universal VESA BIOS Extensions'') is a software driver that allows DOS applications written to the VESA BIOS standard to run on almost any display device made in the last 15 years or so. The UniVBE driver was written by SciT ...


References

{{Reflist, refs= "Computer Graphics", ISRD Group, 2006. {{ISBN, 0070593760 Freeware BGI driversJordan Hargraphix BGI drivers
/ref> SuperVGA BGI Drivers for Turbo C/Turbo Pascal/Borland C++
/ref> Indian engineering colleges are terrible at approaching technology
/ref> Why is Turbo C++ still being used in Indian schools and colleges?
/ref>
/ref> * Turbo C++ 3.0 User's Guide. Borland International, Inc. 1992. * Borland C++ Library Reference. Borland International, Inc. 1992.
Borland Graphics Interface (BGI) Documentation


External links


SDL_bgi
is a multiplatform port written in SDL2; it provides several extensions.
Winbgim
is a port of BGI for Microsoft Windows; it provides several extensions. * Th
GRX graphics library
contains a BGI subsystem, mostly compatible with the original BGI.
OpenBGI library
is another port for Microsoft Windows.
libgraph
is a BGI implementation for Linux written in SDL1.

contains some information on how to decode Borland CHR font.
sunet.se
ftp mirror with some CHR font tools. Borland software Graphics libraries C (programming language) libraries C++ libraries