eglCreatePbufferFromClientBuffer usage

I’m having a bit of trouble trying to use eglCreatePbufferFromClientBuffer() with a VGImage.  Here’s the sequence I’m using.

// === Create a context to the screen ===
    surface1 = eglCreateWindowSurface(display1, config1, window1, NULL);
    context1 = eglCreateContext(display1, config1, EGL_NO_CONTEXT, NULL);
    eglMakeCurrent(display1, surface1, surface1, context1);
    path1 = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32,
                         1, 0, hint, hint, VG_PATH_CAPABILITY_APPEND_TO);
    // === Fill in the path with something here …
    vgDrawPath(path1, VG_STROKE_PATH);
    eglSwapBuffers(display1, surface1);
    // === The path is drawn to the screen just fine ===

// === Now we create the image to draw the path on ===
    image1 = vgCreateImage(VG_sABGR_8888, width, height, IMAGE_QUALITY_ALL);
    vgImageSubData(image1, data, width*4, VG_sABGR_8888, 0, 0, width, height);
    // === Create the off-screen surface ===
    surface2 = eglCreatePbufferFromClientBuffer(display1, EGL_OPENVG_IMAGE,
                                                (EGLClientBuffer)image1,
                                                config1, NULL);
    context2 = eglCreateContext(display1, config1, context1, NULL);
    eglMakeCurrent(display1, surface2, surface2, context2);
    path2 =

vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32,


                         1, 0, hint, hint,

VG_PATH_CAPABILITY_APPEND_TO);
    // === Fill in the path with something here …


    vgDrawPath(path2, VG_STROKE_PATH);

// === Switch the context back so we can draw the image ===
    eglMakeCurrent(display1, surface1, surface1, context1);
    vgDrawImage(image1);
    eglSwapBuffers(display1,

surface1);



What’s drawn is the initial data that was put in the image when vgImageSubData() was called instead of the path that was supposed to draw in the image.  So it seems that the second vgDrawPath() is not drawing to the image.  I’ve checked my coordinates and they are within the size of the image.  Am I missing something here?

I’m using OVG SDK 1.1 with ri_package_1.1 on Windows.

Thanks ahead of time for any help.