Vladimír Vondruš
623fda0dc7
Shaders: removed superfluous `*Shader` suffix from class names.
13 years ago
Vladimír Vondruš
f2df328fe2
Using Corrade's visibility macros instead of copypasta all over again.
13 years ago
Vladimír Vondruš
61e1ec0082
No need to have `const` also in function declarations.
13 years ago
Vladimír Vondruš
c79327ee43
Option to build Magnum as static library.
...
And optionaly position-independent code. The tests now pass again, if
both Corrade and Magnum is static.
13 years ago
Vladimír Vondruš
92c4a5a2ed
Text: turned AbstractFont into plugin interface.
13 years ago
Vladimír Vondruš
cda51f3dd5
Text: moved FreeType and HarfBuzz fonts into plugins.
...
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.
13 years ago
Vladimír Vondruš
e222fc5eb8
Text: simplified font layouters, removed remaining public API.
...
Now the font classes are prepared to be plugins.
13 years ago
Vladimír Vondruš
57adfac002
Text: moved font size to abstract base.
13 years ago
Vladimír Vondruš
cc19e78983
Text: moved glyph caching into separate classes.
...
The API is similar for both basic and distance field caching.
13 years ago
Vladimír Vondruš
06971775cd
Text: properly compute glyph count in FreeTypeFont layouter.
...
It was the same as byte count, thus working only for pure ASCII, not
UTF-8.
13 years ago
Vladimír Vondruš
3c9c90ecf7
Text: assert that also freeing up FreeType resources doesn't fail.
13 years ago
Vladimír Vondruš
0f4e2f8a37
Text: made constructors explicit.
13 years ago
Vladimír Vondruš
a0b83edd2b
Relicensing to MIT/Expat license, part 4: CMake and documentation files.
...
They didn't contain license header before, but I think adding it also
there wouldn't do any harm. Documentation is also integral part of the
codebase.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
6a5d75d1e4
Relicensing to MIT/Expat license, part 2: headers.
13 years ago
Vladimír Vondruš
90dbb28763
Thorough CMakeLists cleanup.
...
* Calling enable_testing() only in root path.
* Using CORRADE_CXX_FLAGS instead of our own set to make things easier
to maintain.
* Various cleanup and reorganization.
13 years ago
Vladimír Vondruš
e9efd87e12
Text: off-by-one mistake.
...
Not exactly an error, because reserving one byte more doesn't harm
anything, but probably result of earlier copypaste from prerender().
13 years ago
Vladimír Vondruš
2afda6f34d
Text: split out HarfBuzz layouting into new HarfBuzzFont class.
...
It now allows to transparently select between FreeType and HarfBuzz
layouting. The new class is built only if USE_HARFBUZZ is enabled.
13 years ago
Vladimír Vondruš
9525dfd51b
Text: abstract base for fonts and layouters.
...
Font and text layouting is now abstracted out from its implementation.
Font class is renamed to FreeTypeFont and all the work can be done
through AbstractFont and AbstractLayouter interface.
13 years ago
Vladimír Vondruš
c864fefb95
Text: moved FontRenderer into Font header.
...
Now everything related to FreeType and HarfBuzz is in one header.
13 years ago
Vladimír Vondruš
b4950b59ac
Text: moved TextLayouter from TextRenderer internals to Font header.
...
Preparation for the whole thing to be testable, moving
implementation-dependent (FreeType/HarfBuzz) things together.
13 years ago
Vladimír Vondruš
2944a4e205
Text: non-templated base for TextRenderer.
...
Saves a lot of duplicated generated code.
13 years ago
Vladimír Vondruš
0d7baef932
Text: no need to explicitly specify Z coordinate in 3D text.
...
The coordinate is always 0 and Mesh can be configured to add it
implicitly. The code is now nearly the same for 2D and 3D, will redo it
without templates later.
13 years ago
Vladimír Vondruš
195ec4e9b2
Text: synchronized function parameter naming with documentation.
13 years ago
Vladimír Vondruš
91f0d302c2
Shaders: renamed TextShader to VectorShader.
...
The code can be used for drawing any vector art, not only font glyphs.
13 years ago
Vladimír Vondruš
7a99a4b326
Shortened (texture) filtering types to comply with OpenGL naming.
...
The documentation already used them, so why complicate things further.
13 years ago
Vladimír Vondruš
12f719f177
Text: prerendering Font for use with distance-field rendering.
...
Currently there is no builtin shader capable of it, will come later.
13 years ago
Vladimír Vondruš
babc850102
Text: minor code cleanup.
13 years ago
Vladimír Vondruš
f07957a37f
A little bit of const fascism.
13 years ago
Vladimír Vondruš
a7a4d3eeb8
Text: using new type aliases in whole Text namespace.
13 years ago
Vladimír Vondruš
faf94c74e2
Adapted to recent meshdata/shader changes.
13 years ago
Vladimír Vondruš
b38ec8152b
Text: ability to compile the library without HarfBuzz support.
...
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.
13 years ago
Vladimír Vondruš
1cf2087817
Text: code cleanup -- merged two loops into one.
13 years ago
Vladimír Vondruš
0e5b676e27
Text: don't use HarfBuzz ICU functions.
...
Apparently not needed at all.
13 years ago
Vladimír Vondruš
afea4f34db
Text: proper UTF-8 support in Font::prerender().
13 years ago
Vladimír Vondruš
9a1f1e1a16
Text: mutable TextRenderer implementation.
...
Allows fast text updates (using buffer mapping). Also fully documented
the workflow.
13 years ago
Vladimír Vondruš
a2e21020aa
Text: reworked TextRenderer internals.
...
* Common layouting code in separate non-templated class.
* Direct creation of interleaved vertex array and compressed index
buffer, saves some memory operations and removes MeshTools dependency.
* Preparation for mutable TextRenderer implementation.
13 years ago
Vladimír Vondruš
3eef49ae8b
Text: cleaned up TextRenderer header.
13 years ago
Vladimír Vondruš
794b94f4fe
Doc++
13 years ago
Vladimír Vondruš
6458b03a76
Text: ability to create Font from memory instead of file.
13 years ago
Vladimír Vondruš
c59404bece
Doc++
13 years ago
Vladimír Vondruš
a45454ca73
Using CORRADE_INTERNAL_ASSERT_OUTPUT() where appropriate.
13 years ago
Vladimír Vondruš
58aefb3fa0
Text: explicit Font constructor.
13 years ago
Vladimír Vondruš
cc2eac41bc
Text: removing duplicate glyphs in Font::prerender().
13 years ago
Vladimír Vondruš
16571a884b
Text: prerender font using dedicated function, not in constructor.
...
The number of possible combinations would explode for no reason when
opening font from different locations will be implemented.
13 years ago
Vladimír Vondruš
5819dd4bd7
Math: matrix/vector rework, part 3: conversion as explicit constructor.
...
Also updated all dependent classes to follow the change, such as Color
and Rectangle. Backwards compatibility for GCC 4.6 (with lack of support
for delegating constructors) will be done as non-constexpr constructor
using operator=().
13 years ago
Vladimír Vondruš
2267627242
Text: return rendered rectangle from TextRenderer::render().
13 years ago
Vladimír Vondruš
dc5a4d83d9
Removing IndexedMesh, part 5: merged documentation, removed IndexedMesh.
13 years ago
Vladimír Vondruš
08d9f65b06
Text: assert that {ARB,EXT}_texture_rg is supported.
...
EXT_texture_rg is not available on my OpenGL ES 2.0 implementation, will
find alternative later. At least it now compiles.
14 years ago
Vladimír Vondruš
fdded7281d
Renamed *Texture::set*Data() to set*Image().
...
Better consistency with OpenGL naming.
14 years ago