mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 11:04:39 +00:00
a different strategy for glarea disposal
This commit is contained in:
parent
fe86aad542
commit
e7cd8628ec
@ -105,12 +105,8 @@ GLArea::GLArea(MultiViewer_Container *mvcont, RichParameterSet *current)
|
||||
|
||||
GLArea::~GLArea()
|
||||
{
|
||||
if (iRenderer)
|
||||
iRenderer->Finalize(currentShader, this->md(), this);
|
||||
if(targetTex) glDeleteTextures(1, &targetTex);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
This member returns the information of the Mesh in terms of VC,VQ,FC,FQ,WT
|
||||
where:
|
||||
@ -724,6 +720,9 @@ bool GLArea::readyToClose()
|
||||
}
|
||||
if(getCurrentEditAction())
|
||||
endEdit();
|
||||
if (iRenderer)
|
||||
iRenderer->Finalize(currentShader, this->md(), this);
|
||||
if(targetTex) glDeleteTextures(1, &targetTex);
|
||||
emit glareaClosed();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -81,6 +81,7 @@ public:
|
||||
GLArea(MultiViewer_Container *mvcont, RichParameterSet *current);
|
||||
~GLArea();
|
||||
static void initGlobalParameterSet( RichParameterSet * /*globalparam*/);
|
||||
|
||||
private:
|
||||
int id; //the very important unique id of each subwindow.
|
||||
|
||||
|
||||
@ -73,10 +73,6 @@ MultiViewer_Container::MultiViewer_Container(QWidget *parent)
|
||||
|
||||
MultiViewer_Container::~MultiViewer_Container()
|
||||
{
|
||||
//foreach(GLArea* viewer, viewerList)
|
||||
//{
|
||||
//delete viewer;
|
||||
//}
|
||||
}
|
||||
|
||||
int MultiViewer_Container::getNextViewerId(){
|
||||
|
||||
@ -84,8 +84,10 @@ public:
|
||||
int getViewerByPicking(QPoint);
|
||||
|
||||
void updateTrackballInViewers();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
public:
|
||||
MeshDocument meshDoc;
|
||||
int currentId;
|
||||
|
||||
@ -98,7 +100,6 @@ public slots:
|
||||
|
||||
// Called when we change viewer, set the current viewer
|
||||
void updateCurrent(int current);
|
||||
|
||||
private:
|
||||
QList<GLArea *> viewerList; /// widgets for the OpenGL contexts and images
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user