Change signature of uniform_set_parameters

This commit is contained in:
twinaphex 2016-04-14 06:24:36 +02:00
parent 7cd10fd707
commit 6a39d504e0
3 changed files with 17 additions and 17 deletions

View File

@ -50,7 +50,7 @@
#define SEMANTIC_COLOR0 0xa9e93e54U
#define SEMANTIC_POSITION 0xd87309baU
static void cg_uniform_set_parameter(void *data, void *uniform_data)
static void cg_uniform_set_parameter(void *data, shader_program_data_t *shader_data, void *uniform_data)
{
struct uniform_info *param = (struct uniform_info*)data;
CGparameter *cg_param = (CGparameter*)uniform_data;
@ -308,7 +308,7 @@ static void gl_cg_set_texture_info(
uniform_data[3] = params->tex_size_f;
for (i = 0; i < 4; i++)
cg_uniform_set_parameter(&uniform_params[i], &uniform_data[i]);
cg_uniform_set_parameter(&uniform_params[i], NULL, &uniform_data[i]);
if (params->coord)
{
@ -424,7 +424,7 @@ static void gl_cg_set_params(void *data, void *shader_data,
}
for (i = 0; i < uniform_count; i++)
cg_uniform_set_parameter(&uniform_params[i], &uniform_data[i]);
cg_uniform_set_parameter(&uniform_params[i], &cg_data->prg[i], &uniform_data[i]);
/* Set orig texture. */
gl_cg_set_texture_info(cg_data, &cg_data->prg[cg_data->active_idx].orig, info);
@ -489,7 +489,7 @@ static void gl_cg_set_params(void *data, void *shader_data,
uniform_params[1].result.f.v0 = cg_data->shader->parameters[i].current;
for (j = 0; j < 2; j++)
cg_uniform_set_parameter(&uniform_params[j], &pragma_cg_params[j]);
cg_uniform_set_parameter(&uniform_params[j], &cg_data->prg[j], &pragma_cg_params[j]);
}
/* Set state parameters. */
@ -525,7 +525,7 @@ static void gl_cg_set_params(void *data, void *shader_data,
uniform_params[1].result.f.v0 = tracker_info[i].value;
for (j = 0; j < 2; j++)
cg_uniform_set_parameter(&uniform_params[j], &pragma_cg_params[j]);
cg_uniform_set_parameter(&uniform_params[j], &cg_data->prg[j], &pragma_cg_params[j]);
}
}
}

View File

@ -1054,7 +1054,7 @@ error:
static float t = 0;
#endif
static void glsl_uniform_set_parameter(void *data, void *uniform_data)
static void glsl_uniform_set_parameter(void *data, shader_program_data_t *shader_data, void *uniform_data)
{
struct uniform_info *param = (struct uniform_info*)data;
@ -1195,7 +1195,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
uniform_count++;
for (i = 0; i < uniform_count; i++)
glsl_uniform_set_parameter(&uniform_params[i], NULL);
glsl_uniform_set_parameter(&uniform_params[i], NULL, NULL);
/* Set lookup textures. */
for (i = 0; i < glsl->shader->luts; i++)
@ -1213,7 +1213,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
lut_uniform.type = UNIFORM_1I;
lut_uniform.result.integer.v0 = texunit;
glsl_uniform_set_parameter(&lut_uniform, NULL);
glsl_uniform_set_parameter(&lut_uniform, NULL, NULL);
texunit++;
}
@ -1235,7 +1235,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
orig_tex_uniform.type = UNIFORM_1I;
orig_tex_uniform.result.integer.v0 = texunit;
glsl_uniform_set_parameter(&orig_tex_uniform, NULL);
glsl_uniform_set_parameter(&orig_tex_uniform, NULL, NULL);
glBindTexture(GL_TEXTURE_2D, info->tex);
texunit++;
@ -1258,7 +1258,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
orig_uniforms[1].enabled = true;
for (j = 0; j < 2; j++)
glsl_uniform_set_parameter(&orig_uniforms[i], NULL);
glsl_uniform_set_parameter(&orig_uniforms[i], NULL, NULL);
/* Pass texture coordinates. */
if (uni->orig.tex_coord >= 0)
@ -1286,7 +1286,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
feedback_texture_param.type = UNIFORM_1I;
feedback_texture_param.result.integer.v0 = texunit;
glsl_uniform_set_parameter(&feedback_texture_param, NULL);
glsl_uniform_set_parameter(&feedback_texture_param, NULL, NULL);
glBindTexture(GL_TEXTURE_2D, feedback_info->tex);
texunit++;
@ -1309,7 +1309,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
feedback_uniforms[1].enabled = true;
for (j = 0; j < 2; j++)
glsl_uniform_set_parameter(&feedback_uniforms[i], NULL);
glsl_uniform_set_parameter(&feedback_uniforms[i], NULL, NULL);
/* Pass texture coordinates. */
if (uni->feedback.tex_coord >= 0)
@ -1360,7 +1360,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
fbo_tex_params[2].enabled = true;
for (j = 0; j < 3; j++)
glsl_uniform_set_parameter(&fbo_tex_params[i], NULL);
glsl_uniform_set_parameter(&fbo_tex_params[i], NULL, NULL);
if (uni->pass[i].tex_coord >= 0)
{
@ -1412,7 +1412,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
prev_tex_params[2].enabled = true;
for (j = 0; j < 3; j++)
glsl_uniform_set_parameter(&prev_tex_params[i], NULL);
glsl_uniform_set_parameter(&prev_tex_params[i], NULL, NULL);
/* Pass texture coordinates. */
if (uni->prev[i].tex_coord >= 0)
@ -1449,7 +1449,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
pragma_param.type = UNIFORM_1F;
pragma_param.result.f.v0 = glsl->shader->parameters[i].current;
glsl_uniform_set_parameter(&pragma_param, NULL);
glsl_uniform_set_parameter(&pragma_param, NULL, NULL);
}
/* Set state parameters. */
@ -1474,7 +1474,7 @@ static void gl_glsl_set_params(void *data, void *shader_data,
state_param.type = UNIFORM_1F;
state_param.result.f.v0 = state_info[i].value;
glsl_uniform_set_parameter(&state_param, NULL);
glsl_uniform_set_parameter(&state_param, NULL, NULL);
}
}
}

View File

@ -103,7 +103,7 @@ void hlsl_set_proj_matrix(void *data, XMMATRIX rotation_value)
hlsl_data->prg[hlsl_data->active_idx].mvp_val = rotation_value;
}
static void hlsl_uniform_set_parameter(void *data, void *uniform_data)
static void hlsl_uniform_set_parameter(void *data, shader_program_data_t *shader_data, void *uniform_data)
{
struct uniform_info *param = (struct uniform_info*)data;