The solution for to refactor the way that events are checked so I add a bool return type to checkEvents() method across osgViewer::GraphcisWindow, osgGA::Devive and osgViewer::Viewer/CompositeViewer classes
with startThreading/stopThreading the _drawQueue and _availableQueue
are not reset properly. This can lead to a deadlock when threading is
started again. So before threading is started again the queues must be
reset. This deadlock is also reported earlier by someone else in here:
http://forum.openscenegraph.org/viewtopic.php?p=43415#43415"
* 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.
"
* avfoundation: added support for IOS (CoreVideo-support is still in development, works only for SDK >= 6.0, set IPHONE_SDKVER in cMake accordingly)
* zeroconf: added ZeroConf-device-plugin (Mac/Win only, linux implementation missing) to advertise and discover services via ZeroConf/Bonjour, on windows you'll need the Bonjour SDK from Apple
* osgosc: modified the example to demonstrate the usage of the ZeroConf-plugin (start the example with the command-line-argument --zeroconf)
* SlideShowConstructor: enable/disable CoreVideo via a environment variable (P3D_ENABLE_CORE_VIDEO)
* RestHttp: mouse-motion-events get interpolated
* RestHttp: unhandled http-requests get sent as an user-event to the event-queue, all arguments get attached as user-values to the event
* modified some CMakeModules to work correctly when compiling for IOS
* fixed a compile-error for IOS in GraphicsWindowIOS
* some minor bugfixes"
This issue can be reproduced:
1. Create osgViewer window,
2. Push right&left mouse buttons on the osgViewer window,
3. Move mouse out of window, and release right&left mouse buttons.
osgViewer window handle only first mouse release, as result window thinks that we did not released second mouse button.
I attached fix for this issue."
Added template readFile(..) function to make it more convinient to cast to a specific object type.
Added support for osgGA::Device to osgViewer.
Added sdl plugin to provides very basic joystick osgGA::Device integration.
10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.
The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.
After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).
I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.
While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.
Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.
There's even a small example video here: http://vimeo.com/31611842"
Line 251:
int getKeyEventWindowedResolutionDown() const { return _keyEventWindowedResolutionUp; }
Should be replaced with:
int getKeyEventWindowedResolutionDown() const { return _keyEventWindowedResolutionDown; }"
UIView, respecting the sizes via GraphicsContext::Traits.
This helps users, who want to integrate osg into an existing ios-app
with multiple UIViews. Additinally a view-controller gets only created
if needed, set IGNORE_ORIENTATION via the WindowData-struct.
"
CID 11836: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _fullscreen is not initialized in this constructor nor in any functions that it calls.
implement the recently introduced setSyncToVBlank-method.
Additionally I added a ToggleSyncToVBlank-eventhandler to osgViewer. I
used it to test the code, perhaps you'll find it useful and include it
in the distribution."
I also fixed the vsync implementation introduced with rev.11357 that was crashing with the Windows Error #170. So I removed your temporary /* */ around the vsync condition..."
enum DeviceOrientation{
PORTRAIT_ORIENTATION = 1<<0,
PORTRAIT_UPSIDEDOWN_ORIENTATION = 1<<1,
LANDSCAPE_LEFT_ORIENTATION = 1<<2,
LANDSCAPE_RIGHT_ORIENTATION = 1<<3,
ALL_ORIENTATIONS = PORTRAIT_ORIENTATION | PORTRAIT_UPSIDEDOWN_ORIENTATION | LANDSCAPE_LEFT_ORIENTATION | LANDSCAPE_RIGHT_ORIENTATION
};
typedef unsigned int DeviceOrientationFlags;
The main motivation for this is to easily allow the user to specifiy that the device is in a horizontal orientation rather then having to rotate the view matrix. All flags have been tested individually as well as in combinations. The default is ALL_ORIENTATIONS to keep the exiting functionality for anyone who hasn't specified WindowData for their context traits.
"
that the windows did not act on repaint request (WM_PAINT, EXPOSE,...)
Detailed explanation:
- I implemented requestRedraw using the push approach (not using
GraphicsWindow::_requestRedraw flag that I was considering) as there may be
multiple viewers reading the flag and fighting to reset it after the paint
request, while some viewers may not spot the request to redraw
- I made windows call GraphicsWindow::requestRedraw when they receive
appropriate message (WM_PAINT, EXPOSE, RESIZE,...)
- There were issues on Linux that windows did not want to close using x
button. Resolved by moving the test for DeleteWindow event from
swapBuffersImplementation() to GraphicsWindowX11::checkEvents(). The difficulty
was that DeleteWindow event is not coming using _eventDisplay, but through
_display.
- The last difficulty was that it is necessary to call
ViewerBase::checkWindowStatus() to set _done to true when all windows are
closed. This did not happened recently in ON_DEMAND run scheme. I put the call
to checkWindowStatus() to eventTraversal.
"
disable pragmas that turn off specific warnings for MSVC.
Unfortunately it's presence is only checked in osg/Export header,
making other Export headers disable warnings no matter what, which is
kind of incoherent.
My fix adds #include <osg/Config> to every Export header. I've also
unified checking whether to disable warnings to current osg/Export
way:
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS).
Attachment contains all changed Export files in their original locations."
/** Convenience method for setting up multiple slave cameras that depth partition the specified camera.*/
bool setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPartitionSettings* dps=0);
/** Convenience method for setting up multiple slave cameras that depth partition each of the view's active cameras.*/
bool setUpDepthPartition(DepthPartitionSettings* dsp=0);
and another problem is:
example osgkeyboard is not work (keys not highlight) if user have 2 keyboard layout native and english and current user layout is native
I try to explain my changes
we need something that is identify key without modifier keys and layout -> this is UnmodifedKey
I think osg must have its own UnmodifiedKeys table. Code must be run same on different platforms. This can de guaranteed by UnmodifiedKeys table.
Mikhail Izmestev helped me. He implemented VirtualKey changes in GraphicsWindowX11"