openframeworks/openFrameworks — pull request #1507 by bakercp (2012-08-23 06:20:24+00:00)
Title: ofShader - Easier dynamic access to info about a shader's Uniforms and Attributes.

This is a proposal for creating easier access to uniform / attribute data. It is primarily intended to help enable uniform / attribute discovery in the case that the uniform / attribute name strings are not hard-coded into a program. An example use might be -- if one is working with a gui-based video mixer and want users to be able to load shaders from disk on the fly (or on startup for that matter), and then dynamically bind gui sliders, etc to the shader uniforms / attributes.

Previously this data was available via `void printActiveUniforms()` / `void printActiveAttributes()`, but this only printed (some) of the data to the screen. The changes in this PR allow access to the data programmatically.