Commit cd73d323 authored by Ken Martin's avatar Ken Martin
Browse files

delete methods

parent 32bf6e41
......@@ -110,6 +110,27 @@ vtkGlrRenderWindow::vtkGlrRenderWindow()
strcpy(this->Name,"Visualization Toolkit - GL");
}
// Description:
// Resize the window.
vtkGlrRenderWindow::~vtkGlrRenderWindow()
{
short cur_light;
/* first delete all the old lights */
for (cur_light = LIGHT0; cur_light < LIGHT0+MAX_LIGHTS; cur_light++)
{
lmbind(cur_light,0);
}
// then close the old window
if (this->OwnWindow)
{
XDestroyWindow(this->DisplayId,this->WindowId);
}
GLXunlink(this->DisplayId,this->WindowId);
XSync(this->DisplayId,0);
}
// Description:
// Create a gl specific light.
vtkLightDevice *vtkGlrRenderWindow::MakeLight()
......
......@@ -174,6 +174,27 @@ vtkOglrRenderWindow::vtkOglrRenderWindow()
strcpy(this->Name,"Visualization Toolkit - OpenGL");
}
// Description:
// free up memory & close the window
vtkOglrRenderWindow::~vtkOglrRenderWindow()
{
short cur_light;
/* first delete all the old lights */
for (cur_light = GL_LIGHT0; cur_light < GL_LIGHT0+MAX_LIGHTS; cur_light++)
{
glDisable(cur_light);
}
glXDestroyContext( this->DisplayId, this->ContextId);
// then close the old window
if (this->OwnWindow)
{
XDestroyWindow(this->DisplayId,this->WindowId);
}
XSync(this->DisplayId,0);
}
// Description:
// Create a OpenGL specific light.
vtkLightDevice *vtkOglrRenderWindow::MakeLight()
......
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