mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wined3d: Move WINED3DRS_POINTSIZE to the state table.
This commit is contained in:
parent
2ea57677d3
commit
0ec7c8b55a
2 changed files with 15 additions and 9 deletions
|
@ -3392,15 +3392,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
|
|||
case WINED3DRS_LINEPATTERN :
|
||||
case WINED3DRS_ZBIAS : /* D3D8 only */
|
||||
case WINED3DRS_NORMALIZENORMALS :
|
||||
StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
|
||||
break;
|
||||
|
||||
case WINED3DRS_POINTSIZE :
|
||||
/* FIXME: check that pointSize isn't outside glGetFloatv( GL_POINT_SIZE_MAX_ARB, &maxSize ); or -ve */
|
||||
tmpvalue.d = Value;
|
||||
TRACE("Set point size to %f\n", tmpvalue.f);
|
||||
glPointSize(tmpvalue.f);
|
||||
checkGLcall("glPointSize(...);");
|
||||
StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
|
||||
break;
|
||||
|
||||
case WINED3DRS_POINTSIZE_MIN :
|
||||
|
|
|
@ -907,6 +907,19 @@ static void state_normalize(DWORD state, IWineD3DStateBlockImpl *stateblock) {
|
|||
}
|
||||
}
|
||||
|
||||
static void state_psize(DWORD state, IWineD3DStateBlockImpl *stateblock) {
|
||||
union {
|
||||
DWORD d;
|
||||
float f;
|
||||
} tmpvalue;
|
||||
|
||||
/* FIXME: check that pointSize isn't outside glGetFloatv( GL_POINT_SIZE_MAX_ARB, &maxSize ); or -ve */
|
||||
tmpvalue.d = stateblock->renderState[WINED3DRS_POINTSIZE];
|
||||
TRACE("Set point size to %f\n", tmpvalue.f);
|
||||
glPointSize(tmpvalue.f);
|
||||
checkGLcall("glPointSize(...);");
|
||||
}
|
||||
|
||||
const struct StateEntry StateTable[] =
|
||||
{
|
||||
/* State name representative, apply function */
|
||||
|
@ -1066,7 +1079,7 @@ const struct StateEntry StateTable[] =
|
|||
{ /*151, WINED3DRS_VERTEXBLEND */ 0, state_nogl },
|
||||
{ /*152, WINED3DRS_CLIPPLANEENABLE */ STATE_RENDER(WINED3DRS_CLIPPING), state_clipping },
|
||||
{ /*153, WINED3DRS_SOFTWAREVERTEXPROCESSING */ 0, state_nogl },
|
||||
{ /*154, WINED3DRS_POINTSIZE */ STATE_RENDER(WINED3DRS_POINTSIZE), state_unknown },
|
||||
{ /*154, WINED3DRS_POINTSIZE */ STATE_RENDER(WINED3DRS_POINTSIZE), state_psize },
|
||||
{ /*155, WINED3DRS_POINTSIZE_MIN */ STATE_RENDER(WINED3DRS_POINTSIZE_MIN), state_unknown },
|
||||
{ /*156, WINED3DRS_POINTSPRITEENABLE */ STATE_RENDER(WINED3DRS_POINTSPRITEENABLE), state_unknown },
|
||||
{ /*157, WINED3DRS_POINTSCALEENABLE */ STATE_RENDER(WINED3DRS_POINTSCALEENABLE), state_unknown },
|
||||
|
|
Loading…
Reference in a new issue