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

aquabsd.alps: Offload framebuffer rendering to windows from the vga device #10

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

obiwac
Copy link
Member

@obiwac obiwac commented Oct 2, 2022

Before the aquabsd.alps.win device existed as it does now, I needed a way to test the aquabsd.alps.vga device as an X11 client, so I wrote a quick backend (the X11 backend) which just created a window and drew to it using the MIT-SHM extension. Now that aquabsd.alps.win exists, this means there's a lot of redundant code between the two; this PR aims to merge the X11 backend of aquabsd.alps.vga into aquabsd.alps.win.

The advantages of this are:

  • Greater flexibility for programs/other devices using aquabsd.alps.win, as they may now benefit from proper framebuffer support (e.g. for platforms which don't have the graphical acceleration capabilities to create EGL contexts in windows using aquabsd.alps.ogl).
  • Greater code reuse.
  • Simplified library interaction. E.g., all UI backends use the aquabsd.alps.win API for the OGL & FB backends rather than two different ones.

What needs to be done:

  • Commands for creating and interacting with framebuffers in windows.
  • Restructuring of the aquabsd.alps.vga device. (I'm not yet sure how I want this to work; should it be completely removed and the aquabsd_vga backend somehow merged into aquabsd.alps.win, should it be a replacement device for aquabsd.alps.win, ...?)
  • Simplification of the UI library to not worry about aquabsd.alps.vga anymore (depends how I decide the above point is gonna work).
  • Commands to show/hide cursor (should probably use this occasion to get to implementing that system for changing cursors to anything, not just show/hiding?).
  • How should all this work with resizing?
  • Rewriting of programs which currently use aquabsd.alps.vga.

@obiwac obiwac added the enhancement New feature or request label Oct 2, 2022
@obiwac
Copy link
Member Author

obiwac commented Feb 13, 2023

I'm not yet sure how I want this to work; should it be completely removed and the aquabsd_vga backend somehow merged into aquabsd.alps.win, should it be a replacement device for aquabsd.alps.win, ...?

I'll add the aquabsd_vga backend into aquabsd.alps.win and retire aquabsd.alps.vga. Having the client handle different backends goes against AQUA's device philosophy, and I'll anyway end up having a Wayland window backend in the not-too-distant future.

This also means that aquabsd.alps.ui will only need to concern itself with a generic aquabsd.alps.win device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant