[Paraview] Clip Hang

Kevin H. Hobbs hobbsk at ohiou.edu
Mon Sep 18 14:02:26 EDT 2006


On Mon, 2006-09-18 at 10:46 -0600, Shead, Timothy wrote:
> I've seen this before with a VTK application - if FindPowerOfTwo() is
> called without a current OpenGL context, glGetIntegerv() fails, leaving
> its (uninitialized) arguments unmodified.  A short-term workaround that
> was successful for me was to initialize maxDimGL to zero in
> FindPowerOfTwo() before calling glGetIntegerV(), then add some logic in
> vtkOpenGLTexture::ResampleToPowerOfTwo() to ignore the FindPowerOfTwo()
> results if they're zero.  Of course the correct long-term solution would
> be to ensure that vtkOpenGLTexture::ResampleToPowerOfTwo() only gets
> called with a current OpenGL context.
> 
> Cheers,
> Tim
> 
> Timothy M. Shead
> Sandia National Laboratories
> Data Analysis & Visualization
> 505-284-0139
>  

I tried changing vtkOpenGLTexture::FindPowerOfTwo() to include an
initialization and test like this :

  GLint maxDimGL=0;
  glGetIntegerv(GL_MAX_TEXTURE_SIZE,&maxDimGL);
  if ( ( maxDimGL > 0 ) && ( size > maxDimGL ) )
    {
        size = maxDimGL ;
    }
Of course this doesn't do a thing for the context being gone. Nothing is
rendered after I use the clip filter. There's no segfault nor the
unhandled exception, but the results are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://public.kitware.com/pipermail/paraview/attachments/20060918/307f550b/attachment.pgp


More information about the ParaView mailing list