tests: Remove use of cogl_program_use
The removes the use of cogl_program_use which has been deprecated and instead of using the cogl_program_uniform functions we now use the cogl_program_set_uniform methods.
This commit is contained in:
parent
c03544daa6
commit
a26119b551
@ -270,10 +270,7 @@ set_shader_num (int new_no)
|
||||
param0[3] = -1.9; /* contrast */
|
||||
|
||||
uniform_no = cogl_program_get_uniform_location (program, "program.local[0]");
|
||||
/* Shesh this API is really F'ugly! */
|
||||
cogl_program_use (program);
|
||||
cogl_program_uniform_float (uniform_no, 4, 1, param0);
|
||||
cogl_program_use (COGL_INVALID_HANDLE);
|
||||
cogl_program_set_uniform_float (program, uniform_no, 4, 1, param0);
|
||||
|
||||
cogl_material_set_user_program (material, program);
|
||||
cogl_handle_unref (program);
|
||||
|
@ -234,24 +234,19 @@ set_shader_num (int new_no)
|
||||
cogl_handle_unref (shader);
|
||||
cogl_program_link (program);
|
||||
|
||||
/* Shesh this API is really F'ugly! */
|
||||
cogl_program_use (program);
|
||||
|
||||
uniform_no = cogl_program_get_uniform_location (program, "tex");
|
||||
cogl_program_uniform_1i (uniform_no, 0);
|
||||
cogl_program_set_uniform_1i (program, uniform_no, 0);
|
||||
uniform_no = cogl_program_get_uniform_location (program, "radius");
|
||||
cogl_program_uniform_1f (uniform_no, 3.0);
|
||||
cogl_program_set_uniform_1f (program, uniform_no, 3.0);
|
||||
uniform_no = cogl_program_get_uniform_location (program, "brightness");
|
||||
cogl_program_uniform_1f (uniform_no, 0.4);
|
||||
cogl_program_set_uniform_1f (program, uniform_no, 0.4);
|
||||
uniform_no = cogl_program_get_uniform_location (program, "contrast");
|
||||
cogl_program_uniform_1f (uniform_no, -1.9);
|
||||
cogl_program_set_uniform_1f (program, uniform_no, -1.9);
|
||||
|
||||
uniform_no = cogl_program_get_uniform_location (program, "x_step");
|
||||
cogl_program_uniform_1f (uniform_no, 1.0f / image_width);
|
||||
cogl_program_set_uniform_1f (program, uniform_no, 1.0f / image_width);
|
||||
uniform_no = cogl_program_get_uniform_location (program, "y_step");
|
||||
cogl_program_uniform_1f (uniform_no, 1.0f / image_height);
|
||||
|
||||
cogl_program_use (COGL_INVALID_HANDLE);
|
||||
cogl_program_set_uniform_1f (program, uniform_no, 1.0f / image_height);
|
||||
|
||||
cogl_material_set_user_program (material, program);
|
||||
cogl_handle_unref (program);
|
||||
|
Loading…
Reference in New Issue
Block a user