shaderInit() example
void
shaderSetup()
{
/* Set defaults */
vec_set(ambientColor,1,1,1);
vec_set(diffuseColor,1,1,1);
vec_set(specularColor,1,1,1);
shininess = 10;
/* Get parameters! */
lookupParamColor("ambientColor",ambientColor);
lookupParamColor("diffuseColor",diffuseColor);
lookupParamColor("specularColor",specularColor);
lookupParamFloat("shininess",&shininess);
/* Set which shader to use */
theShader = myShader;
}
[email protected]
[email protected]
Copyright © 1997 Pat Hanrahan and Andrew C. Beers