On 9/21/07, Adrian Egli <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> I will posting it to the OSG submission
> ([EMAIL PROTECTED] ) 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.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org