EGL_MESA_screen_surface version 7

Adam Jackson ajax at nwnk.net
Fri Apr 29 12:54:02 PDT 2005


On Friday 29 April 2005 14:37, Jon Smirl wrote:
> On 4/29/05, Brian Paul <brian.paul at tungstengraphics.com> wrote:
> > Jon Smirl wrote:
> > > const char *eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode);
> > >
> > > Should this be changed to:
> > > int eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode, const char
> > > **name); can return:
> > > EGL_BAD_DISPLAY
> > > EGL_BAD_MODE
> > >
> > > Should all functions be changed to var params with int error returns?
> >
> > eglQueryString() returns const char *.  That's what I was following.
>
> How do know if the call failed from a bad handle? NULL is a legal
> return. This is a problem for the whole egl API.
>
> Linux kernel has it right in that the only thing that is ever returned
> from a function is an err status. All results are returned via var
> parameters. Error returns are always less than zero so it is easy to
> check. Zero means no error.

I think eglGetError handles this.  A return value of NULL would have to be 
checked, if eglGetError says EGL_SUCCESS then it's just a null string and not 
an error condition.

If QueryModeString were to return anything besides a const char *, it should 
return EGLBoolean.  I don't know how much it matters though, there's never 
any place to pass the mode string into EGL, it's just window dressing.

And I think QueryModeString is useless for exactly that reason.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dri-egl/attachments/20050429/ecce55b3/attachment.pgp


More information about the dri-egl mailing list