зеркало из https://github.com/AvaloniaUI/angle.git
3.1 KiB
3.1 KiB
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 with a few changes.
Required Tools
- Visual Studio Community 2015
- Required to build ANGLE on Windows and for the packaged Windows 10 SDK.
Getting the source
Set the following environment variables as needed:
GYP_GENERATORS
tomsvs
GYP_MSVS_VERSION
to2015
GYP_GENERATE_WINRT
to1
Download the ANGLE source by running the following commands:
git clone https://chromium.googlesource.com/angle/angle
cd angle
python scripts/bootstrap.py
gclient sync
git checkout master
Gyp will generate multiple VS2015 solution files
winrt/10/src/angle.sln
for Windows 10
Building ANGLE
- Open one of the ANGLE Visual Studio solution files (see Getting the source).
- Select Build -> Configuration Manager
- In the "Active solution configuration:" drop down, select the desired configuration (eg. Release), and close the Configuration Manager.
- 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
- A template for creating a Windows Store application that uses ANGLE can be found here.
- 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.
- Configure your build environment to have access to
libEGL.lib
andlibGLESv2.lib
found in the build output directory (see 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 andlibGLESv2.lib
file to Additional Dependencies, separated by a semicolon.
- Copy
libEGL.dll
andlibGLESv2.dll
from the build output directory (see Building ANGLE) into your application folder or packages location if a ANGLE Windows Store NuGet was used. - Code your application to the Khronos OpenGL ES 2.0 and EGL 1.4 APIs.