Hi Robert,thanks a lot for valuable support. It worked like charm. I will have 
to deal with event selection, as you mentioned. Because menu view occupies 
whole window rectangle, it doesn't allow clicks to go to viewports at 
background. I may raise more questions about viewports as I make 
progress.Thanks again!Jason________________________________> Date: Fri, 3 Apr 
2009 17:58:36 +0100> From: robert.osfi...@gmail.com> To: 
osg-users@lists.openscenegraph.org> Subject: Re: [osg-users] Viewer confusion 
and text>> Hi Jason,>> I'm afraid I can't comment on osgWidget too much yet as 
I've still on tinkered a little with it, perhaps others can dive in here.>> One 
thing you could try is to have a Camera/View entirely dedicated to the 
osgWidget HUD an have this overlay the rest of the Camera by disabling it's 
clear mask's colour bit, and setting it's RenderOrder to POST_RENDER so that 
it's drawn last. One thing that may complicate things is the event selection, 
as multiple View's might be trying to grab the focus of events.>>> Robert.>> On 
Fri, Apr 3, 2009 at 5:33 PM, Jason> wrote:>>>> Hi Robert,>> thank you for quick 
reply.>> UI is very basic, and is composed of a menu on top (preferably, 
spanning entire window width) and a side panel like region (could be a separate 
one), where I can display some information about selected node. I have examined 
osgWidget menu example and tried to hack it to work within my UI. This is where 
problem began.>>> First of all, by top I mean the top of windowing system's 
coordinate space; 0, 0 is top left corner of the screen.>> If I split my window 
into 4:+---+|0|1|+-+-+|2|3|+-+-+(just in case, line breaks in this Hotmail 
composer seem to be incompatible with mailing list; viewport 0, top left, 1 top 
right, 2 bottom left and 3 at bottom right).>>> I don't know which view/camera 
should have hud group in this case. I also tried to split it from top and add 
my hud there, but viewport on top overlaps with viewports 0 and 1 (the top row) 
and it also adds additional cost to my layout code that calculates viewport 
sizes (and of course, aspect ratios).>>> I do not want to use wxWidgets or Qt, 
but I would like to use a 3D enabled UI with osg. I am not aiming for a simpler 
implementation, or just a working implementation, but I am aiming an osgWidget 
based implementation.>>> Do you have a suggestion for menu's (of type 
osgWidget::Box, containing other Box'es) placement? Which view should it be 
added to?>>>> Regards,Jason>> ________________________________>>> Date: Fri, 3 
Apr 2009 16:51:08 +0100>>> From: robert.osfi...@gmail.com>>> To: 
osg-users@lists.openscenegraph.org>>> Subject: Re: [osg-users] Viewer confusion 
and text>>>>>> Hi Jason,>>>>>> Without any ambiguity I can say that 
CompositeViewer is exactly what you need, it was written specifically to make 
it easier to manage this type of viewer usage. It may seem a but more 
complicated but then the task is more complicated, and the way it's designed 
ensures that the complexity of the code is directly proportional the complexity 
of the task.>>>>>>>>>> Adding the GUI could be done in a number of different 
ways, the osghud example is probably a good place to start as are the osgwidget 
examples. You don't actually explain how your GUI will related to the various 
views so I really can't comment on the details.>>>>>>>>>> Robert.>>>>>> On Fri, 
Apr 3, 2009 at 4:03 PM, Jason> wrote:>>>>>>>>>>>>>>>>>> Hi,>>>>>> I am trying 
to prepare a small demo with multiple viewports and some text. I did something 
much simpler with plain OpenGL before with my own implementation but it 
suffered a lot from performance, as I am not an expert in this field. 
Basically, I would like to setup 3-4 viewports, much like a CAD app (e.g. top, 
front, perspective/camera, etc). I would also like to create a basic UI with 
osgWidgets. Models contain some detailed terrain data and buildings.>>>>>>>>>> 
I have used CompositeViewer in my first approach, but it seemed difficult to 
deal with text afterwards. I then migrated to single Viewer multiple slave 
cams, but TrackballManipulator moves master cam, which moves slaves as well. 
Besides, I couldn't achieve orthographic projection on slave cameras (e.g. top 
and front).>>>>>>>>>> I would like to ask some guidance, rather than a full 
source code; how should I proceed? Should I stick to composite viewer? If I do 
so, where/which view should I attach UI (in particular, menu)? I am hoping that 
my question doesn't sound stupid, but I am aware that it doesn't describe what 
I exactly want. I have limited time and haven't got enough time to play with 
single viewer approach either. I have read famous "Viewer vs CompositeViewer" 
post multiple times but having this UI confused me.>>>>>>>>>> I would be very 
happy, if you could give me some guidance.>>>>>>>>>>>> Regards,Jason>>>>>> 
_________________________________________________________________>> Rediscover 
HotmailĀ®: Get quick friend updates right in your inbox.>> 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009>>
 _______________________________________________>> osg-users mailing list>> 
osg-users@lists.openscenegraph.org>> 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>>
_________________________________________________________________
Quick access to your favorite MSN content and Windows Live with Internet 
Explorer 8. 
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to