EGL_MESA_screen_surface proposal

Brian Paul brian.paul at tungstengraphics.com
Wed Mar 16 07:18:05 PST 2005


Jon Smirl wrote:
> Another mode attribute should be EGL_NAME. Say your monitor implements
> both HDTV-1080i and HDTV-1080p. Selecting on
> width=1920,height=1080,depth=32 should return. HDTV-1080p since it is
> the best mode. You would need to select on the mode name of HDTV-1080i
> to force the inferior mode.
> 
> Or should EGL_INTERLACE also be added? It's not clear to me that
> interlace is needed. If your monitor only supported 1080i it wouldn't
> have an entry for 1080p.

I'd go with the EGL_INTERLACE attribute.  I'd rather not add 
additional functions to the EGL API to deal with strings for modes.

The eglChooseMode() function would smooth over lots of this stuff. 
Typically, one would construct an attribute list requesting a 
particular resolution and color depth:

EGLint attribList[] = { EGL_WIDTH, 1280,
                         EGL_HEIGHT, 1024,
                         EGL_DEPTH, 24,
                         EGL_NONE };

And pass it to eglChooseMode():

EGLMode modes[MAX_MODES];
EGLint numModes;
eglChooseMode(dpy, attribList, modes, MAX_MODES, &numModes);
printf("%d modes satisfy your request.\n", numModes);

The lack of the EGL_INTERLACE flag would mean that eglChooseMode() 
could return both interlaced and non-interlaced modes.  The list of 
modes returned will be sorted too (like EGLConfigs), and 
non-interlaced should come first.

If you were only interested in interlaced OR non-interlaced modes 
you'd add EGL_INTERLACED=0 or =1 to the attribute list to further 
constrain the search.

I still need to define the selection/sorting criteria for EGLModes as 
the EGL spec does for EGLConfigs.

-Brian


More information about the dri-egl mailing list