Google

How to make always rendering render window?

Discussion regarding OgreDotNet, located in CVS at ogreaddons/ogredotnet

Moderators: OgreDotNet Moderators, OGRE Team

How to make always rendering render window?

Postby nolver » Mon Jul 03, 2006 4:49 pm

This should be very easy to do, but just can't figure it out.

I've got a render window (created by ogre on init) and I want to control some aspects of the rendering from another form. The thing is that when the focus is on the form, the render window becomes inactive and stops rendering.

How can you force the render window to render constinuoslly, even when it's not the active window?

thanks!
nolver
 
Posts: 15
Joined: Mon Dec 05, 2005 10:53 am

Postby pjcast » Mon Jul 03, 2006 6:57 pm

By default, if you are using RenderOneFrame (or startRendering for that matter), Ogre will only update Active windows. And, if you let Ogre create the window, it will also use it's own WinProc to know when the window loses focus. One solution, don't use renderOneFrame and update the renderwindow's yourself. Make sure also fire off framestarted and ended events.
User avatar
pjcast
 
Posts: 93
Joined: Fri Sep 23, 2005 3:12 am

Re: How to make always rendering render window?

Postby diegospc » Sat Jul 08, 2006 2:38 am

nolver wrote:This should be very easy to do, but just can't figure it out.

I've got a render window (created by ogre on init) and I want to control some aspects of the rendering from another form. The thing is that when the focus is on the form, the render window becomes inactive and stops rendering.

How can you force the render window to render constinuoslly, even when it's not the active window?

thanks!


Hello, i'm new in the OgreDotNet World :D
I don't know hoy to render in a window. Please, you can send me an example or tell me what code is necesary write for render in a windows and manage the render from other window.
Thanks a lot!

Sory for my really bad english.
diegospc
 
Posts: 1
Joined: Sat Jul 08, 2006 2:34 am

Postby pjcast » Sat Jul 08, 2006 10:20 pm

You should grab OgreDotNet from CVS, and look at the example source code. It shows how to setup ODN into a WinForm and it also shows how to create the default external window :)
User avatar
pjcast
 
Posts: 93
Joined: Fri Sep 23, 2005 3:12 am

Re: How to make always rendering render window?

Postby spliff » Tue Oct 20, 2009 10:19 am

i found this (old) thread with the search function because of it's topic. in case other people find it, i want to add that in the actual ogre3d release you can just use a function of the http://www.ogre3d.org/docs/api/html/cla ... indow.html class to achieve this:

Code: Select all
void Ogre::RenderWindow::setDeactivateOnFocusChange( bool deactivate )
spliff
 
Posts: 1
Joined: Tue Oct 20, 2009 10:16 am


Return to OgreDotNet

Who is online

Users browsing this forum: No registered users and 1 guest