# Efficient way to output/display debugging data in a window

I'm writing a program in Visual Studio, C++ with OpenGL and for the first time, I think it will be beneficial to see some live data on top of my display/render window.

To give some scope, I'm developing a 3D world with a ball bouncing and it would be nice to see things like the current velocity and y-positions of various objects, amongst other things.

What method is a nice/effective way to display this type of information to a window? Is there any libraries, vs settings or third-party implementations that can be useful? (please excuse my naivety, I'm used to just cout << some info, on a console).

• You're not using a specific engine, right? – Vaillancourt Mar 4 '14 at 18:55
• What's wrong with spawning a console window and outputting to that? – MichaelHouse Mar 4 '14 at 19:07
• @Byte56 I sometimes find it hard to follow data when there is a lot of things to output; it's sometimes hard to align data correctly in column, and when your data takes more than the usual 80 characters, well you get screwed a bit. Also, outputing to console may be more difficult when you have to output stuff coming from different places. – Vaillancourt Mar 4 '14 at 19:29
• Well, you don't have to scroll the window. Just have it show info for the selected object and replace the output instead of scrolling. Otherwise, more information on the technology you're using would be good (any libraries, etc.) – MichaelHouse Mar 4 '14 at 19:31
• You may wish to use code similar to this to put the text on a bitmap: stackoverflow.com/questions/2309767/c-windows-bitmap-draw-text stackoverflow.com/questions/17132923/… – wolfdawn Mar 4 '14 at 19:32