[osg-users] determining new size of rendering window after a user resizing

David Knipp David.Knipp at gmx.net
Thu Mar 31 08:28:03 PDT 2016


Hi,

if you are working under windows you can cast a window to GraphicsHandleWin32 as far as i know:

osgViewer::ViewerBase::Windows wins;
viewer->getWindows(wins);
osgViewer::GraphicsHandleWin32* win32Window = dynamic_cast<osgViewer::GraphicsHandleWin32*>(wins[0]);

if(win32Window) {
     // windows.h
     RECT r;
     GetWindowRect(win32Window->getHWND(), &r);
     // now use r.width and r.height
}

Cheers,
NoxxKn

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66692#66692








More information about the osg-users mailing list