i think you use osg::GraphicsContext::getCameras to obtain ptr to the
Cameras list, then add cameras to that list. i haven't tried it, that's
just looking at the API, but have been messing around with the osgViewer
API for the last week, and it looks like it oughtta work like that.
-charlie
Aydin OKUTANOGLU wrote:
Hi charlie,
Actually i dont understand your solution because addCamera() method in
GraphicsContext is protected and i could not add cameras to it. In a
way i want to use single graphics context and i want to display
different views of same scene in same window. Each view will
completely cover full window, and i want to switch between one view to
another view. I may create multiple viewers each covering all render
surface and add them to CompositeViewer, however, CompositeViewer do
not have any mechanism to disable or remove views from it, so I could
not switch between views.
Thanks.
Aydin
------------------------------------------------------------------------
*From:* [EMAIL PROTECTED] on behalf of Charles Cosse
*Sent:* Wed 21.03.2007 16:26
*To:* osg users
*Subject:* Re: [osg-users] Multiple Viewer problem with single render
surface
Hi Aydin,
i'm no expert, but perhaps you could more directly address your
situation (single GC)
by having multiple cameras in the Cameras list, which is there in
osg::GraphicsContext:
typedef std::list< osg::Camera
<cid:[email protected]> * > Cameras
<cid:[email protected]>
-charlie
Aydin OKUTANOGLU wrote:
> I download and analyze the new osgViewer library. I realize that
> CompositeViewer allows only adding Views but not enabling or disabling
> or removing them. What i want to do is, generate multiple views
> (possibly with more than one cameras-slaves) of same scene and during
> execution only one of them will be active (for example, inside view of
> car). During simulation, i want to change the active view (in the same
> window) to another view (which may be outside view of car). It is
> necessary to create two viewer and call frame() method of only one
> that is active in that time to make this?
>
>
>
> Thanks
>
>
>
> Aydin
>
>
>
>
>
>
>
>
>
>
>
>
>
> **
>
> *From*: Robert Osfield <robert.osfield_at_gmail.com
>
<mailto:robert.osfield_at_gmail.com?Subject=Re:%20%5Bosg-users%5D%20Multiple%20Viewer%20problem%20with%20single%20render%20surface>>
>
> *Date*: Tue Mar 13 2007 - 01:30:11 PST
>
> Hi Aydin,
>
> I'm afraid you are demand a bit more from osgProducer::Viewer that is
> provides for - its entirely geared around mananging one view onto the
> scene, the multiple camera support is just to support multiple
> coordinate graphics outputs such as used in sims.
>
> The new osgViewer library now in Subversion now directly supports
> multiple views on the same scene via the new CompositeViewer class.
> This class allows you to compose your viewer from one or more views on
> to one more scenes, with all sharing of using separate graphics
> windows. Each of the different views can have its own camera
> manipulator to allow independent view interaction, or you just set
> each views main camera view matrix directly.
>
> Robert.
>
> On 3/13/07, Aydin OKUTANOGLU <[EMAIL PROTECTED]> wrote:
> /> /
> /> Hi, /
> /> /
> /> I developing an application utilizing the OSG. One of our
application /
> /> requirements is to display the scene from different camera
> configurations. /
> /> For example from inside the car, and from outside the car, etc. i
> create a /
> /> osgProducer::Viewer for each of these views and set same scene data
> to each /
> /> of them. User can switch from one view to another with some input.
> Also we /
> /> use same render surface for all viewers. Before we getting to osg
> 1.2, every /
> /> thing works fine. However, with osg 1.2 only firstly realized and
> rendered /
> /> viewer works corrent, and later viewers do not display textures of
> scene. /
> /> /
> /> Does anyone has an idea for this case? /
> /> /
> /> Thanks. /
> /> /
> /> Aydin /
> /> /
> /> /
>
>
......................................................................................................................................................................
>
> *DIKKAT !*
>
> *Bu e - postanin içerdigi bilgiler (ekleri dahil olmak üzere)
> gizlidir. Gonderenin onayi olmaksizin üçüncü kisilere açiklanamaz. Bu
> mesajin gönderilmek istendigi kisi degilseniz, lütfen mesaji
> sisteminizden derhal siliniz... Gonderen bu mesajin içerdigi
> bilgilerin dogrulugu veya eksiksiz oldugu konusunda bir garanti
> vermemektedir. Bu nedenle bilgilerin ne sekilde olursa olsun
> içeriginden, iletilmesinden, alinmasindan, saklanmasindan sorumlu
> degildir.*
>
>
>
> *CAUTION !*
>
> *The information contained in this e-mail (including any attachments)
> is confidential. It must not be disclosed to any person without
> sender's authority. If you are not the intended recipient, please
> delete it from your system immediately... Sender makes no warranty as
> to the accuracy or completeness of any information contained in this
> message and hereby excludes any liability of any kind for the
> information contained therein or for the information transmission,
> reception, storage or use of such in any way whatsoever.*
>
>
......................................................................................................................................................................
>
>
> *This message has been scanned for viruses and dangerous content.*
>
>------------------------------------------------------------------------
>
>_______________________________________________
>osg-users mailing list
>[email protected]
>http://openscenegraph.net/mailman/listinfo/osg-users
>http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/