Andy,

I suggest you create a couple of simple objects in your main() function to
redirect stdout and stderr, using freopen().

something along the lines of:

class myFile
{
        FILE*   m_pFile;

public:
        myFile( FILE* pFile, const char* pFileName )
        {
                m_pFile = freopen( pFile, pFileName );
        }
        ~myFile()
        {
                fclose( m_pFile );
        }
};

main()
{
        blah();

        myFile  a(stdout, "C:/stdout.txt");
        myFile  b( stderr, "C:/stderr.txt");

        blah_etc();
}

This way at least you can capture stderr and stout.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Andy Preece
Sent: 26 October 2006 17:06
To: osg users
Subject: RE: [osg-users] Shader debug


Hi,

That's fine for applications that have a console. I am writing a Windows
based application that has no console so stdout output is lost.

However, I would like to catch a situation where a shader fails to
compile and display a pop up screen with the shader info.

Is there a way I can achieve this?

Andy.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Charles Cosse
Sent: 26 October 2006 15:19
To: osg users
Subject: Re: [osg-users] Shader debug

Hi,

on linux you can export OSG_NOTIFY_LEVEL=DEBUG and recompile ... then
shader info is printed to the terminal when you run.  Maybe that helps..

-charlie

Andy Preece wrote:

> Hi All,
>
>
>
> Can anyone show me how to get the shader info log from an osg::shader
> class?
>
> I have tried using the osg::Shader::getGlShaderInfoLog() method but it

> always return false and the string returned is always NULL.
>
>
>
> Regards,
>
> Andy
>
>
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.The service is
> powered by MessageLabs.
>
________________________________________________________________________
>
>-----------------------------------------------------------------------
-
>
>_______________________________________________
>osg-users mailing list
>[email protected]
>http://openscenegraph.net/mailman/listinfo/osg-users
>http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

________________________________________________________________________
This e-mail has been scanned for all viruses by Star.The service is powered
by MessageLabs.
________________________________________________________________________
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to