+++ /dev/null
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-namespace SlimDX\r
-{\r
- namespace Direct3D9\r
- {\r
- ref class Effect;\r
-\r
- public interface struct IEffectStateManager\r
- {\r
- virtual void EnableLight( int index, bool enable ) = 0;\r
- virtual void SetFVF( VertexFormat fvf ) = 0;\r
- virtual void SetLight( int index, Light light ) = 0;\r
- virtual void SetMaterial( Material material ) = 0;\r
- virtual void SetNPatchMode( float segments ) = 0;\r
- virtual void SetTransform( TransformState state, Matrix value ) = 0;\r
-\r
- virtual void SetPixelShader( PixelShader^ pixelShader ) = 0;\r
- virtual void SetPixelShaderConstant( int startRegister, array<bool>^ data ) = 0;\r
- virtual void SetPixelShaderConstant( int startRegister, array<float>^ data ) = 0;\r
- virtual void SetPixelShaderConstant( int startRegister, array<int>^ data ) = 0;\r
-\r
- virtual void SetVertexShader( VertexShader^ vertexShader ) = 0;\r
- virtual void SetVertexShaderConstant( int startRegister, array<bool>^ data ) = 0;\r
- virtual void SetVertexShaderConstant( int startRegister, array<float>^ data ) = 0;\r
- virtual void SetVertexShaderConstant( int startRegister, array<int>^ data ) = 0;\r
-\r
- virtual void SetRenderState( RenderState state, int value ) = 0;\r
- virtual void SetSamplerState( int sampler, SamplerState type, int value ) = 0;\r
- virtual void SetTexture( int sampler, BaseTexture^ texture ) = 0;\r
- virtual void SetTextureStageState( int stage, TextureStage type, int value ) = 0;\r
- };\r
-\r
- class IEffectStateManagerShim : public ID3DXEffectStateManager\r
- {\r
- private:\r
- int refCount;\r
- gcroot<IEffectStateManager^> m_WrappedInterface;\r
- gcroot<Effect^> m_Effect;\r
-\r
- public:\r
- IEffectStateManagerShim( IEffectStateManager^ wrappedInterface, Effect^ effect );\r
-\r
- IEffectStateManager^ GetManager() { return m_WrappedInterface; }\r
-\r
- HRESULT WINAPI QueryInterface( const IID &iid, LPVOID *ppv );\r
- ULONG WINAPI AddRef();\r
- ULONG WINAPI Release();\r
-\r
- HRESULT WINAPI LightEnable( DWORD Index, BOOL Enable );\r
- HRESULT WINAPI SetFVF( DWORD FVF );\r
- HRESULT WINAPI SetLight( DWORD index, const D3DLIGHT9* pLight );\r
- HRESULT WINAPI SetMaterial( const D3DMATERIAL9* pMaterial );\r
- HRESULT WINAPI SetNPatchMode( FLOAT nSegments );\r
- HRESULT WINAPI SetTransform( D3DTRANSFORMSTATETYPE State, const D3DMATRIX* pMatrix );\r
-\r
- HRESULT WINAPI SetPixelShader( LPDIRECT3DPIXELSHADER9 pShader );\r
- HRESULT WINAPI SetPixelShaderConstantB( UINT StartRegister, const BOOL* pConstantData, UINT RegisterCount );\r
- HRESULT WINAPI SetPixelShaderConstantF( UINT StartRegister, const FLOAT* pConstantData, UINT RegisterCount );\r
- HRESULT WINAPI SetPixelShaderConstantI( UINT StartRegister, const INT* pConstantData, UINT RegisterCount );\r
-\r
- HRESULT WINAPI SetVertexShader( LPDIRECT3DVERTEXSHADER9 pShader );\r
- HRESULT WINAPI SetVertexShaderConstantB( UINT StartRegister, const BOOL* pConstantData, UINT RegisterCount );\r
- HRESULT WINAPI SetVertexShaderConstantF( UINT StartRegister, const FLOAT* pConstantData, UINT RegisterCount );\r
- HRESULT WINAPI SetVertexShaderConstantI( UINT StartRegister, const INT* pConstantData, UINT RegisterCount );\r
-\r
- HRESULT WINAPI SetRenderState( D3DRENDERSTATETYPE State, DWORD Value );\r
- HRESULT WINAPI SetSamplerState( DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value );\r
- HRESULT WINAPI SetTexture( DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture );\r
- HRESULT WINAPI SetTextureStageState( DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value );\r
- };\r
- }\r
-}\r