printing text to the screen
Back when using directx i was able to write text to the screen using the TextOut function, but I couldnt get it to work with opengl... is it possible at all?
there has to be another way... i dont believe that for example the text in ut2k3, indicating player names, are bitmap fonts, or any example
Please post here if you do find out how to print text by specifying a font rather than a bitmap font.
Nehe tutorial #13, 14, 15 and 17. You can choose now.
PM Times change...
Excuse my poor english!
sorry PM, but i'd like to do it without texturemapping a quad... The tutorials are either about bitmap fonts, or the latest one, about using some-one elses library. Thats not what i'm looking for
The problem with TextOut is that Opengl doesnt let you draw on the dc. If I dont call the swapbuffers-function, the text shows up fine, but if I do call it, opengl draws over it, even if I call it after the swapbuffers
[edited by - Ruudje on November 22, 2003 7:57:59 AM]
The problem with TextOut is that Opengl doesnt let you draw on the dc. If I dont call the swapbuffers-function, the text shows up fine, but if I do call it, opengl draws over it, even if I call it after the swapbuffers
[edited by - Ruudje on November 22, 2003 7:57:59 AM]
it is simply not possible with TextOut. you can''t use GDI and opengl at the same time. thats why the wgl functions for fonts are there. if you re-read the tutorials, you would see that not all of them use bitmapped fonts, but some use the very same win32 font engine in the background to generate your text, as TextOut does.
If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia
davepermen.net
If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia
davepermen.net
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
what he said.
Another way is to read TTF or BGI fonts and render them as normal vectors and polygons manually. That''s kind of what the WGL functions do.
Another way is to read TTF or BGI fonts and render them as normal vectors and polygons manually. That''s kind of what the WGL functions do.
Beer - the love catalystgood ol' homepage
well I partiately got it to work, but I cant get it to be friends with the backbuffer. As a result the text I draw ''blinks''. Too bad

Use the texture mapped quads tutorial. It''s what all games use (UT2003, Quake, etc).
My Website | Everything you need to know about 3D Graphics | Google | Search the Forums
My Website | Everything you need to know about 3D Graphics | Google | Search the Forums
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement