Graphics Reference
In-Depth Information
Initializing EGL
Once you have successfully opened a connection, EGL needs to be
initialized, which is done by calling the following function:
EGLBoolean eglInitialize (EGLDisplay display ,
EGLint * majorVersion ,
EGLint * minorVersion )
display specifies the EGL display connection
majorVersion specifies the major version number returned by the EGL
implementation; may be NULL
minorVersion specifies the minor version number returned by the EGL
implementation; may be NULL
This function initializes EGL's internal data structures and returns the
major and minor version numbers of the EGL implementation. If EGL
is unable to be initialized, this call will return EGL_FALSE , and set EGL's
error code to
EGL_BAD_DISPLAY if display doesn't specify a valid EGLDisplay .
EGL_NOT_INITIALIZED if the EGL cannot be initialized.
Determining the Available Surface Conigurations
Once we have initialized EGL, we are able to determine which types and
configurations of rendering surfaces are available to us. There are two ways
to go about this:
• Query every surface configuration and find the best choice ourselves.
• Specify a set of requirements and let EGL make a recommendation for
the best match.
In many situations, the second option is simpler to implement, and
most likely yields what you would have found using the first option.
In either case, EGL will return an EGLConfig , which is an identifier
to an EGL-internal data structure that contains information about a
particular surface and its characteristics, such as the number of bits for
 
 
 
 
Search WWH ::




Custom Search