mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-25 06:19:02 -06:00
minVR updates (#908)
* changed libopenspace cmake module name to openspace-core * change mouse button callback to include modifiers * added some new ghoul initialization from the non-MinVR main.cpp * Add GLFW as an external dependency for MinVR
This commit is contained in:
committed by
Alexander Bock
parent
6d725a7d50
commit
64f8793ea0
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -26,3 +26,6 @@
|
||||
[submodule "modules/fitsfilereader/ext/cfitsio"]
|
||||
path = modules/fitsfilereader/ext/cfitsio
|
||||
url = https://github.com/OpenSpace/cfitsio.git
|
||||
[submodule "apps/OpenSpace-MinVR/ext/glfw"]
|
||||
path = apps/OpenSpace-MinVR/ext/glfw
|
||||
url = https://github.com/opensgct/glfw
|
||||
|
||||
@@ -50,7 +50,7 @@ target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ex
|
||||
target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/minvr/external/GLFW/src/include)
|
||||
|
||||
|
||||
target_link_libraries(OpenSpace-MinVR libOpenSpace MinVR)
|
||||
target_link_libraries(OpenSpace-MinVR openspace-core MinVR)
|
||||
|
||||
# Web Browser and Web gui
|
||||
# Why not put these in the module's path? Because they do not have access to the
|
||||
|
||||
1
apps/OpenSpace-MinVR/ext/glfw
Submodule
1
apps/OpenSpace-MinVR/ext/glfw
Submodule
Submodule apps/OpenSpace-MinVR/ext/glfw added at 7ef34eb06d
@@ -200,7 +200,14 @@ void Handler::onVREvent(const VRDataIndex& eventData) {
|
||||
if (button == MouseButton::Right && action == MouseAction::Press) {
|
||||
windowingGlobals.mouseButtons |= 1 << 2;
|
||||
}
|
||||
global::openSpaceEngine.mouseButtonCallback(button, action);
|
||||
|
||||
using KM = KeyModifier;
|
||||
KM mod = KM::NoModifier;
|
||||
mod |= keyboardState.modifierShift ? KM::Shift : KM::NoModifier;
|
||||
mod |= keyboardState.modifierCtrl ? KM::Control : KM::NoModifier;
|
||||
mod |= keyboardState.modifierAlt ? KM::Alt : KM::NoModifier;
|
||||
|
||||
global::openSpaceEngine.mouseButtonCallback(button, action, mod);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -341,6 +348,14 @@ int main(int argc, char** argv) {
|
||||
|
||||
ghoul::initialize();
|
||||
|
||||
// Register the path of the executable,
|
||||
// to make it possible to find other files in the same directory.
|
||||
FileSys.registerPathToken(
|
||||
"${BIN}",
|
||||
ghoul::filesystem::File(absPath(argv[0])).directoryName(),
|
||||
ghoul::filesystem::FileSystem::Override::Yes
|
||||
);
|
||||
|
||||
// Create the OpenSpace engine and get arguments for the SGCT engine
|
||||
std::string windowConfiguration;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user