heyx3 / Bplus.jl

A modern OpenGL 4.6 rendering framework, written in Julia.
Other
70 stars 3 forks source link

Port and generalize the BpWorld project's ability to process `#include` statements in shaders #36

Open heyx3 opened 1 year ago

heyx3 commented 1 year ago

You can find the code here. The SHADER_CUTOFF_TOKEN stuff could be removed completely, as I don't think I even use it in BpWorld anymore.

The final version of this should ask the user for a lambda that maps an include path to some source code. That way it can even be served from places other than the file-system.

It could also cache the code from files that have been included previously, but then we need to think about cache invalidation (i.e. how do we know if the file was updated in real-time?).