Skip to content

Instantly share code, notes, and snippets.

@jbfove
Created January 27, 2021 10:00
Show Gist options
  • Save jbfove/ce2d1876c69809770a7d83aae1512e1b to your computer and use it in GitHub Desktop.
Save jbfove/ce2d1876c69809770a7d83aae1512e1b to your computer and use it in GitHub Desktop.
Simple test app to print all the EGL strings
// Use the following on Linux to see the EGL info (make sure to install EGL libs)
// c++ EGLTest.cpp -lEGL && ./a.out
#include <EGL/egl.h>
#include <iostream>
using namespace std;
const char* nullSafe(const char* str)
{
return str ? str : "null";
}
int main()
{
cout << "Vendor : " << nullSafe(eglQueryString(EGL_NO_DISPLAY, EGL_VENDOR)) << endl << endl;
cout << "Version : " << nullSafe(eglQueryString(EGL_NO_DISPLAY, EGL_VERSION)) << endl << endl;
cout << "ClientAPIs: " << nullSafe(eglQueryString(EGL_NO_DISPLAY, EGL_CLIENT_APIS)) << endl << endl;
cout << "Extensions: " << nullSafe(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)) << endl << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment