patriciogonzalezvivo / glslViewer

Console-based GLSL Sandbox for 2D/3D shaders
BSD 3-Clause "New" or "Revised" License
4.62k stars 350 forks source link

tools: Reduced some common duplicate code #275

Closed tcoyvwac closed 2 years ago

tcoyvwac commented 2 years ago

Hi @patriciogonzalezvivo! :smile_cat:

Noticed some lines-of-code could be reduced a bit. Wanted to help by moving some common code to their own local functions and/or preferring to use some available standard-library algorithms (which performs the same thing). Also using a simple keyword datatype to hopefully make the code more readable and modular.


Thank you for your very useful project and great project BTW! :tada:

patriciogonzalezvivo commented 2 years ago

This is great! thank you!

tcoyvwac commented 2 years ago

Thanks for your positive feedback & encouragement @patriciogonzalezvivo! :tada:

The PR is basically finished now. I hope it was understandable! Do you have any extra requests or recommendations? If no, you can feel free to merge please! :smile_cat:

patriciogonzalezvivo commented 2 years ago

This is fantastic! Thank you so much! Deeply appreciate the time and care you put on it. It's way smarter. Love the reusable structure. I'm learning a lot from it.

tcoyvwac commented 2 years ago

Thanks for the merge & once again encouragement @patriciogonzalezvivo. Grateful! :tada: