Hello,
I'm very new in Ogre, so sorry for bad questions (and sorry for my bad English - it is not related to programming ).
I'm working on a program, that has multiple render windows. Each render window has one viewport and a separate camera.
Now I want to get the content of each window put into accessible memory. I already have a function that can do it for one window. But if I have all windows, it still get only the content of just one of them. I think my problem is that I don't know where does Ogre make those windows.
So can somebody help me where is that? Where should I put my function to catch the contests of all of my windows for every time Ogre renders ?
Thanks
Getting the content of multiple renderwindows into variable
-
- Gnoblar
- Posts: 4
- Joined: Tue Feb 11, 2014 3:39 pm
Getting the content of multiple renderwindows into variable
Last edited by penbo on Wed Feb 19, 2014 8:55 am, edited 1 time in total.
-
- Greenskin
- Posts: 114
- Joined: Mon Oct 14, 2013 1:41 am
- Location: Chile
- x 3
Re: Getting the content of multiple renderwindos into a vari
Everytime you want to access frame data, you have to use either frameStarted(), frameRenderingQueued() or frameEnded(). Dont know exactly the difference among them, but I have always used the second method.
http://www.ogre3d.org/docs/api/1.9/clas ... tener.html
Hope it helps.
http://www.ogre3d.org/docs/api/1.9/clas ... tener.html
Hope it helps.
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
-
- Gnoblar
- Posts: 4
- Joined: Tue Feb 11, 2014 3:39 pm
Re: Getting the content of multiple renderwindos into a vari
Thanks for the reply!
It helped to start, but I found that the solution for this problem lies a bit deeper in the rendering loop, than those functions.
I had to write my own render loop. For this I made a new class where I used the root's stratRendering function and it's subfunctions and made a little change in them. I had to find the place where every rendertarget gets the command: update. And that was the point where I put my image getter function (it is an opnegl function, and it puts the image in an opencv::mat variable).
If you are interested in it, I put my class here. It needs OpenCV, and works with OpenGl.
It helped to start, but I found that the solution for this problem lies a bit deeper in the rendering loop, than those functions.
I had to write my own render loop. For this I made a new class where I used the root's stratRendering function and it's subfunctions and made a little change in them. I had to find the place where every rendertarget gets the command: update. And that was the point where I put my image getter function (it is an opnegl function, and it puts the image in an opencv::mat variable).
If you are interested in it, I put my class here. It needs OpenCV, and works with OpenGl.
- Attachments
-
- MyRenderLoop.cpp
- (3.51 KiB) Downloaded 32 times
-
- MyRenderLoop.h
- (846 Bytes) Downloaded 10 times
-
- Greenskin
- Posts: 114
- Joined: Mon Oct 14, 2013 1:41 am
- Location: Chile
- x 3
Re: Getting the content of multiple renderwindos into a vari
Great, I will take a look at it.
btw why opencv, are you planning to postprocess the images?
btw why opencv, are you planning to postprocess the images?
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
-
- Gnoblar
- Posts: 4
- Joined: Tue Feb 11, 2014 3:39 pm
Re: Getting the content of multiple renderwindos into a vari
Yes. I have to postprocess them.