// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. //------------------------------------------------------------------------------ // // Types declaration for SharpDX.Direct3D11 namespace. // This code was generated by a tool. // Date : 29/03/2015 20:58:23 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using System; using System.Runtime.InteropServices; using System.Security; namespace SharpDX.Direct3D11 { #pragma warning disable 419 #pragma warning disable 1587 #pragma warning disable 1574 /// /// Functions /// /// static partial class D3DX11Effects { /// ///

Creates an effect from a binary effect or file.

///
///

Blob of compiled effect data.

///

Length of the data blob.

///

No effect flags exist. Set to zero.

///

Pointer to the on which to create Effect resources.

///

Address of the newly created interface.

/// No documentation. ///

The return value is one of the values listed in Direct3D 11 Return Codes.

/// ///

Note??You must use Effects 11 source to build your effects-type application. For more info about using Effects 11 source, see Differences Between Effects 10 and Effects 11.

///
/// /// ff476273 /// HRESULT D3DX11CreateEffectFromMemory([In, Buffer] const void* pData,[In] SIZE_T DataLength,[In] unsigned int FXFlags,[In] ID3D11Device* pDevice,[Out, Fast] ID3DX11Effect** ppEffect,[In, Optional] const char* srcName) /// D3DX11CreateEffectFromMemory public static void CreateEffectFromMemory(System.IntPtr dataRef, SharpDX.PointerSize dataLength, int fXFlags, SharpDX.Direct3D11.Device deviceRef, SharpDX.Direct3D11.Effect effectOut, string srcName) { unsafe { IntPtr effectOut_ = IntPtr.Zero; IntPtr srcName_ = Utilities.StringToHGlobalAnsi(srcName); SharpDX.Result __result__; if(IntPtr.Size == 4) { __result__ = D3DX11CreateEffectFromMemory_11_1_x86(dataRef, dataLength, fXFlags, deviceRef.NativePointer, out effectOut_, srcName_); } else { __result__ = D3DX11CreateEffectFromMemory_11_1_x64(dataRef, dataLength, fXFlags, deviceRef.NativePointer, out effectOut_, srcName_); } ((SharpDX.Direct3D11.Effect)effectOut).NativePointer = effectOut_; Marshal.FreeHGlobal(srcName_); __result__.CheckError(); } } [DllImport("sharpdx_direct3d11_1_effects_x86.dll", EntryPoint = "D3DX11CreateEffectFromMemory")] private static extern SharpDX.Result D3DX11CreateEffectFromMemory_11_1_x86(IntPtr dataPointer, IntPtr dataLength, int fxFlags, IntPtr devicePtr, out IntPtr effectOut, IntPtr srcName); [DllImport("sharpdx_direct3d11_1_effects_x64.dll", EntryPoint = "D3DX11CreateEffectFromMemory")] private static extern SharpDX.Result D3DX11CreateEffectFromMemory_11_1_x64(IntPtr dataPointer, IntPtr dataLength, int fxFlags, IntPtr devicePtr, out IntPtr effectOut, IntPtr srcName); } }