Commit 0c05f9f8 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Rename *emission* as *emissive*.

Emission is the OpenGL name, emissive the D3D one. Prefer the latter.
parent d1e309ab
......@@ -126,7 +126,7 @@ struct glsl_vs_program
GLint material_ambient_location;
GLint material_diffuse_location;
GLint material_specular_location;
GLint material_emission_location;
GLint material_emissive_location;
GLint material_shininess_location;
GLint light_ambient_location;
struct
......@@ -1111,7 +1111,7 @@ static void shader_glsl_ffp_vertex_material_uniform(const struct wined3d_context
}
GL_EXTCALL(glUniform4fv(prog->vs.material_ambient_location, 1, &state->material.ambient.r));
GL_EXTCALL(glUniform4fv(prog->vs.material_diffuse_location, 1, &state->material.diffuse.r));
GL_EXTCALL(glUniform4fv(prog->vs.material_emission_location, 1, &state->material.emissive.r));
GL_EXTCALL(glUniform4fv(prog->vs.material_emissive_location, 1, &state->material.emissive.r));
checkGLcall("setting FFP material uniforms");
}
......@@ -5413,7 +5413,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
const struct wined3d_ffp_vs_settings *settings, const struct wined3d_gl_info *gl_info,
BOOL legacy_lighting)
{
const char *diffuse, *specular, *emission, *ambient;
const char *diffuse, *specular, *emissive, *ambient;
enum wined3d_light_type light_type;
unsigned int i;
......@@ -5433,7 +5433,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
ambient = shader_glsl_ffp_mcs(settings->ambient_source, "ffp_material.ambient");
diffuse = shader_glsl_ffp_mcs(settings->diffuse_source, "ffp_material.diffuse");
specular = shader_glsl_ffp_mcs(settings->specular_source, "ffp_material.specular");
emission = shader_glsl_ffp_mcs(settings->emission_source, "ffp_material.emission");
emissive = shader_glsl_ffp_mcs(settings->emissive_source, "ffp_material.emissive");
for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i)
{
......@@ -5563,7 +5563,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
}
shader_addline(buffer, "gl_FrontColor.xyz = %s.xyz * ambient + %s.xyz * diffuse + %s.xyz;\n",
ambient, diffuse, emission);
ambient, diffuse, emissive);
shader_addline(buffer, "gl_FrontColor.w = %s.w;\n", diffuse);
shader_addline(buffer, "gl_FrontSecondaryColor = %s * specular;\n", specular);
}
......@@ -5587,7 +5587,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct wined3d_string_buffe
shader_addline(buffer, "uniform mat4 ffp_texture_matrix[%u];\n", MAX_TEXTURES);
shader_addline(buffer, "uniform struct\n{\n");
shader_addline(buffer, " vec4 emission;\n");
shader_addline(buffer, " vec4 emissive;\n");
shader_addline(buffer, " vec4 ambient;\n");
shader_addline(buffer, " vec4 diffuse;\n");
shader_addline(buffer, " vec4 specular;\n");
......@@ -6410,7 +6410,7 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
vs->material_ambient_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.ambient"));
vs->material_diffuse_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.diffuse"));
vs->material_specular_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.specular"));
vs->material_emission_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.emission"));
vs->material_emissive_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.emissive"));
vs->material_shininess_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.shininess"));
vs->light_ambient_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_light_ambient"));
for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i)
......
......@@ -4232,14 +4232,14 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct
if (state->render_states[WINED3D_RS_COLORVERTEX] && (si->use_map & (1 << WINED3D_FFP_DIFFUSE)))
{
settings->diffuse_source = state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE];
settings->emission_source = state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE];
settings->emissive_source = state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE];
settings->ambient_source = state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE];
settings->specular_source = state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE];
}
else
{
settings->diffuse_source = WINED3D_MCS_MATERIAL;
settings->emission_source = WINED3D_MCS_MATERIAL;
settings->emissive_source = WINED3D_MCS_MATERIAL;
settings->ambient_source = WINED3D_MCS_MATERIAL;
settings->specular_source = WINED3D_MCS_MATERIAL;
}
......
......@@ -1870,7 +1870,7 @@ struct wined3d_ffp_vs_settings
{
DWORD light_type : 24; /* MAX_ACTIVE_LIGHTS, 8 * 3 */
DWORD diffuse_source : 2;
DWORD emission_source : 2;
DWORD emissive_source : 2;
DWORD ambient_source : 2;
DWORD specular_source : 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment