kc3-lang/angle/doc/DevSetup.md

Download

ANGLE Development

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

Version Control

ANGLE uses git for version control. If you are not familiar with git, helpful documentation can be found at http://git-scm.com/documentation.

Required Tools

Getting the source

Set the following environment variables as needed:

Building ANGLE

  1. Open one of the ANGLE Visual Studio solution files (see 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.

Application Development with ANGLE

This sections describes how to use ANGLE to build an OpenGL ES application.

Choosing a D3D Backend

ANGLE can use either a backing renderer which uses D3D11 on systems where it is available, or a D3D9-only renderer.

ANGLE provides an EGL extension called EGL_ANGLE_platform_angle which allows uers to select which renderer to use at EGL initialization time by calling eglGetPlatformDisplayEXT with special enums. Details of the extension can be found in it’s specification in extensions/ANGLE_platform_angle.txt and extensions/ANGLE_platform_angle_d3d.txt and examples of it’s use can be seen in the ANGLE samples and tests, particularly util/EGLWindow.cpp.

By default, ANGLE will use a D3D11 renderer. To change the default:

  1. Open src/libANGLE/renderer/d3d/DisplayD3D.cpp
  2. Locate the definition of ANGLE_DEFAULT_D3D11 near the head of the file, and set it to your preference.

To Use ANGLE in Your Application

  1. Configure your build environment to have access to the include folder to provide access to the standard Khronos EGL and GLES2 header files.
  1. Configure your build environment to have access to libEGL.lib and libGLESv2.lib found in the build output directory (see Building-ANGLE).
  1. Copy libEGL.dll and libGLESv2.dll from the build output directory (see Building-ANGLE) into your application folder.
  2. Code your application to the Khronos OpenGL ES 2.0 and EGL 1.4 APIs.

GLSL ES to GLSL Translator

In addition to OpenGL ES 2.0 and EGL 1.4 libraries, ANGLE also provides a GLSL ES to GLSL translator. This is useful for implementing OpenGL ES emulators on top of desktop OpenGL.

Getting the source

The translator code is fully independent of the rest of ANGLE code and resides in src/compiler. It is cross-platform and build files for operating systems other than Windows can be generated by following the Generating project files steps above.

Usage

The basic usage is shown in essl_to_glsl sample under samples/translator. To translate a GLSL ES shader, following functions need to be called in the same order:


Source

Download