Hello all,

I am currently working on a small project for which I have decided to use
the Clutter and Cogl APIs.  I am attempting to implement a custom Clutter
Actor and am managing the drawing of this Actor using Cogl.  I am having a
problem, however, with the transparency of items drawn using "pure" COGL:
 changing the alpha value has no effect, and the result is 100% opaque.

Here are the relevant pieces of code:

        // title area
{
cd[i++] = ColorManager::BORDER_LIGHT.get_red() / ColorManager::MAX_RGBA_VAL;
cd[i++] = ColorManager::BORDER_LIGHT.get_green() /
ColorManager::MAX_RGBA_VAL;
cd[i++] = ColorManager::BORDER_LIGHT.get_blue() /
ColorManager::MAX_RGBA_VAL;
cd[i++] = ColorManager::BORDER_LIGHT.get_alpha() /
ColorManager::MAX_RGBA_VAL;
 cd[i++] = ColorManager::BORDER_LIGHT.get_red() /
ColorManager::MAX_RGBA_VAL;
cd[i++] = ColorManager::BORDER_LIGHT.get_green() /
ColorManager::MAX_RGBA_VAL;
cd[i++] = ColorManager::BORDER_LIGHT.get_blue() /
ColorManager::MAX_RGBA_VAL;
cd[i++] = 0.0;
}
 cogl_vertex_buffer_add(vertex_data, "gl_Vertex", 2,
COGL_ATTRIBUTE_TYPE_FLOAT, FALSE, 0, vd);
cogl_vertex_buffer_add(vertex_data, "gl_Color", 4,
COGL_ATTRIBUTE_TYPE_FLOAT, FALSE, 0, cd);
cogl_vertex_buffer_submit(vertex_data);

and later on...

        cogl_push_matrix();
{
cogl_scale((_width )/(I_SIZE) , 1.0, 1.0);
cogl_vertex_buffer_draw(vertex_data, COGL_VERTICES_MODE_LINE_STRIP, 12, 2);
}
cogl_pop_matrix();

Note that I have also tried enabling and disabling the stage feature that
forces it to honor Actor transparency:
stage->set_use_alpha(true); // or false

This changes nothing.

I have done a fair amount of search, but to no avail.  If anyone has any
idea why setting the alpha channel to 0.0 has no effect, I would greatly
appreciate it.

Regards,
Andy
_______________________________________________
clutter-app-devel-list mailing list
clutter-app-devel-list@clutter-project.org
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to