Everything About BGI

This is a short history of BGI (Borland Graphics Interface) which was once an extremely popular and easy way to implement presentation graphics in C programs. It is still used today to teach Computer Graphics at universities in India.

#include <graphics.h

This living document is still being worked on.

Quick Explanation

BGI: Borland Graphics Interface
WinBGI: Borland Graphics Interface for Windows
WinBGIm: Borland Graphics Interface for Windows with mouse
WinBGIm-64: Borland Graphics Interface for Windows with mouse supporting 64-bit computers

History

1987 - 1993 : Borland invents BGI
1995 (probably because he made this on Windows 95) : Konstantin Knizhnik creates WinBGI
1998 (or earlier) - 2016 : Michael Main creates WinBGIm
2021 - Jan 2022 : Shakil Ahmed (Bangladesh) creates WinBGIm-64

Q and A

Q: Why did the CS department at the University of Colorado create WinBGIm?
A: As far as I can tell, they did it because the computers around them had switched to Windows and they still wanted students to be able to learn and practice computer graphics programs written for BGI. So Michael Main and others worked on WinBGIm.

Q: What is CSCI 1300?
A: CSCI 1300, sometimes known as CS1300, is the university of Colorado Boulder’s Introduction to Computing Course.
WinBGIm was included in the Software Package for CS1300. It seems to have been used in the Labs sessions there. There’s even a Lab exercise for it: https://home.cs.colorado.edu/~main/bgi/cs1300/lab/cs1300-3.html

Q: What is the history of BGI
A: It’s a beautiful story about open source software, and how it can be picked up and worked on by anyone in the world. Konstantin Khiznik created a way to run Borland Graphics programs on Windows. Michael Main quickly forked the work and made WinBGIm which he worked on for several years, with collaborators at University of Colorado Boulder. Most recently, Sakhil Ahmed at Shahjalal University of Science and Technology in

Q: How long was Michael Main working on WinBGIm?
A: Michael Main was working on WinBGIm from October 17, 1998 (WinBGIm version 2.2) to November, 2005 (WinBGIm version 6.0). But there are updates to the source code as recently as December 2016.

Q: Where is the source code for WinBGIm?
A: Source Code: https://home.cs.colorado.edu/~main/cs1300/bgi

Q: What’s my souce?
A: See this.

Note
Don’t get confused between there two:

  1. The true source code of WinBGIm (updated 2016)
    https://home.cs.colorado.edu/~main/bgi/source/

  2. The mirrored source code in CS1300 (updated 2014)
    https://home.cs.colorado.edu/~main/cs1300/bgi/

People Involved

  • Konstantin Knizhnik (The original developer of WinBGI)
  • Michael Main (AFAIK the primary developer of WinBGIm)
  • Sakhil Ahmed (The developer of WinBGIm-64)

Versions

Documentation for WinBGIm

is hosted here: https://home.cs.colorado.edu/~main/bgi/doc/
Functions without the ‘Win’ tag are originally from BGI. Functions with the ‘Win’ tag are unique to WinBGIm.

Konstantin

http://www.garret.ru/lang.html (scroll down to ‘BGI for Windows’)
My e-mail address:
[email protected]


BGI emulation
PtoC now provides emulation libraries of Borland Graphics Interface (BGI) for X-Windows and Windows-95/NT are included in this distribution (BGI emulators can be also used without converter for C programs using BGI). I found source code of BGI emulator for X-Windows in Internet, so I only have to do some changes and fix few bugs. Unfortunately this emulation library is not fully completed and tested, also not all BGI functionality is supported. And BGI emulator for MS-Windows I created myself (in Internet I found only commercial products). I called this library WinBGI.
WinBGI strictly emulates most of BGI functions (except using of non-standard drivers). Also may be mapping of fonts is not correct. But as far as sources are also available, you can easily customize them for your application. Unfortunately direct work with palette colors (setpalette, setbkcolor, write and putimage modes other than COPYPUT) is supported only for 256-colors Windows mode. Also I have used this library for only few programs (bgidemo is certainly the most complex one) so I can’t guaranty that all functions always work properly. I am also sorry for the lack of parameter checking in WinBGI functions.

GitHub for original WinBGI: https://github.com/knizhnik/ptoc/tree/master/WinBGI

FUN FACT: Years later, he actually got a job at Borland Co, Moscow branch! He was employed there from 2003-2006.

WinBGIm (Windows Borland Graphics Interface and Mouse) at University Of Colorado Boulder(1998/2004 - 2016)

Developed at the Computer Science department of the University of Colorado Boulder.

CS1300 BGI Graphics Exercises - https://home.cs.colorado.edu/~main/bgi/cs1300/lab/cs1300-3.html
Note: WinBGIm contains its own versions of getch, delay, and kbhit. You do not need to include conio.h to use these functions.
Mouse Stuff Explanation: https://home.cs.colorado.edu/~main/cs1300/doc/bgi/bgi.html
Use with Visual Studio: https://home.cs.colorado.edu/~main/bgi/visual/

Codecutter (2005 - 2011)

https://winbgim.codecutter.org/
https://winbgim.codecutter.org/V6\_0/doc/initwindow.html
The site was last updated in 2011.
AFAIK, Al Stevens is the developer of all the projects at codecutter.org. This includes CodeBlocks Edu, Koolplot, Quincy C/C++ IDE, MakeGen(used to generate makefiles compatible with the free Borland C/C++ compiler),

Al Steven’s Personal Website: http://www.alstevens.com/bio.html

Actually Modern BGI Projects (2023)

  • https://sdl-bgi.sourceforge.io/
    Description: SDLbgi can be used to port old programs written for Turbo/Borland C to modern systems. And, of course, to write new graphics programs with minimal effort: BGI, once extremely popular, was probably the simplest way to implement presentation graphics in C programs. The same ease of programming can be obtained on modern systems. Programming fractals, cellular automata, geometry, physics models etc. is a breeze with SDLbgi.

Alternatives to WinBGIm

Jordan Hargrave’s SVGA BGI drivers: https://github.com/jharg93/SvgaBGI
CodeBlocks Edu Portable includes WinBGIm. Recommended only if all other methods to run BGI programs on Windows fails: https://codeblocks.codecutter.org/
Quincy C/C++ IDE includes WinBGIm: https://quincy.codecutter.org/

More BGI libraries here: https://home.cs.colorado.edu/~main/bgi/source/
with the most recent update as early as 2016!

Sitemap of Uni Colorado Michael Main:
https://www.xml-sitemaps.com/details-home.cs.colorado.edu-9234475b5.html

https://en.wikipedia.org/wiki/Borland*Graphics*Interface

Moscow State Industrial University

Author

Siddharth Bhatia

Posted on

2024-08-01

Licensed under

CC BY-NC-SA 4.0

Comments

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×