{{Short description|Program library for computer graphics}} A '''graphics library''' or '''graphics API''' is a program library designed to aid in rendering computer graphics to a monitor. This typically involves providing optimized versions of functions that handle common rendering tasks. This can be done purely in software and running on the CPU, common in embedded systems, or being hardware accelerated by a GPU, more common in PCs. By employing these functions, a program can assemble an image to be output to a monitor. This relieves the programmer of the task of creating and optimizing these functions, and allows them to focus on building the graphics program. Graphics libraries are mainly used in video games and simulations.
The use of graphics libraries in connection with video production systems, such as Pixar RenderMan, is not covered here.
{| class="wikitable" |+Latest Graphics Library usage across Operating Systems: ! OS ! Vulkan ! Direct X ! GNMX ! Metal |- ! Windows 10 | Free, Nvidia and AMD | Free, MS | no | no |- ! Mac | Free, MoltenVK | no | no | Free, Apple |- ! Linux | Free | no | no | no |- ! Android | Free | no | no | no |- ! iOS | Free, MoltenVK | no | no | Free, Apple |- ! Tizen | in Development | no | no | no |- ! Sailfish | in Development | no | no | no |- ! Xbox One | no | Free | no | no |- ! Orbis OS (PS4) | no | no | Free | no |- ! Nintendo Switch | Free | no | no | no |- !HarmonyOS |Free |no |no |no |- !OpenHarmony |Free |no |no |no |} Some APIs use Graphics Library (GL) in their name, notably OpenGL and WebGL.
== Hardware == === Dedicated Graphics Processor (Graphics Card) === Dedicated graphics processors use RAM allocated directly to the graphics processor rather than the computer’s main system memory. This RAM is usually specifically selected with the expected sequential load of the graphics card in mind (see GDDR). Sometimes systems with dedicated discrete graphics processors were called “DIS” systems in contrast to “UMA” systems.<ref>{{Cite web|title=Nvidia Optimus|url=https://nouveau.freedesktop.org/Optimus.html|access-date=2025-08-22|work=freedesktop.org}}</ref> Technologies such as 3dfx's Scan-Line Interleave, Nvidia's SLI and NVLink, and AMD's CrossFire allow multiple graphics processors to simultaneously display images on one screen, increasing the computational power available for graphics processing. However, these technologies are becoming increasingly rare; most games do not utilize all the capabilities of multiple graphics processors since most users cannot afford them.<ref>{{Cite web|title=Crossfire and SLI market is just 300.000 units|url=https://www.fudzilla.com/news/graphics/38134-crossfire-and-sli-market-is-just-300-000-units|access-date=2025-08-22|work=fudzilla.com}}</ref><ref>{{Cite web|title=Nvidia SLI and AMD CrossFire is dead – but should we mourn multi-GPU gaming?|url=https://www.techradar.com/news/nvidia-sli-and-amd-crossfire-is-dead-but-should-we-mourn-multi-gpu-gaming|access-date=2025-08-22|work=techradar.com}}</ref>
=== Integrated Graphics Processor === Today, laptops and mini-PCs require powerful integrated graphics. In many cases, quality integrated graphics can replace a discrete graphics card, enhancing laptop portability and mini-PC compactness while maintaining performance.<ref>{{Cite web|title=Is Intel Iris Xe Graphics Good?|url=https://www.geekom.co.uk/is-intel-iris-xe-graphics-good|access-date=2025-08-22|work=geekom.co.uk}}</ref> Integrated graphics processors (IGPU), integrated graphics, shared graphics solutions, integrated graphics processors (IGP), or unified memory architectures (UMA) use part of the computer’s RAM rather than dedicated graphics memory. IGP may be integrated into the motherboard as part of its northbridge chipset <ref>{{Cite web|title=Evolution Of Intel Graphics: i740 To Iris Pro|url=https://www.tomshardware.com/picturestory/693-intel-graphics-evolution.html|access-date=2025-08-22|work=tomshardware.com}}</ref> or on a single chip (integrated circuit) with the central processor (e.g., AMD APU or Intel HD Graphics). On some motherboards, AMD’s IGP may use sideport dedicated memory: a separate fixed block of high-performance memory allocated for use by the graphics processor. As of early 2007, computers with integrated graphics accounted for about 90% of all PC shipments. They are less expensive to implement than dedicated graphics processing but generally less powerful. Historically, integrated processing was considered unsuitable for 3D games or graphics-intensive applications but could run less resource-demanding programs like Adobe Flash. Examples of such IGPs include offerings from SiS and VIA around 2004. However, modern integrated graphics processors such as AMD Accelerated Processing Unit and Intel Graphics Technology (HD, UHD, Iris, Iris Pro, Iris Plus, and Xe-LP) can handle 2D graphics or undemanding 3D graphics. In systems with a “unified memory architecture” (UMA), including modern AMD processors with integrated graphics, modern Intel processors with integrated graphics, Apple processors, PS5, and Xbox Series (among others), the CPU cores and GPU unit share the same pool of RAM and memory address space.<ref>{{Cite web|title=Intel's new graphics driver lets you dedicate up to 87% of laptop memory capacity to the iGPU for VRAM — Core Ultra CPUs get ""Shared GPU Memory Override"" feature|url=https://www.tomshardware.com/pc-components/gpu-drivers/intels-new-graphics-driver-lets-you-dedicate-up-to-87-percent-of-laptop-memory-capacity-to-the-igpu-for-vram-core-ultra-cpus-get-shared-gpu-memory-override-feature|access-date=2025-08-22|work=tomshardware.com}}</ref>
==Examples== * Allegro * ANGLE * Cairo (graphics)<ref>{{Cite web|title = cairographics.org|url = http://cairographics.org|website = cairographics.org|access-date = 2016-01-03}}</ref> * DFPSR https://dawoodoz.com/dfpsr.html — GUI toolkit and software renderer * DirectX<ref>{{Cite web|url = https://msdn.microsoft.com/en-us/library/windows/desktop/ee663274(v=vs.85).aspx|title = DirectX|website = DirectX Graphics and Gaming (Windows) - MSDN - Microsoft}}</ref> — a library created by Microsoft, to run under Windows operating systems and 'Direct' Xbox * Display PostScript * emWin<ref>{{Cite web|url = https://www.lpcware.com/content/project/emwin-graphics-library|title = emWin Graphics Library {{!}} www.LPCware.com|archive-url = https://web.archive.org/web/20160329073825/https://www.lpcware.com/content/project/emwin-graphics-library|archive-date = 2016-03-29|url-status = dead}}</ref> — an Embedded Graphics Library * FLTK<ref>{{Cite web|url = http://www.fltk.org|title = FLTK GUI and Graphics Library {{!}} www.fltk.org}}</ref> — GUI Toolkit and Graphics Library * GTK — a GUI toolkit * Mesa 3D<ref>{{Cite web|url = http://www.mesa3d.org|title = The Mesa 3D Graphics Library}}</ref> — a library that implements OpenGL and Vulkan * Mobile 3D Graphics API * Qt<ref>{{Cite web|url = http://www.qt.io|title = Qt - Home}}</ref> — cross-platform application framework * Quartz (graphics layer) * SFML<ref>{{Cite web|url = http://www.sfml-dev.org|title = SFML}}</ref> * [http://www.libsigil.com SIGIL]<ref>{{Cite web|url=http://www.libsigil.com|title=SIGIL: Sound, Input, and Graphics Integration Library|website=www.libsigil.com|access-date=2016-06-21}}</ref> — Sound, Input, and Graphics Integration Library * Simple DirectMedia Layer (SDL)<ref>{{Cite web|url = https://www.libsdl.org|title = Simple DirectMedia Layer - Homepage}}</ref> * Skia Graphics Library<ref>{{Cite web|url = https://skia.org|title = Skia Graphics Library}}</ref> * X Window System
==See also== * List of 3D graphics libraries * List of open source code libraries * Anti-Grain Geometry * Software development kit (SDK) * OpenGL ES * Graphical Widget toolkit graphical control elements drawn on bitmap displays
==References== {{reflist}}
{{Graphics Processing Unit}}
{{DEFAULTSORT:Graphics Library}} Category:Graphics libraries