Using Legacy vs. System-Wide EGL Headers

From Symbian OS v9.4 onwards, EGL is delivered as a standalone library within a separate component, the EGL Collection. EGL is thus available for system wide use (for example, by both OpenVG and OpenGL ES). For Symbian^2, the EGL version is 1.3 and is independent of the version for OpenGL ES. For Symbian^3, the EGL version is 1.4.

Variant: ScreenPlay and non-ScreenPlay. Target audience: Device creators.

Prior to Symbian OS v9.4, EGL was delivered as part of the OpenGL ES library, with the OpenGL ES library containing the entry points for both EGL and OpenGL ES APIs. EGL 1.1 was the version embedded within OpenGL ES.

In order to help migrate legacy OpenGL ES applications, the Symbian platform provides a variability point to allow device vendors a staged migration. This variability point allows making use of the system-wide EGL but through the EGL v1.1 headers, effectively hiding from the system-wide EGL any API later than EGL v1.1.

Using the legacy EGL headers

To use the legacy EGL 1.1 headers (these are delivered as part of the OpenGLES Interface component), insert the following line into the OEM-specific system-wide variant file:

#define __OPENGLESHEADERS_LEGACY_EGL_1_1

This causes the following two files to #include the legacy EGL 1.1 header files:

  • /epoc32/include/GLES/egl.h

  • /epoc32/include/GLES/egltypes.h

The legacy EGL 1.1 header files are:

  • /epoc32/include/GLES/legacy_egl_1_1/egl.h

  • /epoc32/include/GLES/legacy_egl_1_1/egltypes.h

When in legacy mode, the following are true:

  • GLES/egl.h includes GLES/gl.h then GLES/egltypes.h

  • GLES/egl.h defines symbols in the EGL 1.1 API namespace

  • GLES/egl.h does not define any symbol from EGL API later than EGL 1.1

Using the system-wide EGL headers

The system-wide EGL header files are used by default (that is, when __OPENGLESHEADERS_LEGACY_EGL_1_1 is not defined). These conform to the EGL API 1.2, 1.3 or 1.4. The system-wide header files are:

  • /epoc32/include/EGL/egl.h

  • /epoc32/include/EGL/egltypes.h

When not in legacy mode, the following are true:

  • GLES/egl.h includes EGL/egl.h and then GLES/gl.h

  • GLES/egl.h includes GLES/egltypes.h

  • GLES/egl.h defines symbols in the system-wide EGL API (EGL/egl.h)

  • GLES/egltypes.h re-directs to EGL/egltypes.h