Skip to content

Conversation

@wenjieshen
Copy link
Collaborator

  • Add gl_backend Meson option to choose gl or gles and gate deps/flags.
  • Include EGL when targeting GLES and define THORVG_GL_RASTER_SUPPORT.
  • Update GlCanvas::target call in MultiCanvas.cpp to new signature.

@wenjieshen wenjieshen self-assigned this Jan 11, 2026
@wenjieshen wenjieshen added the infrastructure Dev infrastructure label Jan 11, 2026
@wenjieshen wenjieshen marked this pull request as ready for review January 11, 2026 11:07
@wenjieshen wenjieshen requested a review from hermet as a code owner January 11, 2026 11:07
Copilot AI review requested due to automatic review settings January 11, 2026 11:07
Copy link

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

This PR adds a configurable GL backend option to the Meson build system, allowing users to choose between OpenGL and OpenGL ES for the examples. The change improves build flexibility by making the graphics backend selection explicit rather than attempting to auto-detect both.

Changes:

  • Introduced a new gl_backend Meson option with choices of 'gl' or 'gles'
  • Updated build logic to conditionally include appropriate dependencies (EGL for GLES) and compiler flags
  • Replaced generic THORVG_GL_RASTER_SUPPORT macro with backend-specific TVGEXAMPLE_GL_SUPPORTED and TVGEXAMPLE_GLES_SUPPORTED macros
  • Updated GlCanvas::target() call to match new API signature with additional parameters

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
meson_options.txt Defines the new gl_backend option with 'gl' and 'gles' choices
src/meson.build Implements conditional dependency resolution and compiler flag setting based on gl_backend choice
src/MultiCanvas.cpp Updates preprocessor guards and GlCanvas::target() call to align with new build configuration

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

Copy link
Member

@hermet hermet left a comment

Choose a reason for hiding this comment

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

@wenjieshen Could you please separate PR with MultiCanvas.cpp fix? I think choosing the OpenGL option in the examples doesn't seem like practical.

Introduce meson_options.txt with a gl_backend selector and
use it to choose GL vs GLES deps/flags; update the GL
target call signature in MultiCanvas for the new API.
@wenjieshen wenjieshen force-pushed the jay/fix/add-gles-option branch from ae9ea48 to 552413c Compare January 12, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Dev infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants