comparison include/mb_graph_engine_openvg.h @ 585:6af1aa74e57c openvg

Rename to mbe_vg_win_surface_create() and matching EGL display
author Thinker K.F. Li <thinker@branda.to>
date Wed, 30 Jun 2010 09:52:22 +0800
parents 543a2a8523fb
children b42d69ab8857
comparison
equal deleted inserted replaced
584:543a2a8523fb 585:6af1aa74e57c
261 /*! \brief Create an EGL window surface for X11. 261 /*! \brief Create an EGL window surface for X11.
262 * 262 *
263 * This function is compiled only for GLX enabled. 263 * This function is compiled only for GLX enabled.
264 */ 264 */
265 static mbe_surface_t * 265 static mbe_surface_t *
266 mbe_xlib_surface_create(Display *display, Drawable drawable, 266 mbe_vg_win_surface_create(Display *display, Drawable drawable,
267 Visual *visual, int width, int height) { 267 Visual *visual, int width, int height) {
268 EGLDisplay egl_disp; 268 EGLDisplay egl_disp;
269 EGLSurface egl_surface; 269 EGLSurface egl_surface;
270 mbe_surface_t *surface; 270 mbe_surface_t *surface;
271 EGLConfig config; 271 EGLConfig config;
272 EGLint attrib_list[2] = {EGL_NONE}; 272 EGLint attrib_list[2] = {EGL_NONE};
280 r = _openvg_find_confg(fmt, width, height, &config); 280 r = _openvg_find_confg(fmt, width, height, &config);
281 if(r != 0) 281 if(r != 0)
282 return NULL; 282 return NULL;
283 283
284 egl_disp = eglGetDisplay(display); 284 egl_disp = eglGetDisplay(display);
285 if(egl_disp == EGL_NO_DISPLAY) 285 if(egl_disp == EGL_NO_DISPLAY || egl_disp != _VG_DISPLAY())
286 return NULL; 286 return NULL;
287 287
288 egl_surface = eglCreateWindowSurface(egl_disp, config, drawable, 288 egl_surface = eglCreateWindowSurface(egl_disp, config, drawable,
289 attrib_list); 289 attrib_list);
290 290