#include <renderableglyph.h>
Public Member Functions | |
| RenderableGlyph (nap::Core &core) | |
| virtual | ~RenderableGlyph () override |
| const glm::ivec2 & | getSize () const |
| const glm::ivec2 & | getBearing () const |
| int | getWidth () const |
| int | getHeight () const |
| int | getOffsetLeft () const |
| int | getOffsetTop () const |
| const Texture2D & | getTexture () const |
| Texture2D & | getTexture () |
| int | getHorizontalAdvance () const |
| int | getVerticalAdvance () const |
| bool | empty () const |
Public Member Functions inherited from IGlyphRepresentation | |
| virtual | ~IGlyphRepresentation () |
| IGlyphRepresentation (nap::Core &core) | |
| IGlyphRepresentation (const IGlyphRepresentation &other)=delete | |
| IGlyphRepresentation & | operator= (const IGlyphRepresentation &)=delete |
| IGlyphRepresentation (IGlyphRepresentation &&other)=delete | |
| IGlyphRepresentation & | operator= (IGlyphRepresentation &&other)=delete |
Protected Member Functions | |
| virtual bool | setup (const Glyph &glyph, bool generateMipmaps, utility::ErrorState &errorCode) |
Protected Member Functions inherited from IGlyphRepresentation | |
| bool | init (const Glyph &glyph, utility::ErrorState &error) |
| virtual bool | onInit (const Glyph &glyph, utility::ErrorState &error)=0 |
Additional Inherited Members | |
Protected Attributes inherited from IGlyphRepresentation | |
| nap::Core * | mCore |
| Handle to core instance. More... | |
Represents a symbol (character) in a font that can be rendered. The glyph is rendered to a 2D texture that can be tied to a material. The glyph is converted to a bitmap on initialization and uploaded to the GPU. The bitmap is deleted after storage on the GPU.
| RenderableGlyph | ( | nap::Core & | core | ) |
|
overridevirtual |
| bool empty | ( | ) | const |
If this render-able glyph has a texture.
| const glm::ivec2& getBearing | ( | ) | const |
| int getHeight | ( | ) | const |
| int getHorizontalAdvance | ( | ) | const |
| int getOffsetLeft | ( | ) | const |
| int getOffsetTop | ( | ) | const |
| const glm::ivec2& getSize | ( | ) | const |
| int getVerticalAdvance | ( | ) | const |
| int getWidth | ( | ) | const |
|
protectedvirtual |
Initializes the 2DTexture after construction of this glyph. First it converts the free-type glyph into a bitmap. This bitmap is uploaded to the GPU.