Lines Matching defs:uniforms
302 SetUniformValues(GLuint program, struct uniform_info uniforms[])
306 for (i = 0; uniforms[i].name; i++) {
307 uniforms[i].location
308 = glGetUniformLocation(program, uniforms[i].name);
310 switch (uniforms[i].type) {
323 assert(uniforms[i].value[0] >= 0.0F);
324 Uniform1i(uniforms[i].location,
325 (GLint) uniforms[i].value[0]);
328 Uniform1fv(uniforms[i].location, 1, uniforms[i].value);
331 Uniform2fv(uniforms[i].location, 1, uniforms[i].value);
334 Uniform3fv(uniforms[i].location, 1, uniforms[i].value);
337 Uniform4fv(uniforms[i].location, 1, uniforms[i].value);
340 UniformMatrix4fv(uniforms[i].location, 1, GL_FALSE,
341 uniforms[i].value);
344 if (strncmp(uniforms[i].name, "gl_", 3) == 0) {
357 /** Get list of uniforms used in the program */
359 GetUniforms(GLuint program, struct uniform_info uniforms[])
373 uniforms[i].name = strdup(name);
374 uniforms[i].size = size;
375 uniforms[i].type = type;
376 uniforms[i].location = glGetUniformLocation(program, name);
379 uniforms[i].name = NULL; /* end of list */
386 PrintUniforms(const struct uniform_info uniforms[])
392 for (i = 0; uniforms[i].name; i++) {
395 uniforms[i].name,
396 uniforms[i].size,
397 uniforms[i].type,
398 uniforms[i].location,
399 uniforms[i].value[0],
400 uniforms[i].value[1],
401 uniforms[i].value[2],
402 uniforms[i].value[3]);