mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 14:08:05 +02:00
fix pbuffer sample code
This commit is contained in:
parent
d2ab4eb2c2
commit
5a0cb726d1
1 changed files with 3 additions and 6 deletions
|
|
@ -81,7 +81,7 @@ demoInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor)
|
|||
_eglSetConfigAttrib(&config, EGL_STENCIL_SIZE, 8);
|
||||
}
|
||||
_eglSetConfigAttrib(&config, EGL_SURFACE_TYPE,
|
||||
(EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT));
|
||||
(EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT));
|
||||
_eglAddConfig(disp, &config);
|
||||
}
|
||||
|
||||
|
|
@ -221,17 +221,14 @@ demoCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
|
|||
if (!surf)
|
||||
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);
|
||||
return EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
/* a real driver would allocate the pbuffer memory here */
|
||||
|
||||
/* insert into hash table */
|
||||
_eglSaveSurface(&surf->Base);
|
||||
assert(surf->Base.Handle);
|
||||
|
||||
return surf->Base.Handle;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue