Dirk Reiners <[email protected]> schrieb am 03.06.2009 15:36:53:

Hello Dirk, 

> The two things that I could imagine giving a drop is display list 
> creation and 
> texture mipmap generation. Can you try to change the texture filtersto 
linear 
> and turn off display list generation, and see if that fixes the problem?

I tried both and the sync spikes are smaller with display list generation 
turned off, they are not completely gone, but barely notable. Texture 
filters set to linear seems to have no effect. The modified code is 
appended below.

Thanks
Marc


void create(void *args)
{
        osg::FieldContainerPtr pProto = 
osg::Geometry::getClassType().getPrototype();
        osg::GeometryPtr pGeoProto = osg::GeometryPtr::dcast(pProto);

        if(pGeoProto != NullFC)
        {
                pGeoProto->setIgnoreGLForAspect(osg::Thread::getAspect());
                pGeoProto->setDlistCache(false);
        }

        pProto = osg::TextureChunk::getClassType().getPrototype();
        osg::TextureChunkPtr pTexChunkProto = 
osg::TextureChunkPtr::dcast(pProto);

        if(pTexChunkProto != NullFC)
        {
 pTexChunkProto->setIgnoreGLForAspect(osg::Thread::getAspect());
                pTexChunkProto->setMinFilter(GL_LINEAR);
                pTexChunkProto->setMagFilter(GL_LINEAR); 
        }

        // ....
}

int main(int argc, char *argv[])
{
#if OSG_MINOR_VERSION > 2
        ChangeList::setReadWriteDefault();
#endif
        osgInit(argc, argv);

        osg::FieldContainerPtr pProto = 
osg::Geometry::getClassType().getPrototype();
        osg::GeometryPtr pGeoProto = osg::GeometryPtr::dcast(pProto);
        if(pGeoProto != NullFC)
        {
                pGeoProto->setDlistCache(false);
        }

        pProto = osg::TextureChunk::getClassType().getPrototype();
        osg::TextureChunkPtr pTexChunkProto = 
osg::TextureChunkPtr::dcast(pProto);

        if(pTexChunkProto != NullFC)
        {
                pTexChunkProto->setMinFilter(GL_LINEAR);
                pTexChunkProto->setMagFilter(GL_LINEAR); 
        }

        // ....
}
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to