Use function argument in va_start instead of local variable.

This commit is contained in:
frohlich 2006-06-15 06:14:46 +00:00
parent 1588a379eb
commit c75270a9fc

View File

@ -483,7 +483,7 @@ void Shader::bind(const float *v,...) {
}
const float *value = v;
va_list args;
va_start(args,value);
va_start(args,v);
for(int i = 0; i < (int)parameters.size(); i++) {
if( vertex_target ) {
glProgramLocalParameter4fvPtr( vertex_target, parameters[i].location, value);
@ -549,7 +549,7 @@ void Shader::setParameter(const char *name,const float *value) {
void Shader::setParameters(const float *v,...) {
const float *value = v;
va_list args;
va_start(args,value);
va_start(args,v);
for(int i = 0; i < (int)parameters.size(); i++) {
if( vertex_target ) {
glProgramLocalParameter4fvPtr( vertex_target, parameters[i].location, value);