# Iterating and selecting EGL Device

**URL:** <https://discourse.glfw.org/t/iterating-and-selecting-egl-device/2899>\
**Category:** support\
**Created:** [March 25, 2025, 5:24pm UTC](https://discourse.glfw.org/t/iterating-and-selecting-egl-device/2899 "2025-03-25T17:24:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayham-1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/ayham-1/32/1020_2.png) [@ayham-1](https://discourse.glfw.org/u/ayham-1)\
**Post date:** [March 25, 2025, 5:24pm UTC](https://discourse.glfw.org/t/iterating-and-selecting-egl-device/2899/1 "2025-03-25T17:24:55Z")

</div>

Hello,

would it be possible using GLFW to specify the dedicated GPU for an EGL setup/iterate over EGL devices and use one of them?

I currently have a project with two threads, one of them runs glfw and the other wlroots, which uses GLES2/EGL for DMABUF sharing. On my two GPU system, I would need to run my progam using DRI\_PRIME=1 in order to resolve the DMABUF distortions which occur when the threads don’t have the same GL\_RENDERER value.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [March 26, 2025, 12:00pm UTC](https://discourse.glfw.org/t/iterating-and-selecting-egl-device/2899/2 "2025-03-26T12:00:48Z")

</div>

There is no API for this in GLFW.

If you want fine control over GPU selection then you might want to use consider using Vulkan, and just use GLFW to create the window.
