Graphics Reference
In-Depth Information
Querying EGLConig Attributes
We now describe the values that EGL associates with an EGLConfig and
explain how you can retrieve those values.
An EGLConfig contains all of the information about a surface made
available by EGL. This includes information about the number of
available colors, additional buffers associated with the configuration
(such as depth and stencil buffers, which we discuss later), the type of
surfaces, and numerous other characteristics. The following is a list of
the attributes that can be queried from an EGLConfig . We discuss only a
subset of these in this chapter, but the entire list appears in Table 3-1 as
a reference.
To query a particular attribute associated with an EGLConfig , use the
following function:
EGLBoolean eglGetConfigAttrib (EGLDisplay display ,
EGLConfig config ,
EGLint attribute ,
EGLint * value )
display specifies the EGL display connection
config specifies the configuration to be queried
attribute specifies the particular attribute to be returned
value
specifies the value returned
This function returns EGL_TRUE if the call succeeded. On failure,
EGL_FALSE is returned, and an EGL_BAD_ATTRIBUTE error is posted if
attribute is not a valid attribute.
This call will return the value for the specific attribute of the associated
EGLConfig . This allows you total control over which configuration you
choose for ultimately creating rendering surfaces. However, when looking
at Table 3-1, you might be somewhat intimidated by the large number of
options. EGL provides another routine, eglChooseConfig , that allows
you to specify what is important for your application, and will return the
best matching configuration given your requests.
 
 
 
Search WWH ::




Custom Search