Results 1 to 5 of 5

Thread: EGL implementation for Window and Linux

  1. #1
    Newbie
    Join Date
    May 2018
    Posts
    2

    EGL implementation for Window and Linux

    I'm looking to use EGL to do headless rendering to a framebuffer in both Linux and Windows. The ultimate goal is to develop a program that will run on the Amazon cloud where it will have access to an NVIDIA GPU, but not necessarily a windowing system. The output would be sent out in a video stream. I would also like to be able to run the same code in Windows as well. I guess technically it doesn't have to be a cross-platform implementation, as long as the Linux and Windows implementations are both EGL compliant.

    I'm looking for an EGL implementation(s) to help me do this, but am having a hard time. What I have found:
    • The Khronos website lists an implementation called Pablo, but the link is dead. I couldn't find any more information about this.
    • McNopper has an implementation on github, but it looks incomplete with the caveat that is in the early stage and not well tested.
    • Various OpenGL ES emulators seem to implement EGL, such as ARM, Imagination Tech, Qualcomm, and Angles. But I think I want a native solution, not an emulation.
    • On Linux, Mesa libraries support EGL. It's unclear to me if this is a software only solution, meaning that it doesn't actually use the GPU.
    • On Windows, GLFW can do a hidden window, but this isn't exactly the same.


    I've seen plenty of example code on how to right an EGL application, but I can't find the actual EGL implementation. Can someone help a confused person?

    Thanks!

  2. #2
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    You will need to look at the AWS OpenGL API. A OpenGL implementation must be paired with a EGL/WGL/CGL/GLX or similar API that creates the contexts that OpenGL uses for rendering. You can't just provide your own. EGL hooks into the internals of OpenGL to create Contexts, DefaultFramebuffers, Fences, and such. It also hooks into the platform window system to put your content into a window. I did a quick look at AWS and didn't see it immediately.
    Second, you will need to get the rendered buffers out of OpenGL. glReadPixels is the only common function. There is EGL_KHR_lock_surface - but this extension is not commonly implemented in all implementations. There may be "native" images that can create EGLImage that then can be used as a texture to a FBO. Here you have direct access to the buffer. But this is not common across platforms.
    Finally, your rendered content/buffer has to be formatted for video stream. Again, the render to YUV format is an extension, so may not be common to all the platforms you want.
    Interesting project, but you are trying to use OpenGL in non-common way, hence the barriers. First look into AWS to see what it provides to access the rendered buffers.
    If you find a link to AWS EGL features, then I might be able to make suggestions. I'll look if I get time.

  3. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    So AWS provides GPUs with OpenGL support. EGL is for OpenGLES. AWS will have to provide WGL or similar API. Their documentation is very high level and its not easy to get these details.

  4. #4
    Junior Member
    Join Date
    Jun 2010
    Posts
    21
    NVidia's Linux graphics drivers support EGL, which you can use to create OpenGL contents.

    EGL Eye: OpenGL Visualization without an X Server

    I haven't done more than kick the tires with it, but it is there and does work.

  5. #5
    Newbie
    Join Date
    May 2018
    Posts
    2
    Thanks for the replies, I've been looking into this more. It does look like Linux is covered with NVidia's drivers, and perhaps AWS too. But I haven't found anything for Windows, does such an implementation exist?

    Thanks for your answers, they are very helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean