Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EGL guide for beginners [closed]

Tags:

egl

I'd like to get into EGL. However, the "only" I've been able to find is the API reference. Searching for "egl guide", "egl tutorial" or "egl for beginners" hasn't succeeded. Does anyone know of a good resource?

EGL may not be a "library for beginners". In that case, I guess I should start from the beginning - but, what's the beginning? I just read that EGL is an abstraction layer over system-dependent drawing APIs, thus being the "correct" way to go. Wayland uses it, and so does kmscon. Looking into their source code, though, has only given me a headache.

P.S.: As a side note, I feel more comfortable with C++ (although I guess that, if it works on C, it should work too on C++). Also, I'm using the latest kernel, with the latest Mesa release, so I guess there's support available for EGL.

like image 887
Kalrish Avatar asked Oct 06 '13 18:10

Kalrish


People also ask

What is EGL in linux?

EGL is an interface between Khronos rendering APIs (such as OpenGL, OpenGL ES or OpenVG) and the underlying native platform windowing system.

What is EGL display?

EGLDevice. EGLDevice provides a mechanism to access graphics functionality in the absence of or without reference to a native window system. It is a method to initialize EGL displays and surfaces directly on top of GPUs/devices rather than native window system objects.

What is EGL surface?

Android uses the OpenGL ES (GLES) API to render graphics. To create GLES contexts and provide a windowing system for GLES renderings, Android uses the EGL library. GLES calls render textured polygons, while EGL calls put renderings on screens. Before you draw with GLES, you need to create a GL context.


1 Answers

To begin learning EGL, I recommend the following resources.

  • The OpenGL ES 3.0 Programming Guide from Addison-Wesley provides a good tutorial on using EGL with OpenGL ES, complete with example code on Github. The book's text provides an introduction to the parts of EGL that are independent of operating system. To cover the operating system specific parts, the book's example code provides a complete program that works on each major operating system. (Addison-Wesley is the publisher of many well-known OpenGL books, such as The Red Book and the OpenGL SuperBible).

    Dan Ginsburg, Budirijanto Purnomo, Dave Shreiner, Aaftab Munshi. OpenGL ES 3.0 Programming Guide, 2e, Chapter 3: An Introduction to EGL. Addison-Wesley, 2014. ISBN-13: 978-0-321-93388-1, ISBN-13: 978-0-13-344016-4.

  • As you're learning, keep by your side the official EGL 1.4 Quick Reference Card.

  • (Linux only) The example code in the EGL_EXT_platform_x11 extension specification demonstrates how to create an X11 window and produce an EGLSurface from that window. (The example programs from the OpenGL ES 3.0 Programming Guide also demonstrates how to do this, but you may find the more focused treatment in the EGL_EXT_platform_x11 specification easier to follow).

  • (Linux only) Likewise, the EGL_MESA_platform_gbm extension specification demonstrates how to do the same, but for GBM, a headless EGL backend supported by opensource Linux drivers.(The OpenGL ES 3.0 Programming Guide does not touch GBM).

Depending on your goals, you may also find useful the following low-level resources, all found in the Khronos EGL Registry.

  • EGL 1.4 Specification
  • EGL man pages
  • EGL Extension Registry
  • EGL XML API Registry
like image 166
Chadversary Avatar answered Nov 08 '22 18:11

Chadversary