PDA

View Full Version : text-printing in OrthoMode



Whisky Bob
06-21-2003, 08:06 AM
Hello.
Im writting an OS-like GUI that uses
ortho-mode.
I have no problem with blending, textures
etc. but i cant figure out how to print
text on the screen using system-fonts.
NeHe´s 13th tutoriol shows you how to
print text using system-fonts,
but only in perspective-mode .
Does anyone know how to print text on
the screen in Ortho-mode?
I could write a text-drawning function
using textures and bitmaps, but that
would take alot of time and theres
probally a much easier way.

Any help is greatly appriciated!!

PS: Sorry for my english, Im a swed http://www.opengl.org/discussion_boards/ubb/biggrin.gif DS

yaro_dup1
06-21-2003, 09:13 AM
You only have to draw the text last and before drawing text in ortho mode disable depth testing.

Whisky Bob
06-21-2003, 09:53 PM
Okey ill try that.
Thanks.

Orzech
06-23-2003, 02:08 AM
Well, you shouldn't have any problems with drawing a text if you know how to do it in perspective-mode. There isn't any difference while drawing in ortographic mode. Like glYaro suggest your text is probably hidden behind some other objects. Try using glOrtho2D - using this projection when drawing guarantee that your primitives will lie on the same plane.

Hope it helped

Orzech

Whisky Bob
06-24-2003, 10:17 AM
Okey now it works.
I dont know what i did wrong in my previous
code, but it works now so it doesnt
really matter http://www.opengl.org/discussion_boards/ubb/smile.gif .

Thank you for help!

[This message has been edited by Whisky Bob (edited 06-24-2003).]