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

wined3d: Move clip status to wined3d_state.

parent 9ce3c61a
......@@ -2862,8 +2862,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetClipStatus(IWineD3DDevice *iface,
if (!pClipStatus)
return WINED3DERR_INVALIDCALL;
This->updateStateBlock->clip_status.ClipUnion = pClipStatus->ClipUnion;
This->updateStateBlock->clip_status.ClipIntersection = pClipStatus->ClipIntersection;
This->updateStateBlock->state.clip_status.ClipUnion = pClipStatus->ClipUnion;
This->updateStateBlock->state.clip_status.ClipIntersection = pClipStatus->ClipIntersection;
return WINED3D_OK;
}
......@@ -2874,8 +2874,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface,
if (!pClipStatus)
return WINED3DERR_INVALIDCALL;
pClipStatus->ClipUnion = This->updateStateBlock->clip_status.ClipUnion;
pClipStatus->ClipIntersection = This->updateStateBlock->clip_status.ClipIntersection;
pClipStatus->ClipUnion = This->updateStateBlock->state.clip_status.ClipUnion;
pClipStatus->ClipIntersection = This->updateStateBlock->state.clip_status.ClipIntersection;
return WINED3D_OK;
}
......
......@@ -616,12 +616,15 @@ static void state_clipping(DWORD state, IWineD3DStateBlockImpl *stateblock, stru
if (disable & WINED3DCLIPPLANE5) { glDisable(GL_CLIP_PLANE5); checkGLcall("glDisable(clip plane 5)"); }
/** update clipping status */
if (enable) {
stateblock->clip_status.ClipUnion = 0;
stateblock->clip_status.ClipIntersection = 0xFFFFFFFF;
} else {
stateblock->clip_status.ClipUnion = 0;
stateblock->clip_status.ClipIntersection = 0;
if (enable)
{
stateblock->state.clip_status.ClipUnion = 0;
stateblock->state.clip_status.ClipIntersection = 0xFFFFFFFF;
}
else
{
stateblock->state.clip_status.ClipUnion = 0;
stateblock->state.clip_status.ClipIntersection = 0;
}
}
......
......@@ -1251,8 +1251,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_BLENDOPALPHA, WINED3DBLENDOP_ADD);
/* clipping status */
This->clip_status.ClipUnion = 0;
This->clip_status.ClipIntersection = 0xFFFFFFFF;
This->state.clip_status.ClipUnion = 0;
This->state.clip_status.ClipIntersection = 0xFFFFFFFF;
/* Texture Stage States - Put directly into state block, we will call function below */
for (i = 0; i < MAX_TEXTURES; ++i)
......
......@@ -2375,6 +2375,7 @@ struct wined3d_state
WINED3DMATRIX transforms[HIGHEST_TRANSFORMSTATE + 1];
double clip_planes[MAX_CLIPPLANES][4];
WINED3DCLIPSTATUS clip_status;
WINED3DMATERIAL material;
WINED3DVIEWPORT viewport;
RECT scissor_rect;
......@@ -2402,9 +2403,6 @@ struct IWineD3DStateBlockImpl
SAVEDSTATES changed;
struct wined3d_state state;
/* Clipping */
WINED3DCLIPSTATUS clip_status;
/* Contained state management */
DWORD contained_render_states[WINEHIGHEST_RENDER_STATE + 1];
unsigned int num_contained_render_states;
......
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