
640 VII Software Design
void main (void )
{
EGLint attribList [] =
{
EGL_BUFFER_SIZE , 32,
EGL_DEPTH_SIZE , 16,
EGL_NONE
};
// Even though we may obtain the EGL_DEFAULT_DISPLAY, we need
// to create a handle to a window in which we create the drawing
// surface , a HDC on windows , a Display on X11 , etc.
EGLNativeDisplayType nativeDisplay = EGL_DEFAULT_DISPLAY;
EGLNativeWindowType nativeWindow = platformSpecificCreateWindow();
EGLDisplay iEglDisplay = eglGetDisplay(nativeDisplay);
eglInitialize(iEglDisplay , 0, 0);
EGLConfig iEglConfig;
EGLint numConfigs;
eglChooseConfig(iEglDisplay , attribList , & iEglConfig , 1, &numConfigs );
EGLContext iEglContext = eglCreateContext ...