blob: 6f65144148ea40d9ed26ce81e0c0dd6931631e0b [file] [log] [blame] [view]
Cooper Partine6605c62015-11-12 12:35:22 -08001# How to build ANGLE for Windows Store
2
3ANGLE provides OpenGL ES 2.0 and EGL 1.4 libraries and dlls. You can use these to build and run OpenGL ES 2.0 applications on Windows.
4
5## Development setup
6
7ANGLE for Windows Store uses most of the same steps found in [ANGLE Development](DevSetup.md) with a few changes.
8
9### Required Tools
10 * [Visual Studio Community 2015](http://www.visualstudio.com/downloads/download-visual-studio-vs)
11 * Required to build ANGLE on Windows and for the packaged Windows 8.1 SDK.
12
13
14### Getting the source
15Set the following environment variables as needed:
16
17 * `GYP_GENERATORS` to `msvs`
18 * `GYP_MSVS_VERSION` to `2015`
19 * `GYP_GENERATE_WINRT` to `1`
20
21Download the ANGLE source by running the following commands:
22
23```
24git clone https://chromium.googlesource.com/angle/angle
25python angle/scripts/bootstrap.py
26gclient sync
27git checkout master
28```
29
30Gyp will generate multiple VS2015 solution files
31 * `winrt/10/src/angle.sln` for Windows 10
32 * `winrt/8.1/windows/src/angle.sln` for Windows 8.1
33 * `winrt/8.1/windowsphone/src/angle.sln` for Windows Phone 8.1
34
35
36### Building ANGLE
37 1. Open one of the ANGLE Visual Studio solution files (see [Getting the source](BuildingAngleForWindowsStore.md#Development-setup-Getting-the-source)).
38 2. Select Build -> Configuration Manager
39 3. In the "Active solution configuration:" drop down, select the desired configuration (eg. Release), and close the Configuration Manager.
40 4. Select Build -> Build Solution.
41Once the build completes, the output directory for your selected configuration (eg. `Release_Win32`, located next to the solution file) will contain the required libraries and dlls to build and run an OpenGL ES 2.0 application.
42
43### To Use ANGLE in Your Application
44 1. A template for creating a Windows Store application that uses ANGLE can be found [here](http://blogs.msdn.com/b/vcblog/archive/2015/07/30/cross-platform-code-sharing-with-visual-c.aspx).
45 2. Configure your build environment to have access to the `include` folder to provide access to the standard Khronos EGL and GLES2 header files.
46 * For Visual C++
47 * Right-click your project in the _Solution Explorer_, and select _Properties_.
48 * Under the _Configuration Properties_ branch, click _C/C++_.
49 * Add the relative path to the Khronos EGL and GLES2 header files to _Additional Include Directories_.
50 3. Configure your build environment to have access to `libEGL.lib` and `libGLESv2.lib` found in the build output directory (see [Building ANGLE](DevSteup.md#Building-ANGLE)).
51 * For Visual C++
52 * Right-click your project in the _Solution Explorer_, and select _Properties_.
53 * Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_.
54 * Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon.
55 4. Copy `libEGL.dll` and `libGLESv2.dll` from the build output directory (see [Building ANGLE](DevSetup.md#Building-ANGLE)) into your application folder or packages location if a ANGLE Windows Store NuGet was used.
56 5. Code your application to the Khronos [OpenGL ES 2.0](http://www.khronos.org/registry/gles/) and [EGL 1.4](http://www.khronos.org/registry/egl/) APIs.
57