Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::FontTexture Class Reference

#include <FontTexture.hpp>

Inheritance diagram for castor3d::FontTexture:
Inheritance graph
[legend]
Collaboration diagram for castor3d::FontTexture:
Collaboration graph
[legend]

Public Member Functions

 CU_DeclareMap (char32_t, castor::Position, GlyphPosition)
 
C3D_API FontTexture (Engine &engine, castor::FontResPtr font)
 Constructor.
 
C3D_API void initialise (RenderDevice const &device, QueueData const &queueData)
 Initialises the texture.
 
C3D_API void cleanup (RenderDevice const &device)
 Flushes the teture.
 
C3D_API void upload (UploadData &uploader)
 Uploads the glyphs info buffer.
 
C3D_API castor::UInt32Array convert (castor::U32String const &text) const
 Converts text to glyph index array.
 
C3D_API castor::String const & getFontName () const
 Retrieves the font name.
 
C3D_API castor::Position const & getGlyphPosition (char32_t glyphChar) const
 Retrieves the wanted glyph position.
 
castor::FontRPtr getFont () const
 
FontGlyphBuffer const & getFontBuffer () const
 
TextureLayoutRPtr getTexture () const
 
SamplerObs getSampler () const
 
void setId (uint32_t v)
 
- Public Member Functions inherited from castor3d::DoubleBufferedResourceT< ResourceT, PointerT >
void update (bool clean)
 Updates the resource.
 
Resource const & getResource () const
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Additional Inherited Members

- Public Types inherited from castor3d::DoubleBufferedResourceT< ResourceT, PointerT >
using ResourcePtrT = PointerT< ResourceT >
 
using OnChangedFunction = castor::Function< void( DoubleBufferedResourceT const & ) >
 
using OnChanged = castor::SignalT< OnChangedFunction >
 
- Public Attributes inherited from castor3d::DoubleBufferedResourceT< ResourceT, PointerT >
OnChanged onResourceChanged
 
- Protected Member Functions inherited from castor3d::DoubleBufferedResourceT< ResourceT, PointerT >
 DoubleBufferedResourceT (Engine &parent, ResourcePtrT back, ResourcePtrT front)
 
virtual C3D_API ~DoubleBufferedResourceT () noexcept=default
 
void doInitialise (RenderDevice const &device, QueueData const &queueData)
 Initialises the texture.
 
void doCleanup ()
 Flushes the teture.
 
void doRefresh (bool clean, bool front)
 Orders events to refresh the resource.
 
ResourcedoGetResource ()
 
- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 
- Protected Attributes inherited from castor3d::DoubleBufferedResourceT< ResourceT, PointerT >
Resource m_back
 
Resource m_front
 

Constructor & Destructor Documentation

◆ FontTexture()

C3D_API castor3d::FontTexture::FontTexture ( Engine & engine,
castor::FontResPtr font )

Constructor.

Parameters
[in]engineThe engine.
[in]fontThe font.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::FontTexture::cleanup ( RenderDevice const & device)

Flushes the teture.

◆ convert()

C3D_API castor::UInt32Array castor3d::FontTexture::convert ( castor::U32String const & text) const

Converts text to glyph index array.

◆ CU_DeclareMap()

castor3d::FontTexture::CU_DeclareMap ( char32_t ,
castor::Position ,
GlyphPosition  )

◆ getFont()

castor::FontRPtr castor3d::FontTexture::getFont ( ) const
inline

name Getters.

◆ getFontBuffer()

FontGlyphBuffer const & castor3d::FontTexture::getFontBuffer ( ) const
inline

◆ getFontName()

C3D_API castor::String const & castor3d::FontTexture::getFontName ( ) const

Retrieves the font name.

Returns
The value.

◆ getGlyphPosition()

C3D_API castor::Position const & castor3d::FontTexture::getGlyphPosition ( char32_t glyphChar) const

Retrieves the wanted glyph position.

Parameters
[in]glyphCharThe glyph index.
Returns
The position.

◆ getSampler()

SamplerObs castor3d::FontTexture::getSampler ( ) const
inline

◆ getTexture()

TextureLayoutRPtr castor3d::FontTexture::getTexture ( ) const
inline

◆ initialise()

C3D_API void castor3d::FontTexture::initialise ( RenderDevice const & device,
QueueData const & queueData )

Initialises the texture.

Parameters
[in]deviceThe GPU device.
[in]queueDataThe queue receiving the GPU commands.

◆ setId()

void castor3d::FontTexture::setId ( uint32_t v)
inline

name Mutators.

◆ upload()

C3D_API void castor3d::FontTexture::upload ( UploadData & uploader)

Uploads the glyphs info buffer.


The documentation for this class was generated from the following file: