Skip to content

Add OpenGLWindowsDevOnly graphics API for Windows#1655

Merged
bkaradzic-microsoft merged 5 commits intomasterfrom
enable-gles-windows
Apr 10, 2026
Merged

Add OpenGLWindowsDevOnly graphics API for Windows#1655
bkaradzic-microsoft merged 5 commits intomasterfrom
enable-gles-windows

Conversation

@bkaradzic-microsoft
Copy link
Copy Markdown
Contributor

@bkaradzic-microsoft bkaradzic-microsoft commented Apr 9, 2026

Gate OpenGLES on Windows behind -DGRAPHICS_API=OpenGLWindowsDevOnly. CMake finds libEGL.dll and libGLESv2.dll from the Edge or Chrome installation via the App Paths registry key and copies them into the executable output directory at build time. Edge is tried first since it ships with Windows, followed by Chrome.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables selecting the OpenGL (bgfx OpenGLES) renderer on Windows builds by relaxing CMake validation and removing an EGL header dependency from the OpenGL renderer-type header.

Changes:

  • Remove EGL/egl.h dependency from the OpenGL renderer-type header and make DeviceT an opaque pointer.
  • Allow -DGRAPHICS_API=OpenGL on Windows in the root CMake validation logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Core/Graphics/Include/RendererType/OpenGL/Babylon/Graphics/RendererType.h Makes the OpenGL “device/context” handle opaque to avoid requiring EGL headers.
CMakeLists.txt Permits GRAPHICS_API=OpenGL on Windows by expanding the accepted renderer list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…dererType.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bkaradzic-microsoft bkaradzic-microsoft changed the title Enable OpenGLES build on Windows. Add OpenGLWindowsDevOnly graphics API for Windows Apr 10, 2026
Copy link
Copy Markdown
Contributor

@bghgary bghgary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment. Looks good otherwise.

@bkaradzic-microsoft bkaradzic-microsoft merged commit 10db6b4 into master Apr 10, 2026
27 checks passed
@bkaradzic-microsoft bkaradzic-microsoft deleted the enable-gles-windows branch April 10, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants