本文整理汇总了C++中GLWindow::createGLWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ GLWindow::createGLWindow方法的具体用法?C++ GLWindow::createGLWindow怎么用?C++ GLWindow::createGLWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLWindow
的用法示例。
在下文中一共展示了GLWindow::createGLWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: P_run
void P_run()
{
if(window.isActive)
{
double elapsed_time;
double current_time = T_GetCurrentTime();
if(movesize_time < 0.05f)
movesize_time = 0.0f;
elapsed_time = (current_time - last_game_time - movesize_time) + remaining_game_time ;
movesize_time = 0.0f;
while (elapsed_time >= S_PER_GAME_UPDATE*fps_mult)
{
G_update(elapsed_time);
elapsed_time -= S_PER_GAME_UPDATE*fps_mult;
}
remaining_game_time = elapsed_time;
last_game_time = current_time;
P_computeFPS();
R_draw(window.hDC);
if(btogglefullscreen || bmodechange)
{
last_movesize_time = T_GetCurrentTime();
if(btogglefullscreen)
{
P_cleanup();
window.createGLWindow(true);
btogglefullscreen = false;
GL_initializeGLObjects();
}
else
{
window.createGLWindow(false);
bmodechange = false;
}
movesize_time = T_GetCurrentTime() - last_movesize_time;
}
}
}
示例2: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int iCmdShow)
{
MSG msg;
BOOL quit = FALSE;
G_initializeGame();
window.createGLWindow("Level Editor", WndProc);
GL_initializeGLObjects();
ShowWindow(window.hWnd,SW_SHOW);
last_game_time = T_GetCurrentTime();
while ( !quit )
{
if ( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
if ( msg.message == WM_QUIT )
{
quit = TRUE;
}
else
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
else
{
P_run();
}
}
P_cleanup();
window.destroyGLWindow();
return msg.wParam;
}