Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Hi John, On 24 February 2012 03:53, John Simpson john.simp...@mbda.co.uk wrote: I know it's possible if I dig into the windowing system for a specific platform, but I was hoping to do it using an OSG cross-platfom method (see first post). The app's developing and I'm now using a CompositeViewer for which I'm explicitly creating a GraphicsContext so I have access to the supportsResize trait and it still resizes (on both platforms). I'll stop pestering this thread now and do it the long way. You should be able to do the cross platform route, but if there is a bug on the OSG side on one particular platform we as a community just need to fix it. I just have access to Linux, and have very little Windows experience so can't help out with debugging the Windows side, so have to rely on Windows dev to get things working perfectly under Windows - this normally works out pretty well. To resolve the issue the best route would be to create a small example that illustrates the problem so that others can reproduce, confirm the problem and then work to fix it. Modifying an existing osg example would probably be a good place to start. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
On 02/23/2012 10:53 PM, John Simpson wrote: Jason I know it's possible if I dig into the windowing system for a specific platform, but I was hoping to do it using an OSG cross-platfom method (see first post). I think you misunderstood me. What I meant was that OSG should be able to provide the ability to disable resizing in a cross-platform way (because all of the underlying platforms support it). If it's not doing that properly, then something needs fixing. If you can create a simple example, like Robert suggested, I can try to help with the Linux and Windows implementations. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Hi, I still haven't got to the bottom of this. Use the source? John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45726#45726 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
On 02/23/2012 10:20 AM, John Simpson wrote: Hi, I still haven't got to the bottom of this. Use the source? Hi, John, You mentioned this is going to be cross-platform. Is your code not working on any platform? I looked at the relevant code in GraphicsWindowX11.cpp, and it seems like it should work (I haven't had time to test it myself, though). Bottom line is that every desktop platform has a way to mark a window as not resizeable, so this should be possible. If it's not working, it can be made to work. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Jason I know it's possible if I dig into the windowing system for a specific platform, but I was hoping to do it using an OSG cross-platfom method (see first post). The app's developing and I'm now using a CompositeViewer for which I'm explicitly creating a GraphicsContext so I have access to the supportsResize trait and it still resizes (on both platforms). I'll stop pestering this thread now and do it the long way. John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45739#45739 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Jason Thanks but the viewer still resizes taking the viewport with it. This is a screen capture app with the resultant data being streamed to an image processing algorithm for which the image size is fixed. It's based on the osgscreencapture example which does mysterious things with the viewers gc so your new camera thing results in a blank screen, however getting the viewer's camera and applying a new, modified, gc to it does at least produce an image but as I said both the viewer and the viewport can still be resized. John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45528#45528 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Does cross platform mean you are using Qt framework? In this case just assign a fixed size to the embedding window. Am 16.02.2012 13:40, schrieb John Simpson: Hi, I need to display a viewer window that the user can't resize. Tried all sorts. I assume it's the viewer's graphics context traits resize boolean but can't figure out a way to change it. This is a cross-platform app and I guess there will be a way of messing with the underlying Windows and X subsystems to achieve this but I'm hoping for something more elegant within OSG Help required. Thanks, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45503#45503 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Hi Werner Thanks for the reply. No I'm not using Qt, it's cross-platform at the console level so I'm relying on OSG's viewer windowing. John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45506#45506 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
Hi, For info: this can be achieved using... osgViewer::ViewerBase::Windows windows; viewer.getWindow(windows); windows[0]-setWindowDecoration(false); But this also prevents the window being moved - not ideal. John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45508#45508 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)
On 02/16/2012 08:46 AM, John Simpson wrote: Hi, For info: this can be achieved using... osgViewer::ViewerBase::Windows windows; viewer.getWindow(windows); windows[0]-setWindowDecoration(false); But this also prevents the window being moved - not ideal. Hi, John, There should be a better way to do that: osg::GraphicsContext::Traits *traits = new osg::GraphicsContext::Traits; traits-x = 100; traits-y = 100; traits-width = 640; traits-height = 480; traits-windowDecoration = true; traits-supportsResize = false; traits-sharedContext = 0; osg::Camera *camera = new osg::Camera(); camera-setGraphicsContext(gc); camera-setViewport(new osg::Viewport(0, 0, traits-width, traits-height)); viewer.setCamera(camera); viewer.realize(); Haven't tested this code, but something like that should be enough to get what you're looking for. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org