Hi All,

About issues for porting clutk to opengl es2.0, I'd like to give some related background of clutk and clutter/cogl implementations first.

clutk:
- some ARB extensions are used for opengl to support legacy chipsets (i.e,  ARB_vertex_program, ARB_fragment_program, ARB_multitexture, ...)
- fixed vertex pipeline programming is used, so some legacy opengl APIs are called for vertex operations (i.e, to specify vertex positions and texture coordinates, do matrix transformations, ...)
- clutk lives in the coordinate system of clutter

clutter/cogl:
- cogl provides a common API, which abstracts the differences of different opengl/es APIs
- fixed vertex pipeline is used in cogl
- for gles2, vertex shader is implemented to emulate fixed vertex pipeline in the gles2 backend of cogl

To use the full programmable pipeline of opengl es2.0, vertex/fragment shaders should be implemented for clutk. But I met some problem for specifying vertex attributes in the vertex shader. Take ctk_render_custom_quad_asm for example here, where fixed vertex pipeline is used for opengl. For opengl es2.0, we need to port it to programmable pipeline. Please note the "ClutterVertex vtx[4]" parameter here is designed for fixed pipeline, currently I haven't found a good way to adapt it to programmable vertex pipeline. Do you have any good ideas?
===
void ctk_render_custom_quad_asm(guint texid, guint texwidth, guint texheight, ShaderProgram *shader, int window_w, int window_h, ClutterVertex vtx[4], gfloat red, gfloat green, gfloat blue, gfloat Opacity)
{
    ...
    glBegin();
    glColor4f();
    glMultiTexCoord2f();
    glVertex4f();
    glEnd();
    ...
}

IMHO there may be two possible solutions:
(1) Implement vertex shader to emulate the fixed vertex pipeline, but how to adapt it to clutter still need to be investigated, and it seems not easy.
(2) Use cogl in clutk directly for gles2 to make clutk platform independent as much as possible, and let cogl to handle the API differences. And in this case, maybe we don't need to write vertex/fragment shaders anymore similar as MxToolkit used in Meego.

The bzr branch for clutk:
https://code.launchpad.net/~jammy-zhou/clutk/gles2-shaders.hacky

It's appreciated that you can give some suggestions. :)

Regards,
Jammy

On Tue, Sep 7, 2010 at 4:03 PM, Alexandros Frantzis <alexandros.frantzis@linaro.org> wrote:
Hi,

notes and actions from our Monday graphics and multimedia cross-vendor
call are available on the wiki:

 + https://wiki.linaro.org/Platform/UserPlatforms/2010-08-30
 + https://wiki.linaro.org/Platform/UserPlatforms/2010-09-06

Details about when and where of this meeting can be found here:

 + https://wiki.linaro.org/WorkingGroups/Middleware/Graphics#Weekly%20Public%20Call


Thanks,

--

 - Alexandros