Results 1 to 3 of 3

Thread: Multiuple window surface

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    1

    Multiuple window surface

    Hello,
    Please take a look to this code.

    ////////////////////////////////////////////////
    EGLDisplay eglDisplay = 0;
    EGLConfig eglConfig = 0;
    EGLSurface eglSurface = 0;
    EGLSurface eglSurfacetmp= 0;

    EGLContext eglContext = 0;

    eglDisplay = eglGetDisplay((NativeDisplayType)0);
    EGLint iMajorVersion, iMinorVersion;
    if (!eglInitialize(eglDisplay, &iMajorVersion, &iMinorVersion))
    {
    printf("Error: eglInitialize() failed.\n");
    goto cleanup;
    }
    EGLint pi32ConfigAttribs[3];
    pi32ConfigAttribs[0] = EGL_SURFACE_TYPE;
    pi32ConfigAttribs[1] = EGL_WINDOW_BIT;
    pi32ConfigAttribs[2] = EGL_NONE;
    int iConfigs;
    if (!eglChooseConfig(eglDisplay, pi32ConfigAttribs, &eglConfig, 1, &iConfigs) || (iConfigs != 1))
    {
    printf("Error: eglChooseConfig() failed.\n");
    goto cleanup;
    }
    eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, (NativeWindowType)0, NULL);
    if (!TestEGLError("eglCreateWindowSurface"))
    {
    goto cleanup;
    }
    eglSurfacetmp = eglCreateWindowSurface(eglDisplay, eglConfig, (NativeWindowType)0, NULL);
    if (!TestEGLError("eglCreateWindowSurface"))
    {
    goto cleanup;
    }

    ////////////////////////////////////////////////


    I would like to know if there's an OpenGLES 1.x specicifation restriction on the number of window surfaces that we can create, in fact, as shown in the previous example, secondary surface creation always fails.


    Thank you in advance.
    gpgnews

  2. #2
    Junior Member
    Join Date
    Mar 2009
    Location
    Redmond, Wa
    Posts
    13

    Re: Multiuple window surface

    What's the EGL error that you're getting? I'm surprised the first call to eglCreateWindowSurface isn't failing since you're passing in a NULL window handle to each call.

  3. #3
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: Multiuple window surface

    Quote Originally Posted by gpgnews
    I would like to know if there's an OpenGLES 1.x specicifation restriction on the number of window surfaces that we can create, in fact, as shown in the previous example, secondary surface creation always fails.
    You cannot have more than one EGLWindowSurface for a specific window (in this case, the whole screen). That's an EGL restriction. What do you want to achieve with two surfaces for the same window?

    Quote Originally Posted by niallm
    What's the EGL error that you're getting? I'm surprised the first call to eglCreateWindowSurface isn't failing since you're passing in a NULL window handle to each call.
    That's fine on an implementation without window system, and creates a surface for the entire screen.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

Similar Threads

  1. How to copy content from pixmap surface to window surface
    By mustaf in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 10-05-2008, 09:44 PM
  2. Posting surface to a window...
    By ufocd in forum OpenVG and VGU
    Replies: 2
    Last Post: 05-14-2007, 02:17 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
  •