d3dx9: Implement ID3DXEffect::Begin().
This commit is contained in:
parent
f37302ed8a
commit
a63be635fc
|
@ -165,6 +165,7 @@ struct ID3DXEffectImpl
|
||||||
LPD3DXEFFECTSTATEMANAGER manager;
|
LPD3DXEFFECTSTATEMANAGER manager;
|
||||||
LPDIRECT3DDEVICE9 device;
|
LPDIRECT3DDEVICE9 device;
|
||||||
LPD3DXEFFECTPOOL pool;
|
LPD3DXEFFECTPOOL pool;
|
||||||
|
D3DXHANDLE active_technique;
|
||||||
|
|
||||||
ID3DXBaseEffect *base_effect;
|
ID3DXBaseEffect *base_effect;
|
||||||
};
|
};
|
||||||
|
@ -2793,10 +2794,29 @@ static BOOL WINAPI ID3DXEffectImpl_IsParameterUsed(ID3DXEffect* iface, D3DXHANDL
|
||||||
static HRESULT WINAPI ID3DXEffectImpl_Begin(ID3DXEffect *iface, UINT *passes, DWORD flags)
|
static HRESULT WINAPI ID3DXEffectImpl_Begin(ID3DXEffect *iface, UINT *passes, DWORD flags)
|
||||||
{
|
{
|
||||||
struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface);
|
struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface);
|
||||||
|
struct d3dx_technique *technique = get_technique_struct(This->active_technique);
|
||||||
|
|
||||||
FIXME("(%p)->(%p, %#x): stub\n", This, passes, flags);
|
FIXME("iface %p, passes %p, flags %#x partial stub\n", This, passes, flags);
|
||||||
|
|
||||||
return E_NOTIMPL;
|
if (passes && technique)
|
||||||
|
{
|
||||||
|
if (This->manager || flags & D3DXFX_DONOTSAVESTATE)
|
||||||
|
{
|
||||||
|
TRACE("State capturing disabled.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FIXME("State capturing not supported, yet!\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
*passes = technique->pass_count;
|
||||||
|
|
||||||
|
return D3D_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
WARN("Invalid argument supplied.\n");
|
||||||
|
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ID3DXEffectImpl_BeginPass(ID3DXEffect* iface, UINT pass)
|
static HRESULT WINAPI ID3DXEffectImpl_BeginPass(ID3DXEffect* iface, UINT pass)
|
||||||
|
@ -4988,6 +5008,12 @@ static HRESULT d3dx9_effect_init(struct ID3DXEffectImpl *effect, LPDIRECT3DDEVIC
|
||||||
|
|
||||||
effect->base_effect = &object->ID3DXBaseEffect_iface;
|
effect->base_effect = &object->ID3DXBaseEffect_iface;
|
||||||
|
|
||||||
|
/* initialize defaults - check because of unsupported ascii effects */
|
||||||
|
if (object->technique_handles)
|
||||||
|
{
|
||||||
|
effect->active_technique = object->technique_handles[0];
|
||||||
|
}
|
||||||
|
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
|
||||||
err_out:
|
err_out:
|
||||||
|
|
|
@ -21,6 +21,12 @@
|
||||||
#ifndef __D3DX9EFFECT_H__
|
#ifndef __D3DX9EFFECT_H__
|
||||||
#define __D3DX9EFFECT_H__
|
#define __D3DX9EFFECT_H__
|
||||||
|
|
||||||
|
#define D3DXFX_DONOTSAVESTATE (1 << 0)
|
||||||
|
#define D3DXFX_DONOTSAVESHADERSTATE (1 << 1)
|
||||||
|
#define D3DXFX_DONOTSAVESAMPLERSTATE (1 << 2)
|
||||||
|
#define D3DXFX_NOT_CLONEABLE (1 << 11)
|
||||||
|
#define D3DXFX_LARGEADDRESSAWARE (1 << 17)
|
||||||
|
|
||||||
#define D3DX_PARAMETER_SHARED 1
|
#define D3DX_PARAMETER_SHARED 1
|
||||||
#define D3DX_PARAMETER_LITERAL 2
|
#define D3DX_PARAMETER_LITERAL 2
|
||||||
#define D3DX_PARAMETER_ANNOTATION 4
|
#define D3DX_PARAMETER_ANNOTATION 4
|
||||||
|
|
Loading…
Reference in New Issue