Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EGLint attr[] =
- {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_RED_SIZE, 8,
- EGL_GREEN_SIZE, 8,
- EGL_BLUE_SIZE, 8,
- EGL_NONE
- };
- EGLCheck(eglhandle = eglGetDisplay(GetDC(handle)));
- EGLCheck(eglInitialize(eglhandle, NULL, NULL));
- EGLConfig eglcfg;
- EGLint dummy;
- EGLCheck(eglChooseConfig(eglhandle, attr, &eglcfg, 1, &dummy));
- EGLCheck(surface = eglCreateWindowSurface(eglhandle, eglcfg, handle, NULL));
- attr[0] = EGL_CONTEXT_CLIENT_VERSION; attr[1] = 2;
- attr[2] = EGL_NONE;
- EGLCheck(ctx = eglCreateContext(eglhandle, eglcfg, EGL_NO_CONTEXT, attr));
- EGLCheck(eglMakeCurrent(eglhandle, surface, surface, ctx));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement