Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for #include #82

@bazilmuzik

Description

@bazilmuzik

There's this wonderfull glsl library called lygia (https://lygia.xyz/) which comes with a ton of incredible utilities, functions, etc.

However it relies heavily on #include that Ofelia doesn't recognize... Or at least I don't know how it could be...
In the attached folder, there's a small example. If you use the command

glslViewer test.frag

It all works fine. The random.glsl file (coming from lygia) is recognized and applied correctly with

#include "random.glsl" (line 5 in test.frag)

But using test.pd, I get this error message when creating the window:

ofShader: GL_FRAGMENT_SHADER shader reports:
0:5(1): preprocessor error: include "random.glsl" not found

On the lygia page, there are many examples on how to implement #include in different cases/languages, including C# and C++ (see the "Design Principle" section). That makes me think, without being a developper, that it should be possible to make it work for Ofelia...

What do you think ?

Thanks in advance

test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions