Shivendra Tiwari
|
Antialiasing in OpenVG - on QNX ARM platform (IMX35 hardware)
|
Shivendra Tiwari
06/18/2009 4:58 PM
post32076
|
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
|
|
|