Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
8c97e82d
Commit
8c97e82d
authored
Dec 19, 2019
by
Tobias WEBER
Browse files
error handler
parent
849e3da1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tools/moldyn/moldyn.cpp
View file @
8c97e82d
...
...
@@ -215,6 +215,7 @@ MolDynDlg::MolDynDlg(QWidget* pParent) : QMainWindow{pParent},
m
::
create
<
t_vec_gl
>
({
1
,
0
,
0
,
0
}),
m
::
create
<
t_vec_gl
>
({
0
,
0
,
1
,
0
}));
connect
(
m_plot
,
&
GlPlot
::
AfterGLInitialisation
,
this
,
&
MolDynDlg
::
AfterGLInitialisation
);
connect
(
m_plot
,
&
GlPlot
::
GLInitialisationFailed
,
this
,
&
MolDynDlg
::
GLInitialisationFailed
);
connect
(
m_plot
->
GetImpl
(),
&
GlPlot_impl
::
PickerIntersection
,
this
,
&
MolDynDlg
::
PickerIntersection
);
connect
(
m_plot
,
&
GlPlot
::
MouseDown
,
this
,
&
MolDynDlg
::
PlotMouseDown
);
connect
(
m_plot
,
&
GlPlot
::
MouseUp
,
this
,
&
MolDynDlg
::
PlotMouseUp
);
...
...
@@ -1146,6 +1147,15 @@ void MolDynDlg::AfterGLInitialisation()
}
void
MolDynDlg
::
GLInitialisationFailed
()
{
std
::
string
err
=
"GL initialisation failed."
;
err
+=
" Need GL version "
+
std
::
to_string
(
_GL_MAJ_VER
)
+
"."
+
std
::
to_string
(
_GL_MIN_VER
);
err
+=
" and shader version "
+
std
::
to_string
(
_GLSL_MAJ_VER
)
+
std
::
to_string
(
_GLSL_MIN_VER
)
+
"0."
;
QMessageBox
::
critical
(
this
,
PROG_NAME
,
err
.
c_str
());
}
void
MolDynDlg
::
closeEvent
(
QCloseEvent
*
evt
)
{
if
(
m_sett
)
...
...
tools/moldyn/moldyn.h
View file @
8c97e82d
...
...
@@ -53,6 +53,7 @@ protected:
void
PlotMouseClick
(
bool
left
,
bool
mid
,
bool
right
);
void
PickerIntersection
(
const
t_vec3_gl
*
pos
,
std
::
size_t
objIdx
,
const
t_vec3_gl
*
posSphere
);
void
AfterGLInitialisation
();
void
GLInitialisationFailed
();
std
::
tuple
<
bool
,
std
::
size_t
,
std
::
size_t
,
std
::
size_t
>
GetAtomIndexFromHandle
(
std
::
size_t
handle
)
const
;
...
...
Write
Preview
Markdown
is supported
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