Public Member Functions | Protected Member Functions | List of all members
Renderable2DGlyph Class Reference

#include <renderableglyph.h>

Public Member Functions

 Renderable2DGlyph (nap::Core &core)
- Public Member Functions inherited from RenderableGlyph
 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 Texture2DgetTexture () const
Texture2DgetTexture ()
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
IGlyphRepresentationoperator= (const IGlyphRepresentation &)=delete
 IGlyphRepresentation (IGlyphRepresentation &&other)=delete
IGlyphRepresentationoperator= (IGlyphRepresentation &&other)=delete

Protected Member Functions

virtual bool onInit (const Glyph &glyph, utility::ErrorState &errorCode) override
- Protected Member Functions inherited from RenderableGlyph
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)

Additional Inherited Members

- Protected Attributes inherited from IGlyphRepresentation
 Handle to core instance. More...


Represents a symbol (character) in a font that can be rendered. The glyph is rendered to a 2DTexture and has no mipmaps. Use this glyph representation when the text does not scale.

Inheritance diagram for Renderable2DGlyph:
Collaboration diagram for Renderable2DGlyph:

Constructor & Destructor Documentation

◆ Renderable2DGlyph()

Member Function Documentation

◆ onInit()

virtual bool onInit ( const Glyph glyph,
utility::ErrorState errorCode 

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.

if the 2DTexture has been initialized correctly.

Implements IGlyphRepresentation.