lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 356 forks source link

Porting the "drawing core" #226

Closed nomi-san closed 3 years ago

nomi-san commented 3 years ago

Hi,

It's known that the "LCUI's drawing core" is based on PNG image and doesn't support hardware acceleration, but I'm interested in this awesome. Is it possible to port as an independent library? And how if possible? 😀

Thanks.

lc-soft commented 3 years ago

Is it possible to port as an independent library?

Yes, but some modifications are required. I had this idea a long time ago, but I didn’t have time to do it, and I don’t know much about other graphics libraries to design the best and easy-to-use graphics API.

And how if possible?

The following steps are required:

  1. Refer to the design of other graphics libraries and design a series of easy-to-use graphics APIs for the new graphics library.
  2. Write code to implement these APIs.
  3. Write Makefile or CMake configuration file.
  4. Submit portfiles to vcpkg so that other developers can install it using vcpkg.
nomi-san commented 3 years ago

Thanks, but.. I mean how to reuse "LCUI's drawing core", for drawing something without the GUI.

lc-soft commented 3 years ago

I mean how to reuse "LCUI's drawing core", for drawing something without the GUI.

@nomi-san

Do you want me to provide sample code to show how to call the graphics API to drawing something without the GUI, or do you want me to change the drawing core to a library that can be used independently? If it is the former, I will consider it when I have time. If it is the latter, it is temporarily impossible.

nomi-san commented 3 years ago

Yep,

provide sample code to show how to call the graphics API...

// If you don't have time, I'll find out myself 😅