Skip to content

Latest commit

 

History

History

SupportEGL

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SupportEGL

SupportEGL is a support class library with the Khronos Native Platform Graphics Interface (EGL) for KVS. By checking the flag KVS_SUPPORT_EGL in the kvs.cong, EGL supported classes are compiled and available.

Prerequisite

To compile the SupportEGL, a graphics driver supports EGL need to be installed in your developping environment. After installing the graphics driver, you need to install the EGL libgrary.

Graphics Driver

The graphics driver needs to be installed according the GPUs and OS before compiling the SupportEGL. We have only tested on Ubuntu OS with NVIDIA GPUs. For Ubuntu OS, the graphics driver can be easily installed on the terminal as follows:

$ sudo ubuntu-drivers autoinstall

EGL

The EGL library can be installed on Ubuntu as follows:

$ sudo apt-get install libegl1-mesa-dev

Execution on Environment without X Window System

  1. cat /etc/glvnd/egl_vendor.d/10_nvidia.json
{
    "file_format_version" : "1.0.0",
    "ICD":{
        "library_path": "libEGL_nvidia.so.0"
    }
}
  1. add the following into .bashrc
Unset DISPLAY

Example Program

An example program for the SupportEGL is available in the Example/SupportEGL directory. You can easily compiple the example program with the kvsmake as follows:

$ cd Example/SupportEGL
$ cd Hello
$ kvsmake -G
$ kvsmake

The offscreen rendering results (12 images) will be generated by executing the compiled program as follows:

e.g)
$ ./Hello
EGL version: 1.5
rendering to ... output_000.bmp
rendering to ... output_001.bmp
rendering to ... output_002.bmp
rendering to ... output_003.bmp
rendering to ... output_004.bmp
rendering to ... output_005.bmp
rendering to ... output_006.bmp
rendering to ... output_007.bmp
rendering to ... output_008.bmp
rendering to ... output_009.bmp
rendering to ... output_010.bmp
rendering to ... output_011.bmp
Total rendering time:   0.333955 [sec]
Average rendering time: 0.083488 [sec]