Use function argument in va_start instead of local variable.
This commit is contained in:
parent
1588a379eb
commit
c75270a9fc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user