how to initiate opengles1.1 in the branch thread

This topic contains 2 replies, has 2 voices, and was last updated by  italylili 7 years, 12 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30012

    italylili
    Member

       i meet the problem when i want to initiate the opengles1.1 in the branch thread in pc emunation version.

       i first launch the branch thread in the main thread.

     

                CreateThread( 0, 0, ThreadProc, 0, 0, 0);

     

    and then initiate the opengles in the branch thread , but when running the eglChooseConfig, it reports wrang

     i=0;
     pi32ConfigAttribs[i++] = EGL_RED_SIZE;
     pi32ConfigAttribs[i++] = 5;
     pi32ConfigAttribs[i++] = EGL_GREEN_SIZE;
     pi32ConfigAttribs[i++] = 6;
     pi32ConfigAttribs[i++] = EGL_BLUE_SIZE;
     pi32ConfigAttribs[i++] = 5;
     pi32ConfigAttribs[i++] = EGL_ALPHA_SIZE;
     pi32ConfigAttribs[i++] = 0;
     pi32ConfigAttribs[i++] = EGL_SURFACE_TYPE;
     pi32ConfigAttribs[i++] = EGL_WINDOW_BIT;
     pi32ConfigAttribs[i++] = EGL_NONE;

     

     if (!eglChooseConfig(eglDisplay, pi32ConfigAttribs, &eglConfig, 1, &iConfigs) || (iConfigs != 1))
     {
      cleanupEgl();
      return 0;
     }

     

    how could i solve this problem, thanks

     

     
    #33624

    jacekc
    Member

    Hi,

    Does this problem appear only in that case (when creating branch thread) ? When you run our SDK training courses or demos , do they work fine? eg. can you run RenderToTexture training course and confirm it is ok? 

    #33625

    italylili
    Member

    yes, all this problem appear only in the case when running in branch thread(error when running eglChooseConfig), and when running in the main thread, every thing is OK.

    renderToTexture also is correct in the main thread

    how could i runnging it correctlly in the branch thread?

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