A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
alexwang
Gnoblar
Posts: 21 Joined: Thu Nov 04, 2021 10:17 am
Post
by alexwang » Tue Jan 04, 2022 10:33 am
In my render loop, I called renderOneFrame(), but I cann't close the window, then I called the messagePump(), the result didn't change. The MinButton and MaxButton works.
Code: Select all
while(!mWindow->isClosed())
{
mRoot->renderOneFrame();
WindowEventUtilities::messagePump();
}
sercero
Bronze Sponsor
Posts: 480 Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 167
Post
by sercero » Wed Jan 05, 2022 4:08 am
What version of OGRE are you using?
I have to call it like this:
Code: Select all
OgreBites::WindowEventUtilities::messagePump();
What happens if you call the functions in the reverse order?
Code: Select all
while(!mWindow->isClosed())
{
WindowEventUtilities::messagePump();
mRoot->renderOneFrame();
}
alexwang
Gnoblar
Posts: 21 Joined: Thu Nov 04, 2021 10:17 am
Post
by alexwang » Wed Jan 05, 2022 6:35 am
my ogre version is 1.12.12, I called the functions in the reverse order as you suggested, the close button has the UI effect of the response.
Did I forget anything else with messagePump?
Code: Select all
while()
{
OgreBites::WindowEventUtilities::messagePump();
mRoot->renderOneFrame();
}
paroj
OGRE Team Member
Posts: 2108 Joined: Sun Mar 30, 2014 2:51 pm
x 1134
Post
by paroj » Wed Jan 05, 2022 3:47 pm