fix ofShader include path behaviour #2784

Merged
merged 3 commits into from Feb 8, 2014

2 participants

@tgfrerer
openFrameworks member

Detail

  • Addresses issue #2768, #2783, ping @ofTheo , @arturoc – is this the behaviour you were after, too?
  • this fix brings the ofShader #pragma include directive in line with the behaviour of a C preprocessor.
  • include paths will now always be relative to the file calling the include

Test case

Motivation

Prior to this fix, shader #pragma include paths were always relative to current OF_DATA_PATH.

This was not in line with how the c preprocessor resolved relative paths, and it also limited portability of shader modules.

Signed-off-by: tgfrerer tim@poniesandlight.co.uk

tgfrerer added some commits Jan 31, 2014
@tgfrerer tgfrerer fix ofShader include paths
before this fix, shader #pragma include paths were always relative to current OF_DATA_PATH.

This was not in line with how the c preprocessor resolved relative paths, and it also limited portability of shader modules.

* this fix brings the ofShader #pragma include directive in line with the behaviour of a C preprocessor.
* include paths will now always be *relative to the file calling the include*
* tested on Windows (VS2012), OS X

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
f9b35fb
@tgfrerer tgfrerer update changelog
* adds a short description of the bugfix for increased karma

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
64cfbab
@tgfrerer tgfrerer fix quirk in how absolute/relative paths are resolved in ofShader inc…
…ludes

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
a8c8173
@ofTheo ofTheo merged commit 6fb7927 into openframeworks:master Feb 8, 2014
@tgfrerer tgfrerer deleted the tgfrerer:fix-ofShader-include-paths branch Feb 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment