console messages

9 views
Skip to first unread message

elan

unread,
Apr 1, 2011, 8:25:49 AM4/1/11
to va-users
Hi,

I just got started with the va touchkit.
Its my purpose to integrate the multitouch features with my own TV-
broadcast graphics engine and other broadcast-graphics machines.

I dont have the touchkit hardware yet, so im no experimenting with the
demo-image software

I now started working on the "exampletouchkitsimple" example.
It compiles and runs fine on MSVC 2008, i just noticed an annoying
thing:

There are constantly "cout" messages appearing on the console window
"Scaling image from (320,240) to (256,256)

This causes my own debug messages to scroll off-screen before i can
even read them.
I searched for this message in the source code, but cannot find it, so
I suspect it must be somewhere in the precompiled libraries. Would be
nice if this message could be removed.

Greetz,
Chris

stefanix

unread,
Apr 1, 2011, 9:06:10 AM4/1/11
to va-users

Hi Chris,

If I remember correctly the underlying library throwing this warning
is OSG. It implicitly converts the video feed to a power-of-2 texture
(and lets you know about it).

OSG uses a pretty nice logging system with 5 levels. Basically you can
tell it to only report stuff severer than a certain level. To only
report on fatal things you use:

osg::setNotifyLevel(osg::FATAL);

This should get rid of all the warning messages.

If you are curious or want to use the 5 levels for your own code ...
the 5 levels are:

osg::ALWAYS
osg::FATAL
osg::WARN
osg::NOTICE
osg::INFO

To throw a message on a certain level you do something like:

osg::notify(osg::WARN) << "some warning here" << std::endl;

You also may need to include
#include <osg/Notify>

depending from where you use this logging stuff.

Hope this helps,

/stefan

elan

unread,
Apr 1, 2011, 9:28:27 AM4/1/11
to va-users
Hi stefan,

Thanks for the quick response.

Just adding the osg::setNotifyLevel line fixed the message problem.
Now delving deeper into the va/touchkit code so you'll probably hear
from me again soon.
Reply all
Reply to author
Forward
0 new messages