diff --git a/NOMADVRLib/ConfigFile.cpp b/NOMADVRLib/ConfigFile.cpp index aa7d86c51e1b2d84f4534d9664f571b986d23640..63976160203008cd48beb901b315eca7ba38a95a 100644 --- a/NOMADVRLib/ConfigFile.cpp +++ b/NOMADVRLib/ConfigFile.cpp @@ -47,6 +47,7 @@ Solid *solid; bool saveStereo; int screenshotdownscaling; bool hapticFeedback; +bool showcontrollers; //markers such as hole positions and electron positions float ** markers; @@ -178,6 +179,7 @@ int loadConfigFile(const char * f) saveStereo=false; screenshotdownscaling=1; hapticFeedback=false; + showcontrollers=false; // FILE *F = fopen(f, "r"); if (F == 0) @@ -452,7 +454,7 @@ int loadConfigFile(const char * f) } else if (!strcmp (s, "atomcolour")) { char atom [100]; float rgb[3]; - r = fscanf(F, "%s %f", atom, rgb, rgb + 1, rgb + 2); + r = fscanf(F, "%s %f %f %f", atom, rgb, rgb + 1, rgb + 2); if (r!=4) { eprintf ("Error loading atom colour"); return -19; @@ -478,6 +480,8 @@ int loadConfigFile(const char * f) hapticFeedback=true; } else if (!strcmp (s, "supercell")) { r=fscanf (F, "%f %f %f", supercell, supercell+1, supercell+2); + } else if (!strcmp (s, "showcontrollers")) { + showcontrollers=true; } else if (!strcmp (s, "\x0d")) { //discard windows newline (problem in Sebastian Kokott's phone (?!) continue; } else { diff --git a/NOMADVRLib/ConfigFile.h b/NOMADVRLib/ConfigFile.h index cf3dae009b26e17d0cca70c7ee1b33cd78995a03..42b45cd16ca3aad33a61b5abf3739e944acd66cc 100644 --- a/NOMADVRLib/ConfigFile.h +++ b/NOMADVRLib/ConfigFile.h @@ -43,6 +43,7 @@ extern bool saveStereo; extern int screenshotdownscaling; extern bool hapticFeedback; +extern bool showcontrollers; //markers such as hole positions and electron positions extern float ** markers; diff --git a/OpenVR/TimestepData/hellovr_opengl.vcxproj b/OpenVR/TimestepData/hellovr_opengl.vcxproj index 378024c583a6e4f908e5f764fc489ec469a889c2..0eaf7764ece5ab6de117cf88fcc78cfcfaa4185c 100644 --- a/OpenVR/TimestepData/hellovr_opengl.vcxproj +++ b/OpenVR/TimestepData/hellovr_opengl.vcxproj @@ -23,6 +23,7 @@ <Keyword>Win32Proj</Keyword> <RootNamespace>hellovr_opengl</RootNamespace> <ProjectName>NOMADViveT</ProjectName> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> @@ -49,7 +50,7 @@ <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v110</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -110,7 +111,7 @@ <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_WINDOWS;INDICESGL32;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../../headers;../thirdparty/glew/glew-1.11.0/include;../thirdparty/sdl2-2.0.3/include;Y:\v2t\software\rapidjson\include;Y:\v2t\software\curl\include;Y:\v2t\software\openvr\openvr-0.9.19\samples\TimestepData</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../../headers;../thirdparty/glew/glew-1.11.0/include;../thirdparty/sdl2-2.0.3/include;Y:\software\rapidjson\include;Y:\software\curl\include;Y:\software\openvr\openvr-0.9.19\samples\TimestepData</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <EnablePREfast>false</EnablePREfast> </ClCompile> @@ -154,7 +155,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;INDICESGL32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <AdditionalIncludeDirectories>..;../../headers;../thirdparty/glew/glew-1.11.0/include;..\thirdparty\sdl2-2.0.3\include;Y:\v2t\software\rapidjson\include;Y:\v2t\software\openvr\openvr-0.9.19\samples\TimestepData</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../../headers;../thirdparty/glew/glew-1.11.0/include;..\thirdparty\sdl2-2.0.3\include;Y:\software\rapidjson\include;Y:\software\openvr\openvr-0.9.19\samples\TimestepData;Y:\v2t\software\rapidjson\include;Y:\v2t\software\openvr\openvr-0.9.19\samples\TimestepData</AdditionalIncludeDirectories> <EnablePREfast>false</EnablePREfast> </ClCompile> <Link> diff --git a/OpenVR/TimestepData/hellovr_opengl_main.cpp b/OpenVR/TimestepData/hellovr_opengl_main.cpp index 87bc0517f31410ece61a987e0a133e0ff59fdf13..38cba011875ceced4c37a24671e9568915429426 100644 --- a/OpenVR/TimestepData/hellovr_opengl_main.cpp +++ b/OpenVR/TimestepData/hellovr_opengl_main.cpp @@ -2350,7 +2350,8 @@ void CMainApplication::RenderScene(vr::Hmd_Eye nEye) if (ISOS==0) { RenderAtoms(nEye); RenderUnitCell(nEye); - RenderAllTrackedRenderModels(nEye); + if (showcontrollers) + RenderAllTrackedRenderModels(nEye); return; } @@ -2386,7 +2387,8 @@ void CMainApplication::RenderScene(vr::Hmd_Eye nEye) RenderAtoms(nEye); RenderUnitCell(nEye); } - RenderAllTrackedRenderModels(nEye); + if (showcontrollers) + RenderAllTrackedRenderModels(nEye); } // for zl glBindFramebuffer(GL_FRAMEBUFFER, dfb); @@ -2481,7 +2483,8 @@ void CMainApplication::RenderScene(vr::Hmd_Eye nEye) glBindTexture(GL_TEXTURE_2D, 0); glUseProgram(m_unSceneProgramID); PaintGrid(nEye, currentiso); - RenderAllTrackedRenderModels(nEye); + if (showcontrollers) + RenderAllTrackedRenderModels(nEye); } //else currentiso =isos