5.2.1. Display initialization

In an OpenGL ES 2.0 application, use the eglGetDisplay() call to create a window that displays the rendered output from the Open GL ES Emulator. You must pass to this function either the:

Default display example

Example 5.1 shows a code example that uses the default display:

Example 5.1. Display initialization

EGLDisplay sEGLDisplay;// EGL init.sEGLDisplay = eglGetDisplay((EGLNativeDisplayType) EGL_DEFAULT_DISPLAY);eglInitialize(sEGLDisplay, NULL, NULL);

Window example

Example 5.2 shows a code example that uses a window display:

Example 5.2. Default display

EGLDisplay sEGLDisplay;

...

// Create windowsWindow = CreateWindowEx(...

// EGL init.sEGLDisplay = eglGetDisplay(GetDC(sWindow)); 
eglInitialize(sEGLDisplay, NULL, NULL);

Copyright © 2009-2012 ARM. All rights reserved.ARM DUI 0511F
Non-ConfidentialID052512