wined3d: Move WINED3DRS_POINTSIZE_MAX to the state table.

This commit is contained in:
Stefan Dösinger 2006-12-10 23:20:15 +01:00 committed by Alexandre Julliard
parent 51b41d9981
commit 9a0e4b5453
2 changed files with 19 additions and 13 deletions

View File

@ -3394,23 +3394,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case WINED3DRS_NORMALIZENORMALS :
case WINED3DRS_POINTSIZE :
case WINED3DRS_POINTSIZE_MIN :
StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
break;
case WINED3DRS_POINTSIZE_MAX :
if (GL_SUPPORT(EXT_POINT_PARAMETERS)) {
tmpvalue.d = Value;
GL_EXTCALL(glPointParameterfEXT)(GL_POINT_SIZE_MAX_EXT, tmpvalue.f);
checkGLcall("glPointParameterfEXT(...);");
} else {
FIXME("WINED3DRS_POINTSIZE_MAX not supported on this opengl\n");
}
break;
case WINED3DRS_POINTSCALE_A :
case WINED3DRS_POINTSCALE_B :
case WINED3DRS_POINTSCALE_C :
case WINED3DRS_POINTSCALEENABLE :
StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
break;
{
/*
* POINTSCALEENABLE controls how point size value is treated. If set to

View File

@ -935,6 +935,21 @@ static void state_psizemin(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
static void state_psizemax(DWORD state, IWineD3DStateBlockImpl *stateblock) {
union {
DWORD d;
float f;
} tmpvalue;
if (GL_SUPPORT(EXT_POINT_PARAMETERS)) {
tmpvalue.d = stateblock->renderState[WINED3DRS_POINTSIZE_MAX];
GL_EXTCALL(glPointParameterfEXT)(GL_POINT_SIZE_MAX_EXT, tmpvalue.f);
checkGLcall("glPointParameterfEXT(...);");
} else {
FIXME("WINED3DRS_POINTSIZE_MAX not supported on this opengl\n");
}
}
const struct StateEntry StateTable[] =
{
/* State name representative, apply function */
@ -1106,7 +1121,7 @@ const struct StateEntry StateTable[] =
{ /*163, WINED3DRS_PATCHEDGESTYLE */ STATE_RENDER(WINED3DRS_PATCHEDGESTYLE), state_unknown },
{ /*164, WINED3DRS_PATCHSEGMENTS */ STATE_RENDER(WINED3DRS_PATCHSEGMENTS), state_unknown },
{ /*165, WINED3DRS_DEBUGMONITORTOKEN */ STATE_RENDER(WINED3DRS_DEBUGMONITORTOKEN), state_unknown },
{ /*166, WINED3DRS_POINTSIZE_MAX */ STATE_RENDER(WINED3DRS_POINTSIZE_MAX), state_unknown },
{ /*166, WINED3DRS_POINTSIZE_MAX */ STATE_RENDER(WINED3DRS_POINTSIZE_MAX), state_psizemax },
{ /*167, WINED3DRS_INDEXEDVERTEXBLENDENABLE */ 0, state_nogl },
{ /*168, WINED3DRS_COLORWRITEENABLE */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_unknown },
{ /*169, Undefined */ 0, state_undefined },