fix pbuffer sample code
This commit is contained in:
@@ -221,17 +221,14 @@ demoCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
|
|||||||
if (!surf)
|
if (!surf)
|
||||||
return EGL_NO_SURFACE;
|
return EGL_NO_SURFACE;
|
||||||
|
|
||||||
if (_eglInitPbufferSurface(drv, dpy, config, attrib_list, &surf->Base)) {
|
if (_eglInitPbufferSurface(&surf->Base, drv, dpy, config, attrib_list)
|
||||||
|
== EGL_NO_SURFACE) {
|
||||||
free(surf);
|
free(surf);
|
||||||
return EGL_NO_SURFACE;
|
return EGL_NO_SURFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a real driver would allocate the pbuffer memory here */
|
/* a real driver would allocate the pbuffer memory here */
|
||||||
|
|
||||||
/* insert into hash table */
|
|
||||||
_eglSaveSurface(&surf->Base);
|
|
||||||
assert(surf->Base.Handle);
|
|
||||||
|
|
||||||
return surf->Base.Handle;
|
return surf->Base.Handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user