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

glfw folder refactor #7422

Open
jwinarske opened this issue Dec 6, 2024 · 4 comments
Open

glfw folder refactor #7422

jwinarske opened this issue Dec 6, 2024 · 4 comments
Assignees

Comments

@jwinarske
Copy link

jwinarske commented Dec 6, 2024

Introduce the problem

Building LVGL without GLFW + glew dependencies requires patching the source tree.

Proposal

Refactor the glfw directory into two folders

  1. glfw - glfw specific calls
  2. egl_gles - generic egl/gles calls

This would introduce a new build variable. Some platforms implement the window * as an opaque data pointer (void *) and call it NativeWindow. Which requires a cast relative to the underlying "window" system.

This enables non-GLFW/glew use cases.

@jwinarske
Copy link
Author

jwinarske commented Dec 7, 2024

drmpp drm-gbm-lvgl demo running on Ubuntu 20 at 1920x1080 @ 60 FPS with above proposed changes. No GLFW, no glew.
https://github.com/user-attachments/assets/8ee20a5e-f78f-4b2e-8b97-2c9168a4df24

jwinarske/drmpp#37

@liamHowatt
Copy link
Collaborator

Hi, thanks for mentioning it. When I picked up the OpenGL, I knew it was only a matter of time before this separation needed to occur. The logic is separated to a reasonable degree but not properly decoupled.

Do you want to open a PR or shall I?

@jwinarske
Copy link
Author

@liamHowatt Hi Liam. Go for it.

My only request is to use an opaque data pointer for window *, opposed to a GLFW specific one, thus making the struct agnostic. Then cast as needed per platform. This way we can reuse the struct for any platform that supports EGL/GLES, opposed to having to redefine it for each platform.

@liamHowatt liamHowatt self-assigned this Dec 11, 2024
@lvgl-bot
Copy link

We need some feedback on this issue.

Now we mark this as "Abandoned" because there was no activity here for 14 days.

Remove the "Stale" label or comment else this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants