The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

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