Are there any libraries to easily load and manage shaders?

Started by
1 comment, last by Hodgman 6 years, 11 months ago

GLFW made doing rendering contexts a cinch
SOIL made loading textures simple
GLEW
, GLAD, etc wrangled the API
GLM
, Hypatia and linMath handles the matrix and quaternions

Is there anything out there that can do that for GLSL shaders in C or C++ (C preferred)

Besides the basics (load a shader from disk and compile) -- I'm looking for things to speed up development time. For example: Advanced features might be a recompilation trigger or something to manage the #defines in a mega-shader -- Maybe something to compile, save the binary off for subsequent loads on the same machine, etc.

NOTE: I initially asked this on SO, but they deleted it (...because I asked for a software recommendation...)

Advertisement

Compared to the other libraries you listed, what you're asking for can be written in about an hour and tested in the same amount of time. I might be missing something mind you. Nor are you really going to be pre-compiling your shaders in GLSL as there is no standard that I'm aware of. It's best, as I doubt it would ever be a noticeable bottleneck, to compile them upon loading. Or on the first run so it's compiled for the systems GPU. Even ATI to ATI card might not have the same format when compiled. But honestly, even if you had a several megabyte shader it would take mere milliseconds to compile and upload to the card. I do this upon startup.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

I don't know if it's still maintained, but there used to be a project called GLFX, which was a full high level shader library like CgFX or the MS effects lib.

This topic is closed to new replies.

Advertisement