Questions tagged [egl]

EGL™ is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system. It handles graphics context management, surface/buffer binding, and rendering synchronization and enables high-performance, accelerated, mixed-mode 2D and 3D rendering using other Khronos APIs.

EGL™ is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system. It handles graphics context management, surface/buffer binding, and rendering synchronization and enables high-performance, accelerated, mixed-mode 2D and 3D rendering using other Khronos APIs.

EGL can be implemented on multiple operating systems (such as Android and Linux) and native window systems (such as X and Microsoft Windows). Implementations may also choose to allow rendering into specific types of EGL surfaces via other supported native rendering APIs, such as Xlib or GDI. EGL provides:

  • Mechanisms for creating rendering surfaces (windows, pbuffers, pixmaps) onto which client APIs can draw and share
  • Methods to create and manage graphics contexts for client APIs
  • Ways to synchronize drawing by client APIs as well as native platform rendering APIs.
397 questions
10
votes
1 answer

How do I create an OpenGL ES 2 context in a native activity?

For the life of me, I cannot find any good pure Android NDK examples for OpenGL ES 2. The one included native-activity sample project builds an ES 1 context. Are there any sample programs demonstrating the creation of an ES 2 context in pure C++?
TheBuzzSaw
  • 8,648
  • 5
  • 39
  • 58
9
votes
5 answers

Confusion between OPEN GL ES and EGL library

I was reading android source code in that I am not getting what does OPEN GL ES library do and what does EGL library do.? Is there any relationship between this two libraries? I have looked at…
Jeegar Patel
  • 26,264
  • 51
  • 149
  • 222
9
votes
0 answers

EGL and OpenGL only produces black screen

I have written the attached example program that uses GTK2 in conjunction with EGL and OpenGL. On my system this works fine. On the PC of friend it only will produce a black window and I cannot put my finger on why this happens. We event straces…
Nidhoegger
  • 4,973
  • 4
  • 36
  • 81
9
votes
1 answer

texture for YUV420 to RGB conversion in OpenGL ES

I have to convert and display YUV420P images to RGB colorspace using the AMD GPU on a Freescale iMX53 processor (OpenGL ES 2.0, EGL). Linux OS, no X11. To achieve this I should be able to create an appropriate image holding the YUV420P data: this…
tselmeci
  • 125
  • 1
  • 1
  • 11
8
votes
1 answer

Program stops drawing after compiling shaders

I am working on a C program to be compiled to WASM and display an image in the browser. The point of this program is to learn to set things up using EGL, and therefore I am not interested in any answers involving e.g. SDL, GLFW, etc. This code works…
user2201041
8
votes
1 answer

Understanding Android camera SurfaceTexture and MediaCodec Surface usage

I'm trying to understand graphics memory usage/flow in Android and specifically with respect to encoding frames from the camera using MediaCodec. In order to do that I'm having to understand a bunch of graphics, OpenGL, and Android…
Mike Sweeney
  • 1,896
  • 2
  • 18
  • 20
8
votes
2 answers

Opengls eglCreateWindowSurface GL Error EGL_BAD_ALLOC

I am getting eglCreateWindowSurface GL Error EGL_BAD_ALLOC when open app first time after installing in Samsung Galaxy S6 and same code working fine in other device. I tried to clean memory and destroy texture and deinitialize all opengl object on…
Jitesh Dalsaniya
  • 1,917
  • 3
  • 20
  • 36
8
votes
1 answer

How to create an OpenGL 3.3 or 4.x context through EGL

I am interested in making an OpenGL app which doesn't depend on X11. As I have seen, this should be possible through EGL. There are even examples on the internet. But how can I control the context version? The sample code below creates an OpenGL…
thefunkyjunky
  • 492
  • 4
  • 15
8
votes
2 answers

Getting a ANativeWindowBuffer from ANativeWindow_Buffer

To get fast OpenGL ES 2.0 texture pixel access on Android NDK, I want to use the eglCreateImageKHR() extension. According to the EGL_NATIVE_BUFFER_ANDROID docs: This extension enables using an Android window buffer (struct …
Adi Shavit
  • 16,743
  • 5
  • 67
  • 137
8
votes
3 answers

Can I use EGL in OSX?

I am trying to use Cairo library in a C++ application utilizing its GL acceleration in Mac. (I made same tests with its Quartz backend but the performance was disappointing.) It says it supports EGL and GLX. Use of GLX requires (externally…
user3648895
  • 395
  • 10
  • 20
8
votes
0 answers

Why is eglCreateImageKHR returning EGL_NO_IMAGE_KHR (on android)?

I need to create a texture in one thread and use it in another thread. I have tried using a shared context but the texture does not seem to be shared. I tried using eglCreateImageKHR using this sample (the code posted by Wiktor) eglCreateImageKHR…
chinchin
  • 271
  • 5
  • 16
8
votes
2 answers

eglSwapBuffers is erratic/slow

I have a problem with very low rendering time on an android tablet using the NDK and the egl commands. I have timed calls to eglSwapBuffers and is taking a variable amount of time, frequently exceeded the device frame rate. I know it synchronizes to…
edA-qa mort-ora-y
  • 30,295
  • 39
  • 137
  • 267
7
votes
2 answers

Get screenshot of EGL DRM/KMS application

How to get screenshot of graphical application programmatically? Application draw its window using EGL API via DRM/KMS. I use Ubuntu Server 16.04.3 and graphical application written using Qt 5.9.2 with EGLFS QPA backend. It started from first…
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169
7
votes
2 answers

Is there a standard way to query EGL error string?

Currently my function to convert result of eglGetError() looks like this: std::string eglErrorString(EGLint error) { switch(error) { case EGL_SUCCESS: return "No error"; case EGL_NOT_INITIALIZED: return "EGL not initialized or failed…
Ruslan
  • 18,162
  • 8
  • 67
  • 136
7
votes
0 answers

Segmentation Fault with eglInitialize / Using OpenGL without X11

I am trying to use OpenGL and write the output directly to the Framebuffer on an Imx6 processor (cubox) The reason for this is I am trying to avoid using X11 I used an example application from…
Mich
  • 3,188
  • 4
  • 37
  • 85
1
2
3
26 27