Displaying Text On Screen in GLFW
Monkey Targets Forums/Desktop/Displaying Text On Screen in GLFW
| ||
Hi All, I've only just started using Monkey Pro after some positive experiences with the trial one. This is probably a total noob question so my apologies in advance. I've hopefully set up Monday for the Desktop Target correctly with the following - C++ Express has been installed and config.winnt.txt has the following - MSBUILD_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Microsoft Visual C++ 2010 Express - ENU" OpenAL has been installed Running the standard "Hello World" program below works fine for HTML5 and appears to compile okay with no errors as a glfw, however nothing prints to the screen. Function Main() Print "Hello" End I had tried putting in a delay in case it was running too fast for me to see anything before closing the program. I also tried running the exe directly but the same thing happened. Any ideas welcome, as I said it's probably me. |
| ||
The Print commands only prints to the console and is meant for debugging purposes. Try DrawText("Hello",10,10). If you want other than the monkey internal font, take a look at the Anglefont example in Monkey/bananas/beaker or at Fontmachine: http://www.monkeycoder.co.nz/Community/posts.php?topic=1171&page=1 ' minimal app hello world Import mojo ' without mojo, no graphics output Class MyApp Extends App Method OnCreate() SetUpdateRate 30 End Method Method OnUpdate() End Method Method OnRender() Cls DrawText("hello world", 10, 10) End End Function Main() New MyApp End |
| ||
Thanks Volker, that works great. Hopefully the next question will be a bit more informed. |