Misplaced Pages

Borland Graphics Interface

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

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 spreadsheet.

#516483

29-586: 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, VGA, Hercules, AT&T 400, MCGA and 3270 PC . There also were BGI drivers for some kinds of plotters. The last Borland's C++ IDE for DOS

58-505: A hardware abstraction layer for computer multimedia hardware components . Software developers can use it to write high-performance computer games and other multimedia applications that can run on many operating systems such as Android , iOS , Linux , macOS , and Windows . SDL manages video , audio , input devices , threads , shared object loading, networking and timers. For 3D graphics, it can handle an OpenGL , Vulkan , Metal , or Direct3D11 (older Direct3D version 9

87-686: A feature set combining what was previously available on macOS and iOS, and will be able to take advantage of features tailored to the tile based deferred rendering (TBDR) architecture of Apple GPUs. At the 2022 WWDC , Apple announced the third version of Metal (Metal 3), which would debut with the release of macOS Ventura , iOS 16 and iPadOS 16 . Metal 3 introduces the MetalFX upscaling framework, which renders complex scenes in less time per frame with high-performance upscaling and anti-aliasing, mesh shaders support. Also announced possibility to use C/C++ for Metal API. The first version of Metal supports

116-520: Is free and open-source software subject to the requirements of the zlib License since version 2.0, and with prior versions subject to the GNU Lesser General Public License . Under the zlib License, SDL 2.0 is freely available for static linking in closed-source projects, unlike SDL 1.2, although it's possible for the user to override the statically linked library with one provided by them. SDL 2.0, released in 2013,

145-727: 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 , 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. Given

174-489: Is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader API created by Apple , debuting in iOS 8 . Metal combines functions similar to OpenGL and OpenCL in one API. It is intended to improve performance by offering low-level access to the GPU hardware for apps on iOS , iPadOS , macOS , and tvOS . It can be compared to low-level APIs on other platforms such as Vulkan and DirectX 12 . Metal

203-418: Is also supported) context. A common misconception is that SDL is a game engine . However, the library is suited to building games directly, or is usable indirectly by engines built on top of it. The library is internally written in C and possibly, depending on the target platform, C++ or Objective-C , and provides the application programming interface in C, with bindings to other languages available. It

232-610: Is an object-oriented API that can be invoked using the Swift , Objective-C or C++17 programming languages . Full-blown GPU execution is controlled via the Metal Shading Language. According to Apple promotional materials: "MSL [Metal Shading Language] is a single, unified language that allows tighter integration between the graphics and compute programs. Since MSL is C++-based, you will find it familiar and easy to use." Metal aims to provide low-overhead access to

261-457: Is divided into several subsystems: Besides this basic, low-level support, there also are a few separate official libraries that provide some more functions. These comprise the "standard library", and are provided on the official website and included in the official documentation: Other, non-standard libraries also exist. For example: SDL_Collide on SourceForge created by Amir Taaki . The SDL 2.0 library has language bindings for: Because of

290-480: Is included in the Free Pascal Pascal compiler. Several BGI implementations for present-day operating systems are also available (see External links.) The following program, written for Borland Turbo C , initialises the graphics and draws 1000 random lines: Simple DirectMedia Layer Simple DirectMedia Layer ( SDL ) is a cross-platform software development library designed to provide

319-593: Is not a separate API from Metal and is supported by the same hardware. Metal 2 enables more efficient profiling and debugging in Xcode , accelerated machine learning , lower CPU workload, support for virtual reality on macOS, and specificities of the Apple A11 GPU, in particular. At the 2020 WWDC , Apple announced the migration of the Mac to Apple silicon . Macs using Apple silicon will feature Apple GPUs with

SECTION 10

#1732790866517

348-605: Is to provide a common framework for accessing these functions for multiple operating systems (cross-platform). SDL provides support for 2D pixel operations, sound, file access, event handling, timing and threading. It is often used to complement OpenGL by setting up the graphical output and providing mouse and keyboard input, since OpenGL comprises only rendering. A game using the Simple DirectMedia Layer will not automatically run on every operating system; further adaptations must be applied. These are reduced to

377-500: Is used to run games such as Quake . Over the years SDL was used for many commercial and non-commercial video game projects. For instance, MobyGames listed 120 games using SDL in 2013, and the SDL website itself listed around 700 games in 2012. Important commercial examples are Angry Birds , Unreal Tournament , and games developed using Valve 's Source Engine , which uses SDL extensively for cross-platform compatibility; ones from

406-527: The MIT License on GitHub . Main bugs are lack of aligning bytes support in VESA true-color modes (so the true-color driver is not suitable for Nvidia graphic cards) and video memory bank switching bug in mouse driver (since real mode addressing space is 1 megabyte, but some video modes require up to 4 megabytes of memory, it is split into 64 kilobyte banks). A BGI-compatible library, named Graph ,

435-514: The emulators , such as DOSBox , FUSE ZX Spectrum emulator and VisualBoyAdvance . There were several books written for development with SDL (see further reading). SDL is used in university courses teaching multimedia and computer science , for instance, in a workshop about game programming using libSDL at the University of Cadiz in 2010, or a Game Design discipline at UTFPR (Ponta Grossa campus) in 2015. Metal (API) Metal

464-593: The CPU, GPU, or both and provides facilities to update and synchronize allocated resources. Metal can also enforce a resource's state during a command encoder's lifetime. On macOS, Metal can provide application developers the discretion to specify which GPU to execute. Application developers can choose between the low-power integrated GPU of the CPU, the discrete GPU (on certain MacBooks and Macs) or an external GPU connected through Thunderbolt. Application developers also have

493-414: The GPU driver to know in advance how to configure and optimize the render pipeline before command execution. Metal improves the capabilities of GPGPU programming by using compute shaders . Metal uses a specific shading language based on C++14 , implemented using Clang and LLVM . Metal allows application developers to create Metal resources such as buffers, textures. Resources can be allocated on

522-541: The GPU. Commands are encoded beforehand and then submitted to the GPU for asynchronous execution. The application controls when to wait for the execution to complete thus allowing application developers to increase throughput by encoding other commands while commands are executed on the GPU or save power by explicitly waiting for GPU execution to complete. Additionally, command encoding is CPU independent thus applications can encode commands to each CPU thread independently. Lastly, render states are pre-computed beforehand, allowing

551-427: The company plans are currently on hold due to time constraints. Soon after putting Galaxy Gameworks on hold, Lantinga announced that SDL 1.3 (which would then later become SDL 2.0) would be licensed under the zlib License . Lantinga announced SDL 2.0 on 14 July 2012, at the same time announcing that he was joining Valve , the first version of which was announced the same day he joined the company. Lantinga announced

580-400: The library, first releasing it in early 1998, while working for Loki Software . He got the idea while porting a Windows application to Macintosh. He then used SDL to port Doom to BeOS (see Doom source ports ). Several other free libraries were developed to work alongside SDL, such as SMPEG and OpenAL . He also founded Galaxy Gameworks in 2008 to help commercially support SDL, although

609-401: The minimum, since SDL also contains a few abstraction APIs for frequent functions offered by an operating system. The syntax of SDL is function-based: all operations done in SDL are done by passing parameters to subroutines (functions). Special structures are also used to store the specific information SDL needs to handle. SDL functions are categorized under several different subsystems. SDL

SECTION 20

#1732790866517

638-570: The open-source domain are OpenTTD , The Battle for Wesnoth or Freeciv . The cross-platform game releases of the popular Humble Indie Bundles for Linux, Mac and Android are often SDL-based. SDL is also often used for later ports on new platforms with legacy code. For instance, the PC game Homeworld was ported to the Pandora handheld and Jagged Alliance 2 for Android via SDL. Also, several non video game programs use SDL; examples are

667-871: 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 BGI drivers version 5.5 that are compatible with some SVGA hardware like ATI or Cirrus Logic cards and VESA VBE -compatible cards. Also there are tweaked VGA drivers for non-standard graphic modes supported by VGA by writing directly into its registers, protected mode driver versions for Turbo Pascal 7.0 and mouse driver (actually cursor handler for unsupported video modes by standard mouse drivers). These drivers were shareware 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

696-429: The preference on how GPU commands are executed on which GPUs and provides suggestion on which GPU a certain command is most efficient to execute (commands to render a scene can be executed by the discrete GPU while post-processing and display can be handled by the integrated GPU). Metal Performance Shaders is a highly optimized library of graphics functions that can help application developers achieve great performance at

725-434: The same time decrease work on maintaining GPU family specific functions. It provides functions including: Metal has been available since June 2, 2014 on iOS devices powered by Apple A7 or later, and since June 8, 2015 on Macs (2012 models or later) running OS X El Capitan . On June 5, 2017, at WWDC , Apple announced the second version of Metal, to be supported by macOS High Sierra , iOS 11 and tvOS 11 . Metal 2

754-418: The stable release of SDL 2.0.0 on 13 August 2013. SDL 2.0 is a major update to the SDL 1.2 codebase with a different, not backwards-compatible API . It replaces several parts of the 1.2 API with more general support for multiple input and output options. Some feature additions include multiple window support, hardware-accelerated 2D graphics, and better Unicode support. Support for Mir and Wayland

783-409: The way SDL is designed, much of its source code is split into separate modules for each operating system, to make calls to the underlying system. When SDL is compiled, the appropriate modules are selected for the target system. The following back-ends are available: An unofficial Sixel back-end is available for SDL 1.2. The Rockbox MP3 player firmware also distributes a version of SDL 1.2, which

812-418: Was a major departure from previous versions, offering more opportunity for 3D hardware acceleration, but breaking backwards-compatibility, a wrapper library made to translate 1.2 calls to 2.0 was later made available. SDL is extensively used in the industry in both large and small projects. By 2010, over 700 games, 180 applications, and 120 demos had been posted on the library website. Sam Lantinga created

841-455: Was added in SDL 2.0.2 and enabled by default in SDL 2.0.4. Version 2.0.4 also provided better support for Android. In 2024, the stable preview of SDL 3.1.3 was released. It makes the API more consistent and allows access to more parts of the device, along with other features. SDL is a wrapper around the operating-system-specific functions that the game needs to access. The only purpose of SDL

#516483