-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add demo mainloops to the normal code base #47
Comments
In my opinion this might seem appealing, but it doesn't make sense, because Zahrad is mainly meant to be used as part of some bigger ecosystem (where GUI is just a subset of visual functionality - e.g. games or simply drawing to separate canvases including pictures, charts, etc.), but not necessarily as a standalone application (which is what demos are good for). Also e.g. in case of X11, there are plenty of options how one can setup the main loop, so forcing one specific implementation by providing an officially supported function like Last but not least, it's unnecessary to spend a lot of time with polishing and maintaining such platform-specific code (right now demos are not considered to be perfect unlike But maybe we could split the demos into 2 files - the loop with GUI and the glue (boiler plate) code. |
Okay, thanks for explaining. I'm planning to use it as lightweight main GUI library in a lightweight program with no bigger ecosystem, that's why I was asking.
Sounds useful to me, but I don't even use zahnrad yet - so only do this if you have a benefit, too. |
So far I can definitely say that I will not add any kind of platform dependent code in both
Could you elaborate what you mean by that. So far I am quite happy with the distinction of platform dependent code and the |
I guess dumblob accidentally confused the demo.c with the examples. It would be indeed not bad at all, to have the examples a little bit more cross platform :) |
Oh ok than I completely misunderstood. I actually thought it would be good to have examples with one file to get a quick overview over all code that would be required to embed the library. In addition I could do things not all platforms support out of the box (for example X11 does not natively support drawing images with different source to destination size or opengl would need |
I'm sorry for not being clear. Yes @richi is correct - I meant doing it in case of each |
Hello,
zahnrad looks really interesting.
But to use it, it seems like one needs to copy paste most of the demo code, before a GUI can be drawn. I know, that this is by design - but what's the benefit?
How about adding all the mainloops from the demo as normal code base? (in separate files, so the user can choose which ones are needed)?
For me, the most obvious way would be something like this:
... instead of:
Thanks for making this project!
The text was updated successfully, but these errors were encountered: