How to distribut shader files in a library?

Answered

I have library functions using OpenGL for GPU programming. These functions require shader source code files to be present at execution time. Right now I replicate the required shader files in each project using this library in a resource folder of that project.

I use this library only locally on my own machine for my private projects. I could have the shaders simply stored somewhere in a central “shader repository” and have the code getting them from there. That way I wouldn't have to replicate the shaders, but it is obviously not cool.

So, what is the idiomatic way to do such a thing? I guess it is really - put in a more generic way - about how to distribute resoures through a library.

0
1 comment
Since this topic is more related to library design and resource packaging rather than something specific to IntelliJ IDEA, you may receive more detailed guidance on a general programming forum such as Stack Overflow.
0

Please sign in to leave a comment.