Nebula
Loading...
Searching...
No Matches
Vulkan::VkTextRenderer Class Reference

#include <vktextrenderer.h>

Inherits Base::TextRendererBase.

Classes

struct  TextElementVertex
 

Public Member Functions

 VkTextRenderer ()
 constructor
 
virtual ~VkTextRenderer ()
 destructor
 
void Open ()
 open the device
 
void Close ()
 close the device
 
void DrawTextElements (const CoreGraphics::CmdBufferId cmdBuf)
 draw the accumulated text
 
- Public Member Functions inherited from Base::TextRendererBase
 TextRendererBase ()
 constructor
 
virtual ~TextRendererBase ()
 destructor
 
void Open ()
 open the the text renderer
 
void Close ()
 close the text renderer
 
bool IsOpen () const
 check if text renderer open
 
void DrawTextElements ()
 draw the accumulated text
 
void DeleteTextElementsByThreadId (Threading::ThreadId threadId)
 delete added text by thread id
 
void AddTextElement (const CoreGraphics::TextElement &textElement)
 add text element for rendering
 
void AddTextElements (const Util::Array< CoreGraphics::TextElement > &textElement)
 add multiple text elements for rendering
 
- Public Member Functions inherited from Core::RefCounted
 RefCounted ()
 constructor
 
int GetRefCount () const
 get the current refcount
 
void AddRef ()
 increment refcount by one
 
void Release ()
 decrement refcount and destroy object if refcount is zero
 
bool IsInstanceOf (const Rtti &rtti) const
 return true if this object is instance of given class
 
bool IsInstanceOf (const Util::String &className) const
 return true if this object is instance of given class by string
 
bool IsInstanceOf (const Util::FourCC &classFourCC) const
 return true if this object is instance of given class by fourcc
 
bool IsA (const Rtti &rtti) const
 return true if this object is instance of given class, or a derived class
 
bool IsA (const Util::String &rttiName) const
 return true if this object is instance of given class, or a derived class, by string
 
bool IsA (const Util::FourCC &rttiFourCC) const
 return true if this object is instance of given class, or a derived class, by fourcc
 
const Util::StringGetClassName () const
 get the class name
 
Util::FourCC GetClassFourCC () const
 get the class FourCC code
 

Static Public Attributes

static const int MaxNumChars = 65535
 

Private Member Functions

 __DeclareClass (VkTextRenderer)
 
 __DeclareSingleton (VkTextRenderer)
 
void Draw (const CoreGraphics::CmdBufferId cmdBuf, TextElementVertex *buffer, SizeT numChars)
 draws text buffer
 
Math::vec2 TransformTextVertex (const Math::vec2 &pos, const Math::vec2 &offset, const Math::vec2 &scale)
 helper function which moves vertex into proper position
 

Private Attributes

stbtt_packedchar * cdata
 
stbtt_fontinfo font
 
CoreGraphics::ResourceTableId textTable
 
CoreGraphics::ShaderProgramId program
 
IndexT texVar
 
IndexT modelVar
 
CoreGraphics::TextureId glyphTexture
 
CoreGraphics::PrimitiveGroup group
 
CoreGraphics::BufferId vbo
 
CoreGraphics::VertexLayoutId layout
 
byte * vertexPtr
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::RefCounted
static void DumpRefCountingLeaks ()
 dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
 
- Protected Member Functions inherited from Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)
 
- Protected Attributes inherited from Base::TextRendererBase
Util::Array< CoreGraphics::TextElementtextElements
 
bool isOpen
 

Constructor & Destructor Documentation

◆ VkTextRenderer()

Vulkan::VkTextRenderer::VkTextRenderer ( )

constructor

◆ ~VkTextRenderer()

Vulkan::VkTextRenderer::~VkTextRenderer ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Vulkan::VkTextRenderer::__DeclareClass ( VkTextRenderer )
private

◆ __DeclareSingleton()

Vulkan::VkTextRenderer::__DeclareSingleton ( VkTextRenderer )
private

◆ Close()

void Vulkan::VkTextRenderer::Close ( )

close the device

◆ Draw()

void Vulkan::VkTextRenderer::Draw ( const CoreGraphics::CmdBufferId cmdBuf,
TextElementVertex * buffer,
SizeT numChars )
private

draws text buffer

◆ DrawTextElements()

void Vulkan::VkTextRenderer::DrawTextElements ( const CoreGraphics::CmdBufferId cmdBuf)

draw the accumulated text

◆ Open()

void Vulkan::VkTextRenderer::Open ( )

open the device

◆ TransformTextVertex()

Math::vec2 Vulkan::VkTextRenderer::TransformTextVertex ( const Math::vec2 & pos,
const Math::vec2 & offset,
const Math::vec2 & scale )
private

helper function which moves vertex into proper position

Member Data Documentation

◆ cdata

stbtt_packedchar* Vulkan::VkTextRenderer::cdata
private

◆ font

stbtt_fontinfo Vulkan::VkTextRenderer::font
private

◆ glyphTexture

CoreGraphics::TextureId Vulkan::VkTextRenderer::glyphTexture
private

◆ group

CoreGraphics::PrimitiveGroup Vulkan::VkTextRenderer::group
private

◆ layout

CoreGraphics::VertexLayoutId Vulkan::VkTextRenderer::layout
private

◆ MaxNumChars

const int Vulkan::VkTextRenderer::MaxNumChars = 65535
static

◆ modelVar

IndexT Vulkan::VkTextRenderer::modelVar
private

◆ program

CoreGraphics::ShaderProgramId Vulkan::VkTextRenderer::program
private

◆ textTable

CoreGraphics::ResourceTableId Vulkan::VkTextRenderer::textTable
private

◆ texVar

IndexT Vulkan::VkTextRenderer::texVar
private

◆ vbo

CoreGraphics::BufferId Vulkan::VkTextRenderer::vbo
private

◆ vertexPtr

byte* Vulkan::VkTextRenderer::vertexPtr
private

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