Commit 4b0297d8 authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

Some needed cleanups for future dx9 and d3d common layer support:

- stateblocks to IDirect3DStateBlockImpl interface and moving into a new file (stateblock.c) - shaders to IDirect3D*ShaderImpl interfaces - splitting vshader and vshader declaration as in dx9 into 2 interfaces (for future common layer use) - vshader declaration code to a new file (vsaderdeclaration.c) - device calls to new interfaces (redirect stubs) Simple texture fix for a little regression after last Jason's patches. Some caps code using the GL/glext.h defines (GL_VERSION_*).
parent fc0d07f8
......@@ -19,12 +19,14 @@ C_SRCS = \
indexbuffer.c \
resource.c \
shader.c \
stateblock.c \
surface.c \
swapchain.c \
texture.c \
vertexbuffer.c \
volume.c \
volumetexture.c \
vshaderdeclaration.c
@MAKE_DLL_RULES@
......
......@@ -419,7 +419,11 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
object->direct3d8 = This;
/** The device AddRef the direct3d8 Interface else crash in propers clients codes */
IDirect3D8_AddRef((LPDIRECT3D8) object->direct3d8);
object->UpdateStateBlock = &object->StateBlock;
/** use StateBlock Factory here, for creating the startup stateBlock */
object->StateBlock = NULL;
IDirect3DDeviceImpl_CreateStateBlock(object, D3DSBT_ALL, NULL);
object->UpdateStateBlock = object->StateBlock;
/* Save the creation parameters */
object->CreateParms.AdapterOrdinal = Adapter;
......@@ -622,7 +626,7 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
}
/* Setup all the devices defaults */
CreateStateBlock((LPDIRECT3DDEVICE8) object);
IDirect3DDeviceImpl_InitStartupStateBlock(object);
LEAVE_GL();
......
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