[vtkusers] vtkOpenGLVolumeTextureMapper3D error

Francois Bertel francois.bertel at kitware.com
Fri May 14 17:28:51 EDT 2010


I'll look into that, thanks.

On Fri, May 14, 2010 at 4:45 PM, Isaac Abbott <isaac.abbott at gmail.com> wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list