Skip to content
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

Add EGL bindings for surfaceless contexts #65

Closed
4 tasks done
onox opened this issue Jun 16, 2020 · 1 comment
Closed
4 tasks done

Add EGL bindings for surfaceless contexts #65

onox opened this issue Jun 16, 2020 · 1 comment
Assignees
Projects
Milestone

Comments

@onox
Copy link
Owner

onox commented Jun 16, 2020

Add EGL bindings to create a (surfaceless) context for headless rendering on the following platforms:

  • Wayland
  • Mesa GBM
  • Device
  • Add Orka.Contexts.EGL package
@onox onox added this to the 0.2 milestone Jun 16, 2020
@onox onox self-assigned this Jun 16, 2020
@onox onox added this to In progress in 1.0 Jun 16, 2020
@onox
Copy link
Owner Author

onox commented Jun 23, 2020

EGL bindings for surfaceless contexts are working. Need to figure out though how to use it via Orka.Contexts. Currently you make a context current by using a constructed Window:

Library : constant Orka.Contexts.Library'Class
  := Orka.Windows.GLFW.Initialize (Major => 4, Minor => 2);

Window : aliased Orka.Windows.Window'Class
  := Library.Create_Window (Width => 500, Height => 500, Resizable => False);

Context : constant Orka.Contexts.Context'Class := Window.Context;
pragma Unreferenced (Context);

The context is created by GLFW in Create_Window and made current via the Context constant (RAII). This is kinda backwards since you surfaces are optional if an EGLDisplay supports surfaceless contexts. I would prefer to have something like this:

Context : Orka.Contexts.Context'Class
  := Orka.Windows.GLFW.Create_Context (Version => (4, 2), Flags => (Debug => True, others => False));

Window : aliased Orka.Windows.Window'Class
  := Context.Create_Window (Width => 500, Height => 500, Resizable => False);

Without a window, a context can be created and made current via:

Context : Orka.Contexts.Context'Class
  := Orka.Windows.EGL.Create_Context (Surfaceless, Version => (4, 2), Flags => (Debug => True, others => False));

@onox onox closed this as completed in 7d9c457 Jun 28, 2020
1.0 automation moved this from In progress to Done Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1.0
  
Done
Development

No branches or pull requests

1 participant