[osg-users] Potential problem with PagedLOD and GeometryTechnique
Rafa Gaitan
rafa.gaitan at gmail.com
Fri Sep 28 12:47:25 PDT 2007
Thanks Robert and Dan, I will try that on monday!
ATI cards always gives us new surprises! ;)
Rafa
On 9/28/07, Gilbert, Daniel R. <DANIEL.R.GILBERT at saic.com> wrote:
> Hi Rafa,
>
> Ah. ATI cards. Gotta love 'em!
>
> Anyways, we encountered a very similar problem with VBOs and ATI cards -- well, at least with Radeon cards -- so we added an extra startup step to disable VBOs if the renderer string contains "Radeon". Not the most elegant solution, but it allowed us to run on various machines without crashing.
>
> Here's the code:
>
> void CardCapabilities::DisableExtensions()
> {
> // Disable extensions which have been shown to cause problems
> // for certain renderers
>
> const GLubyte* renderer = glGetString(GL_RENDERER);
> if (renderer)
> {
> // Convert renderer to lowercase for easier comparison
> std::string strRenderer = (const char*)renderer;
> std::transform(strRenderer.begin(), strRenderer.end(),
> strRenderer.begin(), tolower);
>
> // Turn off VBOs for ATI Radeon cards
> if (strRenderer.find("radeon") != std::string::npos)
> {
> printf("Disabling 'GL_ARB_vertex_buffer_object' extension for Radeon card\n");
> osg::setGLExtensionDisableString("GL_ARB_vertex_buffer_object");
> }
> }
> }
>
> BTW, this technique was inspired by some renderer-specific code I noticed in Texture::Extensions::setupGLExtensions().
>
> Hope this helps.
>
> -- Dan
>
> > -----Original Message-----
> > From: Robert Osfield [mailto:robert.osfield at gmail.com]
> > Sent: Friday, September 28, 2007 3:55 AM
> > To: OpenSceneGraph Users
> > Subject: Re: [osg-users] Potential problem with PagedLOD and
> > GeometryTechnique
> >
> > Hi Rafa,
> >
> > This crash very much sounds like a bug in the ATI driver.
> >
> > Robert.
> >
> > On 9/28/07, Rafa Gaitan <rafa.gaitan at gmail.com> wrote:
> > > Hi Robert,
> > >
> > > We have been using some classes of osgTerrain combined
> > > with PagedLOD. On Nvidia cards.. all works well but on
> > > ATI cards we have found a a crash!.
> > >
> > > We are using yesterday svn version. And María in a previous mail
> > > reported a similar problem, and we have tried to reproduce it
> > > using only C++.
> > >
> > > The problem is when the DatabasePager tries to compile the
> > > GeometryTechnique and passes through the traverse call.
> > > The call to init(), inside the traverse, the one outside the Update
> > > phase, is called. The problem remains in the geometry created inside
> > > GeometryTechnique because it use the hint
> > > setUseVertexBuffers(true), and I don't know really why, but
> > > it makes a crash. On Nvidia cards and MacOSX there is no problem,
> > > but on Windows and linux with ATI.. doesn't work at all. Changing
> > > the hint to setUseDisplayLists(true), and disabling the use of
> > > vertexBufferObjects works without problems.
> > >
> > > Rafa.
> > >
> > > --
> > > Rafael Gaitán Linares
> > > Instituto de Automática e Informática Industrial
> > http://www.ai2.upv.es
> > > Ciudad Politécnica de la Innovación
> > > Universidad Politécnica de Valencia
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users at lists.openscenegraph.org
> > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
> > negraph.org
> > >
> > >
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
More information about the osg-users
mailing list