Commit f089989f authored by Ken Martin's avatar Ken Martin

fix an issue with release graphics resources

If someone released graphics resources it sets the callback to
an empty Window but leaves the Context Set. If they then set the
the context back to the same context is was not setting the
new WindowId on the texture. Arguably Releasing graphcis resources
should set the Context to NULL but I am going with this fix as it
more closely matches the old behavior of leaving Context set.
parent 54b4469c
Pipeline #27359 passed with stage
......@@ -366,13 +366,15 @@ bool vtkTextureObject::LoadRequiredExtensions(vtkOpenGLRenderWindow *renWin)
void vtkTextureObject::SetContext(vtkOpenGLRenderWindow* renWin)
// avoid pointless reassignment
if (this->Context == renWin)
this->Context = NULL;
......@@ -428,6 +430,8 @@ void vtkTextureObject::CreateTexture()
// reuse the existing handle if we have one
if (!this->Handle)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment