Set the static mouse position values in osgProducer::EventAdater to the same
value as warp pointer to ensure that the now roll is encountered on warping of the pointer.
This commit is contained in:
@@ -277,35 +277,14 @@ void Viewer::requestWarpPointer(float x,float y)
|
||||
|
||||
if (_kbmcb)
|
||||
{
|
||||
EventAdapter::_s_mx = x;
|
||||
EventAdapter::_s_my = y;
|
||||
_kbmcb->getKeyboardMouse()->positionPointer(x,y);
|
||||
return;
|
||||
}
|
||||
|
||||
Producer::RenderSurface* rs = 0;
|
||||
|
||||
// here we need to search for which render surface contains the pointer,
|
||||
// but havn't implemented this yet.. follows is dummy loop really.
|
||||
for( unsigned int i = 0; i < _cfg->getNumberOfCameras(); i++ )
|
||||
{
|
||||
Producer::Camera* cam = _cfg->getCamera(i);
|
||||
rs = cam->getRenderSurface();
|
||||
}
|
||||
|
||||
if (rs)
|
||||
{
|
||||
EventAdapter::_s_mx = x;
|
||||
EventAdapter::_s_my = y;
|
||||
rs->positionPointer(x,y);
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "Warning: requestWarpPointer("<<x<<","<<y<<") not handled."<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Viewer::getUsage(osg::ApplicationUsage& usage) const
|
||||
{
|
||||
if (_kbmcb && _kbmcb->getEscapeSetDone())
|
||||
|
||||
Reference in New Issue
Block a user