Doubts in EGL spec 1.3

I was going through the EGL 1.3 spec and i was stuck when it was explaining that “A context can be used with any EGLSurface that it is compatible with”.

Here in one of the point, the spec mentions that A surface and context are compatible if

==>The surface was created with respect to an EGLConfig supporting client API rendering of the same type as the API type of the context (in environments supporting multiple client APIs ).

Can any one please explain what it has actually meant.My understanding is that if the surface was created with an EGLConfig which supports rendering of OPENGL API, then the context has to be also created for OPENGL API and similar for OPENVG.So, it seems somehow the surface has a binding to the rendering API.

If this is the case, then how can multiple rendering API (one OPENGL and one OPENVG) can draw on the same surface?

I am not sure whether i am misinterpreting the spec, can any one please clarify.

Hi Mustaf,

A config can be OpenGL and OpenVG compatible.

The EGL implementation has to support such configs if you want to use them (as far as I can see this is not required). The relevant config-attribute is: RENDERABLE_TYPE = OPENGL_ES_BIT | OPENVG_BIT.

Thanks Nil,

I understood your point, but my question what is the interpretation/intent of the following statement that i quoted in my original post

A surface and context are compatible if

==>The surface was created with respect to an EGLConfig supporting client API rendering of the same type as the API type of the context (in environments supporting multiple client APIs ).

If you could explain a bit more, it would be very helpful.And one more thing, you mentioned "The EGL implementation has to support such configs if you want to use them (as far as I can see this is not required). "

Yes, it is correct that EGL implementation has to support this, but why do you feel this is not required?..i could not get you here…

This means: an API can only render to a surface if the surface’s EGLConfig supports the API.
An EGLConfig can supported multiple APIs, as indicated by the bits in the EGL_RENDERABLE_TYPE attribute.

If you could explain a bit more, it would be very helpful.And one more thing, you mentioned "The EGL implementation has to support such configs if you want to use them (as far as I can see this is not required). "

Yes, it is correct that EGL implementation has to support this, but why do you feel this is not required?..i could not get you here…

There is no requirement for EGLConfigs that support multiple APIs in the spec.
I.e. even if you have a device that supports both OpenGL and OpenVG, there is no guarantee you can create a surface that can be used by both APIs.