blob: 35f77c2a8a2a43f03b742697b815246f1fa82c5e [file] [log] [blame] [view]
David Ghandeharib1536522017-05-24 00:01:15 -07001# 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 10 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
33
34### Building ANGLE
35 1. Open one of the ANGLE Visual Studio solution files (see [Getting the source](BuildingAngleForWindowsStore.md#Development-setup-Getting-the-source)).
36 2. Select Build -> Configuration Manager
37 3. In the "Active solution configuration:" drop down, select the desired configuration (eg. Release), and close the Configuration Manager.
38 4. Select Build -> Build Solution.
39Once 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.
40
41### To Use ANGLE in Your Application
42 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).
43 2. Configure your build environment to have access to the `include` folder to provide access to the standard Khronos EGL and GLES2 header files.
44 * For Visual C++
45 * Right-click your project in the _Solution Explorer_, and select _Properties_.
46 * Under the _Configuration Properties_ branch, click _C/C++_.
47 * Add the relative path to the Khronos EGL and GLES2 header files to _Additional Include Directories_.
48 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)).
49 * For Visual C++
50 * Right-click your project in the _Solution Explorer_, and select _Properties_.
51 * Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_.
52 * Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon.
53 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.
54 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.
55