the close button doesn't work

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
alexwang
Gnoblar
Posts: 15
Joined: Thu Nov 04, 2021 10:17 am

the close button doesn't work

Post by alexwang »

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();
}
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 275
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 87

Re: the close button doesn't work

Post by sercero »

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: 15
Joined: Thu Nov 04, 2021 10:17 am

Re: the close button doesn't work

Post by alexwang »

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
OGRE Team Member
Posts: 1612
Joined: Sun Mar 30, 2014 2:51 pm
x 787
Contact:

Re: the close button doesn't work

Post by paroj »

which RenderSystem/ OS are you using?
Also, note: https://ogrecave.github.io/ogre/api/lat ... ml#details
Post Reply