LDKRendererTextPass
typedef struct LDKRendererTextPass{
LDKRHIContext *rhi;
LDKRHIShaderModule vertex_shader_module;
LDKRHIShaderModule fragment_shader_module;
LDKRHIBindingsLayout bindings_layout;
LDKRHIPipeline ldr_pipeline;
LDKRHIPipeline hdr_pipeline;
LDKRHIPipeline ldr_no_depth_pipeline;
LDKRHIPipeline hdr_no_depth_pipeline;
LDKRHIBuffer vertex_buffer;
LDKRHIBuffer index_buffer;
LDKRHIBuffer camera_buffer;
LDKRHIBuffer object_buffer;
LDKRHISampler sampler;
LDKRendererBindingsCacheEntry *bindings_cache;
u32 bindings_cache_count;
u32 bindings_cache_capacity;
u32 vertex_capacity;
u32 index_capacity;
bool is_initialized;
}LDKRendererTextPass;
LDKRendererTextSubmit
typedef struct LDKRendererTextSubmit{
Mat4 world;
LDKRendererViewId view_id;
LDKRHITexture texture;
u32 index_offset;
u32 index_count;
u32 flags;
}LDKRendererTextSubmit;
LDKRendererTextSubmitFlag
typedef enum LDKRendererTextSubmitFlag{
LDK_RENDERER_TEXT_SUBMIT_FLAG_NONE=0,
LDK_RENDERER_TEXT_SUBMIT_FLAG_BILLBOARD=1<<0,
LDK_RENDERER_TEXT_SUBMIT_FLAG_NO_DEPTH_TEST=1<<1
}LDKRendererTextSubmitFlag;
LDKRendererTextVertex
typedef struct LDKRendererTextVertex{
float x;
float y;
float u;
float v;
u32 color;
}LDKRendererTextVertex;
ldk_renderer_submit_text
Submit UTF-8 text as unlit world-space geometry.
Glyph layout, kerning and atlas placement are shared with the UI text path.
Local text height is normalized by the font instance pixel height, so an
identity world transform produces approximately one world unit per font
height. The local origin is the top-left of the first line and local +Y is
up. BILLBOARD preserves translation, XY roll and scale while facing the
current camera. Text is alpha blended and does not write depth. Depth
testing is enabled by default and can be disabled per submission with
LDK_RENDERER_TEXT_SUBMIT_FLAG_NO_DEPTH_TEST. Views need not exist yet. The
transient queue is cleared after the frame is rendered.
LDK_API bool ldk_renderer_submit_text(
LDKRenderer *renderer,
LDKRendererViewId view_id,
LDKFontInstance *font,
char const *text,
Mat4 world,
u32 color,
u32 flags
);
Parameters
LDKRenderer *renderer
- Renderer receiving this request.
LDKRendererViewId view_id
- Renderer view receiving this operation.
LDKFontInstance *font
- Font or font instance used by the operation.
char const *text
- Text used by this operation.
Mat4 world
- Object-to-world transformation matrix.
u32 color
- Color value used by the operation.
u32 flags
- Bitmask of options controlling this operation.
Returns
True if the operation succeeds; false otherwise.