[vtkusers] vtkOpenGLVolumeTextureMapper3D error

Isaac Abbott isaac.abbott at gmail.com
Fri May 14 16:45:02 EDT 2010


Dear developer,

I have been using vtkOpenGLVolumeTextureMapper3D in many programs for some
time, but when I updated my VTK version to today's git clone my renderer
began to crash.

I debugged the error all the way to
vtkOpenGLVolumeTextureMapper3D::Initialize() with this code at the beginning
of the method:

******************************************************************************************
{
this->Initialized = 1;
vtkOpenGLExtensionManager * extensions = vtkOpenGLExtensionManager::New();
extensions->SetRenderWindow(NULL); // set render window to the current one.

int supports_texture3D=extensions->ExtensionSupported( "GL_VERSION_1_2" );
...
}
******************************************************************************************

but found this block within vtkOpenGLExtensionManager::ExtensionSupported:

******************************************************************************************
int vtkOpenGLExtensionManager::ExtensionSupported(const char *name)
{
...
...
// Woraround for a nVidia bug in indirect/remote rendering mode (ssh -X)
 // The version returns is not the one actually supported.
 // For example, the version returns is greater or equal to 2.1
 // but where PBO (which are core in 2.1) are not actually supported.
 // In this case, force the version to be 1.1 (minimal). Anything above
 // will be requested only through extensions.
 // See ParaView bug
 if(result && !this->RenderWindow->IsDirect())
   {
   if (result && strncmp(name, "GL_VERSION_",11) == 0)
     {
     // whatever is the OpenGL version, return false.
     // (nobody asks for GL_VERSION_1_1)
     result=0;
     }
   }

....
....
}
******************************************************************************************

It crashes because we try to use a method on a NULL pointer
(this->RenderWindow) in the first IF statement.
I temporarily fixed the crashing problem by adding && this->RenderWindow to
the IF statement.

Isaac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100514/4f1a5a59/attachment.htm>


More information about the vtkusers mailing list