Skip to content

render: move make_* into opengl::factory - #4

Open
igagis wants to merge 4 commits into
mainfrom
ren_factory
Open

igagis wants to merge 4 commits into
mainfrom
ren_factory

Conversation

@igagis

@igagis igagis commented Nov 19, 2026

Copy link
Copy Markdown
Member

Follow-up to cppfw/ruis#190 (render context redesign).

The shareable-object make_* functions now live on a new opengl::factory that owns the shared (headless) GL context. opengl::context takes an injected factory and no longer creates objects. The GL version / supported extensions move to the factory (concrete objects read them from the factory); a dedicated extension.hpp is added (shared by opengl_texture and the factory).

Depends on cppfw/ruis#192.

Follow-up to ruis issue #190: the shareable-object make_* functions now
live on a new opengl::factory that owns the shared (headless) GL context.
opengl::context takes an injected factory and no longer creates objects.
The GL version / supported extensions move to the factory; concrete
objects read them from the factory. A dedicated extension.hpp is added
(shared by opengl_texture and the factory).
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

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.
Comment thread src/ruis/render/opengl/factory.hpp Resolved
…ve_window

A GL context is always attached to a window (or a hidden headless window);
there is no bare GL context. The factory retains the native_window that holds
the shared GL 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) 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 #4 review comment.
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