OpenGL ES & OpenVG using the same EGL implementation

Hi Group

I have two Queries :

  1. I would like to know whether the Redering API’s (OpenGLES and OPENVG) can render to the same surface …in other words …whether the below sequence will work :

########################################3
//initialize EGL
eglBindAPI(EGL_OPENVG_API);
egldisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
eglInitialize(egldisplay, NULL, NULL);
eglChooseConfig(egldisplay, s_configAttribs, &eglconfig, 1, &numconfigs);
eglsurface = eglCreateWindowSurface(egldisplay, eglconfig, (void*)window, NULL);
eglcontext = eglCreateContext(egldisplay, eglconfig, NULL, NULL);
eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext);

// Some VG CALLS OF THE APPLICATION
-----
-----
-----

//De Associating the context

eglMakeCurrent(egldisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);

//Calling the EGL BIND API for binding OpenGl ES rendering API’s calls

eglBindAPI(EGL OPENGL ES API);
eglcontext = eglCreateContext(egldisplay, eglconfig, NULL, NULL);
eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext);

// Again call OPENGLES API calls by app

     -------------
     -------------      

#############################################

  1. Is there an OpenGLES and OpenVG software implementation with a single EGL for bind to both of them ?

Thanks in Advance.

Regards
Ajay.V

Yes, provided the implementation exposes a config that has both EGL_OPENGL_ES_BIT and EGL_OPENVG_BIT set in EGL_RENDERABLE_TYPE.

Thanks for your reply.

I understand from the EGL specs that EGL_RENDERABLE_TYPE is present from the EGL 1.2 version only.
Also from EGL 1.2 onwards the eglBindApi() was included.

Is there any possibilty/way to achieve the same (OpenGL ES & OpenVG using the same EGL implementation) in the EGL 1.1 by any chance ?
That is: Can Open GLES and Open VG render on the same EGL surface ?

EGL 1.1 does not support OpenVG as client API, so that can’t work. It needs to be at least EGL 1.2 and the implementation needs to provide a suitable config.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.