Hi.
I have a little problem as I explained in the subject.
Even I call closeDevice() (I tried drop() function, too) after while(dev->run() { ] is end, the irrDevice does not disappear..
It remains like an dead window(you know, the classic MS window error that makes staircase (am I using this word right? or stair effect?))
I don't know why this happens... because I did closeDevice() and even clearSystemMessages(), too.
Does anybody has the same problem?
Please help!.
Why irrDevice still exits even I call closeDevice()?
Why irrDevice still exits even I call closeDevice()?
From Seoul, South Korea
Re: Why irrDevice still exits even I call closeDevice()?
can't tell exactly why, but i guess it is because the window still exists and won't disappear until your code ends, only it won't get updated at all, and thus, the "staircase" effect, also called "hall of mirrors". The window is created independently of the engine (so, Irrlicht can work with a window created by yourself for instance) , and provided it to work, so when the engine ends, the window remains there, i guess that you have also to drop the engine so the window gets also deleted. seems that closeDevice() shuts down the Irr device, but won't delete the window
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Why irrDevice still exits even I call closeDevice()?
Havn't got a solution might explain the problem though, this happened to me when I created mulitple irr devices ie in my case I had one for the main menu then another for the game and if I moved the game window the menu window would still be underneath with the "staircase" effect.
That might explain it but not sure in your case.
That might explain it but not sure in your case.
"Hey Baby Wobbling Wobbling"
-Russell Peters
-Russell Peters
Re: Why irrDevice still exits even I call closeDevice()?
I had similar problem, but I solved it by add a "device->run();" before drop a device, so my code looks now like this:
Code: Select all
if(Device)
{
Device->run();
Device->drop();
}
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Why irrDevice still exits even I call closeDevice()?
Oh I solved it... the problem was I didn't call clearSystemMessages() before or after calling closeDevice()!!!!!!! Holy poop
It seems if I don't call clearSystemMessages() , then irrDevice falls into infinite waiting status for some events(ex.GUI or Key Input) so that the closeDevice() couldn't close the irr window perfectly.
Thank you guys!
It seems if I don't call clearSystemMessages() , then irrDevice falls into infinite waiting status for some events(ex.GUI or Key Input) so that the closeDevice() couldn't close the irr window perfectly.
Thank you guys!
From Seoul, South Korea
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Why irrDevice still exits even I call closeDevice()?
Better call run() as suggested by Nadro. This handles all events properly instead of just removing them.