Update window in multidocument app

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


User avatar
bishopnator
Gnome
Posts: 348
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 16

Update window in multidocument app

Post by bishopnator »

Hi, is there in ogre-next a possibility to update a single window/render target? Through Ogre::Root::getSingleton().renderOneFrame() everything is updated. Consider a multi-document application - I need to update only windows/render targets of an active document. Usually in such application there is a "dirty" flag through which I can even tell the system that even in an active document I don't need to update all the render targets - e.g. only the window/render target where I move the mouse cursor.

User avatar
bishopnator
Gnome
Posts: 348
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 16

Re: Update window in multidocument app

Post by bishopnator »

I will experiment with disabling all the workspaces and enable only those which are used by a single window. Disadvantage is that, when I need to redraw couple of windows, there will be a call Ogre::Root::getSingleton().renderOneFrame() per window. More ideal solution would be to enable all the workspaces from all the windows which need update and call renderOnFrame only once afterwards, but in windowing system (like used by Win32) it is not practical - there is a window message per window and I don't know at that moment, how many windows will receive WM_PAINT.