stetre / moonlibs

Lua libraries for graphics and audio programming
215 stars 11 forks source link

Wonderful project - congratulations #1

Closed iongion closed 6 years ago

iongion commented 6 years ago

Just wanted to bring you many bows and thanks for such an awesome and useful project! The approach of offering bindings is so clean and proper for idiomatic lua. A nice intro on how we could do 'moon'-ish like bindings would be awesome. Do you have any plans to bring other popular bindings to moonlibs such as:

I am actually trying myself to modify https://github.com/starwing/lua-nanovg.git to make it work on msys and linux(the original author only offers OSX :( ) but I am very bad at it (in https://github.com/iongion/lua-nanovg)

stetre commented 6 years ago

Thank you for your kind words, very appreciated!

I don't have any plan to add other binding libraries in the near future. For some time I'll mainly use those I already wrote for the purpose I wrote them: learn graphics programming and related stuff myself. Nanovg and imgui are cool projects, but as a general rule I usually choose to bind libraries that are at a lower level than that. Although maybe, in the future...

As far as the intro, I also may write one in the future. However, I'm convinced that 1 example is worth 1000 explanations and that the best way to learn something in programming is to study someone's else code (this is the main path I take, at least). If you peek at the moonlibs repositories you'll soon find that the binding libraries are very similar to one another. As a matter of fact I do a lot of often-frowned-upon copy&paste coding... So, if you really like them and you are interested in doing something similar, my suggestion is to pick one and analyze it (vivisect it, better). Good starting points could be moonimage, because it is very simple and self-contained, and mooncl (cl, not gl) or moonal, because they are most recent and because the API they bind to are not so complex as others like, say OpenGL or Vulkan. I would avoid studying the bindings to C++ libraries (fltk, freetype, assimp...) because with C++ things tend to get messy and obfuscated very soon.

iongion commented 6 years ago

Thank you once again for the response and highly appreciated tips, I am new to all this world or graphics programming and will I should indeed get my hands dirty!

iongion commented 6 years ago

I have ripped off one of your projects and I am, very slowly adding functionality https://github.com/iongion/lunavg :D sorry for the Luna name :) ... if you think it needs a different name, let me know, it is very amateurish, I am learning lua, lua C api, C itself, nanovg and opengl, all at once 👍 cause both you and the lua-nanovg author are very experienced lua devs too. I just follow the manual and lua IRC channel for now! You have been of imense help!