Commit c3cc92e4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DMATERIALCOLORSOURCE typedef.

parent 223b0736
...@@ -1264,47 +1264,47 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d ...@@ -1264,47 +1264,47 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d
state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE], state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE],
state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE]); state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE]);
if (state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3D_MCS_COLOR1)
Parm = GL_AMBIENT_AND_DIFFUSE; Parm = GL_AMBIENT_AND_DIFFUSE;
else else
Parm = GL_DIFFUSE; Parm = GL_DIFFUSE;
if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
context->untracked_materials[context->num_untracked_materials] = GL_EMISSION; context->untracked_materials[context->num_untracked_materials] = GL_EMISSION;
context->num_untracked_materials++; context->num_untracked_materials++;
} }
if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR;
context->num_untracked_materials++; context->num_untracked_materials++;
} }
} }
else if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3DMCS_COLOR1) else if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
Parm = GL_AMBIENT; Parm = GL_AMBIENT;
if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
context->untracked_materials[context->num_untracked_materials] = GL_EMISSION; context->untracked_materials[context->num_untracked_materials] = GL_EMISSION;
context->num_untracked_materials++; context->num_untracked_materials++;
} }
if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR;
context->num_untracked_materials++; context->num_untracked_materials++;
} }
} }
else if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) else if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
Parm = GL_EMISSION; Parm = GL_EMISSION;
if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR;
context->num_untracked_materials++; context->num_untracked_materials++;
} }
} }
else if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) else if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1)
{ {
Parm = GL_SPECULAR; Parm = GL_SPECULAR;
} }
......
...@@ -1176,10 +1176,10 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) ...@@ -1176,10 +1176,10 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state->render_states[WINED3D_RS_COLORVERTEX] = TRUE; state->render_states[WINED3D_RS_COLORVERTEX] = TRUE;
state->render_states[WINED3D_RS_LOCALVIEWER] = TRUE; state->render_states[WINED3D_RS_LOCALVIEWER] = TRUE;
state->render_states[WINED3D_RS_NORMALIZENORMALS] = FALSE; state->render_states[WINED3D_RS_NORMALIZENORMALS] = FALSE;
state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] = WINED3DMCS_COLOR1; state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] = WINED3D_MCS_COLOR1;
state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] = WINED3DMCS_COLOR2; state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] = WINED3D_MCS_COLOR2;
state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL; state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3D_MCS_MATERIAL;
state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = WINED3DMCS_MATERIAL; state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = WINED3D_MCS_MATERIAL;
state->render_states[WINED3D_RS_VERTEXBLEND] = WINED3D_VBF_DISABLE; state->render_states[WINED3D_RS_VERTEXBLEND] = WINED3D_VBF_DISABLE;
state->render_states[WINED3D_RS_CLIPPLANEENABLE] = 0; state->render_states[WINED3D_RS_CLIPPLANEENABLE] = 0;
state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE; state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE;
......
...@@ -481,13 +481,12 @@ enum wined3d_stencil_op ...@@ -481,13 +481,12 @@ enum wined3d_stencil_op
WINED3D_STENCIL_OP_DECR = 8, WINED3D_STENCIL_OP_DECR = 8,
}; };
typedef enum _WINED3DMATERIALCOLORSOURCE enum wined3d_material_color_source
{ {
WINED3DMCS_MATERIAL = 0, WINED3D_MCS_MATERIAL = 0,
WINED3DMCS_COLOR1 = 1, WINED3D_MCS_COLOR1 = 1,
WINED3DMCS_COLOR2 = 2, WINED3D_MCS_COLOR2 = 2,
WINED3DMCS_FORCE_DWORD = 0x7fffffff };
} WINED3DMATERIALCOLORSOURCE;
typedef enum _WINED3DPATCHEDGESTYLE typedef enum _WINED3DPATCHEDGESTYLE
{ {
......
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