public:
count_uniform_size(struct string_to_uint_map *map)
: num_active_uniforms(0), num_values(0), num_shader_samplers(0),
- num_shader_uniforms(0), map(map)
+ num_shader_uniform_components(0), map(map)
{
/* empty */
}
void start_shader()
{
this->num_shader_samplers = 0;
- this->num_shader_uniforms = 0;
+ this->num_shader_uniform_components = 0;
}
/**
/**
* Number of uniforms used in the current shader
*/
- unsigned num_shader_uniforms;
+ unsigned num_shader_uniform_components;
private:
virtual void visit_field(const glsl_type *type, const char *name)
* Note that samplers do not count against this limit because they
* don't use any storage on current hardware.
*/
- this->num_shader_uniforms += values;
+ this->num_shader_uniform_components += values;
}
/* If the uniform is already in the map, there's nothing more to do.
prog->_LinkedShaders[i]->num_samplers = uniform_size.num_shader_samplers;
prog->_LinkedShaders[i]->num_uniform_components =
- uniform_size.num_shader_uniforms * 4;
+ uniform_size.num_shader_uniform_components;
}
const unsigned num_user_uniforms = uniform_size.num_active_uniforms;