diff --git a/dlls/wined3d/Makefile.in b/dlls/wined3d/Makefile.in index 2eea53cb63d..0cdd967863a 100644 --- a/dlls/wined3d/Makefile.in +++ b/dlls/wined3d/Makefile.in @@ -22,6 +22,7 @@ C_SRCS = \ pixelshader.c \ query.c \ resource.c \ + state.c \ stateblock.c \ surface.c \ surface_gdi.c \ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c new file mode 100644 index 00000000000..2b929b606f0 --- /dev/null +++ b/dlls/wined3d/state.c @@ -0,0 +1,38 @@ +/* + * Direct3D state management + * + * Copyright 2006 Stefan Dösinger for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include +#ifdef HAVE_FLOAT_H +# include +#endif +#include "wined3d_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3d); + +static void state_unknown(DWORD state, IWineD3DStateBlockImpl *stateblock) { + FIXME("Unknown state %d\n", state); +} + +const struct StateEntry StateTable[] = +{ + /* State name representative, apply function */ + { /* 0, Undefined */ 0, state_unknown }, +}; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8eea594d7be..42ecbcd7744 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -407,6 +407,18 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType); #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \ (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1) +/* Routines and structures related to state management */ +typedef void (*APPLYSTATEFUNC)(DWORD state, IWineD3DStateBlockImpl *stateblock); + +struct StateEntry +{ + DWORD representative; + APPLYSTATEFUNC apply; +}; + +/* Global state table */ +extern const struct StateEntry StateTable[]; + /* Routine to fill gl caps for swapchains and IWineD3D */ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display);