Feed for discussion OpenVG in project Graphics. Posts for OpenVG post87116: OpenVG on Blackberry playbook Zeallon Chou http://community.qnx.com/sf/go/post87116 2011-07-06T08:49:16Z 2011-07-06T08:49:16Z Hi, Buddies, I‘m investigating run the OpenVG on Blackberry playbook. I always get "EGL_FALSE" when Invoke "eglBindAPI(EGL_OPENVG_API)", and the error code is "EGL_BAD_PARAMETER". Then I checked the codes in "Tiger". /*----------------*/ EGLBoolean eglBindAPI(EGLenum api) { EGL_GET_EGL(EGL_FALSE); EGL_IF_ERROR(api != EGL_OPENVG_API && api != EGL_OPENGL_ES_API, EGL_BAD_PARAMETER, EGL_FALSE); RIEGLThread* thread = egl->getThread(); if(thread) thread->bindAPI(api); EGL_RETURN(EGL_SUCCESS, EGL_TRUE); } /*------------------*/ According to the codes, this "EGL_FALSE" is imposible. So I guess there is different way in the QNX on Blackberry playbook. Anybody give me any information, suggestion? Best regards Zeallon Chou 2011-07-06T08:49:16Z post67609: Simplest OpenVG rendering pipeline on i.MX35 John Edwards http://community.qnx.com/sf/go/post67609 2010-09-16T16:00:08Z 2010-09-16T16:00:08Z I previously posted on the end of another thread (http://community.qnx.com/sf/discussion/do/listPosts/projects.graphics/discussion.openvg.topc6930), but I felt it warranted to start a new thread and not embed this topic in a previous one. We are trying to get OpenVG running on an i.MX35 platform. So far, all attempts have been unsuccessful. Listed below are a few questions and steps regarding the setup we are currently trying in order to get accelerated OpenVG running. We are just looking for the simplest sequence of steps to run the QNX OpenVG graphics demos vg-egl-vsync and vg-egl-tiger. No composition manager or window management is needed or desired at this point. Is it possible to run accelerated OpenVG only using the graphics driver (devg-imx35), io-display, OpenVG and EGL libraries (libOpenVG.so.1, libOpenVG-G12.so.1, libEGL.so.1) and a sample application (egl-configs, vg-egl-vsync)? We are wanting to run OpenVG directly with EGL without using any of the Composition Manager (io-winmgr or OpenKode). Is this model (using only io-display and EGL) possible with OpenVG on the i.MX35? I have tried the following sequence without success: 1) start io-display (io-display -dvid=0,did=0) 2) run egl-configs This sequence always fails on the eglGetDisplay with egl_disp_id set to EGL_DEFAULT_DISPLAY. This function always returns EGL_NO_DISPLAY and fails getting past this stage. I have tried this with slogger running and this information is output: Time Sev Major Minor Args Jan 01 01:14:55 2 8 300 libkhronos: GRAPHICS_ROOT is not set All software rendered drawing using only the gf library works correctly. I suspect the problem we are having isn't with OpenVG, but rather the correct setup to use the new libEGL.so.1 library to properly get a handle to the display. I am currently working in the 6.5.0 release, but I have tried the same steps in the 6.4.1 release with the same results. Any help would be greatly appreciated as this is now starting to affect our current development evaluation and experimentation of the i.MX35 processor. If this would be better placed in a support ticket please let me know. Thanks, --john Here is the kernel options we are using as well as the display.conf and imx35.conf we are using: kernel options: startup-3dsmx35 -c -s -n -L -C -U1 -r0x86000000,0x02000000,1 display.conf: device { drivername=imx35 vid=0 did=0 deviceindex=0 modeopts=/etc/system/config/imx35-0.conf display { xres=480 yres=272 refresh=60 pixel_format=rgb565 } } imx35-0.conf: xres=480,yres=272,irq=42,refresh=60,hsw=41,hss=43,hew=2,vsw=10,vss=12,vew=2,dmask=0,cidle=0,csel=0,vpol=0,epol=1,dpol=0,cpol=0,hpol=0,sdc=1,sharp1=0,sharp2=0,ofmt=18,bright=255,clkdwn=0x18,clkup=0x34,clkper=0xe0,vidbase=0x86000000,vidsize=0x02000000,ovgLibName=/fs/etfs/resources/boot/libOpenVG-G12.so.1 John Edwards 2010-09-16T16:00:08Z post67410: Re: OpenVG test code ? John Edwards http://community.qnx.com/sf/go/post67410 2010-09-15T14:05:58Z 2010-09-15T14:05:58Z The libs we are using are: libEGL.so.1 from the QNX650 installation: C:\QNX650\target\qnx6\armle\usr\lib libOpenVG.so.1 from the BSP here: prebuilt\armle\usr\lib libOpenVG-G12.so.1 from the BSP here: prebuilt\armle\usr\lib The libraries are all on our target on the etfs flash file system in a path that has been included in the LD_LIBRARY_PATH= variable. We also have the libgs.so.1 library from C:\QNX650\target\qnx6\armle\usr\lib on the target as well. Are there steps that describe the initialization sequence to run an OpenVG application from scratch? For instance, which drivers, libs, and processes need to be started and then what kind of init code is needed in the sample app. Is the eglGetDisplay function with EGL_DEFAULT_DISPLAY enough to start the init sequence for an OpenVG application? Currently I am trying to just run this application with io-display started. Are there any other processes that need to be started before running the application. John Edwards 2010-09-15T14:05:58Z post67376: Re: OpenVG test code ? Gaétan Noël http://community.qnx.com/sf/go/post67376 2010-09-15T12:44:02Z 2010-09-15T12:44:02Z Hi John, The BSP for the iMX35 is for the 6.4.1 release and I'm not sure it would work out of the box when it's put in a 6.5.0 context because the QNX graphics framework around the Khronos APIs has changed. Can you provide a list of Khronos related libs (EGL, VG, GLES) and their paths on your target? Cheers, Gaétan -----Original Message----- From: John Edwards [mailto:community-noreply@qnx.com] Sent: September 14, 2010 8:14 PM To: openvg-graphics Subject: Re: RE: OpenVG test code ? Gaétan, Thanks for the response. What we are actually having trouble with is figuring out what the correct initialization sequence is to get any accelerated OpenVG graphics samples up on our i.mx35 platform. I have not been able to find a clear and concise demo explaining the correct initialization sequence for the which calls need to be made before a proper OpenVG context is set up on a layer. I have good experience with the i.mx31 platform using OpenGL ES and the initialization sequence there included attaching to the display, attaching to the layer, creating a surface all with gf api calls that helped set up the context before getting into the EGL parts to initialize the OpenGL ES context. I'm looking for the same kind of sequencing on the i.mx35 for OpenVG. We are currently running the BSP from qnx.com for the i.mx35 with very few modifications using the 6.5.0 release. Everything is working properly including graphics applications that use GF only or GLES such as vsync and egl-gears (although GLES is software rendered only on the i.mx35). I would like to understand how to get the OpenVG applications to this point as well. The current demo I've been using is the vg-egl-vsync demo provided by QNX. However, with this demo I always get a failure when eglGetDisplay is called and returns a match (0) to EGL_NO_DISPLAY, which then errors out. I suspect I am missing some initialization requirements before I get to this call. Another interesting thing is the error handler that vg-egl-vsync uses when this eglGetDisplay call fails actually causes a Memory Fault when the eglGetError() function is called in error.c of this project. Any insight or help in this matter would be greatly appreciated. Thanks, --john _______________________________________________ OpenVG http://community.qnx.com/sf/go/post67306 Gaétan Noël 2010-09-15T12:44:02Z post67306: Re: RE: OpenVG test code ? John Edwards http://community.qnx.com/sf/go/post67306 2010-09-15T00:13:44Z 2010-09-15T00:13:44Z Gaétan, Thanks for the response. What we are actually having trouble with is figuring out what the correct initialization sequence is to get any accelerated OpenVG graphics samples up on our i.mx35 platform. I have not been able to find a clear and concise demo explaining the correct initialization sequence for the which calls need to be made before a proper OpenVG context is set up on a layer. I have good experience with the i.mx31 platform using OpenGL ES and the initialization sequence there included attaching to the display, attaching to the layer, creating a surface all with gf api calls that helped set up the context before getting into the EGL parts to initialize the OpenGL ES context. I'm looking for the same kind of sequencing on the i.mx35 for OpenVG. We are currently running the BSP from qnx.com for the i.mx35 with very few modifications using the 6.5.0 release. Everything is working properly including graphics applications that use GF only or GLES such as vsync and egl-gears (although GLES is software rendered only on the i.mx35). I would like to understand how to get the OpenVG applications to this point as well. The current demo I've been using is the vg-egl-vsync demo provided by QNX. However, with this demo I always get a failure when eglGetDisplay is called and returns a match (0) to EGL_NO_DISPLAY, which then errors out. I suspect I am missing some initialization requirements before I get to this call. Another interesting thing is the error handler that vg-egl-vsync uses when this eglGetDisplay call fails actually causes a Memory Fault when the eglGetError() function is called in error.c of this project. Any insight or help in this matter would be greatly appreciated. Thanks, --john John Edwards 2010-09-15T00:13:44Z post67299: RE: OpenVG test code ? Gaétan Noël http://community.qnx.com/sf/go/post67299 2010-09-14T23:42:11Z 2010-09-14T23:42:11Z Hi John, The ScaleRotateTranslate sample was actually written and tested on the iMX35 just before I posted it, so there are no modifications required to make it run on that platform. What problems are you having exactly? What version of Neutrino and what version of the BSP are you using? Cheers, Gaétan Gaétan Noël 2010-09-14T23:42:11Z post67285: Re: RE: OpenVG test code ? John Edwards http://community.qnx.com/sf/go/post67285 2010-09-14T21:18:20Z 2010-09-14T21:18:20Z Dominic, Would you be willing to share what you modifications you made to the sample scaleRotateTranslate.c that was posted to get the OpenVG running on an i.mx35 platform. We are currently experiencing the same problems you have been through and I am curious if you found a way through them. Thanks, --john John Edwards 2010-09-14T21:18:20Z post46375: Re: RE: OpenVG test code ? Dominic Rath http://community.qnx.com/sf/go/post46375 2010-02-02T13:45:08Z 2010-02-02T13:45:08Z Never mind, got it working using the code from the sample implementation and some GLES/KD/EGL examples. Regards, Dominic Dominic Rath 2010-02-02T13:45:08Z post46369: Re: RE: OpenVG test code ? Dominic Rath http://community.qnx.com/sf/go/post46369 2010-02-02T12:48:27Z 2010-02-02T12:48:27Z Hi, is the tiger demo that you mentioned available somewhere? The sample implementation appears to use OpenGL/GLUT as the "native windowing" system, whereas OpenKODE or GF would be more suitable on QNX, I guess. We're currently looking into using OpenVG to accelerate graphics on a i.MX35 processor, but I haven't been able to find any readily available examples. Best Regards, Dominic Dominic Rath 2010-02-02T12:48:27Z post38522: RE: Is shared context supported by imx35 openVG driver Sachin Rastogi http://community.qnx.com/sf/go/post38522 2009-09-23T04:18:13Z 2009-09-23T04:18:13Z Thanks Regards, Sachin Kumar Rastogi | Lead Engineer | GlobalLogic Inc. The Global Product Development Leader USA | INDIA | UKRAINE | CHINA B-34/1, Sector 59, Noida 201301 U.P. Office: +91-120-406-2000 x 2740 | Mobile +91-986-856-7370 Fax: +91-120-258-5721 | Blog: blogs.globallogic.com www.globallogic.com Demo-2008 Finalist for Product Innovation InfoWorld Award Winner for Agile Innovation Disclaimer: http://www.globallogic.com/email_disclaimer.txt -----Original Message----- From: Gaétan Noël [mailto:community-noreply@qnx.com] Sent: Tuesday, September 22, 2009 7:10 PM To: openvg-graphics Subject: RE: Is shared context supported by imx35 openVG driver Sorry, I should have specified this in my answer -- it was only implied. The comments about not having any protection around resource sharing was for multiple threads of a single process. Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 22, 2009 12:43 AM To: openvg-graphics Subject: RE: Is shared context supported by imx35 openVG driver I want to use the VGPath sharing in different thread of same process. Is there any support for this? Regards, Sachin Kumar Rastogi | Lead Engineer | GlobalLogic Inc. The Global Product Development Leader USA | INDIA | UKRAINE | CHINA B-34/1, Sector 59, Noida 201301 U.P. Office: +91-120-406-2000 x 2740 | Mobile +91-986-856-7370 Fax: +91-120-258-5721 | Blog: blogs.globallogic.com www.globallogic.com Demo-2008 Finalist for Product Innovation InfoWorld Award Winner for Agile Innovation Disclaimer: http://www.globallogic.com/email_disclaimer.txt -----Original Message----- From: Gaétan Noël [mailto:community-noreply@qnx.com] Sent: Monday, September 21, 2009 11:11 PM To: openvg-graphics Subject: RE: Is shared context supported by imx35 openVG driver Hi Sachin, Unfortunately, the current version of the driver doesn't have any protection around resource sharing (e.g. paths, images -- HW is protected), so unless you know exactly when and how your application will use the VGPath, I would not recommend sharing it. It does have protection for running multiple VG applications though, so that is safe (but resources aren't shareable between apps). Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 18, 2009 3:33 AM To: openvg-graphics Subject: Is shared context supported by imx35 openVG driver Can anyone please let me know if IMX35 OpenVG driver supports shared context mechanism so that we can use VGPath across multiple threads? _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38245 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38422 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38450 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38476 Sachin Rastogi 2009-09-23T04:18:13Z post38476: RE: Is shared context supported by imx35 openVG driver Gaétan Noël http://community.qnx.com/sf/go/post38476 2009-09-22T13:40:02Z 2009-09-22T13:40:02Z Sorry, I should have specified this in my answer -- it was only implied. The comments about not having any protection around resource sharing was for multiple threads of a single process. Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 22, 2009 12:43 AM To: openvg-graphics Subject: RE: Is shared context supported by imx35 openVG driver I want to use the VGPath sharing in different thread of same process. Is there any support for this? Regards, Sachin Kumar Rastogi | Lead Engineer | GlobalLogic Inc. The Global Product Development Leader USA | INDIA | UKRAINE | CHINA B-34/1, Sector 59, Noida 201301 U.P. Office: +91-120-406-2000 x 2740 | Mobile +91-986-856-7370 Fax: +91-120-258-5721 | Blog: blogs.globallogic.com www.globallogic.com Demo-2008 Finalist for Product Innovation InfoWorld Award Winner for Agile Innovation Disclaimer: http://www.globallogic.com/email_disclaimer.txt -----Original Message----- From: Gaétan Noël [mailto:community-noreply@qnx.com] Sent: Monday, September 21, 2009 11:11 PM To: openvg-graphics Subject: RE: Is shared context supported by imx35 openVG driver Hi Sachin, Unfortunately, the current version of the driver doesn't have any protection around resource sharing (e.g. paths, images -- HW is protected), so unless you know exactly when and how your application will use the VGPath, I would not recommend sharing it. It does have protection for running multiple VG applications though, so that is safe (but resources aren't shareable between apps). Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 18, 2009 3:33 AM To: openvg-graphics Subject: Is shared context supported by imx35 openVG driver Can anyone please let me know if IMX35 OpenVG driver supports shared context mechanism so that we can use VGPath across multiple threads? _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38245 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38422 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38450 Gaétan Noël 2009-09-22T13:40:02Z post38450: RE: Is shared context supported by imx35 openVG driver Sachin Rastogi http://community.qnx.com/sf/go/post38450 2009-09-22T04:42:56Z 2009-09-22T04:42:56Z I want to use the VGPath sharing in different thread of same process. Is there any support for this? Regards, Sachin Kumar Rastogi | Lead Engineer | GlobalLogic Inc. The Global Product Development Leader USA | INDIA | UKRAINE | CHINA B-34/1, Sector 59, Noida 201301 U.P. Office: +91-120-406-2000 x 2740 | Mobile +91-986-856-7370 Fax: +91-120-258-5721 | Blog: blogs.globallogic.com www.globallogic.com Demo-2008 Finalist for Product Innovation InfoWorld Award Winner for Agile Innovation Disclaimer: http://www.globallogic.com/email_disclaimer.txt -----Original Message----- From: Gaétan Noël [mailto:community-noreply@qnx.com] Sent: Monday, September 21, 2009 11:11 PM To: openvg-graphics Subject: RE: Is shared context supported by imx35 openVG driver Hi Sachin, Unfortunately, the current version of the driver doesn't have any protection around resource sharing (e.g. paths, images -- HW is protected), so unless you know exactly when and how your application will use the VGPath, I would not recommend sharing it. It does have protection for running multiple VG applications though, so that is safe (but resources aren't shareable between apps). Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 18, 2009 3:33 AM To: openvg-graphics Subject: Is shared context supported by imx35 openVG driver Can anyone please let me know if IMX35 OpenVG driver supports shared context mechanism so that we can use VGPath across multiple threads? _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38245 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38422 Sachin Rastogi 2009-09-22T04:42:56Z post38449: RE: VGPath drawing is slow on imx35 freescale board Sachin Rastogi http://community.qnx.com/sf/go/post38449 2009-09-22T04:38:36Z 2009-09-22T04:38:36Z Hello Gaétan, Kindly find the answers inline. Regards, Sachin Kumar Rastogi | Lead Engineer | GlobalLogic Inc. The Global Product Development Leader USA | INDIA | UKRAINE | CHINA B-34/1, Sector 59, Noida 201301 U.P. Office: +91-120-406-2000 x 2740 | Mobile +91-986-856-7370 Fax: +91-120-258-5721 | Blog: blogs.globallogic.com www.globallogic.com Demo-2008 Finalist for Product Innovation InfoWorld Award Winner for Agile Innovation Disclaimer: http://www.globallogic.com/email_disclaimer.txt -----Original Message----- From: Gaétan Noël [mailto:community-noreply@qnx.com] Sent: Monday, September 21, 2009 10:48 PM To: openvg-graphics Subject: RE: VGPath drawing is slow on imx35 freescale board Hi Sachin, Unfortunately, it is difficult to compare an OpenGL solution against an OpenVG solution as the supporting hardware is quite different (not to mention the screen size & architecture), and we've never tried to compare them, so I cannot comment on the performance comparison. How did you take your measurement? Is it the time taken between start of vgDrawPath and end of vgFinish or eglSwapBuffers, or is it the time taken to display one frame? [Sachin] It is the time taken between vgDrawPath and vgFinish. Did you use the composition manager, or was it just a straight VG application? Did you have any other graphics apps running? [Sachin] Yes, I am using Composition Manager and running my app over HMI Flash. What type of surface do you render to (Pbuffer, or window), and what was its resolution? [Sachin] I am using window surface with 440 * 329 resolution. What was the surface's format? (e.g. 565 or 8888) [Sachin] 565 How is your driver configured in terms of surface format (e.g. 565 or 8888 in display.conf)? [Sachin] 565 Did you specify an eglSwapInterval, or did you leave it to the default of 1? [Sachin] 1 What model of iMX35 do you have --- is it a 3DS? [Sachin] imx35 rev 2 Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 17, 2009 12:44 AM To: openvg-graphics Subject: VGPath drawing is slow on imx35 freescale board Hello, I am working on an application created for QNX 6.4.0 (imx35 board). I am using OpenVG for map drawing. I found that if the vgPath segments are around 17000, then it took 0.3 second to draw a single iteration. is this a reasonable time, chip is taking to draw a single iteration? If I use the same segments for openGL on iPhone, it took very minimal time. since openVG is a H/W accelerated api, so it should not take much time. Please let me know if this is a chip performance issue. _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38126 _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38420 Sachin Rastogi 2009-09-22T04:38:36Z post38422: RE: Is shared context supported by imx35 openVG driver Gaétan Noël http://community.qnx.com/sf/go/post38422 2009-09-21T17:40:34Z 2009-09-21T17:40:34Z Hi Sachin, Unfortunately, the current version of the driver doesn't have any protection around resource sharing (e.g. paths, images -- HW is protected), so unless you know exactly when and how your application will use the VGPath, I would not recommend sharing it. It does have protection for running multiple VG applications though, so that is safe (but resources aren't shareable between apps). Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 18, 2009 3:33 AM To: openvg-graphics Subject: Is shared context supported by imx35 openVG driver Can anyone please let me know if IMX35 OpenVG driver supports shared context mechanism so that we can use VGPath across multiple threads? _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38245 Gaétan Noël 2009-09-21T17:40:34Z post38420: RE: VGPath drawing is slow on imx35 freescale board Gaétan Noël http://community.qnx.com/sf/go/post38420 2009-09-21T17:17:44Z 2009-09-21T17:17:44Z Hi Sachin, Unfortunately, it is difficult to compare an OpenGL solution against an OpenVG solution as the supporting hardware is quite different (not to mention the screen size & architecture), and we've never tried to compare them, so I cannot comment on the performance comparison. How did you take your measurement? Is it the time taken between start of vgDrawPath and end of vgFinish or eglSwapBuffers, or is it the time taken to display one frame? Did you use the composition manager, or was it just a straight VG application? Did you have any other graphics apps running? What type of surface do you render to (Pbuffer, or window), and what was its resolution? What was the surface's format? (e.g. 565 or 8888) How is your driver configured in terms of surface format (e.g. 565 or 8888 in display.conf)? Did you specify an eglSwapInterval, or did you leave it to the default of 1? What model of iMX35 do you have --- is it a 3DS? Cheers, Gaétan -----Original Message----- From: Sachin Rastogi [mailto:community-noreply@qnx.com] Sent: September 17, 2009 12:44 AM To: openvg-graphics Subject: VGPath drawing is slow on imx35 freescale board Hello, I am working on an application created for QNX 6.4.0 (imx35 board). I am using OpenVG for map drawing. I found that if the vgPath segments are around 17000, then it took 0.3 second to draw a single iteration. is this a reasonable time, chip is taking to draw a single iteration? If I use the same segments for openGL on iPhone, it took very minimal time. since openVG is a H/W accelerated api, so it should not take much time. Please let me know if this is a chip performance issue. _______________________________________________ OpenVG http://community.qnx.com/sf/go/post38126 Gaétan Noël 2009-09-21T17:17:44Z post38245: Is shared context supported by imx35 openVG driver Sachin Rastogi http://community.qnx.com/sf/go/post38245 2009-09-18T07:33:06Z 2009-09-18T07:33:06Z Can anyone please let me know if IMX35 OpenVG driver supports shared context mechanism so that we can use VGPath across multiple threads? Sachin Rastogi 2009-09-18T07:33:06Z post38126: VGPath drawing is slow on imx35 freescale board Sachin Rastogi http://community.qnx.com/sf/go/post38126 2009-09-17T04:44:27Z 2009-09-17T04:44:27Z Hello, I am working on an application created for QNX 6.4.0 (imx35 board). I am using OpenVG for map drawing. I found that if the vgPath segments are around 17000, then it took 0.3 second to draw a single iteration. is this a reasonable time, chip is taking to draw a single iteration? If I use the same segments for openGL on iPhone, it took very minimal time. since openVG is a H/W accelerated api, so it should not take much time. Please let me know if this is a chip performance issue. Sachin Rastogi 2009-09-17T04:44:27Z post33777: Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part Shivendra Tiwari http://community.qnx.com/sf/go/post33777 2009-07-14T20:43:28Z 2009-07-14T20:43:28Z I made wfd-pipeline = 1 in winmgr.conf, and it doesn't display anything on the screen. The Flash application doesn't show up. Regarding multiple OpenVG windows: The app has to re-size and changes the zoom levels of the map in particular events, therefore the the OpenVG app destroys its original map window and then creates a new window with the new window properties. I tried NOT resizing the map though, but the black border still persists. Please advise. -Shivendra Shivendra Tiwari 2009-07-14T20:43:28Z post33702: Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part Joel Pilon(deleted) http://community.qnx.com/sf/go/post33702 2009-07-14T01:38:01Z 2009-07-14T01:38:01Z My observation of the dumps: windump_before_OPenVG_app_running.txt Things appear to be normal for the most part with the exception that there appears to be a second openvg window in realize state, and is being created with the MapDisplay class. When this dump was taken, I assume you see a full screen flash HMI window? windump_after_running_OpenVG_app.txt Based on this dump, it appears the second window, mentioned above was eventually destroyed some point after having created a third openvg window with no class. When this dump was taken, I assume you see just the VG map window surrounded by black? Other then the additional window being created and destroyed between creation of the flash window and final third window (map?) things appear to be alright. It is however possible you're running into a known bug in which there can be bit of hicup during a transition from autonomous to non-autonomous which could vary in length depending on the frequency of you're applications posts. To work around this issue, you can remove the "wfd-pipeline = 1" line from you're winmgr.conf to avoid running in autonomous mode. You could also try playing with the order in which you're applications are started, in particular starting the openvg application prior to flash, may help ensure flash stays on top, however you'll need to enable source-alpha for the flash window if you intend to punch a hole in the flash window to display content beneath it. If either of those suggestions don't work out, do you have any additional details about this apparent third window? Joel Pilon(deleted) 2009-07-14T01:38:01Z post33699: Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part Shivendra Tiwari http://community.qnx.com/sf/go/post33699 2009-07-14T00:21:30Z 2009-07-14T00:21:30Z Hi Joel, Thank you so much for your reply. I'm sorry for the delay in providing more information. Here are the attached winmgr.conf, and the dump files at both the states: 1. Only Flash app is running and 2. Both Flash and OpenVG apps are running. I'm sorry, I was not aware of these debugging stuff; therefore please excuse me if you find something trivial after the analysis of these logs and conf files. Thanks a lot. -Shivendra Shivendra Tiwari 2009-07-14T00:21:30Z post33602: Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part Joel Pilon(deleted) http://community.qnx.com/sf/go/post33602 2009-07-11T18:43:44Z 2009-07-11T18:43:44Z As a start if you could provide the winmgr.conf file you're using, as well as an io-winmgr dump (e.g. io-winmgr -d/tmp/windump) during both states you described (desired results vs "blank screen"). This information should help get us on the same page. Joel Pilon(deleted) 2009-07-11T18:43:44Z post33600: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part Shivendra Tiwari http://community.qnx.com/sf/go/post33600 2009-07-11T04:53:01Z 2009-07-11T04:53:01Z Hello, Here is the environment: Hardware: ARM/IMX35 OS: QNX6.4.0 and OpenVG1.1 The application consists of Flash Application in the complete screen; however OpenVG drawing window is around 1/3rd part of the whole screen. I am using OpenKODE for integrating these two. High level API callings are: ----------------------------------------------------------------------------- kd_win = kdCreateWindow(egl_disp, egl_conf, KD_NULL); ...... ///setting properties of kd_win like class, position, size etc. ...... kdRealizeWindow(kd_win, &egl_win); egl_surf = eglCreateWindowSurface(egl_disp, egl_conf, egl_win, NULL); eglSurfaceAttrib(egl_disp, egl_surf, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); eglMakeCurrent(egl_disp, egl_surf, egl_surf, egl_ctx); eglSwapInterval(egl_disp, interval); .... m_warpImage = vgCreateImage(m_imageFormat, m_display_width, m_display_height, VG_IMAGE_QUALITY_BETTER); m_displayPixelRect = (unsigned char*)malloc(m_display_height * m_display_width); memset(m_displayPixelRect, 0, m_display_height * m_display_width); VGfloat mat[9]; vguComputeWarpQuadToQuad(0, 0, (VGfloat)m_display_width, 0.0f, (VGfloat)m_display_width * 0.8f, (VGfloat)m_display_height * 0.5f, (VGfloat)m_display_width * 0.2f, (VGfloat)m_display_height * 0.5f, 0, 0, (VGfloat)m_display_width, 0, (VGfloat)m_display_width, (VGfloat)m_display_height, 0.0f, (VGfloat)m_display_height, mat); .... memcpy(m_warpMatrix, mat, sizeof(VGfloat)*9); ---------------------------------------------------------------------------------- The Flash app is up all the time and it allows me to create and draw an OpenVG map into the specific area Flash has decided. Everything works fine until the OpenVG map drawing starts. As soon as Map comes up in the front, the whole screen goes back except the OpenVG map window. After few seconds (around 3-4 seconds) the Flash app comes up and the whole integrated Flash and OpenVG apps work together properly. This problem comes up again if I resize the OpenVG map area for which I need to create a different size OpenVG window (egl_surface) again. Can someone please let me know what is the cause of the problem? I hope I have given the sufficient information. Please let me know if you want more decryption. Thanks a lot. Shivendra Shivendra Tiwari 2009-07-11T04:53:01Z post32559: Re: RE: The screen is flash when draw a bitmap by OpenVg hu xiaohua http://community.qnx.com/sf/go/post32559 2009-06-26T07:15:13Z 2009-06-26T07:15:13Z This is my code: KDint kdMain(KDint argc, const KDchar *const *argv) { EGLint egl_conf_attr[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_LOCK_SURFACE_BIT_KHR|EGL_SWAP_BEHAVIOR_PRESERVED_BIT, EGL_RENDERABLE_TYPE, EGL_OPENVG_API, /* We don't care about renderable type */ EGL_NATIVE_RENDERABLE, EGL_DONT_CARE, /* We won't use native rendering either */ EGL_LEVEL, EGL_DONT_CARE, /* Use main layer by default */ EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_ALPHA_SIZE,EGL_DONT_CARE, EGL_NONE /* End of list */ }; const KDint32 exit_area_size = 20; EGLDisplay egl_disp; EGLConfig egl_conf = (EGLConfig)0; EGLint egl_num_configs; EGLSurface egl_surf; KDWindow *kd_win; EGLNativeWindowType egl_win; KDint32 kd_size[2] = { -1, -1 }; KDint32 kd_pos[2] = { -1, -1 }; EGLint interval = 1; KDboolean kd_vis = KD_TRUE; KDust timeout = 0; const KDEvent *event; int rval = EXIT_FAILURE; int rc; int i; EGLContext egl_context; egl_disp = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (egl_disp == EGL_NO_DISPLAY) { egl_perror("eglGetDisplay"); goto fail1; } rc = eglInitialize(egl_disp, NULL, NULL); if (rc != EGL_TRUE) { egl_perror("eglInitialize"); goto fail2; } eglBindAPI(EGL_OPENVG_API); if (egl_conf == 0) { rc = eglChooseConfig(egl_disp, egl_conf_attr, &egl_conf, 1, &egl_num_configs); if (rc != EGL_TRUE) { egl_perror("eglChooseConfig"); goto fail2; } if (egl_num_configs == 0) { fprintf(stderr, "eglChooseConfig: could not find a configuration\n"); goto fail2; } } kd_win = kdCreateWindow(egl_disp, egl_conf, KD_NULL); if (kd_win == KD_NULL) { kd_perror("kdCreateWindow"); goto fail2; } if (kd_size[0] != -1 && kd_size[1] != -1) { kdSetWindowPropertyiv(kd_win, KD_WINDOWPROPERTY_SIZE, kd_size); } if (kd_pos[0] != -1 && kd_pos[1] != -1) { } rc = kdRealizeWindow(kd_win, &egl_win); if (rc) { kd_perror("kdRealizeWindow"); goto fail3; } egl_surf = eglCreateWindowSurface(egl_disp, egl_conf, egl_win, NULL); if (egl_surf == EGL_NO_SURFACE) { egl_perror("eglCreateWindowSurface"); goto fail3; } egl_context = eglCreateContext(egl_disp, egl_conf, NULL,NULL); eglMakeCurrent(egl_disp,egl_surf, egl_surf,egl_context); rc = eglSurfaceAttrib(egl_disp, egl_surf, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); if (rc != EGL_TRUE) { egl_perror("eglSurfaceAttrib"); goto fail4; } rc = eglSurfaceAttrib(egl_disp, egl_surf, EGL_SWAP_INTERVAL_QNX, interval); if (rc != EGL_TRUE) { egl_perror("eglSurfaceAttrib"); goto fail2; } if (kd_size[0] == -1 || kd_size[1] == -1) { kdGetWindowPropertyiv(kd_win, KD_WINDOWPROPERTY_SIZE, kd_size); } eglSwapInterval(egl_disp,60); VGImage image; unsigned char * buffer=(unsigned char * )malloc(200*300); image = vgCreateImage(VG_sRGB_565,480,272, VG_IMAGE_QUALITY_NONANTIALIASED); vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); vgScale(640.0/480.0, 480.0/272.0); i = 0; while (1) { while ((event = kdWaitEvent(timeout)) != KD_NULL) { switch (event->type) { case KD_EVENT_WINDOW_CLOSE: goto end; case KD_EVENT_INPUT_POINTER: if (event->data.inputpointer.select) { if (event->data.inputpointer.x >= kd_size[0] - exit_area_size && event->data.inputpointer.x < kd_size[0] && event->data.inputpointer.y >= 0 && event->data.inputpointer.y < exit_area_size) { goto end; } } break; default: kdDefaultEvent(event); break; } } memset(buffer,0,200*300); if (kd_vis) { vgImageSubData(image,buffer, 0, VG_sRGB_565, 480*2, 0,480,272); vgDrawImage(image); rc = eglSwapBuffers(egl_disp, egl_surf); if (rc != EGL_TRUE) { egl_perror("eglSwapBuffers"); break; } } } hu xiaohua 2009-06-26T07:15:13Z post32522: Re: RE: The screen is flash when draw a bitmap by OpenVg hu xiaohua http://community.qnx.com/sf/go/post32522 2009-06-25T15:34:25Z 2009-06-25T15:34:25Z result #1 flash is refresh result #2 The picture is updated with right one time after the eglSwapBuffers,but next time the display of picture is not right where the data and last time is same. There is no refresh when I run the sample code on x86,but the same code run on the ARM is refresh.(sample code is sw-kd-vsync) the process: video_display() { unsigned char * buffer_data = (unsigned char *)malloc(480*272*2) ; egl_init(){ } vgCreateImage(); vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE) vgScale(640/480, 480/272) while(1){ data_size = read(fd,buffer_data,480*272*2); vgImageSubData(image,buffer_data, 0, VG_sRGB_565, 0, 0,480,272); vgDrawImage(image); eglSwapBuffers(egl_disp, egl_surf); } The data is read three times on one second!So the display refresh is three times on one second! Thank you very much! } hu xiaohua 2009-06-25T15:34:25Z post32511: RE: The screen is flash when draw a bitmap by OpenVg Gaétan Noël http://community.qnx.com/sf/go/post32511 2009-06-25T12:47:31Z 2009-06-25T12:47:31Z Hi Hu, I have a few questions regarding your inquiry­. What boards (with processor speed) are you using exactly (both the ARM and the x86)? What EGL, OpenKode and OpenVG solution are you using on the x86? In your result #1, by flash, do you mean flicker, or refresh? In your result #2, you mean that the picture you want to display isn't updated even after the eglSwapBuffers? How do you use OpenKode, and what is the eglSwapInterval set to? How is your buffer (destination of your read) allocated? Can you provide us the code for your app? Cheers, Gaétan -----Original Message----- From: hu xiaohua [mailto:community-noreply@qnx.com] Sent: June 25, 2009 4:11 AM To: openvg-graphics Subject: The screen is flash when draw a bitmap by OpenVg Hi!Everyone! I want to draw a bitmap with full screen. The size of map data is 480*272,the resolution of screen is 640*480. The process is: 1.OpenKode and EGl initialization 2.OpenVg initialization eglBindAPI; vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE) vgScale(640/480, 480/272) vgCreateImage 3.read data from frame buffer and display the image(while loop) read(fd,buffer,length) vgImageSubData vgDrawImage eglSwapBuffers result: 1.The picture of display is right,but the screen is flash three times in one second(The data is read three times in one second) 2.sometimes the display of picture is the picture which have been displayed last time. ps: 1.The screen is don't flash When read data and draw image only one time. 2.The platform is ARM. The same of code run on the x86(HP) don't flash,but run on the ARM is flash. my question: 1.The cause of the error 2.How to resolved? Thank you very much! _______________________________________________ OpenVG http://community.qnx.com/sf/go/post32498 Gaétan Noël 2009-06-25T12:47:31Z post32498: The screen is flash when draw a bitmap by OpenVg hu xiaohua http://community.qnx.com/sf/go/post32498 2009-06-25T08:10:54Z 2009-06-25T08:10:54Z Hi!Everyone! I want to draw a bitmap with full screen. The size of map data is 480*272,the resolution of screen is 640*480. The process is: 1.OpenKode and EGl initialization 2.OpenVg initialization eglBindAPI; vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE) vgScale(640/480, 480/272) vgCreateImage 3.read data from frame buffer and display the image(while loop) read(fd,buffer,length) vgImageSubData vgDrawImage eglSwapBuffers result: 1.The picture of display is right,but the screen is flash three times in one second(The data is read three times in one second) 2.sometimes the display of picture is the picture which have been displayed last time. ps: 1.The screen is don't flash When read data and draw image only one time. 2.The platform is ARM. The same of code run on the x86(HP) don't flash,but run on the ARM is flash. my question: 1.The cause of the error 2.How to resolved? Thank you very much! hu xiaohua 2009-06-25T08:10:54Z post32428: RE: Where are openVG header files and libs? Gaétan Noël http://community.qnx.com/sf/go/post32428 2009-06-24T12:50:49Z 2009-06-24T12:50:49Z Hi Mario, At this point in time, OpenVG is only available on the iMX35, and you would need the BSP to get the header files and libraries. The HMI Suite does not provide OpenVG. You can find details on the iMX35 BSP at http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/FreescaleImx353ds. Cheers, Gaétan -----Original Message----- From: Mario Mastrodicasa [mailto:community-noreply@qnx.com] Sent: June 24, 2009 8:38 AM To: openvg-graphics Subject: Where are openVG header files and libs? Hi all, I've installed QNX 6.4.1 but I'm unable to find openVG header files and related libraries. Where are them? Is OpenVG available only with Aviage Suite? Thanks in advance, Mario. _______________________________________________ OpenVG http://community.qnx.com/sf/go/post32424 Gaétan Noël 2009-06-24T12:50:49Z post32424: Where are openVG header files and libs? Mario Mastrodicasa http://community.qnx.com/sf/go/post32424 2009-06-24T12:37:37Z 2009-06-24T12:37:37Z Hi all, I've installed QNX 6.4.1 but I'm unable to find openVG header files and related libraries. Where are them? Is OpenVG available only with Aviage Suite? Thanks in advance, Mario. Mario Mastrodicasa 2009-06-24T12:37:37Z post32225: RE: Draw a bitmap with full screen by OpenVG Gaétan Noël http://community.qnx.com/sf/go/post32225 2009-06-22T14:31:13Z 2009-06-22T14:31:13Z Hi, You can create a VGImage with size 480x272, and then copy your bits over to it using vgImageSubData. Then set the VG_MATRIX_IMAGE_USER_TO_SURFACE matrix, and use vgScale to scale it using vgScale(640/480, 480/272). Then use vgDrawImage to put the pixels on the surface. So, just to recap the VG steps (you still need to create a surface and initialize EGL...): 1- vgCreateImage 2- vgImageSubData 3- vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE) 4- vgDrawImage You may also want to change VG_IMAGE_MODE (through vgSeti), depending on the effect you want to achieve. Note also that this will stretch your image, and the aspect ratio won't be preserved. If you want to keep the AR, then simply use the same scale in the x & y direction, and use vgTranslate to center the image accordingly. Cheers, Gaétan -----Original Message----- From: hu xiaohua [mailto:community-noreply@qnx.com] Sent: June 22, 2009 9:50 AM To: openvg-graphics Subject: Re: RE: Draw a bitmap with full screen by OpenVG I'm very sorry that don't write my intent. I want to draw a bitmap on the display . But the size of bitmap data is 480*272,the resolution of my screen is 640*480. I don't know how to achieve. Thank you very much! _______________________________________________ OpenVG http://community.qnx.com/sf/go/post32216 Gaétan Noël 2009-06-22T14:31:13Z post32216: Re: RE: Draw a bitmap with full screen by OpenVG hu xiaohua http://community.qnx.com/sf/go/post32216 2009-06-22T13:49:59Z 2009-06-22T13:49:59Z I'm very sorry that don't write my intent. I want to draw a bitmap on the display . But the size of bitmap data is 480*272,the resolution of my screen is 640*480. I don't know how to achieve. Thank you very much! hu xiaohua 2009-06-22T13:49:59Z post32207: RE: Draw a bitmap with full screen by OpenVG Gaétan Noël http://community.qnx.com/sf/go/post32207 2009-06-22T13:21:23Z 2009-06-22T13:21:23Z Hi, In the OpenVG scenario, the vgImageSubData call will put your bitmap data into the vgImage. vgSetPixels can be used to put the Image pixels onto the drawing surface, but you can also use vgDrawImage to get an equivalent effect (and / or apply a transformation), depending on your needs. Also, don't forget to call eglBindAPI in your initial steps (right after eglInitialize is a good place for this). In the second scenario, I'm not quite sure what you are trying to achieve. If the intent is to read the pixels from the surface, you can use vgReadPixels. Furthermore, eglCopyBuffers isn't currently implemented and will always return EGL_FALSE, so it wouldn't be an option for now. Cheers, Gaétan -----Original Message----- From: hu xiaohua [mailto:community-noreply@qnx.com] Sent: June 21, 2009 10:49 PM To: openvg-graphicsra Subject: Draw a bitmap with full screen by OpenVG Hi!Everyone! I want to draw bitmap that with full screen by EGL and OpenVG. step 1.eglGetDisplay 2.eglInitialize 3.eglChooseConfig 4.create a window by OpenKode 5.eglCreateWindowSurface 6.eglCreateContext 7.eglMakeCurrent 8.vgCreateImage 9.vgImageSubData 10.vgSetPixels 11.eglSwapBuffers The size of data source :480*270 display resolution:640*480 The step of draw bitmap is correct? I think of the process of drawing a bitmap with full screen that is : 1.gf_dev_attach 2.eglGetDisplay 3.eglInitialize 4.eglChooseConfig 5.create a window by OpenKode 6.gf_3d_query_config 7.gf_surface_create 8.eglCreatePixmapSurface 9.eglCreateContext 10.eglMakeCurrent 11.vgCreateImage 12.vgImageSubData 13.vgSetPixels 14.eglCopyBuffers I cann't sure of the process is correct. I don't know about between the window surface(by eglCreateWindowSurface) and the pixmap surface(by eglCreatePixmapSurface) difference. What suggestion is about this? Thank you very much! _______________________________________________ OpenVG http://community.qnx.com/sf/go/post32183 Gaétan Noël 2009-06-22T13:21:23Z post32183: Draw a bitmap with full screen by OpenVG hu xiaohua http://community.qnx.com/sf/go/post32183 2009-06-22T02:49:17Z 2009-06-22T02:49:17Z Hi!Everyone! I want to draw bitmap that with full screen by EGL and OpenVG. step 1.eglGetDisplay 2.eglInitialize 3.eglChooseConfig 4.create a window by OpenKode 5.eglCreateWindowSurface 6.eglCreateContext 7.eglMakeCurrent 8.vgCreateImage 9.vgImageSubData 10.vgSetPixels 11.eglSwapBuffers The size of data source :480*270 display resolution:640*480 The step of draw bitmap is correct? I think of the process of drawing a bitmap with full screen that is : 1.gf_dev_attach 2.eglGetDisplay 3.eglInitialize 4.eglChooseConfig 5.create a window by OpenKode 6.gf_3d_query_config 7.gf_surface_create 8.eglCreatePixmapSurface 9.eglCreateContext 10.eglMakeCurrent 11.vgCreateImage 12.vgImageSubData 13.vgSetPixels 14.eglCopyBuffers I cann't sure of the process is correct. I don't know about between the window surface(by eglCreateWindowSurface) and the pixmap surface(by eglCreatePixmapSurface) difference. What suggestion is about this? Thank you very much! hu xiaohua 2009-06-22T02:49:17Z post32140: Re: RE: Antialiasing in OpenVG - on QNX ARM platform (IMX35 hardware) Shivendra Tiwari http://community.qnx.com/sf/go/post32140 2009-06-19T16:50:37Z 2009-06-19T16:50:37Z Hi Gaétan, Thank you so much for your reply. Is there some work around for IMX35 so that we can have quality line drawing? Any ideas and help would be appreciated. Thanks, Shivendra Shivendra Tiwari 2009-06-19T16:50:37Z post32107: RE: Antialiasing in OpenVG - on QNX ARM platform (IMX35 hardware) Gaétan Noël http://community.qnx.com/sf/go/post32107 2009-06-19T12:47:31Z 2009-06-19T12:47:31Z Hi Shivendra, Unfortunately, the OpenVG driver for the iMX35 doesn't currently support multisampling, and that explains why you cannot choose a config with EGL_SAMPLE_BUFFERS set to 1. Cheers, Gaétan -----Original Message----- From: Shivendra Tiwari [mailto:community-noreply@qnx.com] Sent: June 18, 2009 4:58 PM To: openvg-graphics Subject: Antialiasing in OpenVG - on QNX ARM platform (IMX35 hardware) Hello, I am pretty new in the OpenVG application development. I am using OpenVG1.1 libraries for the same. I need to improve the line drawing quality in my existing QNX/ARM/IMX35 based application. The line drawing quality is not good in the existing app, therefore I want to apply Multi-sampling on the drawing, but not sure the correct method of applying it in OpenVG. Following are the EGL config attributes I'm using in my application: EGLint egl_conf_attr[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT, EGL_DEPTH_SIZE, EGL_DONT_CARE, EGL_LEVEL, EGL_DONT_CARE, EGL_TRANSPARENT_TYPE, EGL_DONT_CARE, EGL_RED_SIZE, EGL_DONT_CARE, EGL_GREEN_SIZE, EGL_DONT_CARE, EGL_BLUE_SIZE, EGL_DONT_CARE, EGL_ALPHA_SIZE, EGL_DONT_CARE, EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_SAMPLE_BUFFERS, 0, /* value 1 doesn't work*/ EGL_STENCIL_SIZE, EGL_DONT_CARE, EGL_SAMPLES, EGL_DONT_CARE, EGL_CONFIG_ID, EGL_DONT_CARE, EGL_NONE }; I have already been using vgSeti(VG_IMAGE_QUALITY, VG_IMAGE_QUALITY_BETTER) API so that OpenVG applies anti-aliasing, but the line quality is still poor and lines are jagged. As per OpenVG/EGL documents i.e. "openvg-1.1.pdf" and "eglspec.1.4.withchanges.20090422.pdf", EGL_SAMPLE_BUFFERS attribute can be used for multisampling. But setting the value of EGL_SAMPLE_BUFFERS as 1 (default is 0), fails the eglChooseConfig() API. Can someone let me know how to use multisampling (antialiasing) in OpenVG image drawing? Some sample code/example would be really helpful. Attached is the sample code I am using for the proof of concept which draws two diagonal lines. Thanks a lot. Shivendra _______________________________________________ OpenVG http://community.qnx.com/sf/go/post32076 Gaétan Noël 2009-06-19T12:47:31Z post32078: Re: Antialiasing in OpenVG - on QNX ARM platform (IMX35 hardware) Shivendra Tiwari http://community.qnx.com/sf/go/post32078 2009-06-18T21:58:21Z 2009-06-18T21:58:21Z Just to add that the sample code i.e. "tiger" app given by OpenVG/Kornos has following configuration attributes: EGLint egl_conf_attr[] = { EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_LUMINANCE_SIZE, EGL_DONT_CARE, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_SAMPLES, 1, EGL_NONE }; The above configuration attributes dont work on my application. they fail at eglChooseConfig() call. Do I need to configure my hardware or do I need some different library for the same? -Shivendra Shivendra Tiwari 2009-06-18T21:58:21Z post32076: Antialiasing in OpenVG - on QNX ARM platform (IMX35 hardware) Shivendra Tiwari http://community.qnx.com/sf/go/post32076 2009-06-18T20:58:01Z 2009-06-18T20:58:01Z Hello, I am pretty new in the OpenVG application development. I am using OpenVG1.1 libraries for the same. I need to improve the line drawing quality in my existing QNX/ARM/IMX35 based application. The line drawing quality is not good in the existing app, therefore I want to apply Multi-sampling on the drawing, but not sure the correct method of applying it in OpenVG. Following are the EGL config attributes I'm using in my application: EGLint egl_conf_attr[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT, EGL_DEPTH_SIZE, EGL_DONT_CARE, EGL_LEVEL, EGL_DONT_CARE, EGL_TRANSPARENT_TYPE, EGL_DONT_CARE, EGL_RED_SIZE, EGL_DONT_CARE, EGL_GREEN_SIZE, EGL_DONT_CARE, EGL_BLUE_SIZE, EGL_DONT_CARE, EGL_ALPHA_SIZE, EGL_DONT_CARE, EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_SAMPLE_BUFFERS, 0, /* value 1 doesn't work*/ EGL_STENCIL_SIZE, EGL_DONT_CARE, EGL_SAMPLES, EGL_DONT_CARE, EGL_CONFIG_ID, EGL_DONT_CARE, EGL_NONE }; I have already been using vgSeti(VG_IMAGE_QUALITY, VG_IMAGE_QUALITY_BETTER) API so that OpenVG applies anti-aliasing, but the line quality is still poor and lines are jagged. As per OpenVG/EGL documents i.e. "openvg-1.1.pdf" and "eglspec.1.4.withchanges.20090422.pdf", EGL_SAMPLE_BUFFERS attribute can be used for multisampling. But setting the value of EGL_SAMPLE_BUFFERS as 1 (default is 0), fails the eglChooseConfig() API. Can someone let me know how to use multisampling (antialiasing) in OpenVG image drawing? Some sample code/example would be really helpful. Attached is the sample code I am using for the proof of concept which draws two diagonal lines. Thanks a lot. Shivendra Shivendra Tiwari 2009-06-18T20:58:01Z post31065: RE: How to link agaisnt a revised library. (e.g. libOpenVG-G12.so.1) Gaétan Noël http://community.qnx.com/sf/go/post31065 2009-06-08T12:26:51Z 2009-06-08T12:26:51Z Hi, Your application should only have to link against libOpenVG, and not against libOpenVG-G12. libOpenVG-G12 is being loaded (and used) by the iMX35 graphics driver (devg-imx35) and being used by libOpenVG when your application needs it. Regards, Gaétan -----Original Message----- From: hu xiaohua [mailto:community-noreply@qnx.com] Sent: June 8, 2009 8:06 AM To: openvg-graphics Subject: How to link agaisnt a revised library. (e.g. libOpenVG-G12.so.1) Hello, I cannot link agaisnt a revised library. (e.g. libOpenVG-G12.so.1) What should be done to link agaisnt a revised library. Thanks for your suggestion! _______________________________________________ OpenVG http://community.qnx.com/sf/go/post31064 Gaétan Noël 2009-06-08T12:26:51Z post31064: How to link agaisnt a revised library. (e.g. libOpenVG-G12.so.1) hu xiaohua http://community.qnx.com/sf/go/post31064 2009-06-08T12:05:44Z 2009-06-08T12:05:44Z Hello, I cannot link agaisnt a revised library. (e.g. libOpenVG-G12.so.1) What should be done to link agaisnt a revised library. Thanks for your suggestion! hu xiaohua 2009-06-08T12:05:44Z post25418: RE: OpenVG test code ? Gaétan Noël http://community.qnx.com/sf/go/post25418 2009-03-27T05:41:41Z 2009-03-27T05:41:41Z Hi Dave, Although we don't have much sample OpenVG code apart from the Tiger, I've attached a small sample that I've just made to demonstrate the use of scaling, rotation and translation features that OpenVG provides. I've put a lot of comments in the code so it should be pretty easy to follow, but I think the best way to understand the effects of matrix manipulation is to start with a very simple sample application and manipulate the matrix gradually. In the general case, when doing translations and rotations, the coordinate system's origin and axes get affected, and most following vg (drawing) calls are affected (refer to Khronos' standard to know the exact list). What was drawn before the matrix manipulation is left untouched. Matrix changes are cumulative and non-interchangeable, so two translations followed by a rotation is not equivalent to a rotation followed by two translations. In terms of "plane transformation", there's really nothing to build from scratch here, as the vg API provides all you need through the use of rotations, translations, etc. and through the use of vgLoadMatrix and vgGetMatrix to save and restore your matrix manipulations. Of course my explanation is a bit oversimplified, but all that to say that all the basics are already provided. Note that in my code, I haven't put any error checking (using vgGetError()) as it would have cluttered the sample too much... Note also that the code is by no means optimized --- it's really just a series of matrix manipulations (rotations, translations, scaling) and in many cases, the code could have been "compressed" through re-use of paths and sub-functions. I hope this helps. Regards, Gaétan -----Original Message----- From: Dave Bott [mailto:community-noreply@qnx.com] Sent: March 26, 2009 1:42 PM To: openvg-graphics Subject: OpenVG test code ? Hi, My customer is consulting for another QNX customer. He's using an i.mx35. Do we have any test code or examples that might help him ? Regards Dave " I have been running some unit test code on the OpenVG calls and I need a to setup test to see how I can zoom in and out of some video clips in jpg format without impacting the graphics quality and clocking the CPU utilization as well. I have looked at the Tiger sample code that you send me a while ago and in the code they are performing transformation on the plane instead of object coordinates for zooming and rotating, and the picture quality is also clean on various zoom and rotation level. Do you know of any other sample code that has more details on setting up these plane transformations? f you have any internal test codes for openVG please let me know. I have looked around the OpenVG web site and was not able to find much which really helps what I need to do. If you do not think there is anything out there let me know so I can allocate time to build this plane transformation code from scratch. " _______________________________________________ OpenVG http://community.qnx.com/sf/go/post25380 Gaétan Noël 2009-03-27T05:41:41Z post25380: OpenVG test code ? Dave Bott(deleted) http://community.qnx.com/sf/go/post25380 2009-03-26T17:42:22Z 2009-03-26T17:42:22Z Hi, My customer is consulting for another QNX customer. He's using an i.mx35. Do we have any test code or examples that might help him ? Regards Dave " I have been running some unit test code on the OpenVG calls and I need a to setup test to see how I can zoom in and out of some video clips in jpg format without impacting the graphics quality and clocking the CPU utilization as well. I have looked at the Tiger sample code that you send me a while ago and in the code they are performing transformation on the plane instead of object coordinates for zooming and rotating, and the picture quality is also clean on various zoom and rotation level. Do you know of any other sample code that has more details on setting up these plane transformations? f you have any internal test codes for openVG please let me know. I have looked around the OpenVG web site and was not able to find much which really helps what I need to do. If you do not think there is anything out there let me know so I can allocate time to build this plane transformation code from scratch. " Dave Bott(deleted) 2009-03-26T17:42:22Z