Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#include #65

Open
sacredbanana opened this issue Apr 28, 2018 · 3 comments
Open

#include #65

sacredbanana opened this issue Apr 28, 2018 · 3 comments

Comments

@sacredbanana
Copy link
Contributor

Hi,

I just found Mercury's SDF library at http://mercury.sexy/hg_sdf/ and thought wouldn't it be great if you can just have Bonzomatic silently include a source file such as this one (set in config.json) for helper methods or common variables (obviously can be banned or tightly controlled for actual demo party competition use) so I created a branch for doing so and I have managed to get it working but I'm not sure if you want this to be a feature of the main product or not. And if so, how do we go about finding the point to inject the include file into? You can't just inject it at the beginning or you get errors because the very top of the shader has to have all the setup like #version 410 core.

This feature would severely help people wanting to inject a lot of code and not have it clutter the text editor.

@Gargaj
Copy link
Owner

Gargaj commented Apr 29, 2018

When you say "can be banned or tightly controlled for actual demo party competition use" you're basically suggesting a feature that we're supposed to disable or remove for what the main purpose of this project is. :)

Nothing is really stopping you from forking it and adding this feature on your own, but it's not what Bonzo is for; the main job for this is to provide a tool for the livecoding competitions. Any other use people get out of it is just extra.

@cxw42
Copy link
Contributor

cxw42 commented Oct 7, 2018

I agree with the underlying idea but would like to propose an alternative presentation. Suppose a party wanted to give the competitors the option of using hg_sdf. Bonzo could have a new F-key that would paste into the editor the contents of a file named in config.json. Then the line numbers are all consistent, orgas are still in control, and competitors have the choice of whether or not to use what is provided.

Another option is just to paste hg_sdf into the last-shader source file before running Bonzo ;) .

@sacredbanana
Copy link
Contributor Author

Yeah that sounds good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants