Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
krmadhan opened this issue Jan 9, 2024 · 0 comments

Comments

@krmadhan
Copy link

krmadhan commented Jan 9, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant