Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - OpenVG test code ?: (9 Items)
   
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.
"
RE: OpenVG test code ?  
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

Attachment: Text scaleRotateTranslate.c 8.25 KB
Re: RE: OpenVG test code ?  
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
Re: RE: OpenVG test code ?  
Never mind, got it working using the code from the sample implementation and some GLES/KD/EGL examples.

Regards,

Dominic
Re: RE: OpenVG test code ?  
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
RE: OpenVG test code ?  
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
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
Re: OpenVG test code ?  
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
Re: OpenVG test code ?  
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.