Repository navigation
Conversation
Follow-up to ruis issue #190: the shareable-object make_* functions now live on a new opengles::factory that owns the shared (headless) GL context. opengles::context takes an injected factory and no longer creates objects. The capabilities (caps) move to the factory.
|
The factory only uses the native window once in its constructor (to make the headless GL context current), so there is no need to retain it. Use the constructor parameter directly instead of a stored member.
The native_window holds the actual shared (headless) GL context, so the concrete renderer factory must retain it to keep the context alive for all make_* calls. The abstract ruis::render::factory does not retain it. Add a comment explaining this.
igagis
commented
Nov 19, 2026
… native_window A GLES context is always attached to a window (or a hidden headless window); there is no bare GLES context. The factory retains the native_window that holds the shared GLES context to bind it and keep it alive for all make_* calls. Whether a dummy window is required depends on the platform: on desktop (X11/ Wayland via GLES) a dummy 1x1 window holds the shared context, while on Android (one window, no headless GLES) the factory uses the actual app window. Addresses PR #5 review comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to cppfw/ruis#190 (render context redesign).
The shareable-object
make_*functions now live on a newopengles::factorythat owns the shared (headless) GL context.opengles::contexttakes an injected factory and no longer creates objects. The capabilities (caps) move to the factory.Depends on cppfw/ruis#192.