Free Graphics Libraries, 3D / 2D Engines, Animation
Image manipulation, drawing, game programming, graphics libraries
Free Graphics Libraries, 2D & 3D Engines, Image Drawing
If you need to manage graphics, images (such as JPEG, PNG, GIF images) or pictures of any kind, or handle animation in your programs, including writing games, drawing 3D or 2D pictures, you might like to consider the graphics libraries, 3D engines, 2D engines, image manipulation source code (etc) listed here. Some of these are actually production code, used in commercial products.
If you are looking for game programming libraries and source code, you should also check out our Free Game Programming Libraries and Source Code page. The decision to list a particular library or source code package on one or the other page is sometimes arbitrary, so you really should check both pages whether you want graphics libraries or games programming libraries. In addition, if you are looking for a graphical user interface for (GUI) for your program, try the Free GUI Libraries and Source Code page as well. Possibly also relevant are the Free 3D Content Creation Software and Free Image Editing and Drawing Tools pages, where you can find software to draw your game objects, backgrounds, textures and create animations, etc.
If you are looking for more information on game programming, you might want to check out the list of books on Game Programming on Amazon.com.
Free 3D Engines, 2D Engines, Graphics Libraries / Source Code, Image Drawing
Agar is a cross-platform software library for creating graphical programs. It includes several widgets and works with multiple backends like OpenGL and SDL. It can even work when the underlying system does not have a window system (eg, with low-level LCD controllers, dumb framebuffers, etc). The library is thread-safe, written in C (but can be accessed from other languages), can work with the widgets provided by the native operating system (so that your program looks like a native application on that system), takes advantage of hardware acceleration, has extensions for maths, vector graphics, scene graph and computational geometry, etc. It works on Windows, Mac OS X, MacOS Classic, Linux, FreeBSD, OpenBSD, NetBSD, IRIX and even some game consoles (eg, PlayStation 2, Nintendo GameCube/Wii). It is released under a BSD licence.
Gorgon is a 2D graphics library for the Microsoft .NET Framework and managed DirectX. Among its features are support for pixel shaders, stencil buffers, a variety of image file formats (JPG, PNG, BMP and so on), bitmap fonts, animation, raw input from input devices, and drawing to an assortment of surfaces (lines, circles, ellipses, points, etc). It requires Visual C# (or get the Express version from the Free C# Compilers and Interpreters page) and .NET 3.5 SP 1. The library is licensed under the MIT licence. (Note: to access Gorgon, use the links in the side column of the site.)
- G3D Engine
G3D is a 3D graphics engine that features real-time rendering, off-line rendering like ray tracing, general computation using GPUs, a variety of image formats (JPG, PNG, BMP, ICO, PPM, PCX, TGA, DDS), models (3DS, IFS, MD2, BSP, PLY2, OFF), video formats (MP4, MPG, AVI, MOV, DV, QT, WMV), developer HUD, runtime debugging tools, network/sockets support (TCP and UDP), font rendering, spline, KD-tree, Frustum and other 3D classes, a variety of tools (model viewer, GPU benchmark, build utilities), etc. Supported platforms include Vista, XP, OS X, Linux and FreeBSD. It is Visual C++, XCode and gcc compatible (see the Free C/C++ Compilers and Interpreters page for all of these tools). The engine is licensed under the BSD License.
- Cairo Graphics
Cairo is a 2D graphics library that supports multiple output devices like the X Window System, Win32, PostScript, PDF, SVG and image buffers. It takes advantage of display hardware acceleration when available. The API supports stroking and filling cubic Bezier splines, transforming and compositing translucent images and antialiased text rendering. Drawing operations can be transformed by affine transformations like scale, rotation, shear, etc. The graphics library is written in C, but bindings are available for other programming languages like C++, Common Lisp, Haskell, Java, Perl, PHP, Ruby, Objective-CAML, Mono and .NET languages, Squeak (Smalltalk), Rome, etc. The library is dual-licensed, you may use either the GNU Lesser General Public License (LGPL) 2.1 or the Mozilla Public License (MPL) 1.1.
- GStreamer - Open Source Multimedia Framework
GStreamer is a C library that allows "the construction of graphs of media-handling components, ranging from simple Ogg/Vorbis playback to complex audio (mixing) and video (non-linear editing) processing." It is currently used as a backend for many multimedia applications. This is a Linux library.
- AggPas High Fidelity 2D Graphics
AggPas is an Object Pascal native port of the Anti-Grain Geometry library (AGG) originally written in C++. It is a 2D vector graphics library with an anti-aliasing rendering engine that produces pixel images with subpixel accuracy. It is able to render arbitrary polygons, features gradients and gourand shading, fast filtered image affine transformations with interpolation filters (bilinear, bicubic, spline16, spline36, sinc, Blackman), dashed lines, alpha-masking, separate colour channels, boolean polygon operations, etc.
OGRE is a 3D graphics rendering engine that presents an object-oriented (OO) interface that allows you to render 3D scenes independently of the underlying 3D implementation, be it Direct3D or OpenGL. It provides material / shader support, meshes, animation, facilities for you to manage your scenes and special effects, etc. The engine is useful for writing games, architectural visualisations, simulations, etc. It supports Windows, Linux and Mac OS X and is licensed under the GNU Lesser Public License (LGPL).
- Open Scene Graph
Open Scene Graph (OSG) is a high level 3D graphics toolkit that you can use in development of games, visual simulation, virtual reality, scientific visualizations and modelling. It is an object oriented framework written in standard C++, uses OpenGL, and supports Windows, Mac OS X, Linux, FreeBSD, IRIX and Solaris. OSG is released under a "relaxed version" of the GNU LGPL, allowing its use in both open and closed source projects (see the site for details).
- g2 2D Graphics Library
This open source 2D graphics library is written in C and has a C, Fortran and Perl interface. It exposes functions that you can use to generate graphics for Postscript, X11, PNG, and Win32. The library has been tested on Linux, AIX, Digital Unix, SunOS, IRIX, VMS and Windows NT/2000.
- GD Library
This is a well-known library for the creation of PNG and JPEG images. It is written in ANSI C, but you can also call the library from Perl, Tcl, Pascal, Haskell, REXX and possibly other languages. It has facilities for you to draw lines and arcs, write text, colour the images, cut and paste images, do flood fills, etc.
- Expression 3D Toolkit
Expression is a C++/STL toolkit that supports interactive 3D graphics using OpenGL as well as non-interactive sphere tracing. It runs on Win32 and Linux, supports JPEG and 3DS filters, is MT-safe (thread-safe) (supports both POSIX and Win32 multithreading), handles 3D and homogenous coordinates, 3x3 and 4x4 matrices, quaternion, colour range maps, axis aligned bounding boxes, fogs, procedural textures, fullscreen and windowed modes, polygonal models (tri-mesh), primitive sky, particle systems, etc.
libAfterImage is an image manipulation library for X Windows that supports loading, storing blending, rendering and manipulation of images. Image formats like XCF, XPM, PPM/PNM, BMP, ICO, JPEG, PNG, GIF, TIFF (full range) can be imported into the library, which also allows you to use TrueType fonts. The library may be used without X Windows, and handles scaling, tinting, flipping, tiling, textuarized, semi-transparent 3D text rendering, etc.
This 2D graphics library supports numerous data structures (vector paths, Bezier paths, RGB and RGBA images, sorted vector paths, MicroTile arrays, Affine transformations) and algorithms (converting Bezier paths into vector paths, antialiased rendering of SVPs, alpha-compositing, etc).
- Interactive Visualisation Framework
Ivf++ is a C++ visualisation framework for 3D rendering that encapsulates OpenGL and GLUT functionality. Its extensible foundation classes can be used either standalone or in conjunction with other GUI libraries such as FLTK, MFC and GTK+. It comes with tutorials and a user's guide. It runs on Windows and X11 (Unix systems) and apparently has been tested on Windows NT/2000, Linux and IRIX.
This MSDOS graphics library is designed for the Free Pascal Compiler (which can be found, along with other free Pascal compilers) and Borland Pascal 7.0. It has various capabilities, including the support of various graphics modes from 320x200 to 1600x1200 (and above) using direct-RGB (15, 16, 24 and 32 bit), 8 bit graphics modes, mouse library, image handling library (BMP, GIF, ICO, JPG, PCX, PBM/PGM/PPM, PNG, TGA, etc), font library (FNT bitmapped fonts, CHR-BGI fonts, VGA-BIOS 16x8 font), graphics effects library (alphablending, masking operations, rotating, scaling), triangle-output library (for 3-D, etc), and video and animation library (AVI, FLI/FLC, GIF, Quicktime MOV).
This is a plotting library for displaying data as curves, bar graphs, pie charts, 3-D colour graphics, 3-D graphics, elementary images, 3D-colour plots, surfaces, contours and maps. Versions are available for C, Fortran 77 and Fortran 90 compilers on Linux, FreeBSD, OpenVMS, MS-DOS, Windows 95/98/NT, and other flavours of Unix. On some operating systems, Java, Perl, and Python are also supported. (Not all versions of the library are free, though.)
- Gx2 Graphical Library
GX2 is a graphical library for Borland Pascal 7 and the Free Pascal Compiler ("soon"). It uses an object oriented interface and supports the loading and saving of BMP, GIF, PNG, JPG and PCX files. It comes with 65 fonts (vector and bitmap) and supports True Type Fonts and the conversion of Borland CHR fonts. Most of the work in image handling (e.g. conversion, opening) is done by the library automatically. Other features supported include antialiasing of fonts, lines and circles, alphablending, alphamapping, transparency (add/sub), rotation, colour dithering, fading, colour printing to Epson and HP compatible printers, etc. The library uses 32 bit DPMI code, optimized to take advantage of the MMX.
A 3D graphics library with an API similar to OpenGL. It implements the OpenGL 1.2 API specification (as of version 3.0), and works on most Unix systems with X11. Drivers are available for Amiga, Windows, Macintosh, MSDOS, NeXT, BeOS, etc. 3D hardware supported include 3dfx Voodoo1, Voodoo2, Voodoo Rush, Voodoo Banshee, Voodoo3, nVidia, Amiga Warp3D, Matrox G200/G400, nVidia RIVA, ATI Rage Pro.
You can use this C library for rasterizing 2-D vector graphics primitives such as wide polygonal lines, circular and elliptical arcs and filled polygons. It does not interface with the screen directly, rather, it draws into a user-supplied matrix of pixels. Platforms supported include Linux, FreeBSD and Unix systems. However, the author notes that it should be possible to compile it and install it on any system with a C compiler.
ImageMagick is a well known package of libraries and tools for reading, writing and manipulating many image formats, including GIF, JPEG, PNG, PDF, Photo CD, etc. You can create the image, rotate it, resize it, add special effects, convert between formats, and so on. The library is in C, but there are C++, Perl, Java and Python interfaces as well. The object-oriented C++ interface provides integrated support for STL. Supported platforms include Linux, Windows NT/95, Macintosh, VMS, OS2 and "virtually any Unix".
LibWMF is a library that is able to parse Win16 WMF files and converts them to GIF or fig file formats, or X draw commands for use in an X Windows program. The library is released under the LGPL and should work on Linux.
Paintlib is a C++ class library that allows you to easily decode an image and manipulate it. It supports, with the help of publicly available libraries, the following formats: JPEG, TGA, TIFF, JPEG/JFIF, Windows BMP, Mac PICT, and TIFF previews in EPS files. It can be used on Win32, MSDOS, Linux, etc. There is apparently an ActiveX control as well.
- PNG Source Code, Library and Utilities
A Win32 class library that allows you to read JPEG files into a RGB buffer and saves the buffer as a RGB file or a grey scale JPEG file.
- Scitech MGL (no longer available)
(Update: this library appears to have disappeared. If you know where it has migrated to, let me know.) SciTech, makers of the well-known Display Doctor, has released its Scitech MGL library under an open source public license. This full-blown graphics library has loads of features to allow you to write 2D/3D graphics programs (such as games, etc). It has a 3D API that can scale from software-only to full 3D hardware geometry acceleration. You use the OpenGL API to write your program, for the Windows and/or MSDOS environment, thus allowing you to maintain one set of sources for programs on these platforms. The library comes with complete source code, and a host of useful supplemental libraries (also with source code). There are too many features to list here. Check out the website yourself. The website boasts that this library was used in the development of games like WinQuake and Hexen II.
Can't Find What You're Looking For?
Search the site using Google.
How to Link to This Page
It will appear on your page as: