Qbasicnews.com

Full Version: Fonts and fontsize in OpenGL?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hej, Moi, terve, hello or whatever! 8)

How do I print text on the screen using the OpenGL mode? I've tried the PRINT method, doesn't seems to work (Color &HFF0000)

...And is it possible to change the font and size of the text? Show me some examples, and if there is some special effects that can apply to the text, like Glow, Bevel etc etc I would like to know how to do it...


Code:
Defint a - z

Screenres 800, 600, 32,,&h1 or &h2 'OpenGL fullscreen

Color &HFF0000
Locate 10, 10: print "I can't see this!!!"
Sleep
End
There are good tutorials available on the internet.

At NeHe for example (note that the examples in this tut are c++)

I recommend read all previous tutorials too... it's just much to explain =)
As explained in gfxlib.txt, after setting OpenGL mode you can't use the FB built-in functions to draw to the screen... You have to explicitely use OpenGL calls only.

Yes, on NeHe you can find a nice tutorial on how to draw text in OpenGL mode:
http://nehe.gamedev.net/data/lessons/les...?lesson=13

It's tricky but it works.