mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-16 17:29:20 -06:00
Feature/integrated touchserver (#1015)
* WINDOWS: Touch server integrated into module The touch server functionality has been integrated into the touch module which is enabled by-default when the touch module is used on a windows build. The touch-hook checks for a connected digitizer (pen or touchscreen, but I haven't tested pen) This commit should also fix two potential low-risk race conditions in the tuioear.cpp file. * Added comment regarding which window we use * Added copyright notice on the win32_touch files Also changed from #pragma to #ifndef * Fixes based on review - Added anonymous namespace - Put win32hook in openspace namespace - Fixed indentations and linebreaks - Fixed an issue regarding global state deinitialization
This commit is contained in:
committed by
GitHub
parent
c469dd78a0
commit
a33057d830
@@ -23,6 +23,7 @@
|
||||
****************************************************************************************/
|
||||
|
||||
#include <modules/touch/touchmodule.h>
|
||||
#include <modules/touch/include/win32_touch.h>
|
||||
|
||||
#include <modules/webgui/webguimodule.h>
|
||||
#include <openspace/engine/globals.h>
|
||||
@@ -156,6 +157,14 @@ TouchModule::TouchModule()
|
||||
global::callback::initializeGL.push_back([&]() {
|
||||
LDEBUGC("TouchModule", "Initializing TouchMarker OpenGL");
|
||||
_markers.initialize();
|
||||
#ifdef WIN32
|
||||
// We currently only support one window of touch input internally
|
||||
// so here we grab the first window-handle and use it.
|
||||
void* nativeWindowHandle = global::windowDelegate.getNativeWindowHandle(0);
|
||||
if (nativeWindowHandle) {
|
||||
_win32TouchHook.reset(new Win32TouchHook(nativeWindowHandle));
|
||||
}
|
||||
#endif //WIN32
|
||||
});
|
||||
|
||||
global::callback::deinitializeGL.push_back([&]() {
|
||||
@@ -190,4 +199,8 @@ TouchModule::TouchModule()
|
||||
|
||||
}
|
||||
|
||||
TouchModule::~TouchModule() {
|
||||
//intentionally left empty
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user