GLES2MakeCurrentGC: Invalid drawable

This topic contains 0 replies, has 1 voice, and was last updated by  Rudolf 5 years, 9 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30737

    Rudolf
    Member

    Hi all,

    I try to create an offscreen render context on a Galaxy Nexus (SGX 540) @android 4.0.1. This is my code:

    EGLDisplay display =  eglGetDisplay(EGL_DEFAULT_DISPLAY);
    if (display == EGL_NO_DISPLAY) {} // ok, no error

    if (eglInitialize(_display, &majorVersion, &minorVersion) != EGL_TRUE) {} // ok, no error

    const EGLint attribList[] =
    {
            EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
            EGL_RED_SIZE, 8,
            EGL_GREEN_SIZE, 8,
            EGL_BLUE_SIZE, 8,
            EGL_ALPHA_SIZE, 8,
            EGL_DEPTH_SIZE, 0,
            EGL_STENCIL_SIZE, 0,
            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
            EGL_NONE
    };

    EGLConfig configs[1];
    EGLint num_config = 0;
       
    if (eglChooseConfig(_display, attribList, configs, 1, &num_config) != EGL_TRUE || num_config == 0) {} // ok, no error

    EGLSurface surface = eglCreatePbufferSurface(display, configs[0], NULL);
    if (surface == EGL_NO_SURFACE) {} // ok, no error

    const EGLint attribListContext[] =
        {
            EGL_CONTEXT_CLIENT_VERSION, 2,
            EGL_NONE
        };

    EGLContext context = eglCreateContext(display, configs[0], sharegroup, attribListContext);
    if (context == EGL_NO_CONTEXT) {} // ok, no error

    if (eglMakeCurrent(display, surface, surface,context) != EGL_TRUE) {} // always returns EGL_TRUE, no error


    Now, when I try to make the context current – eglMakeCurrent returns always EGL_TRUE,  an error message is printed to logcat and then nothing works 🙁
    01-28 03:42:21.295: E/IMGSRV(2617): :0: GLES2MakeCurrentGC: Invalid drawable – what do we do?


    Any ideas, thoughts ? Thanks.
    Me.

Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.