Magnum is 2D/3D graphics engine written in C++11/C++14 and modern OpenGL. Its
Magnum is a 2D/3D graphics engine written in C++11/C++14 and modern OpenGL. Its
goal is to simplify low-level graphics development and interaction with OpenGL
goal is to simplify low-level graphics development and interaction with OpenGL
using recent C++11/C++14 features and to abstract away platform-specific
using recent C++11/C++14 features and to abstract away platform-specific
issues.
issues.
@ -8,36 +8,35 @@ issues.
DESIGN GOALS
DESIGN GOALS
============
============
* **2D is not an ugly stepchild**
* **2D is not an ugly stepchild.** Many engines out there were created as
Many engines out there were created as pure 2D or 3D and the alternative is
pure 2D or 3D and the alternative is usually just an afterthought, if
usually just an afterthought, if it is present at all. If you want to do
present at all. If you want to do your next project in 2D only, you have to
your next project in 2D only, you have to either relearn another engine
either relearn another engine from scratch or emulate it in 3D, leaving
from scratch or emulate it in 3D, leaving many things overly complicated.
many things overly complicated. Magnum treats 2D equivalently to 3D so you
Magnum treats 2D equivalently to 3D so you can reuse what you already
can reuse what you already learned for 3D and even combine 2D and 3D in one
learned for 3D and even combine 2D and 3D in one project.
project.
* **Forward compatibility**
* **Forward compatibility.** If newer technology makes things faster, simpler
If newer technology makes things faster, simpler or more intuitive, it is
or more intuitive, it is the way to go. Magnum by default relies on decent
the way to go. Magnum by default relies on decent C++11 support and modern
C++11 support and modern OpenGL features and if some feature isn't
OpenGL features and if some feature isn't available, it tries to emulate it
available, it tries to emulate it using older functionality. However, you
using older functionality. However, you are not restricted to use the older
are not restricted to use the older functionality directly, if you really
functionality directly, if you really want to.
want to.
* **Intuitive, but not restrictive API**
* **Intuitive, but not restrictive API.** Scripting languages are often
Scripting languages are often preferred to C/C++ because they are designed
preferred to C/C++ because they are designed to have less complicated APIs
to have less complicated APIs and less boilerplate code. Magnum is
and less boilerplate code. Magnum is designed with intuitivity in mind, but
designed with intuitivity in mind, but also with speed and static checks
also with speed and static checks that strongly-typed native code offers.
that strongly-typed native code offers. It wraps OpenGL into less verbose
It wraps OpenGL into less verbose and more type-safe API, which is easier
and more type-safe API, which is easier to use. Usually the most common way
to use. Usually the most common way is the most simple, but if you need
is the most simple, but if you need full control, you can have it.
full control, you can have it.
* **Extensible and replaceable components**
* **Extensible and replaceable components.** If you want to use different
If you want to use different mathematical library for specific purposes,
mathematical library for specific purposes, that new windowing toolkit,
that new windowing toolkit, your own file formats or another physics
your own file formats or another physics library, you can. Conversion of
library, you can. Conversion of math structures between different libraries
math structures between different libraries can be done on top of pre-made
can be done on top of pre-made skeleton classes, support for file formats
skeleton classes, support for file formats is done using plugins and
is done using plugins and platform support is done by writing simple
platform support is done by writing simple wrapper class.
wrapper class.
SUPPORTED PLATFORMS
SUPPORTED PLATFORMS
===================
===================
@ -54,10 +53,10 @@ Platforms:
* **Linux** and embedded Linux (natively using GLX/EGL and Xlib or through
* **Linux** and embedded Linux (natively using GLX/EGL and Xlib or through
SDL2, GLFW or GLUT toolkit) [](https://travis-ci.org/mosra/magnum) [](https://coveralls.io/github/mosra/magnum?branch=master)
SDL2, GLFW or GLUT toolkit) [](https://travis-ci.org/mosra/magnum) [](https://coveralls.io/github/mosra/magnum?branch=master)
* **Windows**on both MSVC and MinGW, natively or using ANGLE (through SDL2, GLFW or GLUT toolkit) [](https://ci.appveyor.com/project/mosra/magnum/branch/master)
* **Windows**with both MSVC and MinGW, natively or using ANGLE (through SDL2, GLFW or GLUT toolkit) [](https://ci.appveyor.com/project/mosra/magnum/branch/master)
* **macOS** (through SDL2 or GLFW toolkit) [](https://travis-ci.org/mosra/magnum)
* **macOS** (through SDL2 or GLFW toolkit) [](https://travis-ci.org/mosra/magnum)
* **Web** (asm.js or WebAssembly), through [Emscripten](http://kripken.github.io/emscripten-site/) [](https://travis-ci.org/mosra/magnum)
* **Web** (asm.js or WebAssembly), through [Emscripten](http://kripken.github.io/emscripten-site/) [](https://travis-ci.org/mosra/magnum)
@ -79,10 +78,10 @@ FEATURES
INSTALLATION
INSTALLATION
============
============
You can either use packaging scripts, which are stored in `package/`
You can either use packaging scripts, which are stored in the `package/`
subdirectory, or compile and install everything manually. Note that
subdirectory, or compile and install everything manually using the guide below.
[Magnum documentation](http://doc.magnum.graphics/magnum/) contains more
Note that the [Magnum documentation](http://doc.magnum.graphics/magnum/)
comprehensive guide for building, packaging and crosscompiling.
contains more comprehensive guide for building, packaging and crosscompiling.
Minimal dependencies
Minimal dependencies
--------------------
--------------------
@ -94,7 +93,7 @@ Minimal dependencies
* **Corrade** - Plugin management and utility library. You can get it at
* **Corrade** - Plugin management and utility library. You can get it at
https://github.com/mosra/corrade.
https://github.com/mosra/corrade.
Note that full feature set is available only on GCC 4.8.1 and Clang 3.1.
Note that the full feature set is available only on GCC 4.8.1 and Clang 3.1.
Compilation, installation
Compilation, installation
-------------------------
-------------------------
@ -109,8 +108,9 @@ installed using these four commands:
make
make
make install
make install
See Doxygen documentation for more information about enabling or disabling
See the [Doxygen documentation](http://doc.magnum.graphics/magnum/building.html)
additional features and targeting different platforms such as OpenGL ES.
for more information about enabling or disabling additional features and
targeting different platforms such as OpenGL ES.
Building and running unit tests
Building and running unit tests
-------------------------------
-------------------------------
@ -126,10 +126,8 @@ in build directory. Everything should pass ;-)
Building documentation
Building documentation
----------------------
----------------------
The documentation is written in **Doxygen** (version 1.8 with Markdown support
The documentation is written in **Doxygen** and additionally uses **TeX** for
is used, but older versions should do good job too) and additionally uses
math formulas. The documentation can be build by running:
**Graphviz** for class diagrams and **TeX** for math formulas. The
documentation can be build by running:
doxygen
doxygen
@ -150,7 +148,7 @@ The engine itself is kept as small as possible with only little dependencies.
Additional functionality, often depending on external libraries, is provided in
Additional functionality, often depending on external libraries, is provided in
separate repositories.
separate repositories.
* **Corrade** -- main Magnum dependency, multiplatform utility library:
* **Corrade** -- main Magnum dependency, a multiplatform utility library:
@brief List of (un)supported OpenGL features and extensions.
@brief List of (un)supported OpenGL features and extensions.
@tableofcontents
@tableofcontents
@m_footernavigation
@section opengl-support-state OpenGL implementation state
@section opengl-support-state OpenGL implementation state
@ -47,6 +48,8 @@ following:
@todo @extension{EXT,texture_array} overlaps with @extension{ARB,framebuffer_object}
@todo @extension{EXT,texture_array} overlaps with @extension{ARB,framebuffer_object}
@todo Add @extension{ARB,depth_buffer_float} and implement the missing @fn_gl{DepthRange} function, but keep (and implement) @extension{NV,depth_buffer_float} for non-linear depth buffer
@todo Add @extension{ARB,depth_buffer_float} and implement the missing @fn_gl{DepthRange} function, but keep (and implement) @extension{NV,depth_buffer_float} for non-linear depth buffer