#include #include #include int main(int argc, char** argv) { if (argc != 2) { printf("usage: %s <0-6>\n", argv[0]); return 0; } const int test = atoi(argv[1]); EGLint s_configAttribs[] = { EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_NONE }; EGLint numConfigs = -1; EGLint majorVersion; EGLint minorVersion; EGLConfig config; EGLContext context; EGLSurface surface; EGLint w, h; EGLDisplay dpy; dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); eglInitialize(dpy, &majorVersion, &minorVersion); eglChooseConfig(dpy, s_configAttribs, &config, 1, &numConfigs); surface = eglCreateWindowSurface(dpy, config, android_createDisplaySurface(), NULL); context = eglCreateContext(dpy, config, NULL, NULL); eglMakeCurrent(dpy, surface, surface, context); eglQuerySurface(dpy, surface, EGL_WIDTH, &w); eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); GLint dim = w