Jump to content
  • Advertisement
Sign in to follow this  
EricmBrown

Windows output

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am fairly new to windows/game programming. i have been messing around with some different techniques and tutorials, but there is one quesiont that i've never seen asked (probably b/c its a stupid question and everyone else knows the answer!, lol). How would i go about outputting variables/data such as frame rate or vectors onto the screen for debugging purposes. i'm not asking how to find the frame rate, i'm asking how to look at it while the application is in progress. I.e. is there a console i can run while running a windows app? or a simple opengl/windows command similar to cout/printf()? i'm sure there are plenty of answers to this, so try and keep it simple - i'm a bit new. :)

Share this post


Link to post
Share on other sites
Advertisement
There's no straightforward answer to that. Once you have a method to write text to the screen then you can output that information. For a normal windows application you can try using the DrawText() function. For OpenGL applications you generally need to wrangle a text display function on your own. NeHe has a tutorial for it, I believe. Another possibility is to use AllocConsole() to associate a console window with your application and then write to that, though it doesn't work well with full screen applications. Alternately, if you use an IDE with a debugger, you can try OutputDebugString().

Share this post


Link to post
Share on other sites
windows api has TextOut() which you can use overtop of openGL, which is pretty neat. I dont think you can specify font size, or maybe u have to do that in another function, i only started using it like last night.

Share this post


Link to post
Share on other sites
The application title is a really bad place to put debugging information; when you do that your application takes a major performance hit.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!