This topic contains 1 reply, has 1 voice, and was last updated by  zeGouky 7 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #30018


    Hi everyone,

    In my application i have the current setup under windows :

    – Main Thread with a standard WndProc and a classic while loop in the main()
    – Game Thread : handle logic and display

    In the main thread im creating the window and setup the device but when i trigger the game thread i setup a new GL Context to be able to createtexture and rendering stuff. by this piece of code :

                localContext = eglCreateContext(CIgGLRenderer::GetInstance()->eglDisplay, CIgGLRenderer::GetInstance()->eglConfig, CIgGLRenderer::GetInstance()->eglContext, NULL);
                localSurface = eglCreateWindowSurface(CIgGLRenderer::GetInstance()->eglDisplay, CIgGLRenderer::GetInstance()->eglConfig, CIgGLRenderer::GetInstance()->eglWindow, NULL);

                eglMakeCurrent(CIgGLRenderer::GetInstance()->eglDisplay, localSurface, localSurface, localContext);

    By doing this it seems that everything went fine but soon as i make a

    eglSwapBuffers(eglDisplay, g_pRenderContext->localSurface);

    i just get a blank screen with the correct clear color but no quads at all.
    I searched for a solution but so far no luck.

    Anyone can help ?

    Thanks !



    I made some additionnal test :

    1/ Remove the game thread
    2/ Just show a texture in the main thread -> this is working without problem
    3/ set NULL for the render context and makecurrent the main thread just like the first firt makecurrent call and draw a texture -> not working, just getting the clear color..

    here’s the piece of code

        assert(eglMakeCurrent(pRenderer->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)==EGL_TRUE);

    then before the rendering

        EGLBoolean    ret = eglMakeCurrent(eglGetDisplay((NativeDisplayType) hDC), eglSurface, eglSurface, eglContext);


    I assume that if i can get this working then i will get the thread context working too..


Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.