Hello,
does anybody knows where to submit bugs related to OpenVG implementation on OMAP ? Specifically OMAP3530 with OMAP35x_Graphics SDK _3_00_00_06 ?
It does not correctly implements standard when when drawing elliptical arcs.
Thank you,
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
does anybody knows where to submit bugs related to OpenVG implementation on OMAP ? Specifically OMAP3530 with OMAP35x_Graphics SDK _3_00_00_06 ?
It does not correctly implements standard when when drawing elliptical arcs.
Thank you,
I do not know that there is a formal path, but if you can post details of the issue here we can get it submitted as a bug, is this something that you could post details on in the public forum?
Sure, it is basically related to drawing arc when distance between start point and end point is slightly larger than arc diameter, due to some numerical errors.
Both arc radiuses "rh" and "rv" have the same value. Basically drawing half a circle.
I noticed that sometimes, not all the times, it draws straight line between start and end point instead doing as standard says:
========== Quote from OpenVG standard:
If no elliptical arc exists with the given parameters because the endpoints are too far apart (as detailed in the next section), the arc is drawn as if the radii were scaled up uniformly by the smallest factor that permits a solution.
==========
Could you post a small code snipet that demonstrates a case when the arc is drawn correctly and a case when the arc is drawn incorrectly - then I can file a bug based on this.
Thanks,
Darren
//Note that i don't use decimal floating point definition, i copy raw bytes that i'm getting during my calculations. This draws straight line instead of arc.
//I believe error is in the difference of floating point representations between GPU & CPU
void testCode()
{
EGLDisplay eglDisplay = 0;
EGLConfig eglConfig = 0;
EGLSurface eglSurface = 0;
EGLContext eglContext = 0;
int i32NumConfigs, i32MajorVersion, i32MinorVersion;
/*
Step 0 - Initialize OpenVG
--------------------------
The following code up to the next comment block consists of the
steps 0 to 8 taken straight from the Initialization tutorial.
*/
NativeWindowType sWindow = 0; //No window
eglDisplay = (NativeDisplayType)eglGetDisplay(EGL_DEFAULT_DISPLAY);
if(!eglInitialize(eglDisplay, &i32MajorVersion, &i32MinorVersion))
{
printf("Error: eglInitialize() failed.\n");
return;
}
eglBindAPI(EGL_OPENVG_API);
static const int ai32ConfigAttribs[] =
{
EGL_RED_SIZE, 5,
EGL_GREEN_SIZE, 6,
EGL_BLUE_SIZE, 5,
EGL_ALPHA_SIZE, 0,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
EGL_NONE
};
if(!eglChooseConfig(eglDisplay, ai32ConfigAttribs, &eglConfig, 1, &i32NumConfigs) || (i32NumConfigs != 1))
{
printf("Error: eglChooseConfig() failed.\n");
return;
}
eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, sWindow, NULL);
if((eglGetError() != EGL_SUCCESS) || (eglSurface == EGL_NO_SURFACE))
{
printf("Error: eglCreateWindowSurface() failed.\n");
return;
}
eglContext = eglCreateContext(eglDisplay, eglConfig, NULL, NULL);
if((eglGetError() != EGL_SUCCESS) || (eglContext == EGL_NO_CONTEXT))
{
printf("Error: eglCreateContext() failed.\n");
return;
}
eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext);
if(eglGetError() != EGL_SUCCESS)
{
printf("Error: eglMakeCurrent() failed.\n");
return;
}
vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_FASTER);
//setup transformations
vgSeti(VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER);
vgLoadIdentity();
vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
vgLoadIdentity();
vgScale((float)480.0, (float)480.0);
/* Set the line width to 1 pixel */
vgSetf(VG_STROKE_LINE_WIDTH, 1.0/480.0);
VGPath arcPath = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
1.0f, 0.0f, 20, 30,
(unsigned int)VG_PATH_CAPABILITY_APPEND_TO);
unsigned char data[] = {
0x81,0x69,0x26,0x3F,0x8D,0xA,0x2B,0x3F,0xF9,0x8A,0xAF,0x3C,0xF9,0x8A,0xAF,0x3C,0x0,0x0,0x0,0x0,0x82,0x48,0x24,0x3F,0x9,0xDA,0x35,0x3F,0x82,0x48,0x24,0x3F,0x9,0xDA,0x35,0x3F,
};
VGubyte pathCommands[] = { VG_MOVE_TO, VG_LCWARC_TO, VG_MOVE_TO_ABS, VG_CLOSE_PATH };
VGfloat pathCoords[9];
unsigned char *p = (unsigned char *)pathCoords;
for(int i = 0; i < 4*9; i++) {
*p++ = data[i];
}
for(int i = 0; i < 9; i++) {
printf("%f\n", pathCoords[i]);
}
vgAppendPathData(arcPath, sizeof(pathCommands)/sizeof(VGubyte), pathCommands, pathCoords);
VGfloat clearColor[4] = { 0.6, 0.6, 0.6, 0.0 };
vgSetfv(VG_CLEAR_COLOR, 4, clearColor);
vgClear(0, 0, 640, 480);
vgDrawPath(arcPath, VG_STROKE_PATH);
eglSwapBuffers(eglDisplay, eglSurface);
}
This problem has been reported as fixed in the latest drivers in the 1.3 DDK. This will be included in our next release (3_00_00_08).
Regards, Clay