OpenGL/GLUT - 更新几个 windows
OpenGL/GLUT - Updating several windows
所以,我正在创建一个游戏,其中我有两个不同的 windows,它们具有不同的显示功能。我想知道是否可以同时更新两个 windows。假设对于一个 window,我隐式调用 glutPostRedisplay()
来强制更新。这只会导致对当前 window 的更新。然而,我想更新它们。
这可能吗?我已经搜索了很长时间,但在某些人看来似乎没有明确的答案。
谢谢。
glutPostRedisplay
marks the current window as needing to be redisplayed.
"Current window"诶?我想知道是否...
4.3 glutSetWindow
, glutGetWindow
glutSetWindow
sets the current window; glutGetWindow
returns the identifier of the current window.
foreach( int window : windows )
{
glutSetWindow( window );
glutPostRedisplay();
}
所以,我正在创建一个游戏,其中我有两个不同的 windows,它们具有不同的显示功能。我想知道是否可以同时更新两个 windows。假设对于一个 window,我隐式调用 glutPostRedisplay()
来强制更新。这只会导致对当前 window 的更新。然而,我想更新它们。
这可能吗?我已经搜索了很长时间,但在某些人看来似乎没有明确的答案。
谢谢。
glutPostRedisplay
marks the current window as needing to be redisplayed.
"Current window"诶?我想知道是否...
4.3
glutSetWindow
,glutGetWindow
glutSetWindow
sets the current window;glutGetWindow
returns the identifier of the current window.
foreach( int window : windows )
{
glutSetWindow( window );
glutPostRedisplay();
}