Multiple viewports with multiple overlays

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Deadman Inc.
Posts: 16
Joined: Fri Nov 04, 2005 5:49 pm

Multiple viewports with multiple overlays

Post by Deadman Inc. »


I’m having a little trouble using Overlays and Multiple Viewports. By default the overlays are shown in every viewport, and the viewport can show or not the overlays. But how can I show one overlay in a specific viewport and another overlay in another specific viewport? Or do I need to create multiple render windows?

I'm trying creating a dummy viewport on top of my 4 geometry viewports that covers the whole screen and that this is the only one that shows the overlay stuff. But I need that this viewport doesn't render anything but the overlay, how can I make this?

I have a couple of screenshots here

Using the dummy viewport


The face in the center is the mesh that is being shown in the dummy viewport. I’m trying with this:
But it's still rendering the scene. Point the camera of this viewport to nowhere is not an option.

Without the dummy viewport


Obviously not what I need as I need to have different names for each geometry viewport and a margin to allow resizing of the geometry viewports.

Thanks in advance, and excuse my poor english.
User avatar
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

I would advise using the latter approach (overlay per viewport) but using a RenderTargetListener's preViewportUpdate hook to update the text or switch overlays before each viewport is rendered.

FYI most people making tools embed these sorts of viewports in an external widget system like wxWidgets.
Post Reply