Topic Author
Posts: 8
Joined: 21 Oct 2013, 20:18

multiple viewports

21 Oct 2013, 20:28

I'm unsure how to go about hooking up multiple Ogre viewports on the screen with Noesis with separate cameras.
I was hoping I could just have the controls automatically resized as the window is resized as well.

Any ideas how I might approach this?
Is there a control I might be able to use or something?

User avatar
Site Admin
Posts: 3805
Joined: 20 Jan 2012, 17:18

Re: multiple viewports

21 Oct 2013, 21:44


At the low-level, it must be done manually. Although I think this could be an improvement to be added to the ogre bindings. The idea is as follows:
  • Imagine you have two viewports in the screen
  • You have to create two NoesisGUI IRenderers
  • Each time your viewports change size, you must set that size to each renderer (SetSize())
  • When you apply the RenderCommands generated by the renderer, the current rendertarget and device viewport are preserved. So basically, you must set your viewport, draw your content, and after that draw the NoesisGUI commands (note: offscreen render commands must be applied before any viewport, because they correspond to texture drawing commands)
Please, let me know where do you need more clarification, if any.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests