Configure Your System
To use the Intel® oneAPI Rendering Toolkit (Render Kit) samples, you first need to set up your system as follows:
- Install the oneAPI sample browser to access sample sources.
- Install development tools to build the samples.
- Install Homebrew*.
- Install CMake* and pkg-config.
- Install graphics and imaging libraries to view interactive sample application.
- Install imaging tools to work with sample input and output.
- Configure system security options.
- Set up environment variables.
- Optional: Install tools to navigate repositories and documentation.
Install the oneAPI Sample Browser
You can access sample applications from the oneAPI sample browser. The browser is distributed as part of the Intel® oneAPI Base Toolkit (Base Kit) in the dev-utilities directory.
Install the Base Kit with Intel® oneAPI Threading Building Blocks, which is available in both Render Kit and Base Kit. No other Base Kit components are required. See Base Kit product page for more information and download links.
Install Development Tools
To build samples, install Xcode* and Xcode command line tools for C99- and C++11-capable compiler tools.
- Download and install Xcode from the Apple* website or the App Store from the Spotlight* tool.
- Open a new terminal.
- 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:
- 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}
- Run the following command from a terminal to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
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
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, in particular, 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). Recommended tool is ImageMagick*. 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.
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:
- Install Git* or Wget* to get the library and sample source code.
- Install QlMarkdown* plugin, Visual Studio Code* to view documentation in Markdown format located in the Intel oneAPI Toolkit package or GitHub* repositories.
Next Steps
Get started with the Intel® oneAPI Rendering Toolkit by building and running sample applications.
Feedback
Share your feedback on this article in the Intel® oneAPI Rendering Toolkit forum.