OpenGL Samples Setup Guide

This guide will help you with the setup of your host machine in order to properly build and run the the NVIDIA GameWorks OpenGL sample applications.

Please ensure your system meets the OpenGL Samples Prerequisites before proceeding further.

Installing and Building on Windows Host

This section will walk you through the setup of the OpenGL samples on a Windows development PC, for Android and Windows build targets.

Targeting Windows Host

  1. Unzip the samples pack to a directory on the Windows Host PC. We will call this directory SAMPLES_ROOT.
  2. Launch Visual Studio 2010 or 2012.
  3. Open the all-samples project file: {SAMPLES_ROOT}/samples/build/vs201[0,2]win32/AllSamples.sln.
  4. Build the solution as release or debug.
  5. The resulting apps will be placed in {SAMPLES_ROOT}/samples/bin/vs201[0,2]x86/.

Targeting Android Device

  1. Unzip the samples pack to a directory on the Windows Host PC. We will call this directory SAMPLES_ROOT.
  2. If you haven't already, download and install the Tegra Android Development Pack (TADP) for Windows. Be sure to include NVIDIA Nsight Tegra, Visual Studio Edition as an installed component.
  3. Launch Visual Studio 2010 or 2012.
  4. Open the all-samples project file: {SAMPLES_ROOT}/samples/build/vs2010android/AllSamples.sln (only VS2010 project files are included for Android, but they will open with warnings in VS2012).
  5. Build the solution as release or debug.
  6. The resulting app APKs will be placed in {SAMPLES_ROOT}/samples/bin/Tegra-Android/.
Common Android Build Errors

Installing and Building on Linux Host

This section will walk you through the setup of the OpenGL samples on a Linux development PC for Linux and Android build targets.

Targeting Linux x86

  1. Install the Linux build/target pre-requisites by running:
    sudo apt-get install g++ binutils-gold xorg-dev libglu1-mesa-dev
  2. Unzip the samples pack to a directory on the Linux Host PC. We will call this directory SAMPLES_ROOT.
  3. Open a terminal window to {SAMPLES_ROOT}/samples/build/linux[32,64], depending on the host PC.
  4. Run make.
  5. The resulting apps will be placed in {SAMPLES_ROOT}/samples/bin/linux[32,64]/. Note that as per the Prerequisites guide, the system must have working OpenGL drivers for the samples to run.
Common Linux x86 Build Errors

Targeting Linux Tegra (L4T, e.g. Jetson TK1)

It is possible to build for Tegra Linux target (e.g. Jetson TK1) either cross-compiled from a Linux x86 host or directly compiled on the Linux for Tegra device itself.

Cross-compiling from x86 Linux Host
  1. Unzip the samples pack to a directory on the Linux Host PC. We will call this directory SAMPLES_ROOT.
  2. Install the Linux target pre-requisites:
    sudo apt-get install g++-arm-linux-gnueabihf
  3. Open a terminal window to {SAMPLES_ROOT}/samples/build/linux-arm32, depending on the host PC.
  4. Run make.
  5. The resulting apps will be placed in {SAMPLES_ROOT}/samples/bin/linux-arm32/.
Compiling on the Tegra Linux Device
  1. Unzip the samples pack to a directory on the Linux Host PC. We will call this directory SAMPLES_ROOT.
  2. Install the Linux target pre-requisites:
    sudo apt-get update(this is critical, or else the next line will do nothing)
    sudo apt-get install g++
  3. Open a terminal window to {SAMPLES_ROOT}/samples/build/linux-arm32, depending on the host PC.
  4. Run make.
  5. The resulting apps will be placed in {SAMPLES_ROOT}/samples/bin/linux-arm32/.

Targeting Android Device

  1. Unzip the samples pack to a directory on the Linux Host PC. We will call this directory SAMPLES_ROOT.
  2. If you haven't already, download and install the Tegra Android Development Pack (TADP) for Linux.
  3. Set the environment variable NVPACK_ROOT for all terminals to the root of the TADP install (i.e. the full path to NVPACK).
  4. Set the environment variable ANDROID_HOME for all terminals to the root android SDK (likely the full path to NVPACK/android-sdk-linux).
  5. If the NDK version installed by TADP is not the default for the release (currently android-ndk-r9b), set the environment variable NVPACK_NDK_VERSION for all terminals to the NDK version, e.g. android-ndk-r9d. Note that the makefiles require the NDK to be inside of the NVPACK_ROOT, since they were designed to support the Tegra Android Development Pack for consistency.
  6. Install the Linux pre-requisites:
    sudo apt-get install openjdk-6-jdk dos2unix
  7. If you are on a 64-bit Linux host, install the 32-bit pre-requisites:
    sudo apt-get install ia32-libs
  8. Open a terminal window to {SAMPLES_ROOT}/samples/build/makeandroid.
  9. Run make.
  10. The resulting app APKs will be placed in {SAMPLES_ROOT}/samples/{sample name}/bin/.
Common Android Build Errors

 

 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.200601 ©2014-2020. NVIDIA Corporation. All Rights Reserved.