本文整理汇总了C++中ogre::RenderWindow::windowMovedOrResized方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderWindow::windowMovedOrResized方法的具体用法?C++ RenderWindow::windowMovedOrResized怎么用?C++ RenderWindow::windowMovedOrResized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::RenderWindow
的用法示例。
在下文中一共展示了RenderWindow::windowMovedOrResized方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pollEvents
void ApplicationContextAndroid::pollEvents()
{
for(WindowList::iterator it = mWindows.begin(); it != mWindows.end(); ++it)
{
Ogre::RenderWindow* win = it->render;
win->windowMovedOrResized();
windowResized(win);
}
}
示例2: OnRenderViewSize
//-----------------------------------------------------------------------------
void Engine::OnRenderViewSize()
{
if(m_pRenderWnd)
m_pRenderWnd->windowMovedOrResized();
if(m_pCamera)
m_pCamera->setAspectRatio(
Ogre::Real(m_pViewport->getActualWidth()) / Ogre::Real(m_pViewport->getActualHeight()));
}
示例3: pollEvents
void ApplicationContextSDL::pollEvents()
{
if(mWindows.empty())
{
// SDL events not initialized
return;
}
SDL_Event event;
while (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT:
mRoot->queueEndRendering();
break;
case SDL_WINDOWEVENT:
if(event.window.event != SDL_WINDOWEVENT_RESIZED)
continue;
for(WindowList::iterator it = mWindows.begin(); it != mWindows.end(); ++it)
{
if(event.window.windowID != SDL_GetWindowID(it->native))
continue;
Ogre::RenderWindow* win = it->render;
win->windowMovedOrResized();
windowResized(win);
}
break;
default:
_fireInputEvent(convert(event), event.window.windowID);
break;
}
}
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
// hacky workaround for black window on OSX
for(const auto& win : mWindows)
{
SDL_SetWindowSize(win.native, win.render->getWidth(), win.render->getHeight());
win.render->windowMovedOrResized();
}
#endif
}