IPB Style© Fisana

Jump to content


Debug code in 0 A.D - printf ?


  • Please log in to reply
2 replies to this topic

#1 mpatton

mpatton

  • Community Members

  • Tiro
    (6 posts)

Posted 23 April 2012 - 08:57 AM

Hi all,

More of a general question about debuging code in 0 a.d. I've got some simple printf statements that I would like to appear in the console to see if my calculations are correct, however nothing appears to be printing. I'm assuming your re-routing STD out or something somewhere. In any case how can I get my stuff to print out? Position of the print statements in the code is within TerrainRenderer.cpp just before the shaders are used.

thanks in advance
Michael

#2 fcxSanya

fcxSanya

  • WFG Programming Team

  • Centurio
    (646 posts)

Posted 23 April 2012 - 10:15 AM

I think you can use debug_printf
Alexander Olkhovskiy [ aka fcxSanya ]
Wildfire Games Programmer
E-mail: fcxsanya at wildfiregames dot com

#3 Ykkrosh

Ykkrosh

  • WFG Programming Team

  • Primus Pilus
    (4,869 posts)

Posted 23 April 2012 - 01:47 PM

I'm fairly sure printf should work when on Linux. debug_printf(L"message", ...) should work too (and also works on Windows, via Visual Studio's debug output window). There's also LOGWARNING(L"message", ...) which displays the messages in the game window.
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users