EGL_MESA_screen_surface version 4

Brian Paul brian.paul at tungstengraphics.com
Thu Mar 24 09:25:56 PST 2005


Michel Danzer wrote:
> On Thu, 2005-03-24 at 12:23 +0100, Matthias Hopf wrote:
> 
>>>>    EGLSurface eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config,
>>>>                                          const EGLint *attrib_list)
>>>>
>>>>    Create a surface that can be displayed on a screen.  <attrib_list> is
>>>>    an array of token/value pairs terminated with EGL_NONE.  Valid tokens
>>>>    include:
>>>>
>>>>        Name              Description
>>>>        ----------------  --------------------------------
>>>>        EGL_WIDTH         desired surface width in pixels
>>>>        EGL_HEIGHT        desired surface height in pixels
>>>>
>>>>    Any other token will generate the error EGL_BAD_ATTRIBUTE.
>>>
>>>What will happen if either of these attributes is omitted?
>>
>>And anybody thought about whether unknown tokens should be just ignored
>>instead of creating an error?
> 
> 
> I think that would be a bad idea, because then callers would have no way
> of knowing that all the specified attributes were actually respected.
> Applications should really check that the implementation supports
> certain functionality before using it.

Right.  The OpenGL convention is to detect/report errors whenever 
possible.


Adam Jackson wrote:
 > On Wednesday 23 March 2005 20:32, Jon Smirl wrote:
 >>On Wed, 23 Mar 2005 16:38:34 -0700, Brian Paul
 >>Did you note somewhere that it is illegal to destroy a surface while
 >>it is being displayed?
 >
 > Why would that be illegal, as opposed to merely undefined?

OpenGL tries to avoid undefined behaviour whenever possible.  If it's 
possible to determine that someone's trying to delete a visible 
surface then there should be a well-defined behavior in that situation.

Fairly recently the ARB reexamined the case of what exactly happens 
when a texture object is deleted when the texture is being shared by 
(and possibly bound in) several rendering contexts.  It's too lengthy 
to repeat here, but nobody wanted undefined behaviour.

-Brian


More information about the dri-egl mailing list