Render Freeze (External Window)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
sl.Apollo
Posts: 4
Joined: Sat Dec 10, 2011 8:15 am

Render Freeze (External Window)

Post by sl.Apollo »

Hi there,

This may be a stupid question; but, this should be the appropriate forum for stupid questions. :D

In Windows 7, when Irrlicht renders to its own window (such as in the Hello World example 1), clicking and dragging on the window freezes the rendering.

It looks like it's possible to keep it rendering (while dragging) if it's embedded inside of a GUI (such as in Irrlicht Lime's L02 Winforms example). However, I'd prefer not to use Winforms so that it keeps platform independence.

A third-party cross-platform GUI might work, but forcing the user to download a GUI library just to embed Irrlicht seems a bit overkill.

With that being said:
1. Is it possible to have the window render regardless of whether or not it's selected?
2. If it's possible, is this a bad idea? i.e. would it consume a lot of system resources?


If it matters, this is the while loop code:

Code: Select all

while(device->run())
        {
                driver->beginScene(true, true, SColor(255,255,255,255));
 
                smgr->drawAll();
                guienv->drawAll();
 
                CEGUI::System::getSingleton().renderGUI();
 
                driver->endScene();
        }
Current platform:
Visual Studio 2010 Professional
Visual C++ 10.0 32-bit (Debug)
Windows 7 Ultimate 64-bit
Irrlicht 1.7.2
CEGUI 0.7.5


Any help is greatly appreciated! If you need any additional information, feel free to ask. Thank you for your time.
CuteAlien
Admin
Posts: 9930
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Render Freeze (External Window)

Post by CuteAlien »

Unfortunately not so easy, we discussed it once, but so far no further work on that: http://irrlicht.sourceforge.net/forum/v ... =2&t=38729
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: Render Freeze (External Window)

Post by Radikalizm »

If I understand correctly, the reason why it stops rendering is because the windows messaging pipeline gets 'flooded' with messages that the user has clicked on the titlebar which notifies the OS that the window should be moved, and which in turn prevents the window from being painted

You can definitely prevent this though, but it really isn't easy and it will require you to do some serious engine hacking
CuteAlien
Admin
Posts: 9930
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Render Freeze (External Window)

Post by CuteAlien »

No, it's not flooded - you get no messages at all in that time, it does enter a modal loop the moment you click on the titlebar for moving.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: Render Freeze (External Window)

Post by Radikalizm »

CuteAlien wrote:No, it's not flooded - you get no messages at all in that time, it does enter a modal loop the moment you click on the titlebar for moving.
Thanks for clearing that up ;)
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Render Freeze (External Window)

Post by mongoose7 »

Surely the rendering surface is special, so there would be artifacts in any case if it were dragged?
Post Reply