本文整理汇总了C++中VMDApp::VMDupdate方法的典型用法代码示例。如果您正苦于以下问题:C++ VMDApp::VMDupdate方法的具体用法?C++ VMDApp::VMDupdate怎么用?C++ VMDApp::VMDupdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMDApp
的用法示例。
在下文中一共展示了VMDApp::VMDupdate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Py_BuildValue
static PyObject *py_vmdupdate(PyObject *self, PyObject *args) {
VMDApp *app = get_vmdapp();
if (!app) {
fprintf(stderr, "no app!!\n");
Py_INCREF(Py_None);
return Py_None;
}
return Py_BuildValue("i", app->VMDupdate(1));
}
示例2: VMDmain
int VMDmain(int argc, char **argv) {
#else
int main(int argc, char **argv) {
#endif
int mpienabled = 0;
PROFILE_MAIN_THREAD(); // mark main VMD thread within profiler timelines
PROFILE_PUSH_RANGE("VMD main() initialization", 4);
#if defined(VMDMPI)
// so long as the caller has not disabled MPI, we initialize MPI when VMD
// has been compiled to support it.
if (getenv("VMDNOMPI") == NULL) {
mpienabled = 1;
}
#endif
if (!VMDinitialize(&argc, &argv, mpienabled)) {
return 0;
}
const char *displayTypeName = VMDgetDisplayTypeName();
int displayLoc[2], displaySize[2];
VMDgetDisplayFrame(displayLoc, displaySize);
VMDApp *app = new VMDApp(argc, argv, mpienabled);
if (!app->VMDinit(argc, argv, displayTypeName, displayLoc, displaySize)) {
delete app;
return 1;
}
PROFILE_POP_RANGE();
PROFILE_PUSH_RANGE("VMD startup scripts", 1);
// read various application defaults
VMDreadInit(app);
PROFILE_POP_RANGE();
PROFILE_PUSH_RANGE("VMD process user script(s)", 1);
// read user-defined startup files
VMDreadStartup(app);
PROFILE_POP_RANGE();
PROFILE_PUSH_RANGE("VMD interactive event loop", 1);
// main event loop
do {
// If we knew that there were no embedded python interpreter, we could
// process Tcl events here, rather than within the VMD instance.
#ifdef VMDTCL
// Loop on the Tcl event notifier
// while (Tcl_DoOneEvent(TCL_DONT_WAIT));
#endif
// handle Fltk events
VMDupdateFltk();
#if 0
// take over the console
if (vmd_check_stdin()) {
app->process_console();
}
#endif
} while(app->VMDupdate(VMD_CHECK_EVENTS));
PROFILE_POP_RANGE();
// end of program
delete app;
VMDshutdown(mpienabled);
return 0;
}
示例3: draw
void draw() {
dispdev->reshape();
dispdev->_needRedraw = 1;
app->VMDupdate(VMD_IGNORE_EVENTS);
}