wined3d: Get rid of the WINED3DLINEPATTERN typedef.

This commit is contained in:
Henri Verbeet 2011-11-23 08:51:44 +01:00 committed by Alexandre Julliard
parent 74345201ad
commit 7416953e81
3 changed files with 20 additions and 15 deletions

View File

@ -1313,20 +1313,24 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d
static void state_linepattern(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
union {
DWORD d;
WINED3DLINEPATTERN lp;
union
{
DWORD d;
struct wined3d_line_pattern lp;
} tmppattern;
tmppattern.d = state->render_states[WINED3DRS_LINEPATTERN];
TRACE("Line pattern: repeat %d bits %x\n", tmppattern.lp.wRepeatFactor, tmppattern.lp.wLinePattern);
TRACE("Line pattern: repeat %d bits %x.\n", tmppattern.lp.repeat_factor, tmppattern.lp.line_pattern);
if (tmppattern.lp.wRepeatFactor) {
glLineStipple(tmppattern.lp.wRepeatFactor, tmppattern.lp.wLinePattern);
if (tmppattern.lp.repeat_factor)
{
glLineStipple(tmppattern.lp.repeat_factor, tmppattern.lp.line_pattern);
checkGLcall("glLineStipple(repeat, linepattern)");
glEnable(GL_LINE_STIPPLE);
checkGLcall("glEnable(GL_LINE_STIPPLE);");
} else {
}
else
{
glDisable(GL_LINE_STIPPLE);
checkGLcall("glDisable(GL_LINE_STIPPLE);");
}

View File

@ -1074,8 +1074,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
struct wined3d_device *device = stateblock->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_state *state = &stateblock->state;
union {
WINED3DLINEPATTERN lp;
union
{
struct wined3d_line_pattern lp;
DWORD d;
} lp;
union {
@ -1109,8 +1110,8 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state->render_states[WINED3DRS_ZENABLE] = WINED3DZB_FALSE;
state->render_states[WINED3DRS_FILLMODE] = WINED3DFILL_SOLID;
state->render_states[WINED3DRS_SHADEMODE] = WINED3DSHADE_GOURAUD;
lp.lp.wRepeatFactor = 0;
lp.lp.wLinePattern = 0;
lp.lp.repeat_factor = 0;
lp.lp.line_pattern = 0;
state->render_states[WINED3DRS_LINEPATTERN] = lp.d;
state->render_states[WINED3DRS_ZWRITEENABLE] = TRUE;
state->render_states[WINED3DRS_ALPHATESTENABLE] = FALSE;

View File

@ -1590,11 +1590,11 @@ struct wined3d_gamma_ramp
WORD blue[256];
};
typedef struct _WINED3DLINEPATTERN
struct wined3d_line_pattern
{
WORD wRepeatFactor;
WORD wLinePattern;
} WINED3DLINEPATTERN;
WORD repeat_factor;
WORD line_pattern;
};
typedef struct _WINEDD3DRECTPATCH_INFO
{