Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
8.86k stars 535 forks source link

Unify rawfb rendering code #624

Closed ccawley2011 closed 3 months ago

ccawley2011 commented 3 months ago

This should make rawfb maintenance easier in the future.

The SDL code isn't identical to the others yet due to how pixel formats are implemented, but it should be possible to write a basic replacement for SDL_MapRGBA and SDL_GetRGBA in a follow-up PR.

The Wayland code hasn't been tested, but this should restore most of the missing functionality that was disabled in the initial version.

RobLoach commented 3 months ago

Another thought... Right now, you'd moved the common rawfb code to demo/common/nuklear_rawfb.h ... Would there be benefit out have having the structure be like...

demo/
demo/rawfb/nuklear_rawfb.h
demo/rawfb/wayland/main.c
demo/rawfb/sdl2/sdl2surface_rawfb.h
demo/rawfb/x11/main.c

While it does stray away from the current set up, it does consolidate all rawfb-related code into that rawfb directory. What do you think?

RobLoach commented 3 months ago

@ccawley2011 Pushed up a pull request to follow up with the comment above https://github.com/ccawley2011/Nuklear-1/pull/2

https://github.com/Immediate-Mode-UI/Nuklear/pull/629