[osg-users] Potential problem with PagedLOD and GeometryTechnique
Gilbert, Daniel R.
DANIEL.R.GILBERT at saic.com
Fri Sep 28 11:07:48 PDT 2007
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:
// Disable extensions which have been shown to cause problems
// for certain renderers
const GLubyte* renderer = glGetString(GL_RENDERER);
// Convert renderer to lowercase for easier comparison
std::string strRenderer = (const char*)renderer;
// 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");
BTW, this technique was inspired by some renderer-specific code I noticed in Texture::Extensions::setupGLExtensions().
Hope this helps.
> -----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
> Hi Rafa,
> This crash very much sounds like a bug in the ATI driver.
> 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
> > Ciudad Politécnica de la Innovación
> > Universidad Politécnica de Valencia
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
More information about the osg-users