3
\$\begingroup\$

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).

\$\endgroup\$
  • \$\begingroup\$ You're not using a specific engine, right? \$\endgroup\$ – Vaillancourt Mar 4 '14 at 18:55
  • 2
    \$\begingroup\$ What's wrong with spawning a console window and outputting to that? \$\endgroup\$ – MichaelHouse Mar 4 '14 at 19:07
  • 1
    \$\begingroup\$ @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. \$\endgroup\$ – Vaillancourt Mar 4 '14 at 19:29
  • 2
    \$\begingroup\$ 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.) \$\endgroup\$ – MichaelHouse Mar 4 '14 at 19:31
  • 1
    \$\begingroup\$ 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/… \$\endgroup\$ – wolfdawn Mar 4 '14 at 19:32
1
\$\begingroup\$

Personally i have created a secondary GUI Layer and have a single class (c#) that handles all draw calls to this layer

information is passed in text format along with the sending object and the class organises the data before drawing it to screen

here is an exmple of the output

http://i.imgur.com/YeUWujS.png

\$\endgroup\$
0
\$\begingroup\$

AntTweakBar is nice for simple things, but C.

\$\endgroup\$
  • 1
    \$\begingroup\$ Some details would be appropriate. What is it? What does it do? Why is it good for this? \$\endgroup\$ – Anko Mar 7 '14 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.