|
HDK
|
Vulkan text rendering class for viewport UI elements. More...
#include <RV_TextRender.h>
Public Member Functions | |
| RV_TextRender () | |
| ~RV_TextRender () | |
| RV_TextRender (const RV_TextRender &)=delete | |
| RV_TextRender & | operator= (const RV_TextRender &)=delete |
| void | beginText (RV_Render *r, const UT_DimRect &viewport) |
| void | addText (const char *text, RE_Font &font, fpreal32 x, fpreal32 y, const UT_Color &color, fpreal32 alpha=1.0f) |
| void | addText (const char *text, RE_Font &font, fpreal32 x, fpreal32 y, fpreal32 z, const UT_Color &color, fpreal32 alpha=1.0f) |
| void | endText () |
| void | render (RV_Render *r) |
| Render the text. More... | |
| void | render (RV_Render *r, const UT_DimRect &viewport) |
| void | render (RV_Render *r, const UT_Matrix4F &proj) |
| void | clear () |
| Clear the text entries. More... | |
| void | setEnableBlending (bool val) |
| void | setPreserveDepthState (bool val) |
| bool | hasText () const |
| Check if there is any text to render. More... | |
| int | numEntries () const |
| Get the number of text entries awaiting rendering. More... | |
Static Public Member Functions | |
| static void | renderText (RV_Render *r, RE_Font &font, const char *text, fpreal32 x, fpreal32 y, fpreal32 z, const UT_Color &color, fpreal32 alpha, const UT_DimRect &viewport) |
| static void | renderText (RV_Render *r, RE_Font &font, const char *text, fpreal32 x, fpreal32 y, const UT_Color &color, fpreal32 alpha, const UT_DimRect &viewport) |
| static void | renderTextWithShadow (RV_Render *r, RE_Font &font, const char *text, fpreal32 x, fpreal32 y, fpreal32 z, const UT_Color &text_color, const UT_Color &shadow_color, fpreal32 alpha_scale, const UT_DimRect &viewport) |
| Convienience function to render text with a soft shadow (1 px offset) More... | |
| static void | renderTextWithShadow (RV_Render *r, RE_Font &font, const char *text, fpreal32 x, fpreal32 y, const UT_Color &text_color, const UT_Color &shadow_color, fpreal32 alpha_scale, const UT_DimRect &viewport) |
| static void | cleanup () |
Vulkan text rendering class for viewport UI elements.
Definition at line 73 of file RV_TextRender.h.
| RV_TextRender::RV_TextRender | ( | ) |
| RV_TextRender::~RV_TextRender | ( | ) |
|
delete |
| void RV_TextRender::addText | ( | const char * | text, |
| RE_Font & | font, | ||
| fpreal32 | x, | ||
| fpreal32 | y, | ||
| const UT_Color & | color, | ||
| fpreal32 | alpha = 1.0f |
||
| ) |
Add a text string to be rendered with the given font, position, and color.
| void RV_TextRender::addText | ( | const char * | text, |
| RE_Font & | font, | ||
| fpreal32 | x, | ||
| fpreal32 | y, | ||
| fpreal32 | z, | ||
| const UT_Color & | color, | ||
| fpreal32 | alpha = 1.0f |
||
| ) |
Add a text string to be rendered with the given font, position, depth, and color.
| void RV_TextRender::beginText | ( | RV_Render * | r, |
| const UT_DimRect & | viewport | ||
| ) |
Initialize text rendering with the given viewport. Clears any existing text entries.
|
static |
| void RV_TextRender::clear | ( | ) |
Clear the text entries.
| void RV_TextRender::endText | ( | ) |
Build the geometry and texture data needed for rendering. Needs to be called after beginText() and before render().
|
inline |
Check if there is any text to render.
Definition at line 125 of file RV_TextRender.h.
|
inline |
Get the number of text entries awaiting rendering.
Definition at line 128 of file RV_TextRender.h.
|
delete |
| void RV_TextRender::render | ( | RV_Render * | r, |
| const UT_DimRect & | viewport | ||
| ) |
| void RV_TextRender::render | ( | RV_Render * | r, |
| const UT_Matrix4F & | proj | ||
| ) |
|
static |
Render text directly. This should be used for simple single-string rendering as it does not batch render calls.
|
inlinestatic |
Definition at line 144 of file RV_TextRender.h.
|
static |
Convienience function to render text with a soft shadow (1 px offset)
|
inlinestatic |
Definition at line 170 of file RV_TextRender.h.
|
inline |
Definition at line 121 of file RV_TextRender.h.
|
inline |
Definition at line 122 of file RV_TextRender.h.