wined3d: Add D3DZBUFFERTYPE to the WINED3D namespace.
This commit is contained in:
parent
10cbffb335
commit
5f79e80827
|
@ -3452,22 +3452,22 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DRS_ZENABLE :
|
case WINED3DRS_ZENABLE :
|
||||||
switch ((D3DZBUFFERTYPE) Value) {
|
switch ((WINED3DZBUFFERTYPE) Value) {
|
||||||
case D3DZB_FALSE:
|
case WINED3DZB_FALSE:
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
checkGLcall("glDisable GL_DEPTH_TEST");
|
checkGLcall("glDisable GL_DEPTH_TEST");
|
||||||
break;
|
break;
|
||||||
case D3DZB_TRUE:
|
case WINED3DZB_TRUE:
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
checkGLcall("glEnable GL_DEPTH_TEST");
|
checkGLcall("glEnable GL_DEPTH_TEST");
|
||||||
break;
|
break;
|
||||||
case D3DZB_USEW:
|
case WINED3DZB_USEW:
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
checkGLcall("glEnable GL_DEPTH_TEST");
|
checkGLcall("glEnable GL_DEPTH_TEST");
|
||||||
FIXME("W buffer is not well handled\n");
|
FIXME("W buffer is not well handled\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FIXME("Unrecognized D3DZBUFFERTYPE value %d\n", Value);
|
FIXME("Unrecognized WINED3DZBUFFERTYPE value %d\n", Value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -839,9 +839,9 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
|
||||||
TRACE("Render states\n");
|
TRACE("Render states\n");
|
||||||
/* Render states: */
|
/* Render states: */
|
||||||
if (ThisDevice->depthStencilBuffer != NULL) {
|
if (ThisDevice->depthStencilBuffer != NULL) {
|
||||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, D3DZB_TRUE);
|
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, WINED3DZB_TRUE);
|
||||||
} else {
|
} else {
|
||||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, D3DZB_FALSE);
|
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, WINED3DZB_FALSE);
|
||||||
}
|
}
|
||||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_FILLMODE, D3DFILL_SOLID);
|
IWineD3DDevice_SetRenderState(device, WINED3DRS_FILLMODE, D3DFILL_SOLID);
|
||||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
IWineD3DDevice_SetRenderState(device, WINED3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||||
|
|
|
@ -1224,8 +1224,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
|
||||||
glDrawBuffer(GL_BACK);
|
glDrawBuffer(GL_BACK);
|
||||||
vcheckGLcall("glDrawBuffer");
|
vcheckGLcall("glDrawBuffer");
|
||||||
}
|
}
|
||||||
if(myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == D3DZB_TRUE ||
|
if(myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == WINED3DZB_TRUE ||
|
||||||
myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == D3DZB_USEW) glEnable(GL_DEPTH_TEST);
|
myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == WINED3DZB_USEW) glEnable(GL_DEPTH_TEST);
|
||||||
if (myDevice->stateBlock->renderState[WINED3DRS_ALPHABLENDENABLE]) glEnable(GL_BLEND);
|
if (myDevice->stateBlock->renderState[WINED3DRS_ALPHABLENDENABLE]) glEnable(GL_BLEND);
|
||||||
if (myDevice->stateBlock->renderState[WINED3DRS_FOGENABLE]) glEnable(GL_FOG);
|
if (myDevice->stateBlock->renderState[WINED3DRS_FOGENABLE]) glEnable(GL_FOG);
|
||||||
|
|
||||||
|
|
|
@ -470,6 +470,14 @@ typedef enum _WINED3DVERTEXBLENDFLAGS {
|
||||||
WINED3DVBF_0WEIGHTS = 256
|
WINED3DVBF_0WEIGHTS = 256
|
||||||
} WINED3DVERTEXBLENDFLAGS;
|
} WINED3DVERTEXBLENDFLAGS;
|
||||||
|
|
||||||
|
typedef enum _WINED3DZBUFFERTYPE {
|
||||||
|
WINED3DZB_FALSE = 0,
|
||||||
|
WINED3DZB_TRUE = 1,
|
||||||
|
WINED3DZB_USEW = 2,
|
||||||
|
|
||||||
|
WINED3DZB_FORCE_DWORD = 0x7fffffff
|
||||||
|
} WINED3DZBUFFERTYPE;
|
||||||
|
|
||||||
typedef struct _WINED3DDISPLAYMODE {
|
typedef struct _WINED3DDISPLAYMODE {
|
||||||
UINT Width;
|
UINT Width;
|
||||||
UINT Height;
|
UINT Height;
|
||||||
|
|
Loading…
Reference in New Issue