Results 1 to 3 of 3

Thread: SOS:How to deal with openglesInit between two Processes

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    2

    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

  2. #2
    Junior Member
    Join Date
    Sep 2008
    Posts
    2

    Re: SOS:How to deal with openglesInit between two Processes

    can anybody give me any suggestions?
    please!!

  3. #3
    Member
    Join Date
    Sep 2003
    Location
    Silicon Valley
    Posts
    57

    Re: SOS:How to deal with openglesInit between two Processes

    Quote Originally Posted by xiaochun
    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.
    Jon Leech
    EGL & OpenGL Specification Editor / OpenGL ARB Ecosystem TSG Chair / Khronos API Registrar

Similar Threads

  1. What's the deal with clEnqueueWriteBufferRect?
    By vincentfpgarcia in forum OpenCL
    Replies: 4
    Last Post: 01-30-2013, 02:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •