| |||
| Home > Implementation Information > EGL implementation information on Windows > 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 2.0 Emulator. You must pass to this function either the:
value EGL_DEFAULT_DISPLAY
Handle of the Device Context (HDC).
Example 5.1 shows a code example that uses the default display:
Example 5.1.
EGLDisplay sEGLDisplay;// EGL init.sEGLDisplay = eglGetDisplay((EGLNativeDisplayType) EGL_DEFAULT_DISPLAY);eglInitialize(sEGLDisplay, NULL, NULL);
Example 5.2 shows a code example that uses a window display:
Example 5.2.
EGLDisplay sEGLDisplay;
...
// Create windowsWindow = CreateWindowEx(...
// EGL init.sEGLDisplay = eglGetDisplay(GetDC(sWindow));
eglInitialize(sEGLDisplay, NULL, NULL);