POWERVR Insider FAQ   Forum FAQ Forum FAQ  Forum Search   Calendar   Register Register  Login Login

eglCreatePbufferFromClientBuffer usage

 Post Reply Post Reply
Author
  Topic Search Topic Search  Topic Options Topic Options
lamh View Drop Down
Insider
Insider


Joined: 17 May 10
Online Status: Offline
Posts: 1
  Quote lamh Quote  Post ReplyReply Direct Link To This Post Topic: eglCreatePbufferFromClientBuffer usage
    Posted: 17 Jul 10 at 7:20pm
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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.08
Copyright ©2001-2008 Web Wiz

This page was generated in 0.090 seconds.

Disclaimer: This Forum is opened by Imagination Technologies to foster a dynamic dialogue with developers. The opinions expressed within this forum are not those of Imagination Technologies. Imagination Technologies also reserves the right to edit or withdraw any content on this forum that is deemed inappropriate by Imagination Technologies and to not be in the best interests of our developer community.