Hi Andy, I had to do something similar recently, as I wanted to be able to fall back to a non-shader approach for some functionality if anything went wrong during the compile.
I'm not sure when you're attempting to access shader->getGlShaderInfoLog(), but I also was getting false and and empty string when I first tried. In my case it was because I was trying to access it before it was actually compiled. Forcing it to compile first worked for me: osg::Shader* shader = program->getShader(0); // I only have 1 shader attached shader->compileShader(contextID); // contextID bool logFound = shader->getGlShaderInfoLog(contextID, log); This did the trick for me at least. Hope this helps, -- Dan > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Andy Preece > Sent: Thursday, October 26, 2006 9:06 AM > 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/
