Version

Goal:Draw 2D text
Difficulty:Beginner
Duration:5 minutes
Language:All

Python

import harfang as hg

hg.LoadPlugins()

plus = hg.GetPlus()
plus.RenderInit(400, 300)

while not plus.IsAppEnded():
    plus.Clear()
    plus.Text2D(120, 150, "Draw Text Example")
    plus.Flip()
    plus.EndFrame()

plus.RenderUninit()

Lua

hg = require("harfang")

hg.LoadPlugins()

plus = hg.GetPlus()
plus:RenderInit(400, 300)

while not plus:IsAppEnded() do
    plus:Clear()
    plus:Text2D(120, 150, "Draw Text Example")
    plus:Flip()
    plus:EndFrame()
end

plus:RenderUninit()