![]() |
VisionWorks Toolkit ReferenceDecember 18, 2015 | 1.2 Release |
This section demonstrates how to initialize EGL resources and create EGL streams.
Most EGL calls require an EGLDisplay
parameter, which represents the abstract display on which graphics are drawn.
<EGL/egl.h>
header.Obtain an instance of EGL display, which can be either an imported native display or default display. This procedure uses the default display:
Initialize the EGL display:
At this point EGL display instance has been prepared; it will be used in all EGL API calls.
After obtaining resources to initialize an EGL stream instance, applications must setup KHR extensions to create a KHR EGL stream:
<EGL/eglext.h>
.Create the EGL stream in one of the following 2 modes:
To prevent frame dropping this procedure creates an EGL stream in FIFO mode.
After creating the EGL stream, a producer (like NvMedia) and a consumer (like CUDA) must be connected to it. For more information, see Connecting CUDA Consumers to EGL Streams.