/** * Do whatever it takes to get us an EGL display for the system. * * This needs to be ported to other window systems. */ EGLDisplay get_egl_display_or_skip(void** nativeWindow) { #ifdef _WIN32 HDC dpy = make_window_and_test(nativeWindow); #else Display *dpy = XOpenDisplay(NULL); #endif EGLint major, minor; EGLDisplay edpy; bool ok; struct glproxy_gl_context params = { 0 }; if (!dpy) fprintf(stderr, "couldn't open display\n"); //params.gles_names.egl = "libEGLd.dll"; //params.gles_names.gles2 = "libGLESv2d.dll"; //glproxy_context = glproxy_context_create(¶ms); //glproxy_context_set(glproxy_context); edpy = eglGetDisplay((EGLNativeDisplayType)dpy); if (edpy == EGL_NO_DISPLAY) fprintf(stderr, "Couldn't get EGL display for X11 Display.\n"); ok = eglInitialize(edpy, &major, &minor); if (!ok) fprintf(stderr, "eglInitialize() failed\n"); return edpy; }
int main() { make_window_and_test(test_function); /* UNREACHED */ return 1; }
int main(int argc, char **argv) { make_window_and_test(test_function); /* UNREACHED */ return 1; }