Skip to content

Allow full backend selection by name#38

Open
mabl wants to merge 1 commit intomoderngl:mainfrom
mabl:feature/backend_selection_by_name
Open

Allow full backend selection by name#38
mabl wants to merge 1 commit intomoderngl:mainfrom
mabl:feature/backend_selection_by_name

Conversation

@mabl
Copy link

@mabl mabl commented Oct 1, 2025

This MR enables manual selection of all backends, as well as querying the default backend name.

Changes:

  • Extracted backend name detection into new get_default_backend_name() function that returns the backend name string instead of the backend object
  • Refactored default_backend() to delegate to get_default_backend_name() and get_backend_by_name()
  • Enhanced get_backend_by_name() to support all backends ('wgl', 'x11', 'darwin', 'egl')
  • Improved error message in get_backend_by_name() to list all supported backends

  This MR enables manual selection of all backends, as well as querying the default backend name.

  Changes:
  - Extracted backend name detection into new get_default_backend_name() function that returns the backend name string instead of the backend object
  - Refactored default_backend() to delegate to get_default_backend_name() and get_backend_by_name()
  - Enhanced get_backend_by_name() to support all backends ('wgl', 'x11', 'darwin', 'egl')
  - Improved error message in get_backend_by_name() to list all supported backends
@mabl
Copy link
Author

mabl commented Oct 1, 2025

Potentially, one could also add an environmental variable to overwrite the default backend.

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.

1 participant