Configure the Screen Graphics Subsystem
The default buildfile (am62p-evm.build) that's provided with this BSP doesn't build an image that starts the Screen Graphics Subsystem (Screen). Instead, you must use the image that's built from the am62p-evm-graphics.build file, which starts Screen automatically.
The Screen Graphics Subsystem (Screen) includes the libraries, services and tools required to run graphics applications on the board with supported graphics processors, and to manage graphics shown on the display. To use Screen, you often must configure the graphics and display. To confirm whether Screen is running properly on your target, we provide demo applications with this BSP that you can run on the target. This chapter provides an overview of how to use Screen on your target, but for detailed information, you should refer to the Screen Graphics Subsystem Developer's Guide in the QNX Software Development Platform 8.0 documentation.
Graphics configuration
The specifics of a board’s graphics configuration, such as the target's output display port or the output resolution, are defined in the graphics configuration file (graphics.conf file). The graphics configuration file and required Screen binaries are found in the $QNX_TARGET/arch64le/usr/lib/graphics/am62p directory on your host installation. On the target, the same binaries and configuration are typically located at /usr/lib/graphics/am62p/. Before you start Screen, you must ensure that the LD_LIBRARY_PATH environment variable includes the path to the Screen binaries. In the example buildfile, this has been done for you, but if you haven't done this, here what you can do before starting Screen:
# export LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/pci:\
/usr/lib/graphics/am62p
# screen -c /usr/lib/graphics/am62p/graphics.conf
# slay screen
# screen -c /usr/lib/graphics/am62p/graphics.conf
For more information about the Screen Graphics Subsystem, see the Screen Graphics Subsystem Developer’s Guide in the QNX Software Development Platform 8.0 documentation.
Configure the display for Screen
- 1920x1080 @ 60 (default for HDMI output)
video-mode
in the graphics.conf file as shown here:...
...
...
begin display 1
formats = rgba8888, rgbx8888, rgb565, rgba5551, yuy2, uyvy, nv12
video-mode = 1920 x 1080 @ 60
cursor = off
end display
...
...
For more information about configuring the display subsection
in the graphics.conf, see Configure display subsectionin the Screen Graphics Subsystem Developer's Guide.
Display driver
The video display configuration library is located on the target at /usr/lib/graphics/am62p/libwfdcfg-am62p-evm.so and /usr/lib/graphics/am62p/libWFDam62p.so.
Using the GPU
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libglslcompiler.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libIMGegl.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libIMGGLESv1_CM.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libIMGGLESv2.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libPVROCL.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libPVRScopeServices.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libpvrSCREEN_WSEGL.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libsrv_km.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libsrv_um.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libufwriter.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libVK_IMG.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libWFDam62p.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/libwfdcfg-am62p-evm.so
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/rgx_vulkan_icd.json
- $QNX_TARGET/aarch64le/usr/lib/graphics/am62p/screen-jacinto7-alloc.so
Run Screen applications
This BSP archive comes with built-in demo applications that show how to use Screen. It's a good idea to run these demos on your target to confirm that Screen is configured properly and all the necessary drivers are available for Screen to run. If the following demo applications run successfully, it's a good indication that Screen is properly configured on your target.
- sw-vsync
- Shows vsync that uses software rendering, but
doesn't use GLES. This application is useful to verify that
your display works with basic Screen functionality.
Figure 1sw-vsync
- gles2-gears
- Shows gears that use OpenGL ES 2.X for the rendering API; if gles2-gears
runs, then it confirms that screen and drivers necessary for OpenGL ES 2.x have
started successfully.
Figure 2gles2-gears
For more information about using the demo applications or debugging them, see the
Utilities and Binaries
and the Debugging
chapters in the Screen Developer's Guide, respectively.
Create Screen applications
When you create an application that supports Screen, it must link to the Screen library (libscreen.so). This library provides the interfaces for applications to use the Screen API. Depending on the graphical requirements of your application, you may need to link in additional libraries. Below are some of the libraries commonly used when building applications that use Screen:- libEGL
- The interface to access vendor-specific EGL functionality. Refer to the EGL standard from www.khronos.org.
- libGLESv2
- The interface to access vendor-specific OpenGL ES functionality. Refer to the OpenGL ES standard from www.khronos.org.
- libimg
- The interface to load and decode images. For more information, see the Image Library Reference guide in the QNX Software Development Platform 8.0 documentation.
For more information about application development using Screen, see the
Screen Graphics Subsystem Developer’s Guide. For
information about linking libraries, see QNX C/C++ Project properties
in the Reference
chapter of the QNX Momentics IDE User's Guide or the Compiling and Debugging
chapter of the QNX OS
Programmer's Guide.