• Advertisement
Sign in to follow this  

Are there any libraries to easily load and manage shaders?

Recommended Posts

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...)

Edited by Codizen34

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement