本文整理汇总了C++中GHOST_ISystem::processEvents方法的典型用法代码示例。如果您正苦于以下问题:C++ GHOST_ISystem::processEvents方法的具体用法?C++ GHOST_ISystem::processEvents怎么用?C++ GHOST_ISystem::processEvents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GHOST_ISystem
的用法示例。
在下文中一共展示了GHOST_ISystem::processEvents方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GHOST_ProcessEvents
int GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, int waitForEvent)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
return (int) system->processEvents(waitForEvent ? true : false);
}
示例2: main
//.........这里部分代码省略.........
else
{
i++;
}
}
if ((windowWidth < kMinWindowWidth) || (windowHeight < kMinWindowHeight))
{
error = true;
printf("error: window size too small.\n");
}
if (error )
{
usage(argv[0], isBlenderPlayer);
return 0;
}
#ifdef WIN32
if (scr_saver_mode != SCREEN_SAVER_MODE_CONFIGURATION)
#endif
{
// Create the system
if (GHOST_ISystem::createSystem() == GHOST_kSuccess) {
GHOST_ISystem* system = GHOST_ISystem::getSystem();
assertd(system);
if (!fullScreenWidth || !fullScreenHeight)
system->getMainDisplayDimensions(fullScreenWidth, fullScreenHeight);
// process first batch of events. If the user
// drops a file on top off the blenderplayer icon, we
// receive an event with the filename
system->processEvents(0);
// this bracket is needed for app (see below) to get out
// of scope before GHOST_ISystem::disposeSystem() is called.
{
int exitcode = KX_EXIT_REQUEST_NO_REQUEST;
STR_String exitstring = "";
GPG_Application app(system);
bool firstTimeRunning = true;
char filename[FILE_MAX];
char pathname[FILE_MAX];
char *titlename;
get_filename(argc_py_clamped, argv, filename);
if (filename[0])
BLI_path_cwd(filename);
// fill the GlobalSettings with the first scene files
// those may change during the game and persist after using Game Actuator
GlobalSettings gs;
do {
// Read the Blender file
BlendFileData *bfd;
// if we got an exitcode 3 (KX_EXIT_REQUEST_START_OTHER_GAME) load a different file
if (exitcode == KX_EXIT_REQUEST_START_OTHER_GAME)
{
char basedpath[FILE_MAX];
// base the actuator filename relative to the last file
BLI_strncpy(basedpath, exitstring.Ptr(), sizeof(basedpath));