[osg-users] PSSM: Latest Version : Please Test and Debug

Robert Osfield robert.osfield at gmail.com
Fri Sep 21 11:35:03 PDT 2007


On 9/21/07, Adrian Egli <3dhelp at gmail.com> wrote:
> Hi Robert,
>
> I will posting it to the OSG submission
> (osg-submissions at lists.openscenegraph.org ) as soon as i
> have rebuild it myself (SVN version of OSG).
>
> there is a little issue i have to / like to fix before sunday. I tested it
> on ATI and NVidea the polygonOffset is quite different
> for ATI :     Factor = - 0.02f, Unit = 1.0f
> for NVidea: Factor = 15.0f, Unit = 10.0f
> ends in really nice output.
>
> How should i implement it, ? GL_VENDOR ? ...

There is already some hacks in place in PolygonOffset, see
src/osg/PolygonOffset.cpp:

void PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
{
    s_MultiplerSet = true;
    // osg::notify(osg::NOTICE)<<"PolygonOffset::setFactorAndUnitMultipliersUsingBestGuessForDriver()"<<std::endl;

    const GLubyte* renderer = glGetString(GL_RENDERER);
    if (renderer)
    {
        if ((strstr((const char*)renderer,"Radeon")!=0) ||
            (strstr((const char*)renderer,"RADEON")!=0))
        {
            setFactorMultiplier(1.0f);
            setUnitsMultiplier(128.0f);
            osg::notify(osg::INFO)<<"PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
apply ATI workaround."<<std::endl;
        }
    }
}

So you above factor/units should be multiplier against these.

Robert.



More information about the osg-users mailing list