Doesn't make any backwards-incompatible change -- plugins can still
export the transformation as matrix and users can still access the
combined one even if separate transformations are used. Yay!
This is quite big, so:
* There are new Magnum::PixelFormat and Magnum::CompressedPixelFormat
enums, which contain generic API-independent formats. In particular,
PixelFormat replaces GL::PixelFormat and GL::PixelType with a single
value.
* There's GL::pixelFormat(), GL::pixelType(),
GL::compressedPixelFormat() to convert the generic enums to
GL-specific. The mapping is only in one direction, done with a lookup
table (generic enums are indices to that table).
* GL classes taking the formats directly (such as GL::BufferImage) have
overloads that take both the GL-specific and generic format.
* The generic Image, CompressedImage, ImageView, CompressedImageView,
and Trade::ImageData classes now accept the generic formats
first-class. However, it's also possible to store an
implementation-specific value to cover cases where a generic format
enum doesn't have support for a particular format. This is done by
wrapping the value using pixelFormatWrap() or
compressedPixelFormatWrap(). Particular GPU APIs then assume it's
their implementation-specific value and extract the value back using
pixelFormatUnwrap() or compressedPixelFormatUnwrap(). There's also an
isPixelFormatImplementationSpecific() and
isCompressedPixelFormatImplementationSpecific() that distinguishes
these values.
* Many operations need pixel size and in order to have it even for
implementation-specific formats, a corresponding pixelSize()
overload is found via ADL on construction and the calculated size
stored along the format. Previously the pixel size was only
calculated on demand, but that's not possible now. In case such
overload is not available, it's possible to pass pixel size manually
as well.
* In order to support the GL format+type pair, Image, ImageView and
Trade::ImageData, there's now an additional untyped formatExtra()
field that holds the second value.
* The CompressedPixelStorage class is now unconditionally available on
all targets, including OpenGL ES and WebGL. However, on OpenGL ES the
GL APIs expect that it's all at default values.
I attempted to preserve backwards compatibility as much as possible:
* The PixelFormat and CompressedPixelFormat enum now contains generic
API-independent values. The GL-specific formats are present there,
but marked as deprecated. Use either the generic values or
GL::PixelFormat (togehter with GL::PixelType) and
GL::CompressedPixelFormat instead. There's a lot of ugliness caused
by this, but seems to work well.
* *Image::type() functions are deprecated as they were too
GL-specific. Use formatExtra() and cast it to GL::PixelType instead.
* Image constructors take templated format or format+extra arguments,
so passing GL-specific values to them should still work.
Forward declarations of templated types don't have named template
parameters and thus Doxygen (sometimes) used these for documentation. It
then looked like this:
Magnum::Math::RectangularMatrix<std::size_t, std::size_t, class>
which isn't helpful at all. After the change it looks like this (much
better):
Magnum::Math::RectangularMatrix<cols, rows, T>
Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
Better API for handling more than one application screens (context
switching, event propagation etc.). Taken from Push The Box, updated to
current coding style and templated.
Provides a way to convert font into different format (either with or
without contents of associated glyph cache) or import/export glyph cache
(i.e. to avoid recreating it from scratch every time).
Implementation is moved into `do*()` private virtual functions, public
interface is doing additional sanity checks around them. Opening files
is by default done in base implementation, which loads the files into
memory and then calls function for opening raw data.
Added interface for opening multi-file fonts from raw data, default
implementation just calls single-file implementation.
Function for creating glyph cache converts the text from UTF-8 to UTF-32
and then calls the implementation, removing the burden from
reimplementing this in each plugin.
Added unit test for file and single data opening, bumped plugin version
to 0.2.
Implementation is moved into private virtual `do*()` functions and
public interface does additional sanity checks around them. Exporting to
file is by default done in base implementation, which takes exported
data and then saves them to the file.
Added unit test for file export, bumped plugin interface version to 0.2.
Implementation is moved into private virtual `do*()` functions and the
public interface does additional checks aroung them to simplify plugin
development. Opening files is by default done by the base
implementation, which then calls function for opening raw data with file
contents.
Added test for file opening, bumped plugin interface version to 0.3.
Y# Please enter the commit message for your changes. Lines starting
In next few commits AbstractFont will become plugin interface. Font
implementations are now in magnum-plugins repository. Removed all traces
of FreeType and HarfBuzz dependencies.
Makes it easier to disable parts of the code than with this. And this
would also not be future-proof:
defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_GLES2)
The text will be rendered without all the nifty features like kerning
and it will most probably fail on everything non-latin, but HarfBuzz is
currently PITA on some systems.
HarfBuzz usage can be configured using USE_HARFBUZZ CMake option.
4.6 doesn't support `override` keyword, using preprocessor macro to
simply hide it. The compatibility mode must be explicitly enabled,
though, using GCC46_COMPATIBILITY CMake option.
Desktop OpenGL and OpenGL ES 2 support can be switched using CMake
TARGET_GLES option. All functionality not supported in ES is marked in
documentation.
If targetting OpenGL ES, GLES2/gl2.h is included instead of GLEW.
Mesh class now uses VAOs only in desktop OpenGL, in ES the buffers are
bound on each draw call.