how to initiate opengles1.1 in the branch thread

   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

 

 

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?Â

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