Commit cbcf6998 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: D3DXAssembleShaderFromResource implementation.

parent c31121dd
@ 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 D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr)
@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr)
@ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr)
@ stub D3DXCheckCubeTextureRequirements
@ stub D3DXCheckTextureRequirements
......
......@@ -23,6 +23,7 @@
#include "windef.h"
#include "wingdi.h"
#include "d3dx9.h"
#include "d3dx9_36_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
......@@ -179,3 +180,43 @@ HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename,
FIXME("stub\n");
return D3DERR_INVALIDCALL;
}
HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module,
LPCSTR resource,
CONST D3DXMACRO* defines,
LPD3DXINCLUDE include,
DWORD flags,
LPD3DXBUFFER* shader,
LPD3DXBUFFER* error_messages)
{
HRSRC res;
LPCSTR buffer;
DWORD len;
if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA)))
return D3DXERR_INVALIDDATA;
if (FAILED(load_resource_into_memory(module, res, (LPVOID *)&buffer, &len)))
return D3DXERR_INVALIDDATA;
return D3DXAssembleShader(buffer, len, defines, include, flags,
shader, error_messages);
}
HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
LPCWSTR resource,
CONST D3DXMACRO* defines,
LPD3DXINCLUDE include,
DWORD flags,
LPD3DXBUFFER* shader,
LPD3DXBUFFER* error_messages)
{
HRSRC res;
LPCSTR buffer;
DWORD len;
if (!(res = FindResourceW(module, resource, (LPCWSTR)RT_RCDATA)))
return D3DXERR_INVALIDDATA;
if (FAILED(load_resource_into_memory(module, res, (LPVOID *)&buffer, &len)))
return D3DXERR_INVALIDDATA;
return D3DXAssembleShader(buffer, len, defines, include, flags,
shader, error_messages);
}
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