Re: [osg-users] osgviewerQt example - 3D disappears if Viewer height is zero
Alistair Baxter wrote: Yeah, we had to override the Qt resizeEvent function for our osgQt::GLWidget subclass to ensure that neither width nor height were being set to zero before calling the parent's version. Thanks Alistair for your reply. As a workaround I implemented minimumSizeHint() virtual method to return QSize(1,1), but your solution is nicer. Anyway it seems there's something odd in OSG code. In fact osgviewer executed with --window option works fine even if the window height becomes 0. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58951#58951 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgviewerQt example - 3D disappears if Viewer height is zero
Yeah, we had to override the Qt resizeEvent function for our osgQt::GLWidget subclass to ensure that neither width nor height were being set to zero before calling the parent's version. Alistair Baxter Software Engineer Join us for the 2014 Houston Roadshow on 4th April More details on our Calendar: http://www.mve.com/calendar Midland Valley Exploration Ltd. 144 West George Street Glasgow G2 2HG United Kingdom Tel: +44 (0) 141 332 2681 Fax:+44 (0) 141 332 6792 The structural geology experts ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgviewerQt example - 3D disappears if Viewer height is zero
So, the problem related to the NaN dump of CullVisitor::apply(Geode) is solved in OSG 3.2.0. On the other side there is still a problem related to the 3d graphics disappearing. This can be easily reproduced with osgviewerQt example. Basically, resizing the viewer to have 0 height then expand it again and the graphics is no more visibe. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58913#58913 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgviewerQt example - 3D disappears if Viewer height is zero
Hi, in my Qt application I'm experiencing some issues when the viewer is reduced to 0 height. I reduce the viewer size to 0 height then I increase its height again and when I try to interactively rotate the (no more visible - see below) scene with mouse (through a trackabll manipulator) I get the following dump on screen: CullVisitor::apply(Geode) detected NaN, depth=-1.#IND, center=(35 0 -2.14577e-006), matrix={ 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 0 0 -98 1 } Moreover my 3D scene is not visualized anymore. So I tried with osgviewerQt example and the 3D scene disappears here too. Is it a known issue? I'm investigating on it to understand the point but if someone already found the cause or a solution please let me know. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58881#58881 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgviewerQt example - 3D disappears if Viewer height is zero
Hi Gianni, The issue sounds vaguely familiar, but I'm afraid I can't recall all details off the top of my head, or whether it was osgQt specific even. My guess it'll be an issue with the camera projection matrix being scaled to 0,0 to fit to zero sized viewport and then once an attempt to rescale it back up to valid size that erroneous matrix is re-scaled and of course fails. Adding some debugging in the code that sets the projection matrix would allow you to spot whether this is happening or not. One could disable the automatic adjustment of the camera projection matrix too to see if this is the root of the issue, see osg::Camera::setProjectionResizePolicy(osg::ProjectionResizePolicy) method : From include/osg/Camera: enum ProjectionResizePolicy { FIXED, /** Keep the projection matrix fixed, despite window resizes.*/ HORIZONTAL, /** Adjust the HORIZONTAL field of view on window resizes.*/ VERTICAL /** Adjust the VERTICAL field of view on window resizes.*/ }; /** Set the policy used to determine if and how the projection matrix should be adjusted on window resizes. */ inline void setProjectionResizePolicy(ProjectionResizePolicy policy) { _projectionResizePolicy = policy; } Robert. On 11 April 2014 11:13, Gianni Ambrosio ga...@vi-grade.com wrote: Hi, in my Qt application I'm experiencing some issues when the viewer is reduced to 0 height. I reduce the viewer size to 0 height then I increase its height again and when I try to interactively rotate the (no more visible - see below) scene with mouse (through a trackabll manipulator) I get the following dump on screen: CullVisitor::apply(Geode) detected NaN, depth=-1.#IND, center=(35 0 -2.14577e-006), matrix={ 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 0 0 -98 1 } Moreover my 3D scene is not visualized anymore. So I tried with osgviewerQt example and the 3D scene disappears here too. Is it a known issue? I'm investigating on it to understand the point but if someone already found the cause or a solution please let me know. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58881#58881 ___ 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] osgviewerQt example - 3D disappears if Viewer height is zero
Hi Robert, If I set the camera projection resize policy to FIXED then I don't get the bunch of NAN dump and the does not disappears. Anyway I tried with the osgviewer application calling it with --window option and even if the camera projection resize polici is set to HORIZONTAL, it works fine (no gfx disappears nor NAN). Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58895#58895 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org