2. After calling eglDestroyImageKHR I'm unable to recreate the texture when the size of the gltexture is the same as before. In that case eglCreateImageKHR throws a 0x3002 error. I can only fix it by temporarily creating the 1x1 texture and then creating it back with the correct size.
3. What is more strange, when I recreate the texture with the same size and method as described in pt 2 it takes just 100 MICROseconds. It's like the GPU is caching the egl_image and reusing it.
Code: Select all
egl_image = eglCreateImageKHR ( g_egl_display, g_egl_context, EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer) display_texture->getNativeHandle(), 0 );