Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Debug using printf

This topic is 6271 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

Is it possible to open a dos prompt window to see output from functions like printf using portalib, and if so how might you do that?

Share this post

Link to post
Share on other sites
You can just use AllocConsole() to create a new console window, then to be able to use printf() et al, call freopen( "CONOUT$", "wt", stdout );

War Worlds - A 3D Real-Time Strategy game in development.

Share this post

Link to post
Share on other sites
This is planned for the next Portalib version (along with everything else in the world I promise

Have a look on flipcode''s tip of the day - they had a recent one (or was it code of the day?)

I''d recommend using the Win32 Console commands if you are Win32 only, because you can do colours and other good stuff.
Cross-platform it is up to you - I''m going to try for a good one across all in its own window. I''ll have to learn a bit of X though for Linux

The on screen one is always good and easy. glColor4f( 1, 1, 1, 0.7f) and write away

Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!