<div dir="ltr"><div>To make it work, I have moved it to after viewer.realize(); like that:</div><div><br></div><div>    viewer.realize();<br>    osgViewer::Viewer::Windows windows;<br>    viewer.getWindows(windows);<br>    for(auto &window : windows) {<br>        window->useCursor(false);<br>        window->setCursor(osgViewer::GraphicsWindow::NoCursor);<br>    }<br>    while ( !viewer.done() )<br>    {<br>        viewer.frame();<br>    }<br>    return 0;<br><br></div><br>On Thursday, March 28, 2019 at 10:39:48 AM UTC-3, Anatoly Dovzhik wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi. I wanna hide my mouse (commented in main function) but it doesn't work. What do i do wrong?
<br>
<br>here's my main:
<br>
<br>Code:
<br>int main()
<br>{
<br>    osg::Node *scene = osgDB::readNodeFile("../<wbr>resourses/lz.osg");
<br>    osgViewer::Viewer *viewer = new osgViewer::Viewer();
<br>
<br>
<br>    //DON'T WORK
<br>    osgViewer::Viewer::Windows windows;
<br>    viewer->getWindows(windows);
<br>    for(auto &window : windows) {
<br>        window->useCursor(false);
<br>        window->setCursor(osgViewer::<wbr>GraphicsWindow::NoCursor);
<br>    }
<br>
<br>
<br>    viewer->setSceneData(scene);
<br>    return viewer->run();
<br>}
<br>
<br>
<br>
<br>
<br>... 
<br>
<br>Thank you!
<br>
<br>Cheers,
<br>Anatoly
<br>
<br>------------------
<br>Read this topic online here:
<br><a href="http://forum.openscenegraph.org/viewtopic.php?p=75744#75744" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75744%2375744\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHEvMPvkrXQ5MjMlyrlAePVHN844A';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75744%2375744\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHEvMPvkrXQ5MjMlyrlAePVHN844A';return true;">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=75744#<wbr>75744</a>
<br>
<br>
<br>
<br>
<br>
<br>______________________________<wbr>_________________
<br>osg-users mailing list
<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="pbSZG559AgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@lists.<wbr>openscenegraph.org</a>
<br><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a>
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/e4739589-3787-4692-accd-1c015a99b627%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/e4739589-3787-4692-accd-1c015a99b627%40googlegroups.com</a>.<br />