Skip to content

Get SimMedTK building and running on Mac OS X.

This is a large commit because clang (on OS X) does not allow libraries with missing dependencies and adding them would introduce cyclic dependencies between libraries (which CMake and sanity both forbid).

The following changes are included:

  • Merge smUtilities into smCore since they were heavily interdependent.
  • Merge smShaders into smRendering since they were heavily interdependent.
  • Omit the unused smMotionTransformer class.
  • Remove pipes from smSDK based on Ricardo's advice.
  • Add a header-only factory class (templated on the common base class for objects in the collection) that uses dynamic library initialization to register subclasses.
  • Split smViewer into a base class (smViewerBase) in smCore and OpenGL-specific methods (smViewer in smRendering). Use the factory above to register the smViewer when linking to smRendering. If not linking to rendering, the factory returns a null shared pointer when smSDK asks for a view.
  • Moves smGLUtils into smRendering since it is dependent on OpenGL, unlike the rest of the classes that were moved into smCore.
  • Move draw() implementations out of individual classes and into a new smRenderDelegates library. This library uses the new factory pattern, so simply linking to smRenderDelegates should be enough to make delegates available to applications that wish to do rendering.
  • Run a (the?) viewer in the main thread. On OS X, only the main thread can run user interface code because Cocoa events are only delivered to the main thread and Cocoa is not threadsafe.
  • Remove the broken and unused smCollisionManager.

There are rendering issues after this commit, but they apparently exist prior to the commit as well.

Merge request reports