Unofficial OpenGL Software Development Kit  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Building the SDK

In order to build the SDK, you must first have installed your development environment of choice. Please ensure that your development environment is functional and up to date.

Supported development environments are:

Note
At present, the OpenGL SDK has not been tested under any form of Mac OS.

Outside of the Premake utility, the Unofficial OpenGL SDK is completely self-contained. It has no external dependencies. Simply download the distribution and unzip the package into a directory of your choice.

Premake

To simplify the build process for the SDK across platforms, the build system used for the SDK is the Premake utility, version 4.3 or later.

Premake is a utility for generating build files; it does not do the building itself. The general idea is this: you run the Premake program on Premake scripts. This will generate the build files for your development environment of choice. Then you use those build files in that development environment to build your project.

For example, if you are using GCC and the standard GNU tools, Premake would generate a Makefile, which you would then use GNU Make on as normal. If you use Visual Studio, Premake generates .sln and .vcproj files for the VS version of your choice.

For each build tool, Premake has a command to generate the build files for that tool. For example, to execute Premake for Visual Studio 2008, the following command line would be used:

premake4 vs2008

To build a GNU Makefile, one would use

premake4 gmake

Each build tool that Premake supports has its own command; the Premake documentation explains how they work.

Building the Libraries

To compile the libraries that are part of the SDK, perform the following steps:

  1. Ensure that the Premake4 executable is in your path.
  2. Open a command line and go to the directory where you have unpacked the SDK.
  3. Run the command premake4 plat, where plat is the Premake4 command for your build system of choice.
  4. Use the generated build files, using your preferred build environment, to build the libraries.

This process will generate the static libraries for all of the libraries that need compiling (some libraries, like GLM, are pure header libraries).

Note
Neither the GNU Makefiles nor the Premake scripts contain an "install" action. The SDK is intended to be used where it is; it is not intended to make any modifications to your system outside of the directory where you placed it.

Building the Examples

The SDK comes with a number of pieces of example code. These are useful as reference material when getting started with OpenGL.

To compile the examples, perform the following steps:

  1. Ensure that all of the libraries are compiled.
  2. Open a command line and go to the directory where you have unpacked the SDK.
  3. Go to the examples directory.
  4. Run the command premake4 plat, where plat is the Premake4 command for your build system of choice.
  5. Use the generated build files, using your preferred build environment.

The examples are all intended to be executed in the directories where the executables are generated. Any paths they use are relative to that directory.