Skip to content

ashcharles/eglinfo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EGLINFO

This is a utility for displaying information about a platform's EGL support. In addition, it prints information about the following client APIs (if the platform supports them):

  • OpenGL
  • OpenGL ES 1.x
  • OpenGL ES 2.x
  • OpenVG

This includes the list of extensions, supported shader binary formats, supported compressed texture formats, etc.

There are various utilities also called eglinfo. This one came to be because the others lacked many details (such as what APIs are supported by an EGL configuration, and whether or not they are conformant), and did not output any information about client APIs. In addition, this utility has the ability to output all of the information in JSON form.

Building and installing

eglinfo uses the waf meta build system. To configure , run:

./waf configure --platform=PLATFORM --device=DEVICE --prefix=PREFIX --sysroot=SYSROOT

PLATFORM is the platform to build for. Currently, the valid values are:

  • x11
  • fb (framebuffer)

DEVICE is the device to build for. Currently, the valid values are:

  • generic (this is the default)
  • imx6 (Freescale i.MX6)
  • beagleboard
  • raspberrypi

If the platform is set to x11, the default generic device is usually enough. If however the platform is fb, you must set the appropiate DEVICE parameter, because EGL initialization on top of the framebuffer is device specific.

The "beagleboard" device should be useful for many other devices that share identical or similar PowerVR hardware, such as the IGEP boards, the Nokia N900, the PandaBoard, TI AM3359 based devices etc.

PREFIX is the installation prefix.

SYSROOT is the path to the system root, the place where the rootfs is installed, and the device's /usr/include/, /usr/lib etc. paths are located. On the PC, this does not need to be set.

Once configuration is complete, run:

./waf

This builds eglinfo.

Finally, to install, run:

./waf install

The eglinfo binary will then be installed to ${PREFIX}/bin .

Running

Running eglinfo without parameters outputs information about the current display, using the text writer, which outputs information in a human-readable fashion. eglinfo accepts the following arguments:

  • -h : Output help, then quit
  • -w WRITER : Use specified writer for output. Valid values are: json text
  • -d NAME : Output information for the native display with specified name (depends on the platform: on X11, this is an X display name like :0)
  • -r : If using the JSON writer, do a raw print instead of a pretty one

Example:

eglinfo -d :1 -w json

outputs EGL information about the X11 display ":1", as JSON data.

Extending eglinfo by a device

To add support for another device, you must:

  1. Add a platform_NAME.cpp file in the src/ directory, and write an implementation of the native_display and native_window classes in there
  2. Add a configuration block to the wscript file
  3. Add device NAME to the valid_devices list in the wscript
  4. Add device NAME to the needs_sysroot and needs_prefix lists in the wscript if the device configuration requires these values to be set

License

This program is licensed under the zlib license (see the LICENSE file).

About

EGL information utility with support for client APIs like OpenGL ES and OpenVG

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 60.7%
  • C 31.6%
  • Python 7.2%
  • Other 0.5%