Graphics Reference
In-Depth Information
Specifying these values in the window configuration bitmask will add the
appropriate tokens and values into the
EGLConfig
attributes list
(i.e.,
configAttribs
in the preceding example).
You might encounter situations in which you need to coordinate the
rendering of multiple graphics APIs into a single window. For example,
you might find it easier to use OpenVG or find the native windowing
system's font rendering functions better suited for drawing characters into
a window than OpenGL ES 3.0. In such cases, you will need to have your
application allow the various libraries to render into the shared window.
EGL has a few functions to help with your synchronization tasks.
If your application is rendering only with OpenGL ES 3.0, then you can
guarantee that all rendering has occurred by simply calling
glFinish
(or
more efficient sync objects and fences, which are discussed in Chapter 13,
“Sync Objects and Fences”).
However, if you are using more than one Khronos API for rendering (such
as OpenVG) and you might not know which API is used before switching
to the window system's native rendering API, you can call this function:
EGLBoolean
eglWaitClient
()
Delays execution of the client until all rendering through a Khronos API
(e.g., OpenGL ES 3.0, OpenGL, or OpenVG) is completed. On success, it
returns
EGL_TRUE
. On failure, it returns
EGL_FALSE
and an
EGL_BAD_CURRENT_SURFACE
error is posted.
This function's operation is similar to that of
glFinish
, but it works
regardless of which Khronos API is currently in operation.
Likewise, if you need to guarantee that the native windowing system's
rendering is completed, call this function:
EGLBoolean
eglWaitNative
(EGLint
engine
)
engine
specifies the renderer to wait for rendering completion