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

radial: configurable offsets #73

Merged
merged 2 commits into from
Oct 25, 2018
Merged

radial: configurable offsets #73

merged 2 commits into from
Oct 25, 2018

Conversation

coderobe
Copy link
Collaborator

Fixes #69 (extended discussion)

@coderobe coderobe merged commit 52af6ac into master Oct 25, 2018
@coderobe coderobe deleted the radial-offsets branch October 25, 2018 17:01
@jarcode-foss
Copy link
Owner

This unfortunately is a breaking change (wrt. local configuration files), radial/1.glsl needs something like:

#ifndef CENTER_OFFSET_X
#define CENTER_OFFSET_X 0
#endif
/* ... repeat for `Y` */

I unfortunately have introduced similar breaking changes in the past; it's probably best to adopt this practice for patch-level version increments.

On the other hand, this adds a lot of boilerplate. I'm thinking about adding a special #config directive to the GLSL extensions (glsl_ext.c) that includes the local configuration while parsing the system copy for defaults (if applicable).

@mmhobi7
Copy link
Contributor

mmhobi7 commented Oct 26, 2018

you could also change the 1.frag to include the glsl from etc first (by like including 0.glsl which is a symlink to the /etc) and then the variables in that frag can override the defaults

@jarcode-foss
Copy link
Owner

@aaahh that will causes either errors or warnings (depending on the vendor) in the GLSL compiler due to re-defining macros.

@mmhobi7
Copy link
Contributor

mmhobi7 commented Oct 26, 2018

Check if the variable already exist first, already made a test case and it works fine

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

Successfully merging this pull request may close these issues.

None yet

3 participants