It’s now possible to use Triton’s 3D water effects on MacOS! There are a few tricks to it – so here’s some guidance. Make sure you are using XCode 5 or newer.
Install FFTSS
Triton on MacOS is distributed as obfuscated source code, so you’ll actually be building the libraries on your system from a terminal window. Before starting, you need to download and install the FFTSS library on your system. You can download FFTSS 3.0 here.
This is a Unix library – but building it on MacOS just requires one small trick. Once you’ve decompressed FFTSS, cd into its include directory, and then:
touch malloc.h
Once you have a “fake” malloc.h in there, cd back up to the top directory of fftss, and do the usual:
sudo ./configure
sudo make
sudo make install
Once this is done, confirm that you have a libfftss.a in your /usr/local/lib directory. On Mavericks, make sure this is a 64-bit build of FFTSS.
Install CMake
Triton is built using CMake, which is a cross-platform build tool. You can download MacOS X versions of CMake from cmake.org.
Confirm that you have a valid /usr/bin/cmake symlink after installing. Just type “cmake” in your terminal, and you should get usage information displayed if it is succesfully installed.
Download and Install Triton
You’re almost done. First  download the Triton Ocean SDK installer for MacOS. You’ll end up with a install-triton-eval.run file. Now,
sudo chmod a+x ./install-triton-eval.run
sudo ./install-triton-eval.run
Triton should now decompress into a triton-sdk-eval directory, and start compiling itself. If the compilation succeeds, you should be left with a message inviting you to test out the OpenGLSample application in the SDK that was just linked.
cd triton-sdk-eval/Samples/OpenGLSample
./OpenGLSample
…and you should see Triton’s 3D water in action on your Mac!
You can study this sample application’s source code to get started on integrating Triton into your own application, and you’ll find complete HTML documentation in the docs/html directory of the SDK – or just read Triton’s API documentation online.
Optional FFT Acceleration
To make Triton even faster, you can build it against NVidia’s CUDA Toolkit (version 6 or newer) and/or Intel’s Integrated Performance Primitives.
CUDA will speed up Triton on NVidia-based systems. Grab the CUDA Toolkit from NVidia’s website and install it. Then, you’ll need to rebuild Triton.
cd triton-sdk-eval
sudo cmake ./
sudo make
If you encounter an error when TritonCUDA is being built, try running sudo cmake ./ a couple more times, and then sudo make again. To ensure CUDA is used at runtime, you’ll need to add it to your dynamic library path, like this:
export DYLD_LIBRARY_PATH="/usr/local/cuda/lib:$DYLD_LIBRARY_PATH"
You may also using Intel’s Integrated Performance Primitives (IPP) to accelerate Triton on any system. IPP for MacOS is distributed as part of Intel’s C++ Composer product, so you’ll need to download an evaluation version of C++ Composer XE from Intel, and install it on your system.
Once the C++ Composer evaluation is installed, you can follow the same steps above to rebuild Triton. It should automatically find the IPP libraries and use them when linking.
In order for IPP acceleration to work at runtime, you’ll need to set the environment variable DYLD_LIBRARY_PATH to /opt/intel/ipp/lib:/opt/intel/composerxe/lib so the Intel .dylib’s can be located.
export DYLD_LIBRARY_PATH="/opt/intel/ipp/lib:/opt/intel/composerxe/lib:$DYLD_LIBRARY_PATH"
Feel free to contact us at support@sundog-soft.com if you have trouble.