SOS:How to deal with openglesInit between two Processes

There are two application?launcher.exe ,photo.exe
In the launcher.exe ,there is a Function “InitOpenGLES”
In the photo.exe,there also is a Function “InitOpenGLES”
two InitOpenGLES are the same ,just as follow:
bool InitOpenGLES ( HWND hWnd )
{
EGLConfig configs[10];
EGLint matchingConfigs;
const EGLint configAttribs[] =
{
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_NONE, EGL_NONE
};
g_hWnd= hWnd;
g_hDC = GetWindowDC(hWnd);
glesDisplay = eglGetDisplay(g_hDC); //Ask for an available display
if(!eglInitialize(glesDisplay, NULL, NULL)) return false;
if(!eglChooseConfig(glesDisplay, configAttribs, &configs[0], 10, &matchingConfigs)) return false;
//If there isn’t any configuration enough good
if (matchingConfigs < 1) return false;
glesSurface = eglCreateWindowSurface(glesDisplay, configs[0], hWnd, configAttribs);
if(!glesSurface) return false;
// Let’s create our rendering context
glesContext=eglCreateContext(glesDisplay,configs[0],0,configAttribs);
//Now we will activate the context for rendering
eglMakeCurrent(glesDisplay, glesSurface, glesSurface, glesContext);
return true;
}
my question:
When in the launcher.exe it creates a process to call photo.exe,the program will stop at this line “eglCreateWindowSurface” which belong to photo.exe.There is no error info,no return,just stop there.The application photo.exe has no problem,because it runs well individually. Maybe the two InitOpenGLES can not run at the same time.But I am no idea how to solve the question.
anyone can help me?who can tell me how two processes can work well using opengles at the same time?
thanks a lot

can anybody give me any suggestions?
please!!

This is an implementation-dependent question, which you need to ask on a support forum devoted to the system you’re using (Windows Mobile, maybe?). The API specifications say very little about multiple processes, but multiple processes should all be able to work with EGL and OpenGL ES, unless your implementation restricts it to only one process at a time. It’s also possible you’ve simply run into a bug in the drivers.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.