2 * Copyright (c) 2007-2010 SlimDX Group
\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
\r
5 * of this software and associated documentation files (the "Software"), to deal
\r
6 * in the Software without restriction, including without limitation the rights
\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
8 * copies of the Software, and to permit persons to whom the Software is
\r
9 * furnished to do so, subject to the following conditions:
\r
11 * The above copyright notice and this permission notice shall be included in
\r
12 * all copies or substantial portions of the Software.
\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\r
26 #include "../d3dcompiler/IncludeDC.h"
\r
27 #include "../d3dcompiler/ShaderMacroDC.h"
\r
28 #include "../d3dcompiler/EnumsDC.h"
\r
30 using System::Runtime::InteropServices::OutAttribute;
\r
34 namespace Direct3D10
\r
37 ref class EffectConstantBuffer;
\r
38 ref class EffectTechnique;
\r
39 ref class EffectVariable;
\r
40 ref class EffectPool;
\r
41 value class EffectDescription;
\r
43 public ref class Effect : public ComObject
\r
45 COMOBJECT(ID3D10Effect, Effect);
\r
48 static Effect^ FromMemory_Internal( SlimDX::Direct3D10::Device^ device, const void* memory, SIZE_T size, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros, System::String^* compilationErrors );
\r
51 property EffectDescription Description
\r
53 EffectDescription get();
\r
56 property bool IsOptimized
\r
61 property bool IsPooled
\r
66 property bool IsValid
\r
71 property Device^ Device
\r
73 SlimDX::Direct3D10::Device^ get();
\r
76 EffectConstantBuffer^ GetConstantBufferByIndex( int index );
\r
77 EffectConstantBuffer^ GetConstantBufferByName( System::String^ name );
\r
79 EffectTechnique^ GetTechniqueByIndex( int index );
\r
80 EffectTechnique^ GetTechniqueByName( System::String^ name );
\r
82 EffectVariable^ GetVariableByIndex( int index );
\r
83 EffectVariable^ GetVariableByName( System::String^ name );
\r
84 EffectVariable^ GetVariableBySemantic( System::String^ name );
\r
88 static Effect^ FromFile( SlimDX::Direct3D10::Device^ device, System::String^ fileName, System::String^ profile );
\r
89 static Effect^ FromFile( SlimDX::Direct3D10::Device^ device, System::String^ fileName, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags );
\r
90 static Effect^ FromFile( SlimDX::Direct3D10::Device^ device, System::String^ fileName, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros );
\r
91 static Effect^ FromFile( SlimDX::Direct3D10::Device^ device, System::String^ fileName, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros, [Out] System::String^ %compilationErrors );
\r
93 static Effect^ FromMemory( SlimDX::Direct3D10::Device^ device, array<System::Byte>^ memory, System::String^ profile );
\r
94 static Effect^ FromMemory( SlimDX::Direct3D10::Device^ device, array<System::Byte>^ memory, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags );
\r
95 static Effect^ FromMemory( SlimDX::Direct3D10::Device^ device, array<System::Byte>^ memory, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros );
\r
96 static Effect^ FromMemory( SlimDX::Direct3D10::Device^ device, array<System::Byte>^ memory, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros, [Out] System::String^ %compilationErrors );
\r
98 static Effect^ FromStream( SlimDX::Direct3D10::Device^ device, System::IO::Stream^ stream, System::String^ profile );
\r
99 static Effect^ FromStream( SlimDX::Direct3D10::Device^ device, System::IO::Stream^ stream, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags );
\r
100 static Effect^ FromStream( SlimDX::Direct3D10::Device^ device, System::IO::Stream^ stream, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros );
\r
101 static Effect^ FromStream( SlimDX::Direct3D10::Device^ device, System::IO::Stream^ stream, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool,D3DCompiler:: Include^ include, array<D3DCompiler::ShaderMacro>^ macros, [Out] System::String^ %compilationErrors );
\r
103 static Effect^ FromString( SlimDX::Direct3D10::Device^ device, System::String^ code, System::String^ profile );
\r
104 static Effect^ FromString( SlimDX::Direct3D10::Device^ device, System::String^ code, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags );
\r
105 static Effect^ FromString( SlimDX::Direct3D10::Device^ device, System::String^ code, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros );
\r
106 static Effect^ FromString( SlimDX::Direct3D10::Device^ device, System::String^ code, System::String^ profile, D3DCompiler::ShaderFlags shaderFlags, D3DCompiler::EffectFlags effectFlags, EffectPool^ pool, D3DCompiler::Include^ include, array<D3DCompiler::ShaderMacro>^ macros, [Out] System::String^ %compilationErrors );
\r