-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibly add a separate headless_egl window #130
Comments
The below code works for me class EglHeadlessWindow(headless.Window):
name = "egl-headless"
def init_mgl_context(self) -> None:
"""Create an standalone context and framebuffer"""
self._ctx = mgl.create_standalone_context(
require=self.gl_version_code,
backend="egl",
)
self._fbo = self.ctx.framebuffer(
color_attachments=self.ctx.texture(self.size, 4, samples=self._samples),
depth_attachment=self.ctx.depth_texture(self.size, samples=self._samples),
)
self.use() Though I'm not sure what is the best interface to use this. The only thing I want to do is to pass |
That is a perfectly fine way to do it. Optionally you can just monkeypatch the method in the headless window itself. There might be several other context creation parameters people want to supply here as well. |
Hmm then |
Since moderngl-window are doing the context creation we might need to add a separate window for egl. Optionally the current headless window should be more configurable.
The text was updated successfully, but these errors were encountered: