Get Started with the Intel® Rendering Toolkit for macOS*

ID 766440
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Configure Your System

To use the Intel® Rendering Toolkit (Render Kit) samples, you first need to set up your system as follows:

  1. Install the oneAPI sample browser to access sample sources.
  2. Install development tools to build the samples.
  3. Install Homebrew*.
  4. Install CMake* and pkg-config.
  5. Install graphics and imaging libraries to view interactive sample application.
  6. Install imaging tools to work with sample input and output.
  7. Configure system security options.
  8. Set up environment variables.
  9. Optional: Install tools to navigate repositories and documentation.

Install Development Tools

To build samples, install Xcode* and Xcode command line tools for C99- and C++11-capable compiler tools.

  1. Download and install Xcode from the Apple* website or the App Store from the Spotlight* tool.
  2. Open a new terminal.
  3. Install the command line tools for Xcode:
    xcode-select --install

For more information on setting up the command line tools for Xcode, see Building from the Command Line with Xcode FAQ.

Install Homebrew*

Homebrew* (brew) is required to install configuration packages. To install Homebrew:

  1. If you are behind proxy, you may need to configure your proxy:
    export http_proxy=http://<user>:<pass>@proxy.<server>.com:<port>
    export https_proxy=http://<user>:<pass>@proxy.<server>.com:<port>
    export HTTP_PROXY=${http_proxy}
    export HTTPS_PROXY=${https_proxy}
    export ALL_PROXY=${http_proxy}
  2. Run the following command from a terminal to install Homebrew:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
NOTE:
You can also use other package management systems, such as MacPorts*. However, they are not covered in this guide.

Install CMake* and pkg-config

Although the CMake and pkg-config build tools are not required by the oneAPI tools and toolkits, many oneAPI samples are provided as CMake projects and require CMake to build them. pkg-config is required to locate libraries needed to complete a build of the application.

Install the tools as follows:

brew install cmake pkg-config

For information about Homebrew, see the official website.

Install Graphics and Imaging Libraries

Some Render Kit samples, such as Intel OSPRay Studio, are interactive and require graphics libraries.

To install the graphics and imaging libraries, do one of the following depending on your Linux distribution:

To install the libraries with Homebrew:

brew install libpng jpeg glfw glew openimageio
NOTE:
Interactive applications use OpenGL*, Cocoa,* and IOKit* frameworks to accelerate lower-level system library. These frameworks come with Xcode.

The command installs the following libraries:

  • libPNG is a PNG image loading library for input and output image files.
  • libJPEG is a JPEG image loading library for input and output image files.
  • libGLFW3 is a multiplatform OpenGL API for windowing, input, events.
  • GLEW is an OpenGL* extension library.
  • libOpenImageIO is a library for reading and writing many image types, including HDR images.

Install Imaging Tools

Render Kit samples and applications often require preprocessed images as input or generate images as output. To convert input and output images, you need to get imaging tools for staging NetPBM filetypes (PPM and PFM). The ImageMagick* tool is suggested. See the ImageMagick website for standalone and package manager install instructions.

To install the tool with Homebrew:

brew install imagemagick

Configure System Security Options

Recent versions of macOS may restrict executing programs built with the Render Kit. Disable execution restrictions as follows to enable executing the programs:

sudo spctl --master-disable

For more security configuration options, run:

man spctl

Set up Environment Variables

To use Render Kit from command line, you need to set up environment variables for Intel oneAPI Toolkit components using a setvars.sh script. You can find the script in the root folder of your Intel oneAPI Toolkit installation, which is by default /opt/intel/oneapi/ for sudo or root users and ~/intel/oneapi/ for non-root users.

NOTE:
If you installed the Intel oneAPI Toolkits to a different location, make sure to replace the default path with your custom one in the commands below before running them.

Option 1. Configure environment variables once per session

Each time as you open a new terminal, you need to source the setvars.sh script as follows:

  • For root or sudo users:
    . /opt/intel/oneapi/setvars.sh
  • For non-root users:
    . ~/intel/oneapi/setvars.sh

Option 2. Configure environment variables to be set up automatically for all sessions

To have the environment automatically set up for your all projects, add the source command to a startup script where it will be invoked automatically.

For example, you can add the . /opt/intel/oneapi/setvars.sh (for root users) or the . ~/intel/oneapi/setvars.sh (for non-root users) command to your ~/.bashrc_profile or ~/.profile script.

To make the settings permanent for all accounts on your system, create a one-line .sh script in your system's /etc/profile.d folder and add the source command to the file.

You can manage the setvars.sh script using a configuration file. This is helpful if you need to initialize specific versions of libraries or a compiler, rather than defaulting to the latest version. For details, see Using a Configuration File to Manage Setvars.sh.

Optional: Install Tools to Navigate Repositories and Documentation

You might need the following tools:

Next Steps

Get started with the Intel® Rendering Toolkit by building and running sample applications.

Feedback on Issues

Share your feedback on this article in the Intel® Rendering Toolkit forum.