const T *value; // Owner by the effect.
size_t num_values; // Number of elements; for arrays only. _Not_ the vector length.
std::string prefix; // Filled in only after phases have been constructed.
- GLint location; // Filled in only after phases have been constructed. -1 if no location.
+ GLuint location; // Filled in only after phases have been constructed. GL_INVALID_INDEX if no location, or if using UBOs.
+ GLint ubo_offset; // Same. -1 if no location or if not using UBOs.
+ GLint ubo_num_elem; // Same. 0 if no location or if not using UBOs.
};
class Effect {
//
// Neither of these take ownership of the pointer.
- // int is special since GLSL pre-1.30 doesn't have integer uniforms.
- // Thus, ints that you register will _not_ be converted to GLSL uniforms.
+ // These correspond directly to int/float/vec2/vec3/vec4 in GLSL.
void register_int(const std::string &key, int *value);
-
- // These correspond directly to float/vec2/vec3/vec4 in GLSL.
void register_float(const std::string &key, float *value);
void register_vec2(const std::string &key, float *values);
void register_vec3(const std::string &key, float *values);