DrawText usage in OpenB3D?

Started by Amon, March 11, 2023, 10:23:26

Previous topic - Next topic

Amon

I want to draw text to the top left corner of my viewport. I'm trying the standard DrawText() but I get no output. I put DrawText in the main loop after UpdateWorld and before RenderWorld and Flip.

What am I doing wrong?

markcwm

You're rendering 3d over the text, put it after RenderWorld and before Flip. It should also be enclosed by BeginMax2D and EndMax2D.

Amon

Quote from: markcwm on March 11, 2023, 11:20:36You're rendering 3d over the text, put it after RenderWorld and before Flip. It should also be enclosed by BeginMax2D and EndMax2D.
That worked perfectly. Thanks!