From Stephan Huber, "* osgGA: fixed a small bug regarding emulating mouse-events from touch-events
* resthttp/osc: encapsulate RequestHandler-classes in their own namespaces to prevent class-name-lookup-errors in the debugger/code (had some weird crashes) * QTKit: fixed a compile-bug for gcc and blocks * osgPresentation: click_to_* will fire on RELEASE, only if the drawable received a PUSH beforehand * p3d/osgPresentation: implemented "forward_mouse_event_to_device"-tag, which will forward mouse-events to all registered devices of a viewer, if an intersection occurs. The mouse-coordinates get reprojected * present3d: all devices get registered with the viewer * osgViewer: only devices which are capable of receiving events are queried for new events. * GraphicWindowIOS: added a flag to GraphicWindowIOS::WindowData to set up a retained backing buffer (defaults to false) This will enable read-back of the render-buffer with glReadPixels even after the renderbuffer got presented * curl: added an optimized check for file-existance, now only the headers are requested and checked, instead of reading the whole file and handle it with a ReaderWriter * p3d: fixed a bug, where the existence of a local file may prevent the remote loading of a file with the same name. "
This commit is contained in:
@@ -933,7 +933,8 @@ void CompositeViewer::eventTraversal()
|
||||
++eitr)
|
||||
{
|
||||
osgGA::Device* es = eitr->get();
|
||||
es->checkEvents();
|
||||
if (es->getCapabilities() & osgGA::Device::RECEIVE_EVENTS)
|
||||
es->checkEvents();
|
||||
|
||||
// open question, will we need to reproject mouse coordinates into current view's coordinate frame as is down for GraphicsWindow provided events?
|
||||
// for now assume now and just get the events directly without any reprojection.
|
||||
|
||||
@@ -271,16 +271,18 @@ typedef std::map<void*, unsigned int> TouchPointsIdMapping;
|
||||
if (_win->getTraits()->inheritedWindowData.valid())
|
||||
win_data = dynamic_cast<osgViewer::GraphicsWindowIOS::WindowData*>(_win->getTraits()->inheritedWindowData.get());
|
||||
|
||||
eaglLayer.opaque = win_data ? !win_data->getCreateTransparentView() : YES ;
|
||||
eaglLayer.opaque = win_data ? !win_data->getCreateTransparentView() : YES;
|
||||
bool retained_backing = win_data ? win_data->getUseRetainedBacking() : NO;
|
||||
|
||||
if(_win->getTraits()->alpha > 0)
|
||||
{
|
||||
//create layer with alpha channel RGBA8
|
||||
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
|
||||
[NSNumber numberWithBool:retained_backing], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
|
||||
}else{
|
||||
//else no alpha, IOS uses RBG565
|
||||
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGB565, kEAGLDrawablePropertyColorFormat, nil];
|
||||
[NSNumber numberWithBool:retained_backing], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGB565, kEAGLDrawablePropertyColorFormat, nil];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,7 +651,8 @@ void Viewer::eventTraversal()
|
||||
++eitr)
|
||||
{
|
||||
osgGA::Device* es = eitr->get();
|
||||
es->checkEvents();
|
||||
if (es->getCapabilities() & osgGA::Device::RECEIVE_EVENTS)
|
||||
es->checkEvents();
|
||||
|
||||
// open question, will we need to reproject mouse coordinates into current view's coordinate frame as is down for GraphicsWindow provided events?
|
||||
// for now assume now and just get the events directly without any reprojection.
|
||||
|
||||
Reference in New Issue
Block a user