Commit 9a0e4b54 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Move WINED3DRS_POINTSIZE_MAX to the state table.

parent 51b41d99
......@@ -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
......
......@@ -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 },
......
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