OK, first to DerAnged and Rocket05. LOVE your work guys. Seriously. Oh no wait - I was getting confused. You''re f--kwits.
kingpinzs: In general falling back to GDI to overlay text on a DirectX game is a fairly bad idea; I''m an OpenGL guy myself but I understand that you''ll get a major performance hit if you do that - plus you won''t be able to take advantage of DirectX niceties like antialiased text. Not an expert as I said, please correct me if I''m wrong.
TheNerd: When you call System("cls"); as recommended by ToohrVyk you''re (under Win 2000 and XP) creating a whole new shell instance, allocating 640Kb to it, and then calling a system function that gets trapped by the emulation layer anyway (I *think*).
If you''re asking because you''re doing a console-mode game, I''d seriously recommend implementing a rendering layer using the console functions described here.
It''ll actually help you in the long run too, because you''re essentially getting a good taste of using an output API - which gives you a great context for understanding what level of abstraction you''re at when you get onto DirectX/OpenGL/whatever.
A really great implementation would be if you wrapped the console functions in a wrapper class of your own, which you then call with member functions such as renderer.OutputText (line, column, "Some text"). You could then expand the class to draw little windows for you and all sorts of stuff - AND you''d be getting really used to using an API to handle your output.
I use the console functions in my ASCII renderer class, which provides a similar implementation to that described above but doesn''t handle text output - although do feel free to extend it
www.coldcity.com
code, pics, life
Question about wrighting text to screen
quote:Original post by IainCHe did not mention making any DirectX game. I think he just started with Win32 API. That''s why I said GDI is easier, because it''s part of Win32 API.
kingpinzs: In general falling back to GDI to overlay text on a DirectX game is a fairly bad idea; I''m an OpenGL guy myself but I understand that you''ll get a major performance hit if you do that - plus you won''t be able to take advantage of DirectX niceties like antialiased text. Not an expert as I said, please correct me if I''m wrong.
quote:Original post by Rocket05It wasn''t funny. I had half a mind to NB you.
wow, you people can''t take a joke, can you?
@kingpinzs and TheNerdTk421:
IainC gave you excellent answers.
@kingpinzs:
If you''re building a plain Win32 application, use GDI - if you''re using C++. Win32 GUIs are much more easily built in other languages/technologies, though: Visual Basic, C# and .NET, Delphi, etc.
If you''re building a DirectX application, stay away from GDI.
quote:Original post by DerAngedWould you like to be banned?
DEV IS NOT A COMPILER ITS AN IDE!!!
and if you cant even make a console app go get a book or google a tutorial.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement