Open Dev Kit Documentation :: OpenGL :: Render Context :: Draw Text Ex
OpenGL.RenderContext.DrawTextEx( Text String, Area Rectangle, Color 1 Color HDR, Color 2 Color HDR, Font Font*, Line Spacing Float, Character Spacing Float, Shader Shader*, Extrusion Depth Float, Material Model Material )
Parameters
- Text String
- Area Rectangle
- Color 1 Color HDR
- The primary color of the text to be drawn
- Color 2 Color HDR
- An optional second color to fade to, if the render context supports it easily
- Font Font*
- An optional override font to use.
- Line Spacing Float
- The spacing factor between individual lines
- Character Spacing Float
- The spacing factor between individual characters; also known as kerning
- Shader Shader*
- Extrusion Depth Float
- When > 0, emit a 3D outline mesh per glyph (front + back + optional side walls) extruded along -Z by this many local units. Default 0 keeps a flat 2-tri-quad path. All paths render through ShaderLitColor with per-vertex normals so HologramParameters lighting/material applies uniformly.
- Material Model Material
- Material whose color uniforms (Ambient/Diffuse/Emissive/Specular/Power) drive the lighting equation. Default-constructed neutral material (white diffuse, zero specular) renders plain text correctly when no material is configured.
Return Value
- Nothing
Lua Usage
renderContext:DrawTextEx(text, area, color1, color2, font, lineSpacing, characterSpacing, shader, extrusionDepth, material)
If you think anything is missing, please feel free to: submit documentation feedback on this page
