OpenSceneGraph icon indicating copy to clipboard operation
OpenSceneGraph copied to clipboard

Touch Screen Problem -> myTraits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData(hwnd, true);

Open krmadhan opened this issue 2 years ago • 0 comments

Hello, I amusing osg3.6.5

Problem Description: I am developing application(OSG(OpenSceneGraph) c++ with C# WPF UI) for a desktop environment and that application visualize 3D objects (Ex: GL primitives, OSG 3D Shapes, .stl file for 3D Model). This application having inputs: mouse, keyboard and touch screen also. In osgViewer mouse, keyboard and touch screen inputs are working fine.

But, I facing problem in C# WPF UI window: touch screen inputs are not getting in inherited WindowData Visualization. Mouse inputs only working.

Code Snapshot:: ``` osg::ref_ptrosg::GraphicsContext::Traits myTraits = new osg::GraphicsContext::Traits;

// Set location and size of the window 
myTraits->x = windowX;
myTraits->y = windowY;
myTraits->width = windowWidth;
myTraits->height = windowHeight;
myTraits->windowDecoration = true;
myTraits->doubleBuffer = true;
myTraits->sharedContext = 0;
myTraits->samples = 6;
myTraits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData(hwnd);

// Create graphics context 
gcMain = osg::GraphicsContext::createGraphicsContext(myTraits.get());

Solution Expectation:
I want same result(mouse, keyboard and touch screen inputs) are work in C# WPF UI window(inherited WindowData Visualization) like osgViewer output.

please anyone help me to fix this problem.
thank you

krmadhan avatar Jan 09 '24 11:01 krmadhan