Hello,
Please take a look to this code.
////////////////////////////////////////////////
EGLDisplay eglDisplay = 0;
EGLConfig eglConfig = 0;
EGLSurface eglSurface = 0;
EGLSurface eglSurfacetmp= 0;
EGLContext eglContext = 0;
eglDisplay = eglGetDisplay((NativeDisplayType)0);
EGLint iMajorVersion, iMinorVersion;
if (!eglInitialize(eglDisplay, &iMajorVersion, &iMinorVersion))
{
printf("Error: eglInitialize() failed.
");
goto cleanup;
}
EGLint pi32ConfigAttribs[3];
pi32ConfigAttribs[0] = EGL_SURFACE_TYPE;
pi32ConfigAttribs[1] = EGL_WINDOW_BIT;
pi32ConfigAttribs[2] = EGL_NONE;
int iConfigs;
if (!eglChooseConfig(eglDisplay, pi32ConfigAttribs, &eglConfig, 1, &iConfigs) || (iConfigs != 1))
{
printf("Error: eglChooseConfig() failed.
");
goto cleanup;
}
eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, (NativeWindowType)0, NULL);
if (!TestEGLError(“eglCreateWindowSurface”))
{
goto cleanup;
}
eglSurfacetmp = eglCreateWindowSurface(eglDisplay, eglConfig, (NativeWindowType)0, NULL);
if (!TestEGLError(“eglCreateWindowSurface”))
{
goto cleanup;
}
////////////////////////////////////////////////
I would like to know if there’s an OpenGLES 1.x specicifation restriction on the number of window surfaces that we can create, in fact, as shown in the previous example, secondary surface creation always fails.
Thank you in advance.
gpgnews