class new in Git master
#include <Magnum/Text/RendererGL.h>
RendererGL OpenGL text renderer.
Specialization of a Renderer that uploads index and vertex data to a GL::
Base classes
- class Renderer new in Git master
- Text renderer.
Constructors, destructors, conversion operators
- RendererGL(const AbstractGlyphCache& glyphCache, RendererGLFlags flags = {}) explicit
- Construct.
- RendererGL(NoCreateT) explicit noexcept
- Construct without creating the internal state and the OpenGL objects.
- RendererGL(RendererGL&) deleted
- Copying is not allowed.
- RendererGL(RendererGL&&) noexcept
- Move constructor.
Public functions
- auto operator=(RendererGL&) -> RendererGL& deleted
- Copying is not allowed.
- auto operator=(RendererGL&&) -> RendererGL& noexcept
- Move assignment.
- auto flags() const -> RendererGLFlags
- Flags.
-
auto mesh() -> GL::
Mesh& - Mesh containing the rendered index and vertex data.
-
auto mesh() const -> const GL::
Mesh& - auto setIndexType(MeshIndexType atLeast) -> RendererGL&
- Set index type.
- auto reserve(UnsignedInt glyphCapacity, UnsignedInt runCapacity) -> RendererGL&
- Reserve capacity for given glyph count.
- auto clear() -> RendererGL&
- Clear rendered glyphs, runs and vertices.
- auto reset() -> RendererGL&
- Reset internal renderer state.
-
auto render() -> Containers::
Pair<Range2D, Range1Dui> - Wrap up rendering of all text added so far.
Function documentation
Magnum:: Text:: RendererGL:: RendererGL(const AbstractGlyphCache& glyphCache,
RendererGLFlags flags = {}) explicit
Construct.
Parameters | |
---|---|
glyphCache | Glyph cache to use |
flags | Opt-in feature flags |
Unlike with the Renderer base, the OpenGL implementation needs to have a complete control over memory layout and allocation and thus it isn't possible to supply custom allocators. If you want the control, use Renderer with custom index and vertex allocators and fill a GL::
Magnum:: Text:: RendererGL:: RendererGL(NoCreateT) explicit noexcept
Construct without creating the internal state and the OpenGL objects.
The constructed instance is equivalent to moved-from state, i.e. no APIs can be safely called on the object. Useful in cases where you will overwrite the instance later anyway. Move another object over it to make it useful.
This function can be safely used for constructing (and later destructing) objects even without any OpenGL context being active. However note that this is a low-level and a potentially dangerous API, see the documentation of NoCreate for alternatives.
Magnum:: Text:: RendererGL:: RendererGL(RendererGL&&) noexcept
Move constructor.
Performs a destructive move, i.e. the original object isn't usable afterwards anymore.
RendererGL& Magnum:: Text:: RendererGL:: setIndexType(MeshIndexType atLeast)
Set index type.
Returns | Reference to self (for method chaining) |
---|
Calls Renderer::
RendererGL& Magnum:: Text:: RendererGL:: reserve(UnsignedInt glyphCapacity,
UnsignedInt runCapacity)
Reserve capacity for given glyph count.
Returns | Reference to self (for method chaining) |
---|
Calls Renderer::
RendererGL& Magnum:: Text:: RendererGL:: clear()
Clear rendered glyphs, runs and vertices.
Returns | Reference to self (for method chaining) |
---|
Calls Renderer::0
.
RendererGL& Magnum:: Text:: RendererGL:: reset()
Reset internal renderer state.
Returns | Reference to self (for method chaining) |
---|
Calls Renderer::0
.
Containers:: Pair<Range2D, Range1Dui> Magnum:: Text:: RendererGL:: render()
Wrap up rendering of all text added so far.
Calls Renderer::