DECLARE_INTERFACE_(ID3D10Effect, IUnknown)
{
STDMETHOD_(BOOL, IsValid)(THIS) PURE;
STDMETHOD_(BOOL, IsPool)(THIS) PURE;
STDMETHOD(GetDevice)(THIS_ ID3D10Device** ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_DESC* pDesc) PURE;
STDMETHOD_(ID3D10EffectConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetVariableBySemantic)(THIS_ LPCSTR Semantic) PURE;
STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD(Apply)(THIS) PURE;
STDMETHOD_(void, GetVertexShaderDesc)(THIS_ UINT Index, D3D10_EFFECT_SHADER_DESC* pDesc) PURE;
STDMETHOD_(void, GetPixelShaderDesc)(THIS_ UINT Index, D3D10_EFFECT_SHADER_DESC* pDesc) PURE;
STDMETHOD_(ID3D10EffectPass*, GetPassByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectPass*, GetPassByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD_(void, SetTechnique)(THIS_ ID3D10EffectTechnique* pTechnique) PURE;
STDMETHOD_(ID3D10EffectTechnique*, GetCurrentTechnique)(THIS) PURE;
STDMETHOD_(HRESULT, IsTechniqueValid)(THIS_ ID3D10EffectTechnique* pTechnique) PURE;
STDMETHOD_(ID3D10EffectAnnotation*, GetTechniqueAnnotationByIndex)(THIS_ UINT Technique, UINT Index) PURE;
STDMETHOD_(ID3D10EffectPass*, GetPassByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectPass*, GetPassByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD_(HRESULT, IsParameterUsed)(THIS_ ID3D10EffectVariable* pVariable, UINT Index) PURE;
STDMETHOD_(ID3D10EffectPass*, GetCurrentPass)(THIS) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetParameterElement)(THIS_ ID3D10EffectVariable* pVariable, UINT Index) PURE;
STDMETHOD_(void, GetTechniqueDesc)(THIS_ UINT Index, D3D10_TECHNIQUE_DESC* pDesc) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetVariableBySemantic)(THIS_ LPCSTR Semantic) PURE;
STDMETHOD_(void, GetPassDesc)(THIS_ UINT Index, D3D10_PASS_DESC* pDesc) PURE;
STDMETHOD_(void, GetAnnotationByIndex)(THIS_ UINT Index, ID3D10EffectAnnotation** ppAnnotation) PURE;
STDMETHOD_(void, GetAnnotationByName)(THIS_ LPCSTR Name, ID3D10EffectAnnotation** ppAnnotation) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectType*, GetScalarType)(THIS) PURE;
STDMETHOD_(ID3D10EffectType*, GetVectorType)(THIS) PURE;
STDMETHOD_(ID3D10EffectType*, GetMatrixType)(THIS) PURE;
STDMETHOD_(ID3D10EffectType*, GetObjectType)(THIS) PURE;
STDMETHOD_(ID3D10EffectType*, GetStructType)(THIS) PURE;
STDMETHOD_(ID3D10EffectType*, GetInterfaceType)(THIS) PURE;
STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD_(ID3D10EffectVariable*, GetVariableBySemantic)(THIS_ LPCSTR Semantic) PURE;
};
这个接口提供了一系列方法,用于获取 Effect 对象的各种信息,如描述、常量缓冲区、变量、技术、Pass 等。通过这些方法,你可以在渲染图形时配置和应用所需的渲染状态和着色器。
如果你需要更详细的信息或使用示例,请查阅 Microsoft 官方文档或相应的编程资源。
转载请注明出处:http://www.zyzy.cn/article/detail/25587/Win32 API/D3d10effect.h/ID3D10Effect