main.cpp
Go to the documentation of this file.
1 #include <EGL/egl.h>
2 
3 #include <iostream>
4 
5 int main(int argc, char* argv[])
6 {
7  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
8  if (display == EGL_NO_DISPLAY)
9  {
10  std::cerr << "eglGetDisplay returned EGL_NO_DISPLAY" << std::endl;
11  return -1;
12  }
13 
14  EGLint major = 0;
15  EGLint minor = 0;
16  EGLBoolean initOk = eglInitialize(display, &major, &minor);
17  if (initOk == EGL_FALSE)
18  {
19  EGLint error = eglGetError();
20  std::cerr << "eglInitialize failed with error " << error
21  << "(hex: " << std::hex << error << ")\n";
22  return -2;
23  }
24 
25  std::cout << "EGL initialized (version: " << major << "." << minor << ")" << std::endl;
26 
27  eglTerminate(display);
28  return 0;
29 }
display
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this display
Definition: license.txt:11
main
int main(int argc, char *argv[])
Definition: main.cpp:31
cxxopts::major
uint8_t major
Definition: cxxopts.hpp:54
cxxopts::minor
uint8_t minor
Definition: cxxopts.hpp:54