eglCreatePbufferFromClientBuffer usage |
Post Reply
|
| Author | |
lamh
Insider
Joined: 17 May 10 Online Status: Offline Posts: 1 |
Quote Reply
Topic: eglCreatePbufferFromClientBuffer usagePosted: 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. |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
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.










Topic Options

