Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bill Lorensen
VTK
Commits
02aac437
Commit
02aac437
authored
Apr 25, 2012
by
Clinton Stimpson
Browse files
BUG: Fix bug leaking OpenGL resources when actors are removed.
Change-Id: Ib4697b9465d555d510d9ee835f3e907daadb4a06
parent
99b9af87
Changes
2
Hide whitespace changes
Inline
Side-by-side
GUISupport/Qt/QVTKGraphicsItem.cxx
View file @
02aac437
...
...
@@ -59,6 +59,7 @@ void QVTKGraphicsItem::SetRenderWindow(vtkGenericOpenGLRenderWindow* win)
{
if
(
mWin
)
{
mWin
->
SetMapped
(
0
);
mConnect
->
Disconnect
(
mWin
,
vtkCommand
::
StartEvent
,
this
,
SLOT
(
Start
()));
mConnect
->
Disconnect
(
mWin
,
vtkCommand
::
WindowMakeCurrentEvent
,
this
,
SLOT
(
MakeCurrent
()));
mConnect
->
Disconnect
(
mWin
,
vtkCommand
::
EndEvent
,
this
,
SLOT
(
End
()));
...
...
@@ -74,6 +75,7 @@ void QVTKGraphicsItem::SetRenderWindow(vtkGenericOpenGLRenderWindow* win)
if
(
mWin
)
{
mWin
->
SetMapped
(
1
);
mWin
->
SetDoubleBuffer
(
0
);
mWin
->
SetFrontBuffer
(
vtkgl
::
COLOR_ATTACHMENT0_EXT
);
mWin
->
SetFrontLeftBuffer
(
vtkgl
::
COLOR_ATTACHMENT0_EXT
);
...
...
GUISupport/Qt/QVTKWidget2.cxx
View file @
02aac437
...
...
@@ -137,6 +137,7 @@ void QVTKWidget2::SetRenderWindow(vtkGenericOpenGLRenderWindow* w)
if
(
this
->
mRenWin
)
{
this
->
mRenWin
->
Finalize
();
this
->
mRenWin
->
SetMapped
(
0
);
mConnect
->
Disconnect
(
mRenWin
,
vtkCommand
::
WindowMakeCurrentEvent
,
this
,
SLOT
(
MakeCurrent
()));
mConnect
->
Disconnect
(
mRenWin
,
vtkCommand
::
WindowIsCurrentEvent
,
this
,
SLOT
(
IsCurrent
(
vtkObject
*
,
unsigned
long
,
void
*
,
void
*
)));
mConnect
->
Disconnect
(
mRenWin
,
vtkCommand
::
WindowFrameEvent
,
this
,
SLOT
(
Frame
()));
...
...
@@ -153,6 +154,7 @@ void QVTKWidget2::SetRenderWindow(vtkGenericOpenGLRenderWindow* w)
{
// if it is mapped somewhere else, unmap it
this
->
mRenWin
->
Finalize
();
this
->
mRenWin
->
SetMapped
(
1
);
// tell the vtk window what the size of this window is
this
->
mRenWin
->
SetSize
(
this
->
width
(),
this
->
height
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment