diff OrthancStone/Sources/StoneInitialization.cpp @ 1591:5887a4f8594b

moving platform-specific files out of the "OrthancStone" folder
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 23 Oct 2020 13:15:03 +0200
parents 244ad1e4e76a
children 4fb8fdf03314
line wrap: on
line diff
--- a/OrthancStone/Sources/StoneInitialization.cpp	Thu Oct 22 18:39:03 2020 +0200
+++ b/OrthancStone/Sources/StoneInitialization.cpp	Fri Oct 23 13:15:03 2020 +0200
@@ -21,10 +21,6 @@
 
 #include "StoneInitialization.h"
 
-#if !defined(ORTHANC_ENABLE_SDL)
-#  error Macro ORTHANC_ENABLE_SDL must be defined
-#endif
-
 #if !defined(ORTHANC_ENABLE_SSL)
 #  error Macro ORTHANC_ENABLE_SSL must be defined
 #endif
@@ -40,10 +36,6 @@
 #  endif
 #endif
 
-#if ORTHANC_ENABLE_SDL == 1
-#  include "Viewport/SdlWindow.h"
-#endif
-
 #if ORTHANC_ENABLE_CURL == 1
 #  include <HttpClient.h>
 #endif
@@ -52,11 +44,6 @@
 #  include <DicomParsing/FromDcmtkBridge.h>
 #endif
 
-#if ORTHANC_ENABLE_WASM == 1
-static double viewportsTimeout_ = 1000;
-static std::unique_ptr<OrthancStone::WebGLViewportsRegistry>  viewportsRegistry_;
-#endif
-
 #include "Toolbox/LinearAlgebra.h"
 
 #include <Logging.h>
@@ -150,23 +137,11 @@
         }
       }
     }
-
-#if ORTHANC_ENABLE_SDL == 1
-    OrthancStone::SdlWindow::GlobalInitialize();
-#endif
   }
   
 
   void StoneFinalize()
   {
-#if ORTHANC_ENABLE_WASM == 1
-    viewportsRegistry_.reset();
-#endif
-    
-#if ORTHANC_ENABLE_SDL == 1
-    OrthancStone::SdlWindow::GlobalFinalize();
-#endif
-    
 #if ORTHANC_ENABLE_DCMTK == 1
     Orthanc::FromDcmtkBridge::FinalizeCodecs();
 #endif
@@ -181,32 +156,4 @@
 
     Orthanc::Logging::Finalize();
   }
-
-
-#if ORTHANC_ENABLE_WASM == 1
-  void SetWebGLViewportsRegistryTimeout(double timeout)
-  {
-    if (viewportsRegistry_.get())
-    {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
-    }
-    else
-    {
-      viewportsTimeout_ = timeout;
-    }
-  }
-#endif
-
-
-#if ORTHANC_ENABLE_WASM == 1
-  WebGLViewportsRegistry& GetWebGLViewportsRegistry()
-  {
-    if (viewportsRegistry_.get() == NULL)
-    {
-      viewportsRegistry_.reset(new WebGLViewportsRegistry(viewportsTimeout_));
-    }
-
-    return *viewportsRegistry_;
-  }
-#endif
 }