mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 17:30:04 -05: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
@@ -1042,6 +1042,16 @@ void setSgctDelegateFunctions() {
|
||||
sgct::SGCTWindow* w = sgct::Engine::instance()->getWindowPtr(0);
|
||||
w->setHorizFieldOfView(hFovDeg);
|
||||
};
|
||||
#ifdef WIN32
|
||||
sgctDelegate.getNativeWindowHandle = [](size_t windowIndex) -> void* {
|
||||
sgct::SGCTWindow* w = sgct::Engine::instance()->getWindowPtr(windowIndex);
|
||||
if(w) {
|
||||
HWND hWnd = glfwGetWin32Window(w->getWindowHandle());
|
||||
return reinterpret_cast<void*>(hWnd);
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
#endif // WIN32
|
||||
sgctDelegate.frustumMode = []() {
|
||||
using FM = sgct_core::Frustum::FrustumMode;
|
||||
switch (sgct::Engine::instance()->getCurrentFrustumMode()) {
|
||||
|
||||
Reference in New Issue
Block a user