class new in Git master
#include <Magnum/Ui/TextLayerGL.h>
TextLayerGL OpenGL implementation of the text layer.
The layer assumes RendererGL is set on the user interface (or UserInterfaceGL used, which does so automatically), see its documentation for more information about GL state expectations. The layer produces geometry in a counter-clockwise winding, so GL::
Base classes
- class TextLayer new in Git master
- Text layer.
Public types
- class Shared
- Shared state for the OpenGL implementation of the text layer.
Constructors, destructors, conversion operators
- TextLayerGL(LayerHandle handle, Shared& shared) explicit
- Constructor.
Public functions
Protected functions
-
void doDraw(const Containers::
StridedArrayView1D<const UnsignedInt>& dataIds, std:: size_t offset, std:: size_t count, const Containers:: StridedArrayView1D<const UnsignedInt>& clipRectIds, const Containers:: StridedArrayView1D<const UnsignedInt>& clipRectDataCounts, std:: size_t clipRectOffset, std:: size_t clipRectCount, const Containers:: StridedArrayView1D<const Vector2>& nodeOffsets, const Containers:: StridedArrayView1D<const Vector2>& nodeSizes, Containers:: BitArrayView nodesEnabled, const Containers:: StridedArrayView1D<const Vector2>& clipRectOffsets, const Containers:: StridedArrayView1D<const Vector2>& clipRectSizes) override - Draw a sub-range of visible layer data.
Function documentation
Magnum:: Ui:: TextLayerGL:: TextLayerGL(LayerHandle handle,
Shared& shared) explicit
Constructor.
Parameters | |
---|---|
handle | Layer handle returned from AbstractUserInterface:: |
shared | Shared state containing font and style data |
The shared
state is expected to be kept in scope for the whole class lifetime. In order to draw the layer it's expected that Shared::
Shared& Magnum:: Ui:: TextLayerGL:: shared()
Shared state used by this layer.
Reference to the instance passed to TextLayerGL::
void Magnum:: Ui:: TextLayerGL:: doDraw(const Containers:: StridedArrayView1D<const UnsignedInt>& dataIds,
std:: size_t offset,
std:: size_t count,
const Containers:: StridedArrayView1D<const UnsignedInt>& clipRectIds,
const Containers:: StridedArrayView1D<const UnsignedInt>& clipRectDataCounts,
std:: size_t clipRectOffset,
std:: size_t clipRectCount,
const Containers:: StridedArrayView1D<const Vector2>& nodeOffsets,
const Containers:: StridedArrayView1D<const Vector2>& nodeSizes,
Containers:: BitArrayView nodesEnabled,
const Containers:: StridedArrayView1D<const Vector2>& clipRectOffsets,
const Containers:: StridedArrayView1D<const Vector2>& clipRectSizes) override protected
Draw a sub-range of visible layer data.
It's possible for a subclass to override this function to perform extra GL state changes and then delegate to the parent implementation. As the implementation doesn't track current GL state in any way at the moment, the state should be reset back to the previous afterwards. Note that blending and scissor enabled state is already taken care of by LayerFeature::