Commit e6605c6e by Cooper Partin Committed by Geoff Lang

Added information about generating Windows Store ANGLE projects.

Change-Id: I49b229b7d4f3d6d305fed023f62626a9966f692d Reviewed-on: https://chromium-review.googlesource.com/312456Tested-by: 's avatarCooper Partin <coopp@microsoft.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent aa16dd4a
...@@ -21,7 +21,7 @@ ANGLE is used as the default WebGL backend for both Google Chrome and Mozilla Fi ...@@ -21,7 +21,7 @@ ANGLE is used as the default WebGL backend for both Google Chrome and Mozilla Fi
Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders are accepted across browsers and platforms. The shader translator can be used to translate shaders to other shading languages, and to optionally apply shader modifications to work around bugs or quirks in the native graphics drivers. The translator targets Desktop GLSL, Direct3D HLSL, and even ESSL for native GLES2 platforms. Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders are accepted across browsers and platforms. The shader translator can be used to translate shaders to other shading languages, and to optionally apply shader modifications to work around bugs or quirks in the native graphics drivers. The translator targets Desktop GLSL, Direct3D HLSL, and even ESSL for native GLES2 platforms.
##Building ##Building
View the [Dev setup instructions](doc/DevSetup.md). View the [Dev setup instructions](doc/DevSetup.md). For generating a Windows Store version of ANGLE view the [Windows Store instructions](doc/BuildingAngleForWindowsStore.md)
##Contributing ##Contributing
* Join our [Google group](https://groups.google.com/group/angleproject) to keep up to date. * Join our [Google group](https://groups.google.com/group/angleproject) to keep up to date.
......
# How to build ANGLE for Windows Store
ANGLE 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.
## Development setup
ANGLE for Windows Store uses most of the same steps found in [ANGLE Development](DevSetup.md) with a few changes.
### Required Tools
* [Visual Studio Community 2015](http://www.visualstudio.com/downloads/download-visual-studio-vs)
* Required to build ANGLE on Windows and for the packaged Windows 8.1 SDK.
### Getting the source
Set the following environment variables as needed:
* `GYP_GENERATORS` to `msvs`
* `GYP_MSVS_VERSION` to `2015`
* `GYP_GENERATE_WINRT` to `1`
Download the ANGLE source by running the following commands:
```
git clone https://chromium.googlesource.com/angle/angle
python angle/scripts/bootstrap.py
gclient sync
git checkout master
```
Gyp will generate multiple VS2015 solution files
* `winrt/10/src/angle.sln` for Windows 10
* `winrt/8.1/windows/src/angle.sln` for Windows 8.1
* `winrt/8.1/windowsphone/src/angle.sln` for Windows Phone 8.1
### Building ANGLE
1. Open one of the ANGLE Visual Studio solution files (see [Getting the source](BuildingAngleForWindowsStore.md#Development-setup-Getting-the-source)).
2. Select Build -> Configuration Manager
3. In the "Active solution configuration:" drop down, select the desired configuration (eg. Release), and close the Configuration Manager.
4. Select Build -> Build Solution.
Once 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.
### To Use ANGLE in Your Application
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).
2. Configure your build environment to have access to the `include` folder to provide access to the standard Khronos EGL and GLES2 header files.
* For Visual C++
* Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, click _C/C++_.
* Add the relative path to the Khronos EGL and GLES2 header files to _Additional Include Directories_.
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)).
* For Visual C++
* Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_.
* Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon.
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.
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.
...@@ -32,7 +32,7 @@ gclient sync ...@@ -32,7 +32,7 @@ gclient sync
git checkout master git checkout master
``` ```
Gyp will generate the main VS2013 solution file as build/ANGLE.sln. If you update ANGLE, or make a change to the projects, they can be regenerated by executing `gclient runhooks`. Gyp will generate the main VS2013 solution file as build/ANGLE.sln. If you update ANGLE, or make a change to the projects, they can be regenerated by executing `gclient runhooks`. For generating a Windows Store version of ANGLE view the [Windows Store instructions](doc/BuildingAngleForWindowsStore.md).
### Building ANGLE ### Building ANGLE
1. Open one of the ANGLE Visual Studio solution files (see [Getting the source](DevSetup.md#Development-setup-Getting-the-source)). 1. Open one of the ANGLE Visual Studio solution files (see [Getting the source](DevSetup.md#Development-setup-Getting-the-source)).
...@@ -65,7 +65,7 @@ By default, ANGLE will use a D3D11 renderer. To change the default: ...@@ -65,7 +65,7 @@ By default, ANGLE will use a D3D11 renderer. To change the default:
* Right-click your project in the _Solution Explorer_, and select _Properties_. * Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_. * Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_.
* Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon. * Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon.
3. Copy `libEGL.dll` and `libGLESv2.dll` from the build output directory (see [Building ANGLE](DevSteup.md#Building-ANGLE)) into your application folder. 3. Copy `libEGL.dll` and `libGLESv2.dll` from the build output directory (see [Building ANGLE](DevSetup.md#Building-ANGLE)) into your application folder.
4. 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. 4. 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.
## GLSL ES to GLSL Translator ## GLSL ES to GLSL Translator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment