d3dx9: D3DXAssembleShader and D3DXAssembleShaderFromFile stubs.

This commit is contained in:
Matteo Bruni 2009-09-15 20:17:14 +02:00 committed by Alexandre Julliard
parent 3cd744e98b
commit c31121dd35
2 changed files with 51 additions and 3 deletions

View File

@ -1,6 +1,6 @@
@ stub D3DXAssembleShader
@ stub D3DXAssembleShaderFromFileA
@ stub D3DXAssembleShaderFromFileW
@ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr)
@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr)
@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr)
@ stub D3DXAssembleShaderFromResourceA
@ stub D3DXAssembleShaderFromResourceW
@ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr)

View File

@ -19,6 +19,7 @@
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "windef.h"
#include "wingdi.h"
#include "d3dx9.h"
@ -131,3 +132,50 @@ LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device)
return NULL;
}
HRESULT WINAPI D3DXAssembleShader(LPCSTR data,
UINT data_len,
CONST D3DXMACRO* defines,
LPD3DXINCLUDE include,
DWORD flags,
LPD3DXBUFFER* shader,
LPD3DXBUFFER* error_messages)
{
FIXME("stub\n");
return D3DERR_INVALIDCALL;
}
HRESULT WINAPI D3DXAssembleShaderFromFileA(LPCSTR filename,
CONST D3DXMACRO* defines,
LPD3DXINCLUDE include,
DWORD flags,
LPD3DXBUFFER* shader,
LPD3DXBUFFER* error_messages)
{
LPWSTR filename_w = NULL;
DWORD len;
HRESULT ret;
if (!filename) return D3DXERR_INVALIDDATA;
len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0);
filename_w = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!filename_w) return E_OUTOFMEMORY;
MultiByteToWideChar(CP_ACP, 0, filename, -1, filename_w, len);
ret = D3DXAssembleShaderFromFileW(filename_w, defines, include, flags, shader, error_messages);
HeapFree(GetProcessHeap(), 0, filename_w);
return ret;
}
HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename,
CONST D3DXMACRO* defines,
LPD3DXINCLUDE include,
DWORD flags,
LPD3DXBUFFER* shader,
LPD3DXBUFFER* error_messages)
{
FIXME("stub\n");
return D3DERR_INVALIDCALL;
}