Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
CGoGN
Commits
1f6a99ef
Commit
1f6a99ef
authored
Sep 11, 2014
by
Thery Sylvain
Browse files
remove crash when closing SCHNApps
parent
1295cd62
Changes
4
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/surface_import/src/surface_import.cpp
View file @
1f6a99ef
...
...
@@ -31,12 +31,6 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
if
(
fi
.
exists
())
{
MapHandlerGen
*
mhg
=
m_schnapps
->
addMap
(
fi
.
baseName
(),
2
);
std
::
cout
<<
"IMPORT PLUGIN 2"
<<
std
::
endl
;
std
::
cout
<<
"PTR="
<<
GenericMap
::
s_instances
<<
std
::
endl
;
for
(
auto
inst
:
*
GenericMap
::
s_instances
)
std
::
cout
<<
inst
<<
std
::
endl
;
if
(
mhg
)
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
...
...
SCHNApps/src/main.cpp
View file @
1f6a99ef
...
...
@@ -24,9 +24,13 @@ int main(int argc, char* argv[])
// get a smart pointer to the __main__ module of the Python interpreter
PythonQtObjectPtr
pythonContext
=
PythonQt
::
self
()
->
getMainModule
();
PythonQtScriptingConsole
pythonConsole
(
NULL
,
pythonContext
);
CGoGN
::
SCHNApps
::
SCHNApps
schnapps
(
app
.
applicationDirPath
(),
pythonContext
,
pythonConsole
);
// PythonQtScriptingConsole pythonConsole(NULL, pythonContext);
// CGoGN::SCHNApps::SCHNApps schnapps(app.applicationDirPath(), pythonContext, pythonConsole);
PythonQtScriptingConsole
*
pythonConsole
=
new
PythonQtScriptingConsole
(
NULL
,
pythonContext
);
CGoGN
::
SCHNApps
::
SCHNApps
schnapps
(
app
.
applicationDirPath
(),
pythonContext
,
*
pythonConsole
);
schnapps
.
show
();
pythonContext
.
addObject
(
"schnapps"
,
&
schnapps
);
...
...
SCHNApps/src/view.cpp
View file @
1f6a99ef
...
...
@@ -108,7 +108,8 @@ void View::unlinkPlugin(PluginInteraction* plugin)
{
plugin
->
unlinkView
(
this
);
emit
(
pluginUnlinked
(
plugin
));
updateGL
();
// removed because of crash when application close
// updateGL();
}
}
...
...
@@ -159,7 +160,8 @@ void View::unlinkMap(MapHandlerGen* map)
emit
(
mapUnlinked
(
map
));
updateCurrentCameraBB
();
updateGL
();
// removed because of crash when application close
// updateGL();
disconnect
(
map
->
getFrame
(),
SIGNAL
(
modified
()),
this
,
SLOT
(
updateGL
()));
disconnect
(
map
,
SIGNAL
(
selectedCellsChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
updateGL
()));
...
...
src/Utils/GLSLShader.cpp
View file @
1f6a99ef
...
...
@@ -1088,9 +1088,9 @@ void GLSLShader::enableVertexAttribs(unsigned int stride, unsigned int begin) co
this
->
bind
();
for
(
std
::
vector
<
Utils
::
GLSLShader
::
VAStr
>::
const_iterator
it
=
m_va_vbo_binding
.
begin
();
it
!=
m_va_vbo_binding
.
end
();
++
it
)
{
assert
(((
it
->
vbo_ptr
->
nbElts
()
==
0
)
||
(
it
->
vbo_ptr
->
dataSize
()
!=
0
)
)
||
!
"dataSize of VBO is 0 ! could not draw"
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
it
->
vbo_ptr
->
id
());
glEnableVertexAttribArray
(
it
->
va_id
);
assert
((
it
->
vbo_ptr
->
dataSize
()
!=
0
)
||
!
"dataSize of VBO is 0 ! could not draw"
);
glVertexAttribPointer
(
it
->
va_id
,
it
->
vbo_ptr
->
dataSize
(),
GL_FLOAT
,
false
,
stride
,
(
const
GLvoid
*
)((
unsigned
long
)(
begin
)));
}
// this->unbind();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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