From 07b60f2afda6236546caa8f111344bdc3892eb50 Mon Sep 17 00:00:00 2001 From: AndrewSt Date: Thu, 16 Jun 2016 22:36:27 +0300 Subject: [PATCH 1/5] [Direct3D10] return source from [c6d8e45] --- SharpDX-Desktop.sln | 7 + Source/SharpDX.Direct3D10/AssemblyDoc.cs | 32 ++ Source/SharpDX.Direct3D10/Asynchronous.cs | 78 ++++ Source/SharpDX.Direct3D10/BlendState.cs | 50 +++ Source/SharpDX.Direct3D10/BlendState1.cs | 50 +++ Source/SharpDX.Direct3D10/Buffer.cs | 254 ++++++++++++ .../SharpDX.Direct3D10/BufferDescription.cs | 43 ++ Source/SharpDX.Direct3D10/Counter.cs | 38 ++ Source/SharpDX.Direct3D10/CounterMetadata.cs | 59 +++ .../SharpDX.Direct3D10/DepthStencilState.cs | 50 +++ Source/SharpDX.Direct3D10/DepthStencilView.cs | 51 +++ .../Device.CommonShaderStage.cs | 259 ++++++++++++ .../Device.InputAssembler.cs | 53 +++ .../SharpDX.Direct3D10/Device.OutputMerger.cs | 282 +++++++++++++ .../SharpDX.Direct3D10/Device.Rasterizer.cs | 118 ++++++ .../SharpDX.Direct3D10/Device.StreamOutput.cs | 75 ++++ Source/SharpDX.Direct3D10/Device.cs | 372 +++++++++++++++++ Source/SharpDX.Direct3D10/Device1.cs | 170 ++++++++ Source/SharpDX.Direct3D10/DeviceChild.cs | 65 +++ Source/SharpDX.Direct3D10/DeviceDebug.cs | 52 +++ .../Documentation/CodeComments.xml | 26 ++ Source/SharpDX.Direct3D10/Effect.cs | 44 ++ .../SharpDX.Direct3D10/EffectBlendVariable.cs | 35 ++ .../EffectDepthStencilVariable.cs | 36 ++ .../EffectDepthStencilViewVariable.cs | 75 ++++ .../EffectMatrixVariable.cs | 250 +++++++++++ Source/SharpDX.Direct3D10/EffectPass.cs | 35 ++ .../EffectPassDescription.cs | 37 ++ .../EffectPassShaderDescription.cs | 38 ++ Source/SharpDX.Direct3D10/EffectPool.cs | 39 ++ .../EffectRasterizerVariable.cs | 36 ++ .../EffectRenderTargetViewVariable.cs | 74 ++++ .../EffectSamplerVariable.cs | 36 ++ .../EffectScalarVariable.cs | 205 +++++++++ .../EffectShaderDescription.cs | 52 +++ .../EffectShaderResourceVariable.cs | 74 ++++ .../EffectStringVariable.cs | 71 ++++ Source/SharpDX.Direct3D10/EffectVariable.cs | 267 ++++++++++++ .../EffectVectorVariable.cs | 248 +++++++++++ Source/SharpDX.Direct3D10/Font.cs | 160 +++++++ Source/SharpDX.Direct3D10/FontCharacterSet.cs | 107 +++++ Source/SharpDX.Direct3D10/FontDrawFlags.cs | 76 ++++ .../SharpDX.Direct3D10/FontPitchAndFamily.cs | 71 ++++ Source/SharpDX.Direct3D10/FontPrecision.cs | 75 ++++ Source/SharpDX.Direct3D10/FontQuality.cs | 59 +++ Source/SharpDX.Direct3D10/FontWeight.cs | 91 ++++ Source/SharpDX.Direct3D10/GeometryShader.cs | 52 +++ Source/SharpDX.Direct3D10/ImageInformation.cs | 73 ++++ .../ImageLoadInformation.cs | 46 +++ Source/SharpDX.Direct3D10/InfoQueue.cs | 70 ++++ .../InfoQueueFilterDescription.cs | 118 ++++++ Source/SharpDX.Direct3D10/InputElement.cs | 158 +++++++ Source/SharpDX.Direct3D10/InputLayout.cs | 41 ++ Source/SharpDX.Direct3D10/Mapping.xml | 390 ++++++++++++++++++ Source/SharpDX.Direct3D10/Mesh.cs | 231 +++++++++++ Source/SharpDX.Direct3D10/MeshBuffer.cs | 42 ++ Source/SharpDX.Direct3D10/Message.cs | 50 +++ Source/SharpDX.Direct3D10/NamespaceDoc.cs | 32 ++ Source/SharpDX.Direct3D10/PixelShader.cs | 38 ++ Source/SharpDX.Direct3D10/Predicate.cs | 38 ++ .../Properties/AssemblyInfo.cs | 25 ++ Source/SharpDX.Direct3D10/Query.cs | 38 ++ Source/SharpDX.Direct3D10/RaterizerState.cs | 50 +++ Source/SharpDX.Direct3D10/RenderTargetView.cs | 51 +++ Source/SharpDX.Direct3D10/Resource.cs | 268 ++++++++++++ Source/SharpDX.Direct3D10/SamplerState.cs | 50 +++ .../SharpDX.Direct3D10/ShaderResourceView.cs | 151 +++++++ .../SharpDX.Direct3D10/ShaderResourceView1.cs | 51 +++ .../SharpDX.Direct3D10.csproj | 140 +++++++ .../SharpDX.Direct3D10.nuspec | 52 +++ Source/SharpDX.Direct3D10/SkinInfo.cs | 43 ++ Source/SharpDX.Direct3D10/Sprite.cs | 59 +++ Source/SharpDX.Direct3D10/SpriteInstance.cs | 42 ++ Source/SharpDX.Direct3D10/StateBlock.cs | 41 ++ .../StreamOutputBufferBinding.cs | 62 +++ .../SharpDX.Direct3D10/StreamOutputElement.cs | 43 ++ Source/SharpDX.Direct3D10/Texture1D.cs | 94 +++++ Source/SharpDX.Direct3D10/Texture2D.cs | 130 ++++++ Source/SharpDX.Direct3D10/Texture3D.cs | 106 +++++ .../TextureLoadInformation.cs | 105 +++++ .../SharpDX.Direct3D10/VertexBufferBinding.cs | 75 ++++ Source/SharpDX.Direct3D10/VertexShader.cs | 37 ++ 82 files changed, 7567 insertions(+) create mode 100644 Source/SharpDX.Direct3D10/AssemblyDoc.cs create mode 100644 Source/SharpDX.Direct3D10/Asynchronous.cs create mode 100644 Source/SharpDX.Direct3D10/BlendState.cs create mode 100644 Source/SharpDX.Direct3D10/BlendState1.cs create mode 100644 Source/SharpDX.Direct3D10/Buffer.cs create mode 100644 Source/SharpDX.Direct3D10/BufferDescription.cs create mode 100644 Source/SharpDX.Direct3D10/Counter.cs create mode 100644 Source/SharpDX.Direct3D10/CounterMetadata.cs create mode 100644 Source/SharpDX.Direct3D10/DepthStencilState.cs create mode 100644 Source/SharpDX.Direct3D10/DepthStencilView.cs create mode 100644 Source/SharpDX.Direct3D10/Device.CommonShaderStage.cs create mode 100644 Source/SharpDX.Direct3D10/Device.InputAssembler.cs create mode 100644 Source/SharpDX.Direct3D10/Device.OutputMerger.cs create mode 100644 Source/SharpDX.Direct3D10/Device.Rasterizer.cs create mode 100644 Source/SharpDX.Direct3D10/Device.StreamOutput.cs create mode 100644 Source/SharpDX.Direct3D10/Device.cs create mode 100644 Source/SharpDX.Direct3D10/Device1.cs create mode 100644 Source/SharpDX.Direct3D10/DeviceChild.cs create mode 100644 Source/SharpDX.Direct3D10/DeviceDebug.cs create mode 100644 Source/SharpDX.Direct3D10/Documentation/CodeComments.xml create mode 100644 Source/SharpDX.Direct3D10/Effect.cs create mode 100644 Source/SharpDX.Direct3D10/EffectBlendVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectDepthStencilVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectDepthStencilViewVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectMatrixVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectPass.cs create mode 100644 Source/SharpDX.Direct3D10/EffectPassDescription.cs create mode 100644 Source/SharpDX.Direct3D10/EffectPassShaderDescription.cs create mode 100644 Source/SharpDX.Direct3D10/EffectPool.cs create mode 100644 Source/SharpDX.Direct3D10/EffectRasterizerVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectRenderTargetViewVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectSamplerVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectScalarVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectShaderDescription.cs create mode 100644 Source/SharpDX.Direct3D10/EffectShaderResourceVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectStringVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectVariable.cs create mode 100644 Source/SharpDX.Direct3D10/EffectVectorVariable.cs create mode 100644 Source/SharpDX.Direct3D10/Font.cs create mode 100644 Source/SharpDX.Direct3D10/FontCharacterSet.cs create mode 100644 Source/SharpDX.Direct3D10/FontDrawFlags.cs create mode 100644 Source/SharpDX.Direct3D10/FontPitchAndFamily.cs create mode 100644 Source/SharpDX.Direct3D10/FontPrecision.cs create mode 100644 Source/SharpDX.Direct3D10/FontQuality.cs create mode 100644 Source/SharpDX.Direct3D10/FontWeight.cs create mode 100644 Source/SharpDX.Direct3D10/GeometryShader.cs create mode 100644 Source/SharpDX.Direct3D10/ImageInformation.cs create mode 100644 Source/SharpDX.Direct3D10/ImageLoadInformation.cs create mode 100644 Source/SharpDX.Direct3D10/InfoQueue.cs create mode 100644 Source/SharpDX.Direct3D10/InfoQueueFilterDescription.cs create mode 100644 Source/SharpDX.Direct3D10/InputElement.cs create mode 100644 Source/SharpDX.Direct3D10/InputLayout.cs create mode 100644 Source/SharpDX.Direct3D10/Mapping.xml create mode 100644 Source/SharpDX.Direct3D10/Mesh.cs create mode 100644 Source/SharpDX.Direct3D10/MeshBuffer.cs create mode 100644 Source/SharpDX.Direct3D10/Message.cs create mode 100644 Source/SharpDX.Direct3D10/NamespaceDoc.cs create mode 100644 Source/SharpDX.Direct3D10/PixelShader.cs create mode 100644 Source/SharpDX.Direct3D10/Predicate.cs create mode 100644 Source/SharpDX.Direct3D10/Properties/AssemblyInfo.cs create mode 100644 Source/SharpDX.Direct3D10/Query.cs create mode 100644 Source/SharpDX.Direct3D10/RaterizerState.cs create mode 100644 Source/SharpDX.Direct3D10/RenderTargetView.cs create mode 100644 Source/SharpDX.Direct3D10/Resource.cs create mode 100644 Source/SharpDX.Direct3D10/SamplerState.cs create mode 100644 Source/SharpDX.Direct3D10/ShaderResourceView.cs create mode 100644 Source/SharpDX.Direct3D10/ShaderResourceView1.cs create mode 100644 Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj create mode 100644 Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec create mode 100644 Source/SharpDX.Direct3D10/SkinInfo.cs create mode 100644 Source/SharpDX.Direct3D10/Sprite.cs create mode 100644 Source/SharpDX.Direct3D10/SpriteInstance.cs create mode 100644 Source/SharpDX.Direct3D10/StateBlock.cs create mode 100644 Source/SharpDX.Direct3D10/StreamOutputBufferBinding.cs create mode 100644 Source/SharpDX.Direct3D10/StreamOutputElement.cs create mode 100644 Source/SharpDX.Direct3D10/Texture1D.cs create mode 100644 Source/SharpDX.Direct3D10/Texture2D.cs create mode 100644 Source/SharpDX.Direct3D10/Texture3D.cs create mode 100644 Source/SharpDX.Direct3D10/TextureLoadInformation.cs create mode 100644 Source/SharpDX.Direct3D10/VertexBufferBinding.cs create mode 100644 Source/SharpDX.Direct3D10/VertexShader.cs diff --git a/SharpDX-Desktop.sln b/SharpDX-Desktop.sln index aace7bcea..323b3ab08 100644 --- a/SharpDX-Desktop.sln +++ b/SharpDX-Desktop.sln @@ -88,6 +88,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Direct3D12", "Sourc EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Desktop", "Source\SharpDX.Desktop\SharpDX.Desktop.csproj", "{5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Direct3D10", "Source\SharpDX.Direct3D10\SharpDX.Direct3D10.csproj", "{618AFA87-81A8-4B1C-8876-5457D49F2DEF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -193,6 +195,10 @@ Global {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Release|Any CPU.Build.0 = Release|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -223,5 +229,6 @@ Global {49E4485F-3A2A-4C35-A159-12ECCFC00396} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {E5BB5D1C-6C07-495B-923B-FB80B79C535E} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} + {618AFA87-81A8-4B1C-8876-5457D49F2DEF} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} EndGlobalSection EndGlobal diff --git a/Source/SharpDX.Direct3D10/AssemblyDoc.cs b/Source/SharpDX.Direct3D10/AssemblyDoc.cs new file mode 100644 index 000000000..5203a43e9 --- /dev/null +++ b/Source/SharpDX.Direct3D10/AssemblyDoc.cs @@ -0,0 +1,32 @@ +// 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. +namespace SharpDX.Direct3D10 +{ + /// + /// The assembly provides managed Direct3D10 API. + /// + /// bb205066 + /// Direct3D10 + /// Direct3D10 + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + class AssemblyDoc + { + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Asynchronous.cs b/Source/SharpDX.Direct3D10/Asynchronous.cs new file mode 100644 index 000000000..748f97f33 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Asynchronous.cs @@ -0,0 +1,78 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class Asynchronous + { + + /// + /// Get data from the GPU asynchronously. + /// + /// + /// GetData retrieves the data collected between calls to and . Certain queries only require a call to ID3D10Asynchronous::End in which case the data returned by GetData is accurate up to the last call to ID3D10Asynchronous::End (See ). If DataSize is 0, GetData is only used to check status where a return value of S_OK indicates that data is available to give to an application, and a return value of S_FALSE indicates data is not yet available. It is invalid to invoke this function on a predicate created with the flag D3D10_QUERY_MISCFLAG_PREDICATEHINT. If the asynchronous interface that calls this function is , then the following table applies. Query TypeOutput Data TypeSupports Begin Method EVENTBOOLNO OCCLUSIONUINT64YES TIMESTAMPUINT64NO TIMESTAMP_DISJOINTQUERYDATA_TIMESTAMP_DISJOINTYES PIPELINE_STATISTICSQUERYDATA_PIPELINE_STATISTICSYES OCCLUSION_PREDICATEBOOLYES SO_STATISTICSQUERYDATA_SO_STATISTICSYES SO_OVERFLOW_PREDICATEBOOLYES ? If the asynchronous interface that calls this API is , then the following applies. Counter TypeOutput Data TypeUnits GPU_IDLEFLOAT32fraction of time VERTEX_PROCESSINGFLOAT32fraction of time GEOMETRY_PROCESSINGFLOAT32fraction of time PIXEL_PROCESSINGFLOAT32fraction of time OTHER_GPU_PROCESSINGFLOAT32fraction of time HOST_ADAPTER_BANDWIDTH_UTILIZATIONFLOAT32fraction of theoretical maximum LOCAL_VIDMEM_BANDWIDTH_UTILIZATIONFLOAT32fraction of theoretical maximum VERTEX_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum TRISETUP_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum FILLRATE_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum VERTEXSHADER_MEMORY_LIMITEDFLOAT32fraction of time VERTEXSHADER_COMPUTATION_LIMITEDFLOAT32fraction of time GEOMETRYSHADER_MEMORY_LIMITEDFLOAT32fraction of time GEOMETRYSHADER_COMPUTATION_LIMITEDFLOAT32fraction of time PIXELSHADER_MEMORY_LIMITEDFLOAT32fraction of time PIXELSHADER_COMPUTATION_LIMITEDFLOAT32fraction of time POST_TRANSFORM_CACHE_HIT_RATEFLOAT32fraction TEXTURE_CACHE_HIT_RATEFLOAT32fraction ? The value returned by a GPU_IDLE, VERTEX_PROCESSING, GEOMETRY_PROCESSING, PIXEL_PROCESSING, or OTHER_GPU_PROCESSING counter may be different depending on the number of parallel counters that exist on a video card, and those values can be interpreted with the following equation: ? Equation to interpret the number of parallel counters ? The number of parallel counters that a video card has is available from NumDetectableParallelUnits in , and it can be retrieved by calling . + /// + /// If this function succeeds, returns a containing the asynchronous data sent from the GPU. + /// HRESULT ID3D10Asynchronous::GetData([Out, Buffer, Optional] void* pData,[In] int DataSize,[In] int GetDataFlags) + public DataStream GetData() + { + return GetData(AsynchronousFlags.None); + } + + /// + /// Get data from the GPU asynchronously. + /// + /// + /// GetData retrieves the data collected between calls to and . Certain queries only require a call to ID3D10Asynchronous::End in which case the data returned by GetData is accurate up to the last call to ID3D10Asynchronous::End (See ). If DataSize is 0, GetData is only used to check status where a return value of S_OK indicates that data is available to give to an application, and a return value of S_FALSE indicates data is not yet available. It is invalid to invoke this function on a predicate created with the flag D3D10_QUERY_MISCFLAG_PREDICATEHINT. If the asynchronous interface that calls this function is , then the following table applies. Query TypeOutput Data TypeSupports Begin Method EVENTBOOLNO OCCLUSIONUINT64YES TIMESTAMPUINT64NO TIMESTAMP_DISJOINTQUERYDATA_TIMESTAMP_DISJOINTYES PIPELINE_STATISTICSQUERYDATA_PIPELINE_STATISTICSYES OCCLUSION_PREDICATEBOOLYES SO_STATISTICSQUERYDATA_SO_STATISTICSYES SO_OVERFLOW_PREDICATEBOOLYES ? If the asynchronous interface that calls this API is , then the following applies. Counter TypeOutput Data TypeUnits GPU_IDLEFLOAT32fraction of time VERTEX_PROCESSINGFLOAT32fraction of time GEOMETRY_PROCESSINGFLOAT32fraction of time PIXEL_PROCESSINGFLOAT32fraction of time OTHER_GPU_PROCESSINGFLOAT32fraction of time HOST_ADAPTER_BANDWIDTH_UTILIZATIONFLOAT32fraction of theoretical maximum LOCAL_VIDMEM_BANDWIDTH_UTILIZATIONFLOAT32fraction of theoretical maximum VERTEX_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum TRISETUP_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum FILLRATE_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum VERTEXSHADER_MEMORY_LIMITEDFLOAT32fraction of time VERTEXSHADER_COMPUTATION_LIMITEDFLOAT32fraction of time GEOMETRYSHADER_MEMORY_LIMITEDFLOAT32fraction of time GEOMETRYSHADER_COMPUTATION_LIMITEDFLOAT32fraction of time PIXELSHADER_MEMORY_LIMITEDFLOAT32fraction of time PIXELSHADER_COMPUTATION_LIMITEDFLOAT32fraction of time POST_TRANSFORM_CACHE_HIT_RATEFLOAT32fraction TEXTURE_CACHE_HIT_RATEFLOAT32fraction ? The value returned by a GPU_IDLE, VERTEX_PROCESSING, GEOMETRY_PROCESSING, PIXEL_PROCESSING, or OTHER_GPU_PROCESSING counter may be different depending on the number of parallel counters that exist on a video card, and those values can be interpreted with the following equation: ? Equation to interpret the number of parallel counters ? The number of parallel counters that a video card has is available from NumDetectableParallelUnits in , and it can be retrieved by calling . + /// + /// Optional flags. Can be 0 or any combination of the flags enumerated by . + /// If this function succeeds, returns a containing the asynchronous data sent from the GPU. + /// HRESULT ID3D10Asynchronous::GetData([Out, Buffer, Optional] void* pData,[In] int DataSize,[In] int GetDataFlags) + public DataStream GetData(AsynchronousFlags flags) + { + int dataSize = GetDataSize(); + DataStream dataStream = new DataStream(dataSize, true, true); + try + { + GetData(dataStream.DataPointer, dataSize, (int)flags); + } + catch (Exception) + { + dataStream.Dispose(); + throw; + } + return dataStream; + } + + /// + /// Gets a value indicating whether or not data is available for consumption. + /// + public bool IsDataAvailable + { + get + { + // http://msdn.microsoft.com/en-us/library/windows/desktop/bb173503%28v=vs.85%29.aspx + // any result other than S_OK will indicate that there is no data available. + return GetData(IntPtr.Zero, 0, 0) == Result.Ok; + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/BlendState.cs b/Source/SharpDX.Direct3D10/BlendState.cs new file mode 100644 index 000000000..f78c93fc8 --- /dev/null +++ b/Source/SharpDX.Direct3D10/BlendState.cs @@ -0,0 +1,50 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class BlendState + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public BlendState(Device device, BlendStateDescription description) + : base(IntPtr.Zero) + { + device.CreateBlendState(ref description, this); + } + + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public BlendState(Device device, ref BlendStateDescription description) + : base(IntPtr.Zero) + { + device.CreateBlendState(ref description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/BlendState1.cs b/Source/SharpDX.Direct3D10/BlendState1.cs new file mode 100644 index 000000000..068c74909 --- /dev/null +++ b/Source/SharpDX.Direct3D10/BlendState1.cs @@ -0,0 +1,50 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class BlendState1 + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public BlendState1(Device1 device, BlendStateDescription1 description) + : base(IntPtr.Zero) + { + device.CreateBlendState1(ref description, this); + } + + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public BlendState1(Device1 device, ref BlendStateDescription1 description) + : base(IntPtr.Zero) + { + device.CreateBlendState1(ref description, this); + } + } +} diff --git a/Source/SharpDX.Direct3D10/Buffer.cs b/Source/SharpDX.Direct3D10/Buffer.cs new file mode 100644 index 000000000..afba2012f --- /dev/null +++ b/Source/SharpDX.Direct3D10/Buffer.cs @@ -0,0 +1,254 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class Buffer + { + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the buffer. + /// The description of the buffer. + public Buffer(Device device, BufferDescription description) + : base(IntPtr.Zero) + { + device.CreateBuffer(ref description, null, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the buffer. + /// Initial data used to initialize the buffer. + /// The description of the buffer. + public Buffer(Device device, DataStream data, BufferDescription description) + : base(IntPtr.Zero) + { + device.CreateBuffer(ref description, new DataBox(data.PositionPointer, 0, 0), this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the buffer. + /// The size, in bytes, of the buffer. + /// The usage pattern for the buffer. + /// Flags specifying how the buffer will be bound to the pipeline. + /// Flags specifying how the buffer will be accessible from the CPU. + /// Miscellaneous resource options. + public Buffer(Device device, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, + CpuAccessFlags accessFlags, ResourceOptionFlags optionFlags) + : base(IntPtr.Zero) + { + var description = new BufferDescription() + { + BindFlags = bindFlags, + CpuAccessFlags = accessFlags, + OptionFlags = optionFlags, + SizeInBytes = sizeInBytes, + Usage = usage, + }; + + device.CreateBuffer(ref description, null, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the buffer. + /// Initial data used to initialize the buffer. + /// The size, in bytes, of the buffer. + /// The usage pattern for the buffer. + /// Flags specifying how the buffer will be bound to the pipeline. + /// Flags specifying how the buffer will be accessible from the CPU. + /// Miscellaneous resource options. + public Buffer(Device device, DataStream data, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, + CpuAccessFlags accessFlags, ResourceOptionFlags optionFlags) + : base(IntPtr.Zero) + { + var description = new BufferDescription() + { + BindFlags = bindFlags, + CpuAccessFlags = accessFlags, + OptionFlags = optionFlags, + SizeInBytes = sizeInBytes, + Usage = usage, + }; + device.CreateBuffer(ref description, new DataBox(data.PositionPointer, 0, 0), this); + } + + /// + /// Get a reference to the data contained in the resource and deny GPU access to the resource. + /// + /// + /// For the CPU to write the contents of a resource, the resource must be created with the dynamic usage flag, D3D10_USAGE_DYNAMIC. To both read and write those contents, the resource must be created with the staging usage flag, D3D10_USAGE_STAGING. (For more information about these flags, see .) ID3D10Buffer::Map will retrieve a reference to the resource data. For a discussion on how to access resources efficiently, see {{Copying and Accessing Resource Data (Direct3D 10)}}. Call to signify that the application has finished accessing the resource. ID3D10Buffer::Map has a few other restrictions. For example: The same buffer cannot be mapped multiple times; in other words, do not call ID3D10Buffer::Map on a buffer that is already mapped. Any buffer that is bound to the pipeline must be unmapped before any rendering operation (that is, ) can be executed. Differences between Direct3D 9 and Direct3D 10: ID3D10Buffer::Map in Direct3D 10 is analogous to resource {{Lock}} in Direct3D 9. ? + /// + /// Flag that specifies the CPU's permissions for the reading and writing of a resource. For possible values, see . + /// If this function succeeds returns a with the size this buffer. + /// HRESULT ID3D10Buffer::Map([In] D3D10_MAP MapType,[In] int MapFlags,[Out] void** ppData) + public DataStream Map(SharpDX.Direct3D10.MapMode mapType) + { + return Map(mapType, MapFlags.None); + } + + /// + /// Get a reference to the data contained in the resource and deny GPU access to the resource. + /// + /// + /// For the CPU to write the contents of a resource, the resource must be created with the dynamic usage flag, D3D10_USAGE_DYNAMIC. To both read and write those contents, the resource must be created with the staging usage flag, D3D10_USAGE_STAGING. (For more information about these flags, see .) ID3D10Buffer::Map will retrieve a reference to the resource data. For a discussion on how to access resources efficiently, see {{Copying and Accessing Resource Data (Direct3D 10)}}. Call to signify that the application has finished accessing the resource. ID3D10Buffer::Map has a few other restrictions. For example: The same buffer cannot be mapped multiple times; in other words, do not call ID3D10Buffer::Map on a buffer that is already mapped. Any buffer that is bound to the pipeline must be unmapped before any rendering operation (that is, ) can be executed. Differences between Direct3D 9 and Direct3D 10: ID3D10Buffer::Map in Direct3D 10 is analogous to resource {{Lock}} in Direct3D 9. ? + /// + /// Flag that specifies the CPU's permissions for the reading and writing of a resource. For possible values, see . + /// Flag that specifies what the CPU should do when the GPU is busy (see ). This flag is optional. + /// If this function succeeds returns a with the size this buffer. + /// HRESULT ID3D10Buffer::Map([In] D3D10_MAP MapType,[In] int MapFlags,[Out] void** ppData) + public DataStream Map(SharpDX.Direct3D10.MapMode mode, SharpDX.Direct3D10.MapFlags mapFlags) + { + int sizeInBytes = Description.SizeInBytes; + IntPtr data; + Map(mode, mapFlags, out data); + bool canRead = mode == MapMode.Read || mode == MapMode.ReadWrite; + bool canWrite = mode != MapMode.Read; + return new DataStream(data, sizeInBytes, canRead, canWrite); + } + + + /// + /// Creates a new instance of the class. + /// + /// Type of the data to upload + /// The device with which to associate the buffer. + /// Flags specifying how the buffer will be bound to the pipeline. + /// Initial data used to initialize the buffer. + /// The size, in bytes, of the buffer. If 0 is specified, sizeof(T) is used. + /// The usage pattern for the buffer. + /// Flags specifying how the buffer will be accessible from the CPU. + /// Miscellaneous resource options. + /// The size (in bytes) of the structure element for structured buffers. + /// An initialized buffer + public static Buffer Create( + Device device, + BindFlags bindFlags, + ref T data, + int sizeInBytes = 0, + ResourceUsage usage = ResourceUsage.Default, + CpuAccessFlags accessFlags = CpuAccessFlags.None, + ResourceOptionFlags optionFlags = ResourceOptionFlags.None, + int structureByteStride = 0) + where T : struct + { + var buffer = new Buffer(IntPtr.Zero); + + var description = new BufferDescription() + { + BindFlags = bindFlags, + CpuAccessFlags = accessFlags, + OptionFlags = optionFlags, + SizeInBytes = sizeInBytes == 0 ? Utilities.SizeOf() : sizeInBytes, + Usage = usage, + }; + + unsafe + { + device.CreateBuffer(ref description, new DataBox((IntPtr)Interop.Fixed(ref data)), buffer); + } + return buffer; + } + + /// + /// Creates a new instance of the class. + /// + /// Type of the data to upload + /// The device with which to associate the buffer. + /// Flags specifying how the buffer will be bound to the pipeline. + /// Initial data used to initialize the buffer. + /// The size, in bytes, of the buffer. If 0 is specified, sizeof(T) is used. + /// The usage pattern for the buffer. + /// Flags specifying how the buffer will be accessible from the CPU. + /// Miscellaneous resource options. + /// The size (in bytes) of the structure element for structured buffers. + /// An initialized buffer + public static Buffer Create(Device device, BindFlags bindFlags, T[] data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceOptionFlags optionFlags = ResourceOptionFlags.None, int structureByteStride = 0) where T : struct + { + var buffer = new Buffer(IntPtr.Zero); + + var description = new BufferDescription() + { + BindFlags = bindFlags, + CpuAccessFlags = accessFlags, + OptionFlags = optionFlags, + SizeInBytes = sizeInBytes == 0 ? Utilities.SizeOf() * data.Length : sizeInBytes, + Usage = usage, + }; + + unsafe + { + device.CreateBuffer(ref description, new DataBox((IntPtr)Interop.Fixed(data)), buffer); + } + return buffer; + } + + /// + /// Creates a new instance of the class. + /// + /// Type of the data to upload + /// The device with which to associate the buffer. + /// Initial data used to initialize the buffer. + /// The description. + /// + /// An initialized buffer + /// + public static Buffer Create(Device device, ref T data, BufferDescription description) where T : struct + { + var buffer = new Buffer(IntPtr.Zero); + unsafe + { + if (description.SizeInBytes == 0) + description.SizeInBytes = Utilities.SizeOf(); + + device.CreateBuffer(ref description, new DataBox((IntPtr)Interop.Fixed(ref data)), buffer); + } + return buffer; + } + + /// + /// Creates a new instance of the class. + /// + /// Type of the data to upload + /// The device with which to associate the buffer. + /// Initial data used to initialize the buffer. + /// The description. + /// + /// An initialized buffer + /// + public static Buffer Create(Device device, T[] data, BufferDescription description) where T : struct + { + var buffer = new Buffer(IntPtr.Zero); + unsafe + { + if (description.SizeInBytes == 0) + description.SizeInBytes = Utilities.SizeOf() * data.Length; + device.CreateBuffer(ref description, new DataBox((IntPtr)Interop.Fixed(data)), buffer); + } + return buffer; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/BufferDescription.cs b/Source/SharpDX.Direct3D10/BufferDescription.cs new file mode 100644 index 000000000..b09dcaa1b --- /dev/null +++ b/Source/SharpDX.Direct3D10/BufferDescription.cs @@ -0,0 +1,43 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial struct BufferDescription + { + /// + /// Initializes a new instance of the struct. + /// + /// The size in bytes. + /// The usage. + /// The bind flags. + /// The CPU access flags. + /// The option flags. + public BufferDescription(int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags cpuAccessFlags, ResourceOptionFlags optionFlags) + { + SizeInBytes = sizeInBytes; + Usage = usage; + BindFlags = bindFlags; + CpuAccessFlags = cpuAccessFlags; + OptionFlags = optionFlags; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Counter.cs b/Source/SharpDX.Direct3D10/Counter.cs new file mode 100644 index 000000000..f41b48187 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Counter.cs @@ -0,0 +1,38 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class Counter + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The counter description. + /// The newly created object. + public Counter(Device device, CounterDescription description) + : base(IntPtr.Zero) + { + device.CreateCounter(description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/CounterMetadata.cs b/Source/SharpDX.Direct3D10/CounterMetadata.cs new file mode 100644 index 000000000..a66a0a8f5 --- /dev/null +++ b/Source/SharpDX.Direct3D10/CounterMetadata.cs @@ -0,0 +1,59 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Counter metadata that contains the type, name, units of measure, and a description of an existing counter. + /// + public partial class CounterMetadata + { + /// + /// Gets the data type of a counter (see ). + /// + /// The type. + public CounterType Type { get; internal set;} + + /// + /// Gets the number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters. + /// + /// The hardware counter count. + public int HardwareCounterCount { get; internal set; } + + /// + /// Gets a brief name for the counter. + /// + /// The name. + public string Name { get; internal set; } + + /// + /// Gets the units a counter measures. + /// + /// The units. + public string Units { get; internal set; } + + /// + /// Gets a description of the counter. + /// + /// The description. + public string Description { get; internal set; } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/DepthStencilState.cs b/Source/SharpDX.Direct3D10/DepthStencilState.cs new file mode 100644 index 000000000..a260a1e63 --- /dev/null +++ b/Source/SharpDX.Direct3D10/DepthStencilState.cs @@ -0,0 +1,50 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class DepthStencilState + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public DepthStencilState(Device device, DepthStencilStateDescription description) + : base(IntPtr.Zero) + { + device.CreateDepthStencilState(ref description, this); + } + + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public DepthStencilState(Device device, ref DepthStencilStateDescription description) + : base(IntPtr.Zero) + { + device.CreateDepthStencilState(ref description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/DepthStencilView.cs b/Source/SharpDX.Direct3D10/DepthStencilView.cs new file mode 100644 index 000000000..3cb6d5513 --- /dev/null +++ b/Source/SharpDX.Direct3D10/DepthStencilView.cs @@ -0,0 +1,51 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class DepthStencilView + { + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the DepthStencil flag. + /// ID3D10Device::CreateDepthStencilView + public DepthStencilView(Device device, Resource resource) + : base(IntPtr.Zero) + { + device.CreateDepthStencilView(resource, null, this); + } + + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the DepthStencil flag. + /// A structure describing the to be created. + /// ID3D10Device::CreateDepthStencilView + public DepthStencilView(Device device, Resource resource, DepthStencilViewDescription description) + : base(IntPtr.Zero) + { + device.CreateDepthStencilView(resource, description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device.CommonShaderStage.cs b/Source/SharpDX.Direct3D10/Device.CommonShaderStage.cs new file mode 100644 index 000000000..a87f30b57 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device.CommonShaderStage.cs @@ -0,0 +1,259 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Common Shader class. Provides a common set of methods for a Shader Stage. + /// TODO: check if usage of abstract is not introducing an unacceptable overhead... + /// + /// Type of the shader + public abstract class CommonShaderStage : CppObject + where T : ComObject + { + + /// + /// Maximum number of bindable constant buffers to a pipeline stage. + /// + public const int MaximumConstantBufferSlotCount = 14; + + /// + /// Maximum number of bindable resources to a pipeline stage. + /// + public const int MaximumResourceSlotCount = 128; + + /// + /// Maximum number of bindable samplers to a pipeline stage. + /// + public const int MaximumSamplerSlotCount = 16; + + /// + /// Initializes a new instance of the class. + /// + /// The pointer. + protected CommonShaderStage(IntPtr pointer) + : base(pointer) + { + } + + /// + /// Gets the constant buffers used by the shader stage. + /// + /// Index into the device's zero-based array from which to begin retrieving constant buffers. + /// Number of buffers to retrieve. + /// An array of constant buffers. + public Buffer[] GetConstantBuffers(int startSlot, int count) + { + var buffers = new Buffer[count]; + GetConstantBuffers(startSlot, count, buffers); + return buffers; + } + + /// + /// Gets the sampler states used by the shader stage. + /// + /// Index into the device's zero-based array from which to begin retrieving samplers. + /// Number of samplers to retrieve. + /// An array of sampler states. + public SamplerState[] GetSamplers(int startSlot, int count) + { + var buffers = new SamplerState[count]; + GetSamplers(startSlot, count, buffers); + return buffers; + } + + /// + /// Gets the shader resources used by the shader stage. + /// + /// Index into the device's zero-based array from which to begin retrieving shader resources. + /// Number of resources to retrieve. + /// An array of shader resources. + public ShaderResourceView[] GetShaderResources(int startSlot, int count) + { + var buffers = new ShaderResourceView[count]; + GetShaderResources(startSlot, count, buffers); + return buffers; + } + + /// + /// Sets a single constant buffer to be used by the shader stage. + /// + /// Index into the device's zero-based array to which to set the constant buffer. + /// constant buffer to set + public void SetConstantBuffer(int slot, Buffer constantBuffer) + { + SetConstantBuffers(slot, 1, new[] { constantBuffer }); + } + + /// + /// Sets a single sampler to be used by the shader stage. + /// + /// Index into the device's zero-based array to which to set the sampler. + /// sampler state to set + public void SetSampler(int slot, SamplerState sampler) + { + SetSamplers(slot, 1, new[] { sampler }); + } + + /// + /// Sets a single shader resource to be used by the shader stage. + /// + /// Index into the device's zero-based array to which to set the resource. + /// Resource view to attach + public void SetShaderResource(int slot, ShaderResourceView resourceView) + { + SetShaderResources(slot, 1, new[] { resourceView }); + } + + + /// + /// Get the shader resources. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1). + /// The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot). + /// Array of {{shader resource view}} interfaces to be returned by the device. + /// void PSGetShaderResources([In] UINT StartSlot,[In] UINT NumViews,[Out, Buffer] ID3D10ShaderResourceView** ppShaderResourceViews) + internal abstract void GetShaderResources( + int startSlot, + int numViews, + SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsRef); + + /// + /// Get an array of sampler states from the shader pipeline stage. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Index into a zero-based array to begin getting samplers from (ranges from 0 to D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1). + /// Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot). + /// Array of sampler-state interface pointers (see ) to be returned by the device. + /// void PSGetSamplers([In] UINT StartSlot,[In] UINT NumSamplers,[Out, Buffer] ID3D10SamplerState** ppSamplers) + internal abstract void GetSamplers( + int startSlot, + int numSamplers, + SharpDX.Direct3D10.SamplerState[] samplersRef); + + /// + /// Get the constant buffers used by the shader pipeline stage. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1). + /// Number of buffers to retrieve (ranges from 0 to D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot). + /// Array of constant buffer interface pointers (see ) to be returned by the method. + /// void PSGetConstantBuffers([In] UINT StartSlot,[In] UINT NumBuffers,[Out, Buffer] ID3D10Buffer** ppConstantBuffers) + internal abstract void GetConstantBuffers( + int startSlot, + int numBuffers, + SharpDX.Direct3D10.Buffer[] constantBuffersRef); + + /// + /// Bind an array of shader resources to the shader stage. + /// + /// + /// If an overlapping resource view is already bound to an output slot, such as a render target, then this API will fill the destination shader resource slot with NULL.For information about creating shader-resource views, see . The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. + /// + /// Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1). + /// Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot). + /// Array of {{shader resource view}} interfaces to set to the device. + /// void PSSetShaderResources([In] UINT StartSlot,[In] UINT NumViews,[In, Buffer] const ID3D10ShaderResourceView** ppShaderResourceViews) + public abstract void SetShaderResources( + int startSlot, + int numViews, + SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsRef); + + /// + /// Bind an array of shader resources to the shader stage. + /// + /// + /// If an overlapping resource view is already bound to an output slot, such as a render target, then this API will fill the destination shader resource slot with NULL.For information about creating shader-resource views, see . The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. + /// + /// Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1). + /// Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot). + /// Array of {{shader resource view}} interfaces to set to the device. + /// void PSSetShaderResources([In] UINT StartSlot,[In] UINT NumViews,[In, Buffer] const ID3D10ShaderResourceView** ppShaderResourceViews) + public abstract void SetShaderResources( + int startSlot, + int numViews, + SharpDX.ComArray shaderResourceViewsRef); + + /// + /// Set an array of sampler states to the shader pipeline stage. + /// + /// + /// Any sampler may be set to NULL; this invokes the default state, which is defined to be the following.StateDefault ValueFilterD3D10_FILTER_MIN_MAG_MIP_LINEARAddressUD3D10_TEXTURE_ADDRESS_CLAMPAddressVD3D10_TEXTURE_ADDRESS_CLAMPAddressWD3D10_TEXTURE_ADDRESS_CLAMPMipLODBias0MaxAnisotropy1ComparisonFuncD3D10_COMPARISON_NEVERBorderColor[0]1.0fBorderColor[1]1.0fBorderColor[2]1.0fBorderColor[3]1.0fMinLOD-FLT_MAXMaxLODFLT_MAX The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. + /// + /// Index into the device's zero-based array to begin setting samplers to (ranges from 0 to D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1). + /// Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot). + /// Pointer to an array of sampler-state interfaces (see ). See Remarks. + /// void PSSetSamplers([In] UINT StartSlot,[In] UINT NumSamplers,[In, Buffer] const ID3D10SamplerState** ppSamplers) + public abstract void SetSamplers( + int startSlot, + int numSamplers, + SharpDX.Direct3D10.SamplerState[] samplersRef); + + /// + /// Set an array of sampler states to the shader pipeline stage. + /// + /// + /// Any sampler may be set to NULL; this invokes the default state, which is defined to be the following.StateDefault ValueFilterD3D10_FILTER_MIN_MAG_MIP_LINEARAddressUD3D10_TEXTURE_ADDRESS_CLAMPAddressVD3D10_TEXTURE_ADDRESS_CLAMPAddressWD3D10_TEXTURE_ADDRESS_CLAMPMipLODBias0MaxAnisotropy1ComparisonFuncD3D10_COMPARISON_NEVERBorderColor[0]1.0fBorderColor[1]1.0fBorderColor[2]1.0fBorderColor[3]1.0fMinLOD-FLT_MAXMaxLODFLT_MAX The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. + /// + /// Index into the device's zero-based array to begin setting samplers to (ranges from 0 to D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - 1). + /// Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot). + /// Pointer to an array of sampler-state interfaces (see ). See Remarks. + /// void PSSetSamplers([In] UINT StartSlot,[In] UINT NumSamplers,[In, Buffer] const ID3D10SamplerState** ppSamplers) + public abstract void SetSamplers( + int startSlot, + int numSamplers, + SharpDX.ComArray samplersRef); + + /// + /// Set the constant buffers used by the shader pipeline stage. + /// + /// + /// The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. + /// + /// Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1). + /// Number of buffers to set (ranges from 0 to D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot). + /// Array of constant buffers (see ) being given to the device. + /// void PSSetConstantBuffers([In] UINT StartSlot,[In] UINT NumBuffers,[In, Buffer] const ID3D10Buffer** ppConstantBuffers) + public abstract void SetConstantBuffers( + int startSlot, + int numBuffers, + SharpDX.Direct3D10.Buffer[] constantBuffersRef); + + /// + /// Set the constant buffers used by the shader pipeline stage. + /// + /// + /// The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. + /// + /// Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1). + /// Number of buffers to set (ranges from 0 to D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot). + /// Array of constant buffers (see ) being given to the device. + /// void PSSetConstantBuffers([In] UINT StartSlot,[In] UINT NumBuffers,[In, Buffer] const ID3D10Buffer** ppConstantBuffers) + public abstract void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.ComArray constantBuffersRef); + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device.InputAssembler.cs b/Source/SharpDX.Direct3D10/Device.InputAssembler.cs new file mode 100644 index 000000000..d280a29be --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device.InputAssembler.cs @@ -0,0 +1,53 @@ +// 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. +namespace SharpDX.Direct3D10 +{ + public partial class InputAssemblerStage + { + /// + /// Binds a single vertex buffer to the input assembler. + /// + /// Index of the slot to which to bind the vertex buffer. + /// A binding for the input vertex buffer. + public void SetVertexBuffers(int slot, VertexBufferBinding vertexBufferBinding) + { + SetVertexBuffers(slot, new[] { vertexBufferBinding }); + } + + /// + /// Binds an array of vertex buffers to the input assembler. + /// + /// Index of the first input slot to use for binding. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. There are 16 input slots. + /// An array of bindings for input vertex buffers. + public void SetVertexBuffers(int firstSlot, params VertexBufferBinding[] vertexBufferBindings) + { + Buffer[] vertexBuffers = new Buffer[vertexBufferBindings.Length]; + int[] strides = new int[vertexBufferBindings.Length]; + int[] offsets = new int[vertexBufferBindings.Length]; + for (int i = 0; i < vertexBufferBindings.Length; i++) + { + vertexBuffers[i] = vertexBufferBindings[i].Buffer; + strides[i] = vertexBufferBindings[i].Stride; + offsets[i] = vertexBufferBindings[i].Offset; + } + SetVertexBuffers(firstSlot, vertexBufferBindings.Length, vertexBuffers, strides, offsets); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device.OutputMerger.cs b/Source/SharpDX.Direct3D10/Device.OutputMerger.cs new file mode 100644 index 000000000..16d76a77a --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device.OutputMerger.cs @@ -0,0 +1,282 @@ +// 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. + +using System; +using SharpDX; +using SharpDX.Mathematics.Interop; + +namespace SharpDX.Direct3D10 +{ + public partial class OutputMergerStage + { + /// + /// Get references to the render targets that are available to the {{output-merger stage}}. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// a depth-stencil view (see ) to be filled with the depth-stencil information from the device. + /// void OMGetRenderTargets([In] int NumViews,[Out, Buffer, Optional] ID3D10RenderTargetView** ppRenderTargetViews,[Out, Optional] ID3D10DepthStencilView** ppDepthStencilView) + public void GetRenderTargets(out SharpDX.Direct3D10.DepthStencilView depthStencilViewRef) + { + GetRenderTargets(0, new RenderTargetView[0], out depthStencilViewRef); + } + + /// + /// Get references to the render targets that are available to the {{output-merger stage}}. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Number of render targets to retrieve. + /// an array of render targets views (see ) to be filled with the render targets from the device. + /// void OMGetRenderTargets([In] int NumViews,[Out, Buffer, Optional] ID3D10RenderTargetView** ppRenderTargetViews,[Out, Optional] ID3D10DepthStencilView** ppDepthStencilView) + public SharpDX.Direct3D10.RenderTargetView[] GetRenderTargets(int numViews) + { + var renderTargets = new RenderTargetView[numViews]; + DepthStencilView depthStencilView; + GetRenderTargets(numViews, renderTargets, out depthStencilView); + if (depthStencilView != null) + depthStencilView.Dispose(); + return renderTargets; + } + + /// + /// Get references to the render targets and the depth-stencil buffer that are available to the {{output-merger stage}}. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Number of render targets to retrieve. + /// Pointer to a depth-stencil view (see ) to be filled with the depth-stencil information from the device. + /// an array of render targets views (see ) to be filled with the render targets from the device. + /// void OMGetRenderTargets([In] int NumViews,[Out, Buffer, Optional] ID3D10RenderTargetView** ppRenderTargetViews,[Out, Optional] ID3D10DepthStencilView** ppDepthStencilView) + public SharpDX.Direct3D10.RenderTargetView[] GetRenderTargets(int numViews, out SharpDX.Direct3D10.DepthStencilView depthStencilViewRef) + { + var renderTargets = new RenderTargetView[numViews]; + GetRenderTargets(numViews, renderTargets, out depthStencilViewRef); + return renderTargets; + } + + /// + /// Get the {{blend state}} of the output-merger stage. + /// + /// + /// The reference count of the returned interface will be incremented by one when the blend state is retrieved. Applications must release returned reference(s) when they are no longer needed, or else there will be a memory leak. + /// + /// Array of blend factors, one for each RGBA component. + /// Pointer to a {{sample mask}}. + /// a reference to a blend-state interface (see ). + /// void OMGetBlendState([Out, Optional] ID3D10BlendState** ppBlendState,[Out, Optional] float BlendFactor[4],[Out, Optional] int* pSampleMask) + public SharpDX.Direct3D10.BlendState GetBlendState(out RawColor4 blendFactor, out int sampleMaskRef) + { + BlendState blendState; + GetBlendState(out blendState, out blendFactor, out sampleMaskRef); + return blendState; + } + + /// + /// Gets the {{depth-stencil}} state of the output-merger stage. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Pointer to the stencil reference value used in the {{depth-stencil}} test. + /// a reference to a depth-stencil state interface (see ) to be filled with information from the device. + /// void OMGetDepthStencilState([Out, Optional] ID3D10DepthStencilState** ppDepthStencilState,[Out, Optional] int* pStencilRef) + public SharpDX.Direct3D10.DepthStencilState GetDepthStencilState(out int stencilRefRef) + { + DepthStencilState temp; + GetDepthStencilState(out temp, out stencilRefRef); + return temp; + } + + /// + /// Binds a set of render targets to the output-merger stage. + /// + /// A set of render target views to bind. + public void SetTargets(params RenderTargetView[] renderTargetViews) + { + SetTargets((DepthStencilView)null, renderTargetViews); + } + + /// + /// Binds a single render target to the output-merger stage. + /// + /// A view of the render target to bind. + public void SetTargets(RenderTargetView renderTargetView) + { + SetTargets((DepthStencilView)null, renderTargetView); + } + + /// + /// Binds a depth-stencil buffer and a set of render targets to the output-merger stage. + /// + /// A view of the depth-stencil buffer to bind. + /// A set of render target views to bind. + public void SetTargets(DepthStencilView depthStencilView, params RenderTargetView[] renderTargetViews) + { + SetRenderTargets(renderTargetViews.Length, renderTargetViews, depthStencilView); + } + + /// + /// Binds a depth-stencil buffer and a single render target to the output-merger stage. + /// + /// A view of the depth-stencil buffer to bind. + /// A view of the render target to bind. + public void SetTargets(DepthStencilView depthStencilView, RenderTargetView renderTargetView) + { + SetTargets(depthStencilView, new[] { renderTargetView }); + } + + /// + /// Gets or sets the blend factor. + /// + /// The blend factor. + public RawColor4 BlendFactor + { + get + { + BlendState state; + RawColor4 blendFactor; + int sampleMaskRef; + GetBlendState(out state, out blendFactor, out sampleMaskRef); + if (state != null) + state.Dispose(); + return blendFactor; + + } + set + { + BlendState state; + RawColor4 blendFactor; + int sampleMaskRef; + GetBlendState(out state, out blendFactor, out sampleMaskRef); + SetBlendState(state, value, sampleMaskRef); + if (state != null) + state.Dispose(); + } + } + + /// + /// Gets or sets the blend sample mask. + /// + /// The blend sample mask. + public int BlendSampleMask + { + get + { + BlendState state; + RawColor4 blendFactor; + int sampleMaskRef; + GetBlendState(out state, out blendFactor, out sampleMaskRef); + if (state != null) + state.Dispose(); + return sampleMaskRef; + } + set + { + BlendState state; + RawColor4 blendFactor; + int sampleMaskRef; + GetBlendState(out state, out blendFactor, out sampleMaskRef); + SetBlendState(state, blendFactor, value); + if (state != null) + state.Dispose(); + } + } + + /// + /// Gets or sets the state of the blend. + /// + /// The state of the blend. + public BlendState BlendState + { + get + { + BlendState state; + RawColor4 blendFactor; + int sampleMaskRef; + GetBlendState(out state, out blendFactor, out sampleMaskRef); + return state; + } + set + { + BlendState state; + RawColor4 blendFactor; + int sampleMaskRef; + GetBlendState(out state, out blendFactor, out sampleMaskRef); + if (state != null) + state.Dispose(); + SetBlendState(value, blendFactor, sampleMaskRef); + } + } + + /// + /// Gets or sets the depth stencil reference. + /// + /// The depth stencil reference. + public int DepthStencilReference + { + get + { + DepthStencilState state; + int reference; + GetDepthStencilState(out state, out reference); + if (state != null) + state.Dispose(); + return reference; + } + set + { + DepthStencilState state; + int reference; + GetDepthStencilState(out state, out reference); + SetDepthStencilState(state, value); + if (state != null) + state.Dispose(); + } + } + + /// + /// Gets or sets the state of the depth stencil. + /// + /// The state of the depth stencil. + public DepthStencilState DepthStencilState + { + get + { + DepthStencilState state; + int reference; + GetDepthStencilState(out state, out reference); + return state; + } + set + { + DepthStencilState state; + int reference; + GetDepthStencilState(out state, out reference); + if (state != null) + state.Dispose(); + SetDepthStencilState(value, reference); + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device.Rasterizer.cs b/Source/SharpDX.Direct3D10/Device.Rasterizer.cs new file mode 100644 index 000000000..c2e15507c --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device.Rasterizer.cs @@ -0,0 +1,118 @@ +// 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. +using System; +using SharpDX.Mathematics.Interop; + +namespace SharpDX.Direct3D10 +{ + public partial class RasterizerStage + { + /// + /// Get the array of {{viewports}} bound to the {{rasterizer stage}} + /// + /// An array of viewports (see ). + /// void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports) + public RawViewport[] GetViewports() + { + int numViewports = 0; + + GetViewports(ref numViewports, null); + + RawViewport[] viewports = new RawViewport[numViewports]; + GetViewports(ref numViewports, viewports); + + return viewports; + } + + /// + /// Get the array of {{viewports}} bound to the {{rasterizer stage}} + /// + /// An array of viewports (see ). + /// void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports) + public void GetViewports(RawViewport[] viewports) + { + int numViewports = viewports.Length; + GetViewports(ref numViewports, viewports); + } + + /// + /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. + /// + /// An array of scissor rectangles (see ). + /// void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects) + public RawRectangle[] GetScissorRectangles() + { + int numRects = 0; + GetScissorRects(ref numRects, null); + + RawRectangle[] scissorRectangles = new RawRectangle[numRects]; + GetScissorRects(ref numRects, scissorRectangles); + + return scissorRectangles; + } + + /// + /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. + /// + /// An array of scissor rectangles (see ). + /// void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects) + public void GetScissorRectangles(RawRectangle[] scissorRectangles) + { + int numRects = scissorRectangles.Length; + GetScissorRects(ref numRects, scissorRectangles); + } + + /// + /// Binds a single scissor rectangle to the rasterizer stage. + /// + /// The scissor rectangle to bind. + public void SetScissorRectangles(RawRectangle scissorRectangle) + { + SetScissorRectangles(new RawRectangle[] { scissorRectangle }); + } + + /// + /// Binds a set of scissor rectangles to the rasterizer stage. + /// + /// The set of scissor rectangles to bind. + public void SetScissorRectangles(params RawRectangle[] scissorRectangles) + { + SetScissorRects(scissorRectangles.Length, scissorRectangles); + } + + /// + /// Binds a set of viewports to the rasterizer stage. + /// + /// The set of viewports to bind. + public void SetViewports(params RawViewport[] viewports) + { + SetViewports(viewports.Length, viewports); + } + + /// + /// Binds a single viewport to the rasterizer stage. + /// + /// The viewport to bind. + public void SetViewports(RawViewport viewport) + { + SetViewports(new RawViewport[] { viewport }); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device.StreamOutput.cs b/Source/SharpDX.Direct3D10/Device.StreamOutput.cs new file mode 100644 index 000000000..6644ae81d --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device.StreamOutput.cs @@ -0,0 +1,75 @@ +// 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. +namespace SharpDX.Direct3D10 +{ + public partial class StreamOutputStage + { + /// + /// Set the target output {{buffers}} for the {{StreamOutput}} stage, which enables/disables the pipeline to stream-out data. + /// + /// + /// Call ID3D10Device::SOSetTargets (before any draw calls) to stream data out; call SOSetTargets with NULL to stop streaming data out. For an example, see Exercise 01 from the GDC 2007 workshop, which sets the stream output render targets before calling draw methods in the RenderInstanceToStream function. An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass. Calling this method using a buffer that is currently bound for writing will effectively bind NULL instead because a buffer cannot be bound as both an input and an output at the same time. The {{DeviceDebug Layer}} will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime. The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device. + /// + /// an array of output buffers (see ) to bind to the device. The buffers must have been created with the flag. + /// void SOSetTargets([In] int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppSOTargets,[In, Buffer, Optional] const int* pOffsets) + public void SetTargets(params StreamOutputBufferBinding[] bufferBindings) + { + if (bufferBindings == null) + { + SetTargets(0, (Buffer[])null, null); + } + else + { + var buffers = new Buffer[bufferBindings.Length]; + var offsets = new int[bufferBindings.Length]; + for (int i = 0; i < bufferBindings.Length; i++) + { + buffers[i] = bufferBindings[i].Buffer; + offsets[i] = bufferBindings[i].Offset; + } + + SetTargets(bufferBindings.Length, buffers, offsets); + } + } + + /// + /// Get the target output {{buffers}} for the {{StreamOutput}} stage of the pipeline. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// Number of buffers to get. A maximum of four output buffers can be retrieved. + /// an array of output buffers (see ) to bind to the device. + /// void SOGetTargets([In] int NumBuffers,[Out, Buffer, Optional] ID3D10Buffer** ppSOTargets,[Out, Buffer, Optional] int* pOffsets) + public StreamOutputBufferBinding[] GetTargets(int numBuffers) + { + var bufferBindings = new StreamOutputBufferBinding[numBuffers]; + var buffers = new Buffer[bufferBindings.Length]; + var offsets = new int[bufferBindings.Length]; + GetTargets(bufferBindings.Length, buffers, offsets); + for (int i = 0; i < bufferBindings.Length; i++) + { + bufferBindings[i].Buffer = buffers[i]; + bufferBindings[i].Offset = offsets[i]; + } + return bufferBindings; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device.cs b/Source/SharpDX.Direct3D10/Device.cs new file mode 100644 index 000000000..6ce0e4219 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device.cs @@ -0,0 +1,372 @@ +// 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. +using System; +using System.Drawing; +using System.Runtime.InteropServices; + +using SharpDX.Direct3D; +using SharpDX.DXGI; +using SharpDX; +using SharpDX.Mathematics.Interop; + +namespace SharpDX.Direct3D10 +{ + public partial class Device + { + /// + /// Constructor for a D3D10 Device. See for more information. + /// + /// + public Device(DriverType driverType) + : this(driverType, DeviceCreationFlags.None) + { + } + + /// + /// Constructor for a D3D10 Device. See for more information. + /// + /// + public Device(Adapter adapter) + : this(adapter, DeviceCreationFlags.None) + { + } + + /// + /// Constructor for a D3D10 Device. See for more information. + /// + /// + /// + public Device(DriverType driverType, DeviceCreationFlags flags) + { + CreateDevice(null, driverType, flags); + } + + /// + /// Constructor for a D3D10 Device. See for more information. + /// + /// + /// + public Device(Adapter adapter, DeviceCreationFlags flags) + { + CreateDevice(adapter, DriverType.Hardware, flags); + } + + private void CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags) + { + D3D10.CreateDevice(adapter, driverType, IntPtr.Zero, flags, D3D10.SdkVersion, this); + } + + /// + /// Initializes a new instance of the class along with a new used for rendering. + /// + /// The type of device to create. + /// A list of runtime layers to enable. + /// Details used to create the swap chain. + /// When the method completes, contains the created device instance. + /// When the method completes, contains the created swap chain instance. + /// A object describing the result of the operation. + public static void CreateWithSwapChain(DriverType driverType, DeviceCreationFlags flags, + SwapChainDescription swapChainDescription, out Device device, + out SwapChain swapChain) + { + CreateWithSwapChain(null, driverType, flags, swapChainDescription, out device, out swapChain); + } + + /// + /// Initializes a new instance of the class along with a new used for rendering. + /// + /// The video adapter on which the device should be created. + /// A list of runtime layers to enable. + /// Details used to create the swap chain. + /// When the method completes, contains the created device instance. + /// When the method completes, contains the created swap chain instance. + /// A object describing the result of the operation. + public static void CreateWithSwapChain(Adapter adapter, DeviceCreationFlags flags, + SwapChainDescription swapChainDescription, out Device device, + out SwapChain swapChain) + { + CreateWithSwapChain(adapter, DriverType.Hardware, flags, swapChainDescription, out device, out swapChain); + } + + + /// + /// This overload has been deprecated. Use one of the alternatives that does not take both an adapter and a driver type. + /// + internal static void CreateWithSwapChain(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, SwapChainDescription swapChainDescription, out Device device, out SwapChain swapChain) + { + D3D10.CreateDeviceAndSwapChain(adapter, driverType, IntPtr.Zero, flags, D3D10.SdkVersion, + ref swapChainDescription, out swapChain, out device); + } + + /// + /// Get the type, name, units of measure, and a description of an existing counter. + /// + /// The counter description. + /// Description of the counter + public CounterMetadata GetCounterMetadata(CounterDescription counterDescription) + { + unsafe + { + var data = new CounterMetadata(); + CounterType type; + int hardwareCounterCount; + int nameLength = 0; + int unitsLength = 0; + int descriptionLength = 0; + + // Get Length for strings + CheckCounter(counterDescription, out type, out hardwareCounterCount, IntPtr.Zero, new IntPtr(&nameLength), IntPtr.Zero, new IntPtr(&unitsLength), + IntPtr.Zero, new IntPtr(&descriptionLength)); + + sbyte* name = stackalloc sbyte[nameLength]; + sbyte* units = stackalloc sbyte[unitsLength]; + sbyte* description = stackalloc sbyte[descriptionLength]; + + // Get strings + CheckCounter(counterDescription, out type, out hardwareCounterCount, new IntPtr(name), new IntPtr(&nameLength), new IntPtr(units), new IntPtr(&unitsLength), + new IntPtr(description), new IntPtr(&descriptionLength)); + + data.Type = type; + data.HardwareCounterCount = hardwareCounterCount; + data.Name = new string(name, 0, nameLength); + data.Units = new string(units, 0, unitsLength); + data.Description = new string(description, 0, descriptionLength); + + return data; + } + } + + /// + /// Get the rendering predicate state. + /// + /// + /// Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks. + /// + /// a boolean to fill with the predicate comparison value. FALSE upon device creation. + /// a reference to a predicate (see ). + /// void ID3D10Device::GetPredication([Out, Optional] ID3D10Predicate** ppPredicate,[Out, Optional] BOOL* pPredicateValue) + public Predicate GetPredication(out bool predicateValue) + { + Predicate temp; + RawBool tempPredicateValue; + GetPredication(out temp, out tempPredicateValue); + predicateValue = tempPredicateValue; + return temp; + } + + /// + /// Give a device access to a shared resource created on a different Direct3d device. + /// + /// The type of the resource we are gaining access to. + /// A resource handle. See remarks. + /// + /// This method returns a reference to the resource we are gaining access to. + /// + /// + /// To share a resource between two Direct3D 10 devices the resource must have been created with the flag, if it was created using the ID3D10Device interface. If it was created using the IDXGIDevice interface, then the resource is always shared. The REFIID, or GUID, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D10Buffer) will get the GUID of the interface to a buffer resource. When sharing a resource between two Direct3D 10 devices the unique handle of the resource can be obtained by querying the resource for the interface and then calling {{GetSharedHandle}}. + /// IDXGIResource* pOtherResource(NULL); + /// hr = pOtherDeviceResource->QueryInterface( __uuidof(IDXGIResource), (void**)&pOtherResource ); + /// HANDLE sharedHandle; + /// pOtherResource->GetSharedHandle(&sharedHandle); + /// The only resources that can be shared are 2D non-mipmapped textures. To share a resource between a Direct3D 9 device and a Direct3D 10 device the texture must have been created using the pSharedHandle argument of {{CreateTexture}}. The shared Direct3D 9 handle is then passed to OpenSharedResource in the hResource argument. The following code illustrates the method calls involved. + /// sharedHandle = NULL; // must be set to NULL to create, can use a valid handle here to open in D3D9 + /// pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle); + /// ... + /// pDevice10->OpenSharedResource(sharedHandle, __uuidof(ID3D10Resource), (void**)(&tempResource10)); + /// tempResource10->QueryInterface(__uuidof(ID3D10Texture2D), (void**)(&pTex2D_10)); + /// tempResource10->Release(); + /// // now use pTex2D_10 with pDevice10 + /// Textures being shared from D3D9 to D3D10 have the following restrictions. Textures must be 2D Only 1 mip level is allowed Texture must have default usage Texture must be write only MSAA textures are not allowed Bind flags must have SHADER_RESOURCE and RENDER_TARGET set Only R10G10B10A2_UNORM, R16G16B16A16_FLOAT and R8G8B8A8_UNORM formats are allowed If a shared texture is updated on one device must be called on that device. + /// + /// HRESULT ID3D10Device::OpenSharedResource([In] void* hResource,[In] GUID* ReturnedInterface,[Out, Optional] void** ppResource) + public T OpenSharedResource(IntPtr resourceHandle) where T : ComObject + { + IntPtr temp; + OpenSharedResource(resourceHandle, Utilities.GetGuidFromType(typeof(T)), out temp); + return FromPointer(temp); + } + + /// + /// Copy the entire contents of the source resource to the destination resource using the GPU. + /// + /// + /// This method is unusual in that it causes the GPU to perform the copy operation (similar to a memcpy by the CPU). As a result, it has a few restrictions designed for improving performance. For instance, the source and destination resources: Must be different resources. Must be the same {{type}}. Must have identical dimensions (including width, height, depth, and size as appropriate). Will only be copied. CopyResource does not support any stretch, color key, blend, or format conversions. Must have compatible {{formats}}, which means the formats must be identical or at least from the same type group. For example, a DXGI_FORMAT_R32G32B32_FLOAT texture can be copied to an DXGI_FORMAT_R32G32B32_UINT texture since both of these formats are in the DXGI_FORMAT_R32G32B32_TYPELESS group. May not be currently {{mapped}}. {{Immutable}}, and {{depth-stencil}} resources cannot be used as a destination. Resources created with {{multisampling capability}} cannot be used as either a source or destination. The method is an asynchronous call which may be added to the command-buffer queue. This attempts to remove pipeline stalls that may occur when copying data. See {{performance considerations}} for more details. An application that only needs to copy a portion of the data in a resource should use instead. Differences between Direct3D 10 and Direct3D 10.1: Direct3D 10.1 enables depth-stencil resources to be used as either a source or destination. Direct3D 10.1 enables multisampled resources to be used as source and destination only if both source and destination have identical multisampled count and quality. If source and destination differ in multisampled count and quality or if the source is multisampled and the destination is not multisampled (or vice versa), the call to ID3D10Device::CopyResource fails. It is possible to copy between prestructured+typed resources and block-compressed textures. See {{Format Conversion using Direct3D 10.1}}. ? + /// + /// A reference to the source resource (see ). + /// A reference to the destination resource (see ). + /// void ID3D10Device::CopyResource([In] ID3D10Resource* pDstResource,[In] ID3D10Resource* pSrcResource) + public void CopyResource(Resource source, Resource destination) + { + CopyResource_(destination, source); + } + + /// + /// Copy a region from a source resource to a destination resource. + /// + /// + /// The source box must be within the size of the source resource. The destination location is an absolute value (not a relative value). The destination location can be offset from the source location; however, the size of the region to copy (including the destination location) must fit in the destination resource. If the resources are buffers, all coordinates are in bytes; if the resources are textures, all coordinates are in texels. {{D3D10CalcSubresource}} is a helper function for calculating subresource indexes. CopySubresourceRegion performs the copy on the GPU (similar to a memcpy by the CPU). As a consequence, the source and destination resources must meet the following criteria: Must be different subresources (although they can be from the same resource). Must be the same {{type}}. Must have compatible {{formats}} (the formats must either be identical or be from the same type group). For example, a DXGI_FORMAT_R32G32B32_FLOAT texture can be copied to an DXGI_FORMAT_R32G32B32_UINT texture because both of these formats are in the DXGI_FORMAT_R32G32B32_TYPELESS group. May not be currently {{mapped}}. CopySubresourceRegion supports only copy; it does not support any stretch, color key, blend, or format conversions. An application that needs to copy an entire resource should use instead. CopySubresourceRegion is an asynchronous call that the runtime can add to the command-buffer queue. This asynchronous behavior attempts to remove pipeline stalls that may occur when copying data. See {{performance considerations}} for more details. Differences between Direct3D 10 and Direct3D 10.1: Direct3D 10 has the following limitations: You cannot use a depth-stencil resource as a destination. You cannot use an immutable resource as a destination. You cannot use a multisampled texture as either a source or a destination Direct3D 10.1 has added support for the following features: You can use a depth-stencil buffer as a source or a destination. You can use multisampled resources as source and destination only if both source and destination have identical multisampled count and quality. If source and destination differ in multisampled count and quality or if the source is multisampled and the destination is not multisampled (or vice versa), the call to ID3D10Device::CopySubresourceRegion fails. You can copy between uncompressed and compressed resources. During copy, the format conversions that are specified in {{Format Conversion using Direct3D 10.1}} are supported automatically. The uncompressed resource must be at least prestructured, and typed. You must also account for the difference between the virtual and the physical size of the mipmap levels. ? Note??If you use CopySubresourceRegion with a depth-stencil buffer or a multisampled resource, you must copy the whole subresource. You must also pass 0 to the DstX, DstY, and DstZ parameters and NULL to the pSrcBox parameter. In addition, source and destination resources, which are represented by the pSrcResource and pDstResource parameters respectively, must have identical sample count values. Example The following code snippet copies a box (located at (120,100),(200,220)) from a source texture into a region (130,120),(210,240) in a destination texture. + /// D3D10_BOX sourceRegion; + /// sourceRegion.left = 120; + /// sourceRegion.right = 200; + /// sourceRegion.top = 100; + /// sourceRegion.bottom = 220; + /// sourceRegion.front = 0; + /// sourceRegion.back = 1; pd3dDevice->CopySubresourceRegion( pDestTexture, 0, 130, 120, 0, pSourceTexture, 0, &sourceRegion ); + /// + /// Notice that, for a 2D texture, front and back are always set to 0 and 1 respectively. + /// + /// A reference to the source resource (see ). + /// index of the source. + /// A 3D box (see ) that defines the source subresources that can be copied. If NULL, the entire source subresource is copied. The box must fit within the source resource. + /// A reference to the destination resource (see ). + /// index of the destination. + /// The x coordinate of the upper left corner of the destination region. + /// The y coordinate of the upper left corner of the destination region. + /// The z coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero. + /// void ID3D10Device::CopySubresourceRegion([In] ID3D10Resource* pDstResource,[In] int DstSubresource,[In] int DstX,[In] int DstY,[In] int DstZ,[In] ID3D10Resource* pSrcResource,[In] int SrcSubresource,[In, Optional] const D3D10_BOX* pSrcBox) + public void CopySubresourceRegion(SharpDX.Direct3D10.Resource source, int sourceSubresource, SharpDX.Direct3D10.ResourceRegion? sourceRegion, SharpDX.Direct3D10.Resource destination, int destinationSubResource, int dstX, int dstY, int dstZ) + { + CopySubresourceRegion_(destination, destinationSubResource, dstX, dstY, dstZ, source, sourceSubresource, sourceRegion); + } + + /// + /// Copy a multisampled resource into a non-multisampled resource. This API is most useful when re-using the resulting render target of one render pass as an input to a second render pass. + /// + /// + /// Both the source and destination resources must be the same {{resource type}} and have the same dimensions. The source and destination must have compatible formats. There are three scenarios for this: ScenarioRequirements Source and destination are prestructured and typedBoth the source and destination must have identical formats and that format must be specified in the Format parameter. One resource is prestructured and typed and the other is prestructured and typelessThe typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is DXGI_FORMAT_R32_FLOAT and the typeless resource is DXGI_FORMAT_R32_TYPELESS). The format of the typed resource must be specified in the Format parameter. Source and destination are prestructured and typelessBoth the source and destination must have the same typeless format (i.e. both must have DXGI_FORMAT_R32_TYPELESS), and the Format parameter must specify a format that is compatible with the source and destination (i.e. if both are DXGI_FORMAT_R32_TYPELESS then DXGI_FORMAT_R32_FLOAT or DXGI_FORMAT_R32_UINT could be specified in the Format parameter). ? + /// + /// Source resource. Must be multisampled. + /// The source subresource of the source resource. + /// Destination resource. Must be a created with the flag and be single-sampled. See . + /// A zero-based index, that identifies the destination subresource. See {{D3D10CalcSubresource}} for more details. + /// that indicates how the multisampled resource will be resolved to a single-sampled resource. See remarks. + /// void ID3D10Device::ResolveSubresource([In] ID3D10Resource* pDstResource,[In] int DstSubresource,[In] ID3D10Resource* pSrcResource,[In] int SrcSubresource,[In] DXGI_FORMAT Format) + public void ResolveSubresource(SharpDX.Direct3D10.Resource source, int sourceSubresource, SharpDX.Direct3D10.Resource destination, int destinationSubresource, SharpDX.DXGI.Format format) + { + ResolveSubresource_(destination, destinationSubresource, source, sourceSubresource, format); + } + + /// + /// Copies data from the CPU to to a non-mappable subresource region. + /// + /// Type of the data to upload + /// A reference to the data to upload. + /// The destination resource. + /// The destination subresource. + /// The row pitch. + /// The depth pitch. + public void UpdateSubresource(ref T data, Resource resource, int subresource = 0, int rowPitch = 0, int depthPitch = 0) where T : struct + { + unsafe + { + UpdateSubresource(resource, subresource, null, (IntPtr)Interop.Fixed(ref data), rowPitch, depthPitch); + } + } + + /// + /// Copies data from the CPU to to a non-mappable subresource region. + /// + /// Type of the data to upload + /// A reference to the data to upload. + /// The destination resource. + /// The destination subresource. + /// The row pitch. + /// The depth pitch. + public void UpdateSubresource(T[] data, Resource resource, int subresource = 0, int rowPitch = 0, int depthPitch = 0) where T : struct + { + unsafe + { + UpdateSubresource(resource, subresource, null, (IntPtr)Interop.Fixed(data), rowPitch, depthPitch); + } + } + + /// + /// Copies data from the CPU to to a non-mappable subresource region. + /// + /// The source data. + /// The destination resource. + /// The destination subresource. + public void UpdateSubresource(DataBox source, Resource resource, int subresource) + { + UpdateSubresource(resource, subresource, null, source.DataPointer, source.RowPitch, source.SlicePitch); + } + + /// + /// Copies data from the CPU to to a non-mappable subresource region. + /// + /// The source data. + /// The destination resource. + /// The destination subresource. + /// The destination region within the resource. + public void UpdateSubresource(DataBox source, Resource resource, int subresource, ResourceRegion region) + { + UpdateSubresource(resource, subresource, region, source.DataPointer, source.RowPitch, source.SlicePitch); + } + + /// + /// Get the flags used during the call to create the device with . + /// + /// A bitfield containing the flags used to create the device. See . + /// int ID3D10Device::GetCreationFlags() + public DeviceCreationFlags CreationFlags + { + get + { + return (DeviceCreationFlags) GetCreationFlags(); + } + } + + /// + /// Gets or sets the debug-name for this object. + /// + /// + /// The debug name. + /// + public string DebugName + { + get + { + unsafe + { + byte* pname = stackalloc byte[1024]; + int size = 1024 - 1; + if (GetPrivateData(CommonGuid.DebugObjectName, ref size, new IntPtr(pname)).Failure) + return string.Empty; + pname[size] = 0; + return Marshal.PtrToStringAnsi(new IntPtr(pname)); + } + } + + set + { + if (string.IsNullOrEmpty(value)) + { + SetPrivateData(CommonGuid.DebugObjectName, 0, IntPtr.Zero); + } + else + { + var namePtr = Marshal.StringToHGlobalAnsi(value); + SetPrivateData(CommonGuid.DebugObjectName, value.Length, namePtr); + Marshal.Release(namePtr); + } + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Device1.cs b/Source/SharpDX.Direct3D10/Device1.cs new file mode 100644 index 000000000..6086a8f1f --- /dev/null +++ b/Source/SharpDX.Direct3D10/Device1.cs @@ -0,0 +1,170 @@ +// 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. +using System; +using SharpDX.Direct3D; +using SharpDX.DXGI; + +namespace SharpDX.Direct3D10 +{ + public partial class Device1 + { + /// + /// Constructor for a D3D10.1 Device. See for more information. + /// + /// + public Device1(DriverType driverType) + : this(driverType, DeviceCreationFlags.None) + { + } + + /// + /// Constructor for a D3D10.1 Device. See for more information. + /// + /// + public Device1(Adapter adapter) + : this(adapter, DeviceCreationFlags.None) + { + } + + /// + /// Constructor for a D3D10.1 Device. See for more information. + /// + /// + /// + public Device1(DriverType driverType, DeviceCreationFlags flags) : this(driverType, flags, FeatureLevel.Level_10_1) + { + } + + /// + /// Constructor for a D3D10.1 Device. See for more information. + /// + /// + /// + public Device1(Adapter adapter, DeviceCreationFlags flags) + : this(adapter, flags, FeatureLevel.Level_10_1) + { + } + + /// + /// Constructor for a D3D10.1 Device. See for more information. + /// + /// + /// + /// + public Device1(DriverType driverType, DeviceCreationFlags flags, FeatureLevel featureLevel) + : base(IntPtr.Zero) + { + CreateDevice(null, driverType, flags, featureLevel); + } + + /// + /// Constructor for a D3D10.1 Device. See for more information. + /// + /// + /// + /// + public Device1(Adapter adapter, DeviceCreationFlags flags, FeatureLevel featureLevel) : base(IntPtr.Zero) + { + CreateDevice(adapter, DriverType.Hardware, flags, featureLevel); + } + + private void CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel featureLevel) + { + D3D10.CreateDevice1(adapter, driverType, IntPtr.Zero, flags, featureLevel, D3D10.SdkVersion1, this); + } + + /// + /// Initializes a new instance of the class along with a new used for rendering. + /// + /// The type of device to create. + /// A list of runtime layers to enable. + /// Details used to create the swap chain. + /// When the method completes, contains the created device instance. + /// When the method completes, contains the created swap chain instance. + /// A object describing the result of the operation. + public static void CreateWithSwapChain(DriverType driverType, DeviceCreationFlags flags, + SwapChainDescription swapChainDescription, out Device1 device, + out SwapChain swapChain) + { + CreateWithSwapChain(null, driverType, flags, swapChainDescription, FeatureLevel.Level_10_1, out device, out swapChain); + } + + /// + /// Initializes a new instance of the class along with a new used for rendering. + /// + /// The video adapter on which the device should be created. + /// A list of runtime layers to enable. + /// Details used to create the swap chain. + /// When the method completes, contains the created device instance. + /// When the method completes, contains the created swap chain instance. + /// A object describing the result of the operation. + public static void CreateWithSwapChain(Adapter adapter, DeviceCreationFlags flags, + SwapChainDescription swapChainDescription, out Device1 device, + out SwapChain swapChain) + { + CreateWithSwapChain(adapter, DriverType.Hardware, flags, swapChainDescription, FeatureLevel.Level_10_1, out device, out swapChain); + } + + /// + /// Initializes a new instance of the class along with a new used for rendering. + /// + /// The type of device to create. + /// A list of runtime layers to enable. + /// Details used to create the swap chain. + /// Desired feature level + /// When the method completes, contains the created device instance. + /// When the method completes, contains the created swap chain instance. + /// A object describing the result of the operation. + public static void CreateWithSwapChain(DriverType driverType, DeviceCreationFlags flags, + SwapChainDescription swapChainDescription, FeatureLevel featureLevel, out Device1 device, + out SwapChain swapChain) + { + CreateWithSwapChain(null, driverType, flags, swapChainDescription, featureLevel, out device, out swapChain); + } + + /// + /// Initializes a new instance of the class along with a new used for rendering. + /// + /// The video adapter on which the device should be created. + /// A list of runtime layers to enable. + /// Details used to create the swap chain. + /// Desired feature level + /// When the method completes, contains the created device instance. + /// When the method completes, contains the created swap chain instance. + /// A object describing the result of the operation. + public static void CreateWithSwapChain(Adapter adapter, DeviceCreationFlags flags, + SwapChainDescription swapChainDescription, FeatureLevel featureLevel,out Device1 device, + out SwapChain swapChain) + { + CreateWithSwapChain(adapter, DriverType.Hardware, flags, swapChainDescription, featureLevel, out device, out swapChain); + } + + + /// + /// This overload has been deprecated. Use one of the alternatives that does not take both an adapter and a driver type. + /// + internal static void CreateWithSwapChain(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, SwapChainDescription swapChainDescription, FeatureLevel featureLevel, out Device1 device, out SwapChain swapChain) + { + D3D10.CreateDeviceAndSwapChain1(adapter, driverType, IntPtr.Zero, flags, featureLevel, D3D10.SdkVersion1, + ref swapChainDescription, out swapChain, out device); + } + + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/DeviceChild.cs b/Source/SharpDX.Direct3D10/DeviceChild.cs new file mode 100644 index 000000000..8a160e68c --- /dev/null +++ b/Source/SharpDX.Direct3D10/DeviceChild.cs @@ -0,0 +1,65 @@ +// 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. + +using System; +using System.Runtime.InteropServices; + +using SharpDX.Direct3D; + +namespace SharpDX.Direct3D10 +{ + public partial class DeviceChild + { + /// + /// Gets or sets the debug-name for this object. + /// + /// + /// The debug name. + /// + public string DebugName + { + get + { + unsafe + { + byte* pname = stackalloc byte[1024]; + int size = 1024 - 1; + if (GetPrivateData(CommonGuid.DebugObjectName, ref size, new IntPtr(pname)).Failure) + return string.Empty; + pname[size] = 0; + return Marshal.PtrToStringAnsi(new IntPtr(pname)); + } + } + + set + { + if (string.IsNullOrEmpty(value)) + { + SetPrivateData(CommonGuid.DebugObjectName, 0, IntPtr.Zero); + } + else + { + var namePtr = Marshal.StringToHGlobalAnsi(value); + SetPrivateData(CommonGuid.DebugObjectName, value.Length, namePtr); + } + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/DeviceDebug.cs b/Source/SharpDX.Direct3D10/DeviceDebug.cs new file mode 100644 index 000000000..e75c743c3 --- /dev/null +++ b/Source/SharpDX.Direct3D10/DeviceDebug.cs @@ -0,0 +1,52 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class DeviceDebug + { + /// + /// Initializes a new instance of the class. + /// + /// The device. + public DeviceDebug(Device device) + { + QueryInterfaceFrom(device); + } + + /// + /// Gets or sets the feature flags that indicates which debug features are on or off. + /// + /// The feature flags. + public DebugFeatureFlags FeatureFlags + { + get + { + return (DebugFeatureFlags) GetFeatureFlags(); + } + + set + { + SetFeatureFlags((int) value); + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Documentation/CodeComments.xml b/Source/SharpDX.Direct3D10/Documentation/CodeComments.xml new file mode 100644 index 000000000..503765389 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Documentation/CodeComments.xml @@ -0,0 +1,26 @@ + + + +Flags that defines the behavior of method . + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Effect.cs b/Source/SharpDX.Direct3D10/Effect.cs new file mode 100644 index 000000000..c5429f387 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Effect.cs @@ -0,0 +1,44 @@ +// 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. +using System; +using System.IO; +using System.Text; + +using SharpDX.D3DCompiler; +using SharpDX.Direct3D; + +namespace SharpDX.Direct3D10 +{ + public partial class Effect + { + /// + /// Initializes a new instance of the class. + /// + /// The device. + /// The effect byte code. + /// Effect compile options + /// Optional. A reference to an memory space for effect variables that are shared across effects (see ). + public unsafe Effect(Device device, byte[] effectByteCode, EffectFlags fxFlags = EffectFlags.None, EffectPool effectPool = null) + { + fixed (void* ptr = effectByteCode) + D3D10.CreateEffectFromMemory((IntPtr)ptr, effectByteCode.Length, (int)fxFlags, device, effectPool, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectBlendVariable.cs b/Source/SharpDX.Direct3D10/EffectBlendVariable.cs new file mode 100644 index 000000000..37f30b7b9 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectBlendVariable.cs @@ -0,0 +1,35 @@ +// 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. + +namespace SharpDX.Direct3D10 +{ + public partial class EffectBlendVariable + { + /// + /// Get a pointer to a blend-state interface. + /// + /// Returns . + /// HRESULT ID3D10EffectBlendVariable::GetBlendState([None] int Index,[Out] ID3D10BlendState** ppBlendState) + public SharpDX.Direct3D10.BlendState GetBlendState() + { + return GetBlendState(0); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectDepthStencilVariable.cs b/Source/SharpDX.Direct3D10/EffectDepthStencilVariable.cs new file mode 100644 index 000000000..a9e040a5b --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectDepthStencilVariable.cs @@ -0,0 +1,36 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectDepthStencilVariable + { + /// + /// Get a pointer to a depth-stencil interface. + /// + /// Returns a pointer to a blend-state interface (see ). + /// HRESULT ID3D10EffectDepthStencilVariable::GetDepthStencilState([None] int Index,[Out] ID3D10DepthStencilState** ppDepthStencilState) + public SharpDX.Direct3D10.DepthStencilState GetDepthStencilState() + { + return GetDepthStencilState(0); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectDepthStencilViewVariable.cs b/Source/SharpDX.Direct3D10/EffectDepthStencilViewVariable.cs new file mode 100644 index 000000000..347d4c984 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectDepthStencilViewVariable.cs @@ -0,0 +1,75 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectDepthStencilViewVariable + { + /// + /// Set an array of depth-stencil-view resources. + /// + /// A pointer to an array of depth-stencil-view interfaces. See . + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray([In, Buffer] ID3D10DepthStencilView** ppResources,[None] int Offset,[None] int Count) + public void SetDepthStencilArray(SharpDX.Direct3D10.DepthStencilView[] resourcesRef) + { + SetDepthStencilArray(resourcesRef, 0, resourcesRef.Length); + } + + /// + /// Set an array of depth-stencil-view resources. + /// + /// A pointer to an array of depth-stencil-view interfaces. See . + /// The zero-based array index to set the first interface. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray([In, Buffer] ID3D10DepthStencilView** ppResources,[None] int Offset,[None] int Count) + public void SetDepthStencilArray(SharpDX.Direct3D10.DepthStencilView[] resourcesRef, int offset) + { + SetDepthStencilArray(resourcesRef, offset, resourcesRef.Length-offset); + } + + /// + /// Get an array of depth-stencil-view resources. + /// + /// The number of elements in the array. + /// Returns an array of depth-stencil-view interfaces. See . + /// HRESULT ID3D10EffectDepthStencilViewVariable::GetDepthStencilArray([Out, Buffer] ID3D10DepthStencilView** ppResources,[None] int Offset,[None] int Count) + public SharpDX.Direct3D10.DepthStencilView[] GetDepthStencilArray(int count) + { + return GetDepthStencilArray(0, count); + } + + + /// + /// Get an array of depth-stencil-view resources. + /// + /// The zero-based array index to get the first interface. + /// The number of elements in the array. + /// Returns an array of depth-stencil-view interfaces. See . + /// HRESULT ID3D10EffectDepthStencilViewVariable::GetDepthStencilArray([Out, Buffer] ID3D10DepthStencilView** ppResources,[None] int Offset,[None] int Count) + public SharpDX.Direct3D10.DepthStencilView[] GetDepthStencilArray(int offset, int count) + { + DepthStencilView[] temp = new DepthStencilView[count]; + GetDepthStencilArray(temp, offset, count); + return temp; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs b/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs new file mode 100644 index 000000000..d11588866 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs @@ -0,0 +1,250 @@ +// 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. +using System.Diagnostics; +using SharpDX.Mathematics.Interop; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectMatrixVariable + { + private const string MatrixInvalidSize = "Invalid Matrix size: Must be 64 bytes, 16 floats"; + + /// + /// Set a floating-point matrix. + /// + /// A pointer to the first element in the matrix. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrix([In] float* pData) + public void SetMatrix(T matrix) where T : struct + { + SetMatrix(ref matrix); + } + + /// + /// Get a matrix. + /// + /// A reference to the first element in a matrix. + /// + /// Note??The DirectX SDK does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11. + /// + /// HRESULT ID3DX11EffectMatrixVariable::GetMatrix([Out] SHARPDX_MATRIX* pData) + public unsafe T GetMatrix() where T : struct + { + T value; + GetMatrix(out *(RawMatrix*)Interop.CastOut(out value)); + return value; + } + + /// + /// Get a matrix. + /// + /// A reference to the first element in a matrix. + /// + /// Note??The DirectX SDK does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11. + /// + /// HRESULT ID3DX11EffectMatrixVariable::GetMatrix([Out] SHARPDX_MATRIX* pData) + public RawMatrix GetMatrix() + { + RawMatrix value; + GetMatrix(out value); + return value; + } + + /// + /// Set a floating-point matrix. + /// + /// A pointer to the first element in the matrix. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrix([In] float* pData) + public unsafe void SetMatrix(ref T matrix) where T : struct + { + Trace.Assert(Utilities.SizeOf() == 64, MatrixInvalidSize); + SetMatrix(ref *(RawMatrix*)Interop.Fixed(ref matrix)); + } + + /// + /// Set an array of floating-point matrices. + /// + /// A pointer to the first matrix. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void SetMatrix(T[] matrixArray) where T : struct + { + SetMatrix(matrixArray, 0); + } + + /// + /// Set an array of floating-point matrices. + /// + /// A pointer to the first matrix. + /// The number of matrix elements to skip from the start of the array. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void SetMatrix(T[] matrixArray, int offset) where T : struct + { + Trace.Assert(Utilities.SizeOf() == 64, MatrixInvalidSize); + SetMatrixArray(Interop.CastArray(matrixArray), offset, matrixArray.Length); + } + + /// + /// Get an array of matrices. + /// + /// The number of matrices in the returned array. + /// Returns an array of matrix. + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixArray([Out, Buffer] float* pData,[None] int Offset,[None] int Count) + public T[] GetMatrixArray(int count) where T : struct + { + return GetMatrixArray(0, count); + } + + /// + /// Get an array of matrices. + /// + /// The offset (in number of matrices) between the start of the array and the first matrix returned. + /// The number of matrices in the returned array. + /// Returns an array of matrix. + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixArray([Out, Buffer] float* pData,[None] int Offset,[None] int Count) + public T[] GetMatrixArray(int offset, int count) where T : struct + { + var temp = new T[count]; + GetMatrixArray(Interop.CastArray(temp), offset, count); + return temp; + } + + /// + /// Transpose and set a floating-point matrix. + /// + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa). + /// + /// A pointer to the first element of a matrix. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTranspose([In] float* pData) + public void SetMatrixTranspose(T matrix) where T : struct + { + SetMatrixTranspose(ref matrix); + } + + /// + /// Transpose and set a floating-point matrix. + /// + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa). + /// + /// A pointer to the first element of a matrix. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTranspose([In] float* pData) + public unsafe void SetMatrixTranspose(ref T matrix) where T : struct + { + Trace.Assert(Utilities.SizeOf() == 64, MatrixInvalidSize); + SetMatrixTranspose(ref *(RawMatrix*)Interop.Cast(ref matrix)); + } + + /// + /// Transpose and set an array of floating-point matrices. + /// + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa). + /// + /// A pointer to an array of matrices. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTransposeArray([In] float* pData,[None] int Offset,[None] int Count) + public void SetMatrixTranspose(T[] matrixArray) where T : struct + { + SetMatrixTranspose(matrixArray, 0); + } + + /// + /// Transpose and set an array of floating-point matrices. + /// + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa). + /// + /// A pointer to an array of matrices. + /// The offset (in number of matrices) between the start of the array and the first matrix to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTransposeArray([In] float* pData,[None] int Offset,[None] int Count) + public void SetMatrixTranspose(T[] matrixArray, int offset) where T : struct + { + SetMatrixTransposeArray(Interop.CastArray(matrixArray), offset, matrixArray.Length); + } + + /// + /// Transpose and get a floating-point matrix. + /// + /// The transposed matrix. + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).Note??The DirectX SDK does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11. + /// + /// HRESULT ID3DX11EffectMatrixVariable::GetMatrixTranspose([Out] SHARPDX_MATRIX* pData) + public unsafe T GetMatrixTranspose() where T : struct + { + T value; + GetMatrixTranspose(out *(RawMatrix*)Interop.CastOut(out value)); + return value; + } + + /// + /// Transpose and get a floating-point matrix. + /// + /// The transposed matrix. + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).Note??The DirectX SDK does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11. + /// + /// HRESULT ID3DX11EffectMatrixVariable::GetMatrixTranspose([Out] SHARPDX_MATRIX* pData) + public RawMatrix GetMatrixTranspose() + { + RawMatrix value; + GetMatrixTranspose(out value); + return value; + } + + /// + /// Transpose and get an array of floating-point matrices. + /// + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa). + /// + /// The number of matrices in the array to get. + /// Returns an array of transposed . + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixTransposeArray([Out, Buffer] float* pData,[None] int Offset,[None] int Count) + public T[] GetMatrixTransposeArray(int count) where T : struct + { + return GetMatrixTransposeArray(0, count); + } + + /// + /// Transpose and get an array of floating-point matrices. + /// + /// + /// Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa). + /// + /// The offset (in number of matrices) between the start of the array and the first matrix to get. + /// The number of matrices in the array to get. + /// Returns an array of transposed . + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixTransposeArray([Out, Buffer] float* pData,[None] int Offset,[None] int Count) + public T[] GetMatrixTransposeArray(int offset, int count) where T : struct + { + var temp = new T[count]; + GetMatrixTransposeArray(Interop.CastArray(temp), offset, count); + return temp; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectPass.cs b/Source/SharpDX.Direct3D10/EffectPass.cs new file mode 100644 index 000000000..fc47188d0 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectPass.cs @@ -0,0 +1,35 @@ +// 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. + +namespace SharpDX.Direct3D10 +{ + public partial class EffectPass + { + /// + /// Set the state contained in a pass to the device. + /// + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT Apply([None] UINT Flags) + public void Apply() + { + Apply(0); + } + } +} diff --git a/Source/SharpDX.Direct3D10/EffectPassDescription.cs b/Source/SharpDX.Direct3D10/EffectPassDescription.cs new file mode 100644 index 000000000..fbf22a218 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectPassDescription.cs @@ -0,0 +1,37 @@ +// 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. +using SharpDX.D3DCompiler; + +namespace SharpDX.Direct3D10 +{ + public partial struct EffectPassDescription + { + /// + /// Returns the signature of this Effect pass. + /// + public ShaderBytecode Signature + { + get + { + return new ShaderBytecode(this.PIAInputSignature, this.IAInputSignatureSize); + } + } + } +} diff --git a/Source/SharpDX.Direct3D10/EffectPassShaderDescription.cs b/Source/SharpDX.Direct3D10/EffectPassShaderDescription.cs new file mode 100644 index 000000000..f0645ccf9 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectPassShaderDescription.cs @@ -0,0 +1,38 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial struct EffectPassShaderDescription + { + /// + /// A reference to the variable that the shader came from. If it is an inline shader assignment, the returned interface will be an anonymous shader variable, which is not retrievable any other way. Its name in the variable description will be "$Anonymous". If there is no assignment of this type in the pass block, this will point to a shader variable that returns false when IsValid is called. + /// + /// ID3D10EffectShaderVariable* pShaderVariable + public EffectShaderVariable Variable + { + get + { + return new EffectShaderVariable(VariablePointer); + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectPool.cs b/Source/SharpDX.Direct3D10/EffectPool.cs new file mode 100644 index 000000000..a1d90cf76 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectPool.cs @@ -0,0 +1,39 @@ +// 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. +using System; +using SharpDX.D3DCompiler; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectPool + { + /// + /// Initializes a new instance of the class. + /// + /// The device. + /// The effect byte code. + /// Effect compile options + public unsafe EffectPool(Device device, byte[] effectByteCode, EffectFlags fxFlags = EffectFlags.None) + { + fixed (void* ptr = effectByteCode) + D3D10.CreateEffectPoolFromMemory((IntPtr)ptr, effectByteCode.Length, (int)fxFlags, device, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectRasterizerVariable.cs b/Source/SharpDX.Direct3D10/EffectRasterizerVariable.cs new file mode 100644 index 000000000..8e19c4663 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectRasterizerVariable.cs @@ -0,0 +1,36 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectRasterizerVariable + { + /// + /// Get a pointer to a rasterizer interface. + /// + /// Returns a pointer to a rasterizer interface (see ). + /// HRESULT ID3D10EffectRasterizerVariable::GetRasterizerState([None] int Index,[Out] ID3D10RasterizerState** ppRasterizerState) + public SharpDX.Direct3D10.RasterizerState GetRasterizerState() + { + return GetRasterizerState(0); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectRenderTargetViewVariable.cs b/Source/SharpDX.Direct3D10/EffectRenderTargetViewVariable.cs new file mode 100644 index 000000000..47c915061 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectRenderTargetViewVariable.cs @@ -0,0 +1,74 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectRenderTargetViewVariable + { + /// + /// Set an array of render-targets. + /// + /// Set an array of render-target-view interfaces. See . + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray([In, Buffer] ID3D10RenderTargetView** ppResources,[None] int Offset,[None] int Count) + public void SetRenderTargetArray(SharpDX.Direct3D10.RenderTargetView[] resourcesRef) + { + SetRenderTargetArray(resourcesRef, 0); + } + + /// + /// Set an array of render-targets. + /// + /// Set an array of render-target-view interfaces. See . + /// The zero-based array index to store the first interface. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray([In, Buffer] ID3D10RenderTargetView** ppResources,[None] int Offset,[None] int Count) + public void SetRenderTargetArray(SharpDX.Direct3D10.RenderTargetView[] resourcesRef, int offset) + { + SetRenderTargetArray(resourcesRef, offset, resourcesRef.Length); + } + + /// + /// Get an array of render-targets. + /// + /// The number of elements in the array. + /// Returns an array of . + /// HRESULT ID3D10EffectRenderTargetViewVariable::GetRenderTargetArray([Out, Buffer] ID3D10RenderTargetView** ppResources,[None] int Offset,[None] int Count) + public SharpDX.Direct3D10.RenderTargetView[] GetRenderTargetArray(int count) + { + return GetRenderTargetArray(0, count); + } + + /// + /// Get an array of render-targets. + /// + /// The zero-based array index to get the first interface. + /// The number of elements in the array. + /// Returns an array of . + /// HRESULT ID3D10EffectRenderTargetViewVariable::GetRenderTargetArray([Out, Buffer] ID3D10RenderTargetView** ppResources,[None] int Offset,[None] int Count) + public SharpDX.Direct3D10.RenderTargetView[] GetRenderTargetArray(int offset, int count) + { + var temp = new RenderTargetView[count]; + GetRenderTargetArray(temp, offset, count); + return temp; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectSamplerVariable.cs b/Source/SharpDX.Direct3D10/EffectSamplerVariable.cs new file mode 100644 index 000000000..8d80d6ee5 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectSamplerVariable.cs @@ -0,0 +1,36 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectSamplerVariable + { + /// + /// Get a reference to a sampler interface. + /// + /// Returns a reference to a sampler interface (see ). + /// HRESULT ID3D10EffectSamplerVariable::GetSampler([None] int Index,[Out] ID3D10SamplerState** ppSampler) + public SharpDX.Direct3D10.SamplerState GetSampler() + { + return GetSampler(0); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectScalarVariable.cs b/Source/SharpDX.Direct3D10/EffectScalarVariable.cs new file mode 100644 index 000000000..f37c3f0b5 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectScalarVariable.cs @@ -0,0 +1,205 @@ +// 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. +using System; +using SharpDX.Mathematics.Interop; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectScalarVariable + { + /// + /// Set a floating-point variable. + /// + /// A reference to the variable. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetFloat([None] float Value) + public void Set(float value) + { + SetFloat(value); + } + + /// + /// Set an array of floating-point variables. + /// + /// A reference to the start of the data to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetFloatArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void Set(float[] dataRef) + { + Set(dataRef, 0); + } + + /// + /// Set an array of floating-point variables. + /// + /// A reference to the start of the data to set. + /// Must be set to 0; this is reserved for future use. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetFloatArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void Set(float[] dataRef, int offset) + { + SetFloatArray(dataRef, offset, dataRef.Length); + } + + /// + /// Get an array of floating-point variables. + /// + /// The number of array elements to set. + /// Returns an array of floats. + /// HRESULT ID3D10EffectScalarVariable::GetFloatArray([Out, Buffer] float* pData,[None] int Offset,[None] int Count) + public float[] GetFloatArray(int count) + { + return GetFloatArray(0, count); + } + + /// + /// Get an array of floating-point variables. + /// + /// Must be set to 0; this is reserved for future use. + /// The number of array elements to set. + /// Returns an array of floats. + /// HRESULT ID3D10EffectScalarVariable::GetFloatArray([Out, Buffer] float* pData,[None] int Offset,[None] int Count) + public float[] GetFloatArray(int offset, int count) + { + var temp = new float[count]; + GetFloatArray(temp, offset, count); + return temp; + } + + /// + /// Set an integer variable. + /// + /// A reference to the variable. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetInt([None] int Value) + public void Set(int value) + { + SetInt(value); + } + + /// + /// Set an array of integer variables. + /// + /// A reference to the start of the data to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetIntArray([In, Buffer] int* pData,[None] int Offset,[None] int Count) + public void Set(int[] dataRef) + { + Set(dataRef, 0); + } + + /// + /// Set an array of integer variables. + /// + /// A reference to the start of the data to set. + /// Must be set to 0; this is reserved for future use. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetIntArray([In, Buffer] int* pData,[None] int Offset,[None] int Count) + public void Set(int[] dataRef, int offset) + { + SetIntArray(dataRef, offset, dataRef.Length); + } + + /// + /// Get an array of integer variables. + /// + /// The number of array elements to set. + /// Returns an array of integer variables. + /// HRESULT ID3D10EffectScalarVariable::GetIntArray([Out, Buffer] int* pData,[None] int Offset,[None] int Count) + public int[] GetIntArray(int count) + { + return GetIntArray(0, count); + } + + /// + /// Get an array of integer variables. + /// + /// Must be set to 0; this is reserved for future use. + /// The number of array elements to set. + /// Returns an array of integer variables. + /// HRESULT ID3D10EffectScalarVariable::GetIntArray([Out, Buffer] int* pData,[None] int Offset,[None] int Count) + public int[] GetIntArray(int offset, int count) + { + var temp = new int[count]; + GetIntArray(temp, offset, count); + return temp; + } + + /// + /// Set a boolean variable. + /// + /// A reference to the variable. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetBool([None] BOOL Value) + public void Set(bool value) + { + SetBool(value); + } + + /// + /// Get a boolean variable. + /// + /// Returns a boolean. + /// HRESULT ID3D10EffectScalarVariable::GetBool([Out] BOOL* pValue) + public bool GetBool() + { + RawBool temp; + GetBool(out temp); + return temp; + } + + /// + /// Set an array of boolean variables. + /// + /// A reference to the start of the data to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetBoolArray([In, Buffer] BOOL* pData,[None] int Offset,[None] int Count) + public void Set(bool[] dataRef) + { + Set(dataRef, 0); + } + + /// + /// Set an array of boolean variables. + /// + /// A reference to the start of the data to set. + /// Must be set to 0; this is reserved for future use. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::SetBoolArray([In, Buffer] BOOL* pData,[None] int Offset,[None] int Count) + public void Set(bool[] dataRef, int offset) + { + SetBoolArray(Utilities.ConvertToIntArray(dataRef), offset, dataRef.Length); + } + + /// + /// Get an array of boolean variables. + /// + /// Must be set to 0; this is reserved for future use. + /// The number of array elements to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectScalarVariable::GetBoolArray([Out, Buffer] BOOL* pData,[None] int Offset,[None] int Count) + public bool[] GetBoolArray(int offset, int count) + { + var temp = new RawBool[count]; + GetBoolArray(temp, offset, count); + return Utilities.ConvertToBoolArray(temp); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectShaderDescription.cs b/Source/SharpDX.Direct3D10/EffectShaderDescription.cs new file mode 100644 index 000000000..a80128f1d --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectShaderDescription.cs @@ -0,0 +1,52 @@ +// 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. +using System; +using SharpDX.D3DCompiler; + +namespace SharpDX.Direct3D10 +{ + public partial struct EffectShaderDescription + { + + /// + /// Gets the signature passed into InputLayout. Only valid on a vertex shader or geometry shader. + /// + /// The signature. + public ShaderSignature Signature + { + get + { + return new ShaderSignature(Bytecode); + } + } + + /// + /// Gets the bytecode from the compiled shader. + /// + /// The bytecode. + public ShaderBytecode Bytecode + { + get + { + return new ShaderBytecode(BytecodePointer, BytecodeLength); + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectShaderResourceVariable.cs b/Source/SharpDX.Direct3D10/EffectShaderResourceVariable.cs new file mode 100644 index 000000000..a292bdf9c --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectShaderResourceVariable.cs @@ -0,0 +1,74 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectShaderResourceVariable + { + /// + /// Set an array of shader resources. + /// + /// The address of an array of shader-resource-view interfaces. See . + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectShaderResourceVariable::SetResourceArray([None] ID3D10ShaderResourceView** ppResources,[None] int Offset,[None] int Count) + public void SetResourceArray(SharpDX.Direct3D10.ShaderResourceView[] resourcesRef) + { + SetResourceArray(resourcesRef, 0); + } + + /// + /// Set an array of shader resources. + /// + /// The address of an array of shader-resource-view interfaces. See . + /// The zero-based array index to get the first interface. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectShaderResourceVariable::SetResourceArray([None] ID3D10ShaderResourceView** ppResources,[None] int Offset,[None] int Count) + public void SetResourceArray(SharpDX.Direct3D10.ShaderResourceView[] resourcesRef, int offset) + { + SetResourceArray(resourcesRef, offset, resourcesRef.Length); + } + + /// + /// Get an array of shader resources. + /// + /// The number of elements in the array. + /// Returns an array of shader-resource-view interfaces. See . + /// HRESULT ID3D10EffectShaderResourceVariable::GetResourceArray([Out] ID3D10ShaderResourceView** ppResources,[None] int Offset,[None] int Count) + public SharpDX.Direct3D10.ShaderResourceView[] GetResourceArray(int count) + { + return GetResourceArray(0, count); + } + + /// + /// Get an array of shader resources. + /// + /// The zero-based array index to get the first interface. + /// The number of elements in the array. + /// Returns an array of shader-resource-view interfaces. See . + /// HRESULT ID3D10EffectShaderResourceVariable::GetResourceArray([Out] ID3D10ShaderResourceView** ppResources,[None] int Offset,[None] int Count) + public SharpDX.Direct3D10.ShaderResourceView[] GetResourceArray(int offset, int count) + { + ShaderResourceView[] temp = new ShaderResourceView[count]; + GetResourceArray(temp, offset, count); + return temp; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectStringVariable.cs b/Source/SharpDX.Direct3D10/EffectStringVariable.cs new file mode 100644 index 000000000..b2c3b88b7 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectStringVariable.cs @@ -0,0 +1,71 @@ +// 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. +using System; +using System.Runtime.InteropServices; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectStringVariable + { + /// + /// Get the string. + /// + /// Returns a reference to the string. + /// HRESULT ID3D10EffectStringVariable::GetString([Out] const char** ppString) + public string GetString() + { + unsafe { + IntPtr temp; + GetString(out temp); + return Marshal.PtrToStringAnsi( temp); + } + } + + /// + /// Get an array of strings. + /// + /// The number of strings in the returned array. + /// Returns a reference to the first string in the array. + /// HRESULT ID3D10EffectStringVariable::GetStringArray([Out, Buffer] const char** ppStrings,[None] int Offset,[None] int Count) + public string[] GetStringArray(int count) + { + return GetStringArray(0, count); + } + + /// + /// Get an array of strings. + /// + /// The offset (in number of strings) between the start of the array and the first string to get. + /// The number of strings in the returned array. + /// Returns a reference to the first string in the array. + /// HRESULT ID3D10EffectStringVariable::GetStringArray([Out, Buffer] const char** ppStrings,[None] int Offset,[None] int Count) + public string[] GetStringArray(int offset, int count) + { + unsafe { + IntPtr* temp = stackalloc IntPtr[count]; + string[] result = new string[count]; + GetStringArray((IntPtr) temp, offset, count); + for (int i = 0; i < result.Length; i++) + result[i] = Marshal.PtrToStringAnsi( temp[i]); + return result; + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectVariable.cs b/Source/SharpDX.Direct3D10/EffectVariable.cs new file mode 100644 index 000000000..effa45227 --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectVariable.cs @@ -0,0 +1,267 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectVariable + { + /// + /// Set data. + /// + /// A reference to the variable. + /// size in bytes of data to write. + /// + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// + /// + /// This method does no conversion or type checking; it is therefore a very quick way to access array items. + /// + /// HRESULT ID3D10EffectVariable::SetRawValue([None] void* pData,[None] int Offset,[None] int Count) + public void SetRawValue(DataStream data, int count) + { + SetRawValue(data.PositionPointer, 0, count); + } + + /// + /// Get data. + /// + /// + /// This method does no conversion or type checking; it is therefore a very quick way to access array items. + /// + /// The number of bytes to get. + /// Returns a filled with the value. + /// HRESULT ID3D10EffectVariable::GetRawValue([None] void* pData,[None] int Offset,[None] int Count) + public DataStream GetRawValue(int count) + { + DataStream stream = new DataStream(count, true, true); + GetRawValue(stream.DataPointer, 0, count); + return stream; + } + + /// + /// Get a scalar variable. + /// + /// + /// AsScalar returns a version of the effect variable that has been specialized to a scalar variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain scalar data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a scalar variable. See . + /// ID3D10EffectScalarVariable* ID3D10EffectVariable::AsScalar() + public SharpDX.Direct3D10.EffectScalarVariable AsScalar() + { + var temp = AsScalar_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a vector variable. + /// + /// + /// AsVector returns a version of the effect variable that has been specialized to a vector variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain vector data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a vector variable. See . + /// ID3D10EffectVectorVariable* ID3D10EffectVariable::AsVector() + public SharpDX.Direct3D10.EffectVectorVariable AsVector() + { + var temp = AsVector_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a matrix variable. + /// + /// + /// AsMatrix returns a version of the effect variable that has been specialized to a matrix variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain matrix data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a matrix variable. See . + /// ID3D10EffectMatrixVariable* ID3D10EffectVariable::AsMatrix() + public SharpDX.Direct3D10.EffectMatrixVariable AsMatrix() + { + var temp = AsMatrix_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a string variable. + /// + /// + /// AsString returns a version of the effect variable that has been specialized to a string variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain string data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a string variable. See . + /// ID3D10EffectStringVariable* ID3D10EffectVariable::AsString() + public SharpDX.Direct3D10.EffectStringVariable AsString() + { + var temp = AsString_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a shader-resource variable. + /// + /// + /// AsShaderResource returns a version of the effect variable that has been specialized to a shader-resource variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader-resource data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a shader-resource variable. See . + /// ID3D10EffectShaderResourceVariable* ID3D10EffectVariable::AsShaderResource() + public SharpDX.Direct3D10.EffectShaderResourceVariable AsShaderResource() + { + var temp = AsShaderResource_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a render-target-view variable. + /// + /// + /// This method returns a version of the effect variable that has been specialized to a render-target-view variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain render-target-view data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a render-target-view variable. See . + /// ID3D10EffectRenderTargetViewVariable* ID3D10EffectVariable::AsRenderTargetView() + public SharpDX.Direct3D10.EffectRenderTargetViewVariable AsRenderTargetView() + { + var temp = AsRenderTargetView_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a depth-stencil-view variable. + /// + /// + /// This method returns a version of the effect variable that has been specialized to a depth-stencil-view variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain depth-stencil-view data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a depth-stencil-view variable. See . + /// ID3D10EffectDepthStencilViewVariable* ID3D10EffectVariable::AsDepthStencilView() + public SharpDX.Direct3D10.EffectDepthStencilViewVariable AsDepthStencilView() + { + var temp = AsDepthStencilView_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a constant buffer. + /// + /// + /// AsConstantBuffer returns a version of the effect variable that has been specialized to a constant buffer. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain constant buffer data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a constant buffer. See . + /// ID3D10EffectConstantBuffer* ID3D10EffectVariable::AsConstantBuffer() + public SharpDX.Direct3D10.EffectConstantBuffer AsConstantBuffer() + { + var temp = AsConstantBuffer_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a shader variable. + /// + /// + /// AsShader returns a version of the effect variable that has been specialized to a shader variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a shader variable. See . + /// ID3D10EffectShaderVariable* ID3D10EffectVariable::AsShader() + public SharpDX.Direct3D10.EffectShaderVariable AsShader() + { + var temp = AsShader_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a effect-blend variable. + /// + /// + /// AsBlend returns a version of the effect variable that has been specialized to an effect-blend variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain effect-blend data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to an effect blend variable. See . + /// ID3D10EffectBlendVariable* ID3D10EffectVariable::AsBlend() + public SharpDX.Direct3D10.EffectBlendVariable AsBlend() + { + var temp = AsBlend_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a depth-stencil variable. + /// + /// + /// AsDepthStencil returns a version of the effect variable that has been specialized to a depth-stencil variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain depth-stencil data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a depth-stencil variable. See . + /// ID3D10EffectDepthStencilVariable* ID3D10EffectVariable::AsDepthStencil() + public SharpDX.Direct3D10.EffectDepthStencilVariable AsDepthStencil() + { + var temp = AsDepthStencil_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a rasterizer variable. + /// + /// + /// AsRasterizer returns a version of the effect variable that has been specialized to a rasterizer variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain rasterizer data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a rasterizer variable. See . + /// ID3D10EffectRasterizerVariable* ID3D10EffectVariable::AsRasterizer() + public SharpDX.Direct3D10.EffectRasterizerVariable AsRasterizer() + { + var temp = AsRasterizer_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + + /// + /// Get a sampler variable. + /// + /// + /// AsSampler returns a version of the effect variable that has been specialized to a sampler variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain sampler data. Applications can test the returned object for validity by calling {{IsValid}}. + /// + /// A reference to a sampler variable. See . + /// ID3D10EffectSamplerVariable* ID3D10EffectVariable::AsSampler() + public SharpDX.Direct3D10.EffectSamplerVariable AsSampler() + { + var temp = AsSampler_(); + if (temp == null || !temp.IsValid) + return null; + return temp; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/EffectVectorVariable.cs b/Source/SharpDX.Direct3D10/EffectVectorVariable.cs new file mode 100644 index 000000000..e11e77b4f --- /dev/null +++ b/Source/SharpDX.Direct3D10/EffectVectorVariable.cs @@ -0,0 +1,248 @@ +// 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. +using System; +using System.Diagnostics; +using SharpDX.Mathematics.Interop; + +namespace SharpDX.Direct3D10 +{ + public partial class EffectVectorVariable + { + private const string VectorInvalidSize = "Invalid Vector size: Must be 16 bytes or 4 x 4 bytes"; + + /// + /// Get a four-component vector that contains integer data. + /// + /// Returns a four-component vector that contains integer data + /// HRESULT ID3D10EffectVectorVariable::GetIntVector([Out] int* pData) + public RawInt4 GetIntVector() + { + RawInt4 temp; + GetIntVector(out temp); + return temp; + } + + /// + /// Get a four-component vector that contains floating-point data. + /// + /// Returns a four-component vector that contains floating-point data. + /// HRESULT ID3D10EffectVectorVariable::GetFloatVector([Out] float* pData) + public RawVector4 GetFloatVector() + { + RawVector4 temp; + GetFloatVector(out temp); + return temp; + } + + /// + /// Get a four-component vector that contains boolean data. + /// + /// a four-component vector that contains boolean data. + /// HRESULT ID3D10EffectVectorVariable::GetBoolVector([Out, Buffer] BOOL* pData) + public RawBool4 GetBoolVector() + { + RawBool4 temp; + GetBoolVector(out temp); + return temp; + } + + /// + /// Get a four-component vector. + /// + /// Type of the four-component vector + /// a four-component vector. + /// HRESULT ID3D10EffectVectorVariable::GetFloatVector([Out, Buffer] BOOL* pData) + public unsafe T GetVector() where T : struct + { + T temp; + GetIntVector(out *(RawInt4*)Interop.CastOut(out temp)); + return temp; + } + + /// + /// Set an array of four-component vectors that contain integer data. + /// + /// A reference to the start of the data to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetIntVectorArray([In, Buffer] int* pData,[None] int Offset,[None] int Count) + public void Set(RawInt4[] array) + { + Set(array, 0, array.Length); + } + + /// + /// Set an array of four-component vectors that contain floating-point data. + /// + /// A reference to the start of the data to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVectorArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void Set(RawVector4[] array) + { + Set(array, 0, array.Length); + } + + /// + /// Set an array of four-component vectors that contain floating-point data. + /// + /// Type of the four-component vector + /// A reference to the start of the data to set. + /// + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// + /// HRESULT ID3D10EffectVectorVariable::SetFloatVectorArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void Set(T[] array) where T : struct + { + Trace.Assert(Utilities.SizeOf() == 16, VectorInvalidSize); + Set(Interop.CastArray(array), 0, array.Length); + } + + /// + /// Set a x-component vector. + /// + /// A reference to the first component. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) + public void Set(T value) where T : struct + { + Set(ref value); + } + + /// + /// Set a x-component vector. + /// + /// A reference to the first component. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) + public unsafe void Set(ref T value) where T : struct + { + Trace.Assert(Utilities.SizeOf() <= 16, VectorInvalidSize); + SetRawValue(new IntPtr(Interop.Fixed(ref value)), 0, Utilities.SizeOf()); + } + + /// + /// Set a two-component vector that contains floating-point data. + /// + /// A reference to the first component. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) + public void Set(RawVector2 value) + { + unsafe + { + SetRawValue(new IntPtr(&value), 0, Utilities.SizeOf()); + } + } + + /// + /// Set a three-component vector that contains floating-point data. + /// + /// A reference to the first component. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) + public void Set(RawVector3 value) + { + unsafe + { + SetRawValue(new IntPtr(&value), 0, Utilities.SizeOf()); + } + } + + /// + /// Set a four-component color that contains floating-point data. + /// + /// A reference to the first component. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) + public void Set(RawColor4 value) + { + unsafe + { + SetRawValue(new IntPtr(&value), 0, Utilities.SizeOf()); + } + } + + /// + /// Set an array of four-component color that contain floating-point data. + /// + /// A reference to the start of the data to set. + /// Returns one of the following {{Direct3D 10 Return Codes}}. + /// HRESULT ID3D10EffectVectorVariable::SetFloatVectorArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) + public void Set(RawColor4[] array) + { + unsafe + { + fixed (void* pArray = &array[0]) SetRawValue((IntPtr)pArray, 0, array.Length * Utilities.SizeOf()); + } + } + + /// + /// Get an array of four-component vectors that contain integer data. + /// + /// The number of array elements to set. + /// Returns an array of four-component vectors that contain integer data. + /// HRESULT ID3D10EffectVectorVariable::GetIntVectorArray([Out, Buffer] int* pData,[None] int Offset,[None] int Count) + public RawInt4[] GetIntVectorArray(int count) + { + var temp = new RawInt4[count]; + GetIntVectorArray(temp, 0, count); + return temp; + } + + /// + /// Get an array of four-component vectors that contain floating-point data. + /// + /// The number of array elements to set. + /// Returns an array of four-component vectors that contain floating-point data. + /// HRESULT ID3D10EffectVectorVariable::GetFloatVectorArray([None] float* pData,[None] int Offset,[None] int Count) + public RawVector4[] GetFloatVectorArray(int count) + { + var temp = new RawVector4[count]; + GetFloatVectorArray(temp, 0, count); + return temp; + } + + /// + /// Get an array of four-component vectors that contain boolean data. + /// + /// The number of array elements to set. + /// an array of four-component vectors that contain boolean data. + /// HRESULT ID3D10EffectVectorVariable::GetBoolVectorArray([Out, Buffer] BOOL* pData,[None] int Offset,[None] int Count) + public RawBool4[] GetBoolVectorArray(int count) + { + var temp = new RawBool4[count]; + GetBoolVectorArray(temp, 0, count); + return temp; + } + + + /// + /// Get an array of four-component vectors that contain boolean data. + /// + /// The number of array elements to set. + /// an array of four-component vectors that contain boolean data. + /// HRESULT ID3D10EffectVectorVariable::GetBoolVectorArray([Out, Buffer] BOOL* pData,[None] int Offset,[None] int Count) + public T[] GetVectorArray(int count) where T : struct + { + var temp = new T[count]; + GetIntVectorArray(Interop.CastArray(temp), 0, count); + return temp; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Font.cs b/Source/SharpDX.Direct3D10/Font.cs new file mode 100644 index 000000000..6f91bce8e --- /dev/null +++ b/Source/SharpDX.Direct3D10/Font.cs @@ -0,0 +1,160 @@ +// 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. + +using SharpDX.Mathematics.Interop; +using System; +using SharpDX; + +namespace SharpDX.Direct3D10 +{ + public partial class Font + { + /// + /// Initializes a new instance of the class. + /// + /// The device. + /// The font description. + public Font(Device device, FontDescription fontDescription) : base(IntPtr.Zero) + { + D3DX10.CreateFontIndirect(device, ref fontDescription, this); + } + + /// + /// Initializes a new instance of the class from a + /// + /// The device. + /// The font. + public Font(Device device, System.Drawing.Font font) + { + D3DX10.CreateFont(device, font.Height, 0, (int)(font.Bold ? FontWeight.Bold : FontWeight.Normal), 0, font.Italic, (int)FontCharacterSet.Default, (int)FontPrecision.Default, (int)FontQuality.Default, (int)FontPitchAndFamily.Default, font.Name, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device. + /// The height. + /// The width. + /// The weight. + /// The mip levels. + /// if set to true [is italic]. + /// The character set. + /// The precision. + /// The quality. + /// The pitch and family. + /// Name of the face. + public Font(Device device, int height, int width, FontWeight weight, int mipLevels, bool isItalic, FontCharacterSet characterSet, FontPrecision precision, FontQuality quality, FontPitchAndFamily pitchAndFamily, string faceName) + { + D3DX10.CreateFont(device, height, width, (int) weight, mipLevels, isItalic, (int) characterSet, (int) precision, (int) quality, (int) pitchAndFamily, + faceName, this); + } + + /// + /// Load formatted text into video memory to improve the efficiency of rendering to the device. This method supports ANSI and Unicode strings. + /// + /// + /// The compiler setting also determines the function version. If Unicode is defined, the function call resolves to PreloadTextW. Otherwise, the function call resolves to PreloadTextA because ANSI strings are being used. This method generates textures that contain glyphs that represent the input text. The glyphs are drawn as a series of triangles. Text will not be rendered to the device; ID3DX10Font::DrawText must still be called to render the text. However, by preloading text into video memory, ID3DX10Font::DrawText will use substantially fewer CPU resources. This method internally converts characters to glyphs using the GDI function {{GetCharacterPlacement}}. + /// + /// Pointer to a string of characters to be loaded into video memory. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR; otherwise, the data type resolves to LPCSTR. See Remarks. + /// If the method succeeds, the return value is S_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA. + /// HRESULT ID3DX10Font::PreloadTextW([None] const wchar_t* pString,[None] int Count) + public void PreloadText(string stringRef) + { + PreloadText(stringRef, stringRef.Length); + } + + /// + /// Draw formatted text. + /// + /// + /// The parameters of this method are very similar to those of the {{GDI DrawText}} function. This method supports both ANSI and Unicode strings. Unless the DT_NOCLIP format is used, this method clips the text so that it does not appear outside the specified rectangle. All formatting is assumed to have multiple lines unless the DT_SINGLELINE format is specified. If the selected font is too large for the rectangle, this method does not attempt to substitute a smaller font. This method supports only fonts whose escapement and orientation are both zero. + /// + /// Reference to an ID3DX10Sprite object that contains the string you wish to draw. Can be NULL, in which case Direct3D will render the string with its own sprite object. To improve efficiency, a sprite object should be specified if ID3DX10Font::DrawText is to be called more than once in a row. + /// Pointer to a string to draw. If UNICODE is defined, this parameter type resolves to an LPCWSTR, otherwise, the type resolves to an LPCSTR. If the Count parameter is -1, the string must be NULL terminated. + /// Pointer to a structure that contains the rectangle, in logical coordinates, in which the text is to be formatted. As with any RECT object, the coordinate value of the rectangle's right side must be greater than that of its left side. Likewise, the coordinate value of the bottom must be greater than that of the top. + /// Specify the method of formatting the text. It can be any combination of the following values: ItemDescription DT_BOTTOM Justify the text to the bottom of the rectangle. This value must be combined with DT_SINGLELINE. DT_CALCRECT Tell DrawText to automatically calculate the width and height of the rectangle based on the length of the string you tell it to draw. If there are multiple lines of text, ID3DX10Font::DrawText uses the width of the rectangle pointed to by the pRect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, ID3DX10Font::DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, ID3DX10Font::DrawText returns the height of the formatted text but does not draw the text. DT_CENTER Center text horizontally in the rectangle. DT_EXPANDTABS Expand tab characters. The default number of characters per tab is eight. DT_LEFT Align text to the left. DT_NOCLIP Draw without clipping. ID3DX10Font::DrawText is somewhat faster when DT_NOCLIP is used. DT_RIGHT Align text to the right. DT_RTLREADING Display text in right-to-left reading order for bidirectional text when a Hebrew or Arabic font is selected. The default reading order for all text is left-to-right. DT_SINGLELINE Display text on a single line only. Carriage returns and line feeds do not break the line. DT_TOP Top-justify text. DT_VCENTER Center text vertically (single line only). DT_WORDBREAK Break words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the pRect parameter. A carriage return/line feed sequence also breaks the line. ? + /// Color of the text. See . + /// If the function succeeds, the return value is the height of the text in logical units. If DT_VCENTER or DT_BOTTOM is specified, the return value is the offset from pRect (top to the bottom) of the drawn text. If the function fails, the return value is zero. + /// int ID3DX10Font::DrawTextW([None] LPD3DX10SPRITE pSprite,[None] const wchar_t* pString,[None] int Count,[None] RECT* pRect,[None] int Format,[None] D3DXCOLOR Color) + public unsafe int DrawText(SharpDX.Direct3D10.Sprite sprite, string text, RawRectangle rect, FontDrawFlags drawFlags, RawColor4 color) + { + int value = DrawText(sprite, text, text.Length, new IntPtr(&rect), (int) drawFlags, color); + if (value == 0) + throw new SharpDXException("Draw failed"); + return value; + } + + /// + /// Draw formatted text at the specified position. + /// + /// Reference to an ID3DX10Sprite object that contains the string you wish to draw. Can be NULL, in which case Direct3D will render the string with its own sprite object. To improve efficiency, a sprite object should be specified if ID3DX10Font::DrawText is to be called more than once in a row. + /// Pointer to a string to draw. If UNICODE is defined, this parameter type resolves to an LPCWSTR, otherwise, the type resolves to an LPCSTR. If the Count parameter is -1, the string must be NULL terminated. + /// The x. + /// The y. + /// Color of the text. See . + /// + /// If the function succeeds, the return value is the height of the text in logical units. If DT_VCENTER or DT_BOTTOM is specified, the return value is the offset from pRect (top to the bottom) of the drawn text. If the function fails, the return value is zero. + /// + /// int ID3DX10Font::DrawTextW([None] LPD3DX10SPRITE pSprite,[None] const wchar_t* pString,[None] int Count,[None] RECT* pRect,[None] int Format,[None] D3DXCOLOR Color) + /// + /// The parameters of this method are very similar to those of the {{GDI DrawText}} function. This method supports both ANSI and Unicode strings. Unless the DT_NOCLIP format is used, this method clips the text so that it does not appear outside the specified rectangle. All formatting is assumed to have multiple lines unless the DT_SINGLELINE format is specified. If the selected font is too large for the rectangle, this method does not attempt to substitute a smaller font. This method supports only fonts whose escapement and orientation are both zero. + /// + /// int ID3DX10Font::DrawTextW([In] ID3DX10Sprite* pSprite,[In] const wchar_t* pString,[In] int Count,[In] RECT* pRect,[In] unsigned int Format,[In] D3DXCOLOR Color) + public int DrawText(Sprite sprite, string text, int x, int y, RawColor4 color) + { + return DrawText(sprite, text, new RawRectangle(x, y, 0, 0), FontDrawFlags.NoClip, color); + } + + /// + /// Measures the specified text. + /// + /// Pointer to an object that contains the string. Can be null, in which case Direct3D will render the string with its own sprite object. To improve efficiency, a sprite object should be specified if DrawText is to be called more than once in a row. + /// Pointer to a string to draw. If the Count parameter is -1, the string must be null-terminated. + /// Pointer to a structure that contains the rectangle, in logical coordinates, in which the text is to be formatted. The coordinate value of the rectangle's right side must be greater than that of its left side. Likewise, the coordinate value of the bottom must be greater than that of the top. + /// Specifies the method of formatting the text. It can be any combination of the following values: ValueMeaning DT_BOTTOM Justifies the text to the bottom of the rectangle. This value must be combined with DT_SINGLELINE. DT_CALCRECT Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the pRect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text. DT_CENTER Centers text horizontally in the rectangle. DT_EXPANDTABS Expands tab characters. The default number of characters per tab is eight. DT_LEFT Aligns text to the left. DT_NOCLIP Draws without clipping. DrawText is somewhat faster when DT_NOCLIP is used. DT_RIGHT Aligns text to the right. DT_RTLREADING Displays text in right-to-left reading order for bidirectional text when a Hebrew or Arabic font is selected. The default reading order for all text is left-to-right. DT_SINGLELINE Displays text on a single line only. Carriage returns and line feeds do not break the line. DT_TOP Top-justifies text. DT_VCENTER Centers text vertically (single line only). DT_WORDBREAK Breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the pRect parameter. A carriage return/line feed sequence also breaks the line. ? + /// Determines the width and height of the rectangle. If there are multiple lines of text, this function uses the width of the rectangle pointed to by the rect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, this method modifies the right side of the rectangle so that it bounds the last character in the line. + /// int ID3DX10Font::DrawTextW([In] ID3DX10Sprite* pSprite,[In] const wchar_t* pString,[In] int Count,[In] RECT* pRect,[In] unsigned int Format,[In] D3DXCOLOR Color) + public unsafe RawRectangle MeasureText(Sprite sprite, string text, RawRectangle rect, FontDrawFlags drawFlags) + { + // DT_CALCRECT + DrawText(sprite, text, text.Length, new IntPtr(&rect), ((int)drawFlags) | 0x400, whiteColor); + return rect; + } + + /// + /// Measures the specified text. + /// + /// Pointer to an object that contains the string. Can be null, in which case Direct3D will render the string with its own sprite object. To improve efficiency, a sprite object should be specified if DrawText is to be called more than once in a row. + /// Pointer to a string to draw. If the Count parameter is -1, the string must be null-terminated. + /// Pointer to a structure that contains the rectangle, in logical coordinates, in which the text is to be formatted. The coordinate value of the rectangle's right side must be greater than that of its left side. Likewise, the coordinate value of the bottom must be greater than that of the top. + /// Specifies the method of formatting the text. It can be any combination of the following values: ValueMeaning DT_BOTTOM Justifies the text to the bottom of the rectangle. This value must be combined with DT_SINGLELINE. DT_CALCRECT Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the pRect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text. DT_CENTER Centers text horizontally in the rectangle. DT_EXPANDTABS Expands tab characters. The default number of characters per tab is eight. DT_LEFT Aligns text to the left. DT_NOCLIP Draws without clipping. DrawText is somewhat faster when DT_NOCLIP is used. DT_RIGHT Aligns text to the right. DT_RTLREADING Displays text in right-to-left reading order for bidirectional text when a Hebrew or Arabic font is selected. The default reading order for all text is left-to-right. DT_SINGLELINE Displays text on a single line only. Carriage returns and line feeds do not break the line. DT_TOP Top-justifies text. DT_VCENTER Centers text vertically (single line only). DT_WORDBREAK Breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the pRect parameter. A carriage return/line feed sequence also breaks the line. ? + /// The height of the formatted text but does not draw the text. + /// Determines the width and height of the rectangle. If there are multiple lines of text, this function uses the width of the rectangle pointed to by the rect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, this method modifies the right side of the rectangle so that it bounds the last character in the line. + /// int ID3DX10Font::DrawTextW([In] ID3DX10Sprite* pSprite,[In] const wchar_t* pString,[In] int Count,[In] RECT* pRect,[In] unsigned int Format,[In] D3DXCOLOR Color) + public unsafe RawRectangle MeasureText(Sprite sprite, string text, RawRectangle rect, FontDrawFlags drawFlags, out int textHeight) + { + // DT_CALCRECT + textHeight = DrawText(sprite, text, text.Length, new IntPtr(&rect), ((int)drawFlags) | 0x400, whiteColor); + return rect; + } + + private static readonly RawColor4 whiteColor = new RawColor4(1,1,1,1); + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/FontCharacterSet.cs b/Source/SharpDX.Direct3D10/FontCharacterSet.cs new file mode 100644 index 000000000..e32d94e12 --- /dev/null +++ b/Source/SharpDX.Direct3D10/FontCharacterSet.cs @@ -0,0 +1,107 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Defines possible character sets for fonts. + /// + /// CHARSET + public enum FontCharacterSet : byte + { + /// + /// The ANSI character set. + /// + Ansi = 0, + /// + /// The Arabic character set. + /// + Arabic = 0xb2, + /// + /// The Baltic character set. + /// + Baltic = 0xba, + /// + /// The Chinese character set. + /// + ChineseBig5 = 0x88, + /// + /// The default system character set. + /// + Default = 1, + /// + /// The East Europe character set. + /// + EastEurope = 0xee, + /// + /// The GB2312 character set. + /// + GB2312 = 0x86, + /// + /// The Greek character set. + /// + Greek = 0xa1, + /// + /// The Hangul character set. + /// + Hangul = 0x81, + /// + /// The Hebrew character set. + /// + Hebrew = 0xb1, + /// + /// The Johab character set. + /// + Johab = 130, + /// + /// The Mac character set. + /// + Mac = 0x4d, + /// + /// The OEM character set. + /// + Oem = 0xff, + /// + /// The Russian character set. + /// + Russian = 0xcc, + /// + /// The ShiftJIS character set. + /// + ShiftJIS = 0x80, + /// + /// The symbol character set. + /// + Symbol = 2, + /// + /// The Thai character set. + /// + Thai = 0xde, + /// + /// The Turkish character set. + /// + Turkish = 0xa2, + /// + /// The Vietnamese character set. + /// + Vietnamese = 0xa3 + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/FontDrawFlags.cs b/Source/SharpDX.Direct3D10/FontDrawFlags.cs new file mode 100644 index 000000000..5943b7549 --- /dev/null +++ b/Source/SharpDX.Direct3D10/FontDrawFlags.cs @@ -0,0 +1,76 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Specifies formatting options for text rendering. + /// + /// DT + [Flags] + public enum FontDrawFlags + { + /// + /// Align the text to the bottom. + /// + Bottom = 8, + /// + /// Align the text to the center. + /// + Center = 1, + /// + /// Expand tab characters. + /// + ExpandTabs = 0x40, + /// + /// Align the text to the left. + /// + Left = 0, + /// + /// Don't clip the text. + /// + NoClip = 0x100, + /// + /// Align the text to the right. + /// + Right = 2, + /// + /// Rendering the text in right-to-left reading order. + /// + RtlReading = 0x20000, + /// + /// Force all text to a single line. + /// + SingleLine = 0x20, + /// + /// Align the text to the top. + /// + Top = 0, + /// + /// Vertically align the text to the center. + /// + VerticalCenter = 4, + /// + /// Allow word breaks. + /// + WordBreak = 0x10 + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/FontPitchAndFamily.cs b/Source/SharpDX.Direct3D10/FontPitchAndFamily.cs new file mode 100644 index 000000000..4fb5c06d3 --- /dev/null +++ b/Source/SharpDX.Direct3D10/FontPitchAndFamily.cs @@ -0,0 +1,71 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Defines pitch and family settings for fonts. + /// + [Flags] + public enum FontPitchAndFamily : byte + { + /// + /// Use the Decorative family. + /// + Decorative = 80, + /// + /// Default pitch. + /// + Default = 0, + /// + /// The font family doesn't matter. + /// + DontCare = 0, + /// + /// Fixed pitch. + /// + Fixed = 1, + /// + /// Use the Modern family. + /// + Modern = 0x30, + /// + /// Mono pitch. + /// + Mono = 8, + /// + /// Use the Roman family. + /// + Roman = 0x10, + /// + /// Use the Script family. + /// + Script = 0x40, + /// + /// Use the Swiss family. + /// + Swiss = 0x20, + /// + /// Variable pitch. + /// + Variable = 2 + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/FontPrecision.cs b/Source/SharpDX.Direct3D10/FontPrecision.cs new file mode 100644 index 000000000..5bc055d88 --- /dev/null +++ b/Source/SharpDX.Direct3D10/FontPrecision.cs @@ -0,0 +1,75 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Defines precision levels for font rendering. + /// + /// OutPrecision + public enum FontPrecision : byte + { + /// + /// Default + /// + Default, + /// + /// String + /// + String, + /// + /// Character + /// + Character, + /// + /// Stroke + /// + Stroke, + /// + /// TrueType + /// + TrueType, + /// + /// Device + /// + Device, + /// + /// Raster + /// + Raster, + /// + /// TrueTypeOnly + /// + TrueTypeOnly, + /// + /// Outline + /// + Outline, + /// + /// ScreenOutline + /// + ScreenOutline, + /// + /// PostScriptOnly + /// + PostScriptOnly + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/FontQuality.cs b/Source/SharpDX.Direct3D10/FontQuality.cs new file mode 100644 index 000000000..1351267e3 --- /dev/null +++ b/Source/SharpDX.Direct3D10/FontQuality.cs @@ -0,0 +1,59 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Specifies quality options for font rendering. + /// + /// QUALITY + public enum FontQuality : byte + { + /// + /// Default + /// + Default, + /// + /// Draft + /// + Draft, + /// + /// Proof + /// + Proof, + /// + /// Non antialiased + /// + NonAntialiased, + /// + /// Antialiased + /// + Antialiased, + /// + /// ClearType + /// + ClearType, + /// + /// ClearTypeNatural + /// + ClearTypeNatural + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/FontWeight.cs b/Source/SharpDX.Direct3D10/FontWeight.cs new file mode 100644 index 000000000..1012f8d5f --- /dev/null +++ b/Source/SharpDX.Direct3D10/FontWeight.cs @@ -0,0 +1,91 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + /// + /// Specifies weights for font rendering. + /// + /// FW + public enum FontWeight + { + /// + /// Use a black weight. + /// + Black = 900, + /// + /// Use a bold weight. + /// + Bold = 700, + /// + /// Use a demi-bold weight. + /// + DemiBold = 600, + /// + /// The font weight doesn't matter. + /// + DoNotCare = 0, + /// + /// Use an extra bold weight. + /// + ExtraBold = 800, + /// + /// Make the font extra light. + /// + ExtraLight = 200, + /// + /// Use a heavy weight. + /// + Heavy = 900, + /// + /// Make the font light. + /// + Light = 300, + /// + /// Use a medium weight. + /// + Medium = 500, + /// + /// Use a normal weight. + /// + Normal = 400, + /// + /// Use a regular weight. + /// + Regular = 400, + /// + /// Use a semi-bold weight. + /// + SemiBold = 600, + /// + /// Make the font thin. + /// + Thin = 100, + /// + /// Use an ultra bold weight. + /// + UltraBold = 800, + /// + /// Make the font ultra light. + /// + UltraLight = 200 + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/GeometryShader.cs b/Source/SharpDX.Direct3D10/GeometryShader.cs new file mode 100644 index 000000000..393610e4d --- /dev/null +++ b/Source/SharpDX.Direct3D10/GeometryShader.cs @@ -0,0 +1,52 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class GeometryShader + { + /// + /// Initializes a new instance of the class. + /// + /// The device used to create the shader. + /// The compiled shader bytecode. + public unsafe GeometryShader(Device device, byte[] shaderBytecode) + : base(IntPtr.Zero) + { + fixed (void* ptr = shaderBytecode) + device.CreateGeometryShader((IntPtr)ptr, shaderBytecode.Length, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device used to create the shader. + /// The compiled shader bytecode. + /// An array of instances describing the layout of the output buffers. + /// The size, in bytes, of each element in the array pointed to by pSODeclaration. This parameter is only used when the output slot is 0 for all entries in pSODeclaration. + public unsafe GeometryShader(Device device, byte[] shaderBytecode, StreamOutputElement[] elements, int outputStreamStride) + : base(IntPtr.Zero) + { + fixed (void* ptr = shaderBytecode) + device.CreateGeometryShaderWithStreamOutput((IntPtr)ptr, shaderBytecode.Length, elements, elements.Length, outputStreamStride, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/ImageInformation.cs b/Source/SharpDX.Direct3D10/ImageInformation.cs new file mode 100644 index 000000000..e29d695e2 --- /dev/null +++ b/Source/SharpDX.Direct3D10/ImageInformation.cs @@ -0,0 +1,73 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial struct ImageInformation + { + /// + /// Retrieves information about a given image file. + /// + /// File name of image to retrieve information about. + /// If the function succeeds, returns a filled with the description of the data in the source file. else returns null + /// HRESULT D3DX11GetImageInfoFromFileW([None] const wchar_t* pSrcFile,[None] ID3DX11ThreadPump* pPump,[None] D3DX11_IMAGE_INFO* pSrcInfo,[None] HRESULT* pHResult) + public static ImageInformation? FromFile(string fileName) + { + try + { + var info = new ImageInformation(); + Result hresult; + D3DX10.GetImageInfoFromFile(fileName, IntPtr.Zero, ref info, out hresult); + // TODO check hresult? + return info; + } + catch (SharpDXException) + { } + return null; + } + + /// + /// Retrieves information about a given image file from a memory location. + /// + /// an array to the image in memory + /// If the function succeeds, returns a filled with the description of the data from the image memory. else returns null + /// HRESULT D3DX11GetImageInfoFromFileW([None] const wchar_t* pSrcFile,[None] ID3DX11ThreadPump* pPump,[None] D3DX11_IMAGE_INFO* pSrcInfo,[None] HRESULT* pHResult) + public static ImageInformation? FromMemory(byte[] memory) + { + unsafe + { + try + { + var info = new ImageInformation(); + Result hresult; + fixed (void* pMemory = &memory[0]) + D3DX10.GetImageInfoFromMemory((IntPtr)pMemory, memory.Length, IntPtr.Zero, ref info, out hresult); + // TODO check hresult? + return info; + } + catch (SharpDXException) + { + } + return null; + } + } + } +} diff --git a/Source/SharpDX.Direct3D10/ImageLoadInformation.cs b/Source/SharpDX.Direct3D10/ImageLoadInformation.cs new file mode 100644 index 000000000..eacdf4a41 --- /dev/null +++ b/Source/SharpDX.Direct3D10/ImageLoadInformation.cs @@ -0,0 +1,46 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial struct ImageLoadInformation + { + /// + /// The default value for load options. + /// + public const int FileDefaultValue = -1; + + /// + /// Gets an ImageLoadInformation that is setup with all default values (). + /// + public static readonly ImageLoadInformation Default = GetDefault(); + + private static ImageLoadInformation GetDefault() + { + var value = default(ImageLoadInformation); + unsafe + { + Utilities.ClearMemory(new IntPtr(&value), 0xFF, Utilities.SizeOf()); + } + return value; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/InfoQueue.cs b/Source/SharpDX.Direct3D10/InfoQueue.cs new file mode 100644 index 000000000..d1eaefa5d --- /dev/null +++ b/Source/SharpDX.Direct3D10/InfoQueue.cs @@ -0,0 +1,70 @@ +// 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. + +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class InfoQueue + { + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// + /// HRESULT ID3D10InfoQueue::GetMessageW([In] unsigned longlong MessageIndex,[Out, Buffer, Optional] D3D10_MESSAGE* pMessage,[InOut] SIZE_T* pMessageByteLength) + public unsafe Message GetMessage(long messageIndex) + { + PointerSize messageSize = 0; + GetMessage(messageIndex, IntPtr.Zero, ref messageSize); + + var messagePtr = stackalloc byte[(int) messageSize]; + GetMessage(messageIndex, new IntPtr(messagePtr), ref messageSize); + + var message = new Message(); + message.__MarshalFrom(ref *(Message.__Native*)messagePtr); + return message; + } + + /// + /// No documentation. + /// + /// No documentation. + /// + /// HRESULT ID3D10InfoQueue::GetStorageFilter([Out, Buffer, Optional] D3D10_INFO_QUEUE_FILTER* pFilter,[InOut] SIZE_T* pFilterByteLength) + public SharpDX.Direct3D10.InfoQueueFilter GetStorageFilter() + { + throw new NotImplementedException(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// + /// HRESULT ID3D10InfoQueue::GetRetrievalFilter([Out, Buffer, Optional] D3D10_INFO_QUEUE_FILTER* pFilter,[InOut] SIZE_T* pFilterByteLength) + public SharpDX.Direct3D10.InfoQueueFilter GetRetrievalFilter() + { + throw new NotImplementedException(); + } + } +} + diff --git a/Source/SharpDX.Direct3D10/InfoQueueFilterDescription.cs b/Source/SharpDX.Direct3D10/InfoQueueFilterDescription.cs new file mode 100644 index 000000000..2b3d2e27b --- /dev/null +++ b/Source/SharpDX.Direct3D10/InfoQueueFilterDescription.cs @@ -0,0 +1,118 @@ +// 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. + +using System; +using System.Runtime.InteropServices; + +namespace SharpDX.Direct3D10 +{ + public partial class InfoQueueFilterDescription + { + /// + /// Gets or sets the categories. + /// + /// + /// The categories. + /// + public MessageCategory[] Categories { get; set; } + + /// + /// Gets or sets the severities. + /// + /// + /// The severities. + /// + public MessageSeverity[] Severities { get; set; } + + /// + /// Gets or sets the ids. + /// + /// + /// The ids. + /// + public MessageId[] Ids { get; set; } + + // Internal native struct used for marshalling + + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal partial struct __Native + { + public int CategorieCount; + public System.IntPtr PCategoryList; + public int SeveritieCount; + public System.IntPtr PSeverityList; + public int IDCount; + public System.IntPtr PIDList; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (PCategoryList != IntPtr.Zero) + Marshal.FreeHGlobal(PCategoryList); + if (PSeverityList != IntPtr.Zero) + Marshal.FreeHGlobal(PSeverityList); + if (PIDList != IntPtr.Zero) + Marshal.FreeHGlobal(PIDList); + } + } + + internal unsafe void __MarshalFree(ref InfoQueueFilterDescription.__Native @ref) + { + @ref.__MarshalFree(); + } + + internal unsafe void __MarshalFrom(ref InfoQueueFilterDescription.__Native @ref) + { + this.Categories = new MessageCategory[@ref.CategorieCount]; + if (@ref.CategorieCount > 0) + Utilities.Read(@ref.PCategoryList, this.Categories, 0, @ref.CategorieCount); + + this.Severities = new MessageSeverity[@ref.SeveritieCount]; + if (@ref.SeveritieCount > 0) + Utilities.Read(@ref.PSeverityList, this.Severities, 0, @ref.SeveritieCount); + + this.Ids = new MessageId[@ref.IDCount]; + if (@ref.IDCount > 0) + Utilities.Read(@ref.PIDList, this.Ids, 0, @ref.IDCount); + } + + internal unsafe void __MarshalTo(ref InfoQueueFilterDescription.__Native @ref) + { + @ref.CategorieCount = this.Categories == null ? 0 : this.Categories.Length; + if (@ref.CategorieCount > 0) + { + @ref.PCategoryList = Marshal.AllocHGlobal(sizeof(MessageCategory) * @ref.CategorieCount); + Utilities.Write(@ref.PCategoryList, this.Categories, 0, @ref.CategorieCount); + } + @ref.SeveritieCount = this.Severities == null ? 0 : this.Severities.Length; + if (@ref.SeveritieCount > 0) + { + @ref.PSeverityList = Marshal.AllocHGlobal(sizeof(MessageSeverity) * @ref.SeveritieCount); + Utilities.Write(@ref.PSeverityList, this.Severities, 0, @ref.SeveritieCount); + } + @ref.IDCount = this.Ids == null ? 0 : this.Ids.Length; + if (@ref.IDCount > 0) + { + @ref.PIDList = Marshal.AllocHGlobal(sizeof(MessageId) * @ref.IDCount); + Utilities.Write(@ref.PIDList, this.Ids, 0, @ref.IDCount); + } + } + } +} + diff --git a/Source/SharpDX.Direct3D10/InputElement.cs b/Source/SharpDX.Direct3D10/InputElement.cs new file mode 100644 index 000000000..a8aae9a84 --- /dev/null +++ b/Source/SharpDX.Direct3D10/InputElement.cs @@ -0,0 +1,158 @@ +// 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. +using SharpDX.DXGI; + +namespace SharpDX.Direct3D10 +{ + public partial struct InputElement + { + /// + /// Returns a value that can be used for the offset parameter of an InputElement to indicate that the element + /// should be aligned directly after the previous element, including any packing if necessary. + /// + /// A value used to align input elements. + /// D3D10_APPEND_ALIGNED_ELEMENT + public static int AppendAligned + { + get { return -1; } + } + + /// + /// Initializes a new instance of the struct. + /// + /// The HLSL semantic associated with this element in a shader input-signature. + /// The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3). + /// The data type of the element data. + /// Offset (in bytes) between each element. Use AppendAligned for convenience to define the current element directly after the previous one, including any packing if necessary. + /// An integer value that identifies the input-assembler. Valid values are between 0 and 15. + /// Identifies the input data class for a single input slot. + /// The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data. + public InputElement(string name, int index, Format format, int offset, int slot, InputClassification slotClass, + int stepRate) + { + this.SemanticName = name; + this.SemanticIndex = index; + this.Format = format; + this.Slot = slot; + this.AlignedByteOffset = offset; + this.Classification = slotClass; + this.InstanceDataStepRate = stepRate; + } + + /// + /// Initializes a new instance of the struct. + /// + /// The HLSL semantic associated with this element in a shader input-signature. + /// The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3). + /// The data type of the element data. + /// Offset (in bytes) between each element. Use AppendAligned for convenience to define the current element directly after the previous one, including any packing if necessary. + /// An integer value that identifies the input-assembler. Valid values are between 0 and 15. + public InputElement(string name, int index, Format format, int offset, int slot) + { + this.SemanticName = name; + this.SemanticIndex = index; + this.Format = format; + this.Slot = slot; + this.AlignedByteOffset = offset; + this.Classification= InputClassification.PerVertexData; + this.InstanceDataStepRate = 0; + } + + /// + /// Initializes a new instance of the struct. + /// + /// The HLSL semantic associated with this element in a shader input-signature. + /// The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3). + /// The data type of the element data. + /// An integer value that identifies the input-assembler. Valid values are between 0 and 15. + public InputElement(string name, int index, Format format, int slot) + { + this.SemanticName = name; + this.SemanticIndex = index; + this.Format = format; + this.Slot = slot; + this.AlignedByteOffset = -1; + this.Classification = InputClassification.PerVertexData; + this.InstanceDataStepRate = 0; + } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public bool Equals(InputElement other) + { + return Equals(other.SemanticName, SemanticName) && other.SemanticIndex == SemanticIndex && Equals(other.Format, Format) && other.Slot == Slot && other.AlignedByteOffset == AlignedByteOffset && Equals(other.Classification, Classification) && other.InstanceDataStepRate == InstanceDataStepRate; + } + + /// + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (obj.GetType() != typeof(InputElement)) return false; + return Equals((InputElement)obj); + } + + /// + public override int GetHashCode() + { + unchecked + { + int result = SemanticName.GetHashCode(); + result = (result * 397) ^ SemanticIndex.GetHashCode(); + result = (result * 397) ^ Format.GetHashCode(); + result = (result * 397) ^ Slot.GetHashCode(); + result = (result * 397) ^ AlignedByteOffset.GetHashCode(); + result = (result * 397) ^ Classification.GetHashCode(); + result = (result * 397) ^ InstanceDataStepRate.GetHashCode(); + return result; + } + } + + /// + /// Implements the operator ==. + /// + /// The left. + /// The right. + /// + /// The result of the operator. + /// + public static bool operator ==(InputElement left, InputElement right) + { + return left.Equals(right); + } + + /// + /// Implements the operator !=. + /// + /// The left. + /// The right. + /// + /// The result of the operator. + /// + public static bool operator !=(InputElement left, InputElement right) + { + return !left.Equals(right); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/InputLayout.cs b/Source/SharpDX.Direct3D10/InputLayout.cs new file mode 100644 index 000000000..c7787247c --- /dev/null +++ b/Source/SharpDX.Direct3D10/InputLayout.cs @@ -0,0 +1,41 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class InputLayout + { + /// + /// Initializes a new instance of the object to describe the + /// input-buffer data for the input-assembler stage. + /// + /// ID3D10Device::CreateInputLayout + /// The device used to create the layout. + /// An array of input elements describing the layout of the input data. + /// The compiled shader used to validate the input elements. + public unsafe InputLayout(Device device, byte[] shaderBytecode, InputElement[] elements) + : base(IntPtr.Zero) + { + fixed (void* ptr = shaderBytecode) + device.CreateInputLayout(elements, elements.Length, (IntPtr)ptr, shaderBytecode.Length, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Mapping.xml b/Source/SharpDX.Direct3D10/Mapping.xml new file mode 100644 index 000000000..437faccb7 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Mapping.xml @@ -0,0 +1,390 @@ + + + + sharpdx + sharpdx-dxgi + sharpdx-d3dcompiler + sharpdx-direct3d1x + + SharpDX.Direct3D10 + SharpDX.Direct3D10 + + + #define D3D10_NO_HELPERS + + + + + + + + + + + + + + + + + + + + + sharpdx-direct3d10-ext + d3d10 + d3d10_1 + d3d10_1shader + d3d10misc + d3d10sdklayers + d3d10shader + + d3dx10 + d3dx10core + d3dx10tex + d3dx10mesh + d3dx10async + + + + + + + + + + + + + + + + + + + + + + + + $1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Mesh.cs b/Source/SharpDX.Direct3D10/Mesh.cs new file mode 100644 index 000000000..be6835026 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Mesh.cs @@ -0,0 +1,231 @@ +// 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. +using System; +using SharpDX.Direct3D; + +namespace SharpDX.Direct3D10 +{ + public partial class Mesh + { + /// + /// Creates a mesh object using a declarator. + /// + /// Pointer to an , the device object to be associated with the mesh. + /// Array of elements, describing the vertex format for the returned mesh. This parameter must map directly to a flexible vertex format (FVF). + /// Semantic that identifies which part of the vertex declaration contains position information. + /// Number of vertices for the mesh. This parameter must be greater than 0. + /// Number of faces for the mesh. The valid range for this number is greater than 0, and one less than the maximum DWORD (typically 65534), because the last index is reserved. + /// Combination of one or more flags from the , specifying options for the mesh. + /// HRESULT D3DX10CreateMesh([None] ID3D10Device* pDevice,[In, Buffer] const D3D10_INPUT_ELEMENT_DESC* pDeclaration,[None] int DeclCount,[None] const char* pPositionSemantic,[None] int VertexCount,[None] int FaceCount,[None] int Options,[None] ID3DX10Mesh** ppMesh) + public Mesh(Device device, InputElement[] elements, string positionElement, int vertexCount, int faceCount, MeshFlags flags) + { + D3DX10.CreateMesh(device, elements, elements.Length, positionElement, vertexCount, faceCount, (int) flags, this); + } + + /// + /// Creates a new mesh and fills it with the data of a previously loaded mesh. + /// + /// The semantic name for the position data. + /// Array of structures, describing the vertex format for the returned mesh. See . + /// Creation flags to be applied to the new mesh. See . + /// returns the Mesh cloned. + /// HRESULT ID3DX10Mesh::CloneMesh([None] int Flags,[None] const char* pPosSemantic,[In, Buffer] const D3D10_INPUT_ELEMENT_DESC* pDesc,[None] int DeclCount,[None] ID3DX10Mesh** ppCloneMesh) + public Mesh Clone(InputElement[] elements, string positionElement, MeshFlags flags) + { + Mesh temp; + CloneMesh((int) flags, positionElement, elements, elements.Length, out temp); + return temp; + } + + /// + /// Access the mesh's creation flags. + /// + /// The creation flags passed into the options parameter of when the mesh was created. See {{D3DX10_MESH}}. + /// int ID3DX10Mesh::GetFlags() + public MeshFlags Flags + { + get + { + return (MeshFlags)GetFlags(); + } + } + + /// + /// Access the mesh's attribute buffer. + /// + /// Returns the attribute buffer. See . + /// HRESULT ID3DX10Mesh::GetAttributeBuffer([None] ID3DX10MeshBuffer** ppAttribute) + public MeshBuffer GetAttributeBuffer() + { + MeshBuffer temp; + GetAttributeBuffer(out temp); + return temp; + } + + + /// + /// Retrieves either an attribute table for a mesh, or the number of entries stored in an attribute table for a mesh. + /// + /// + /// An attribute table is used to identify areas of the mesh that need to be drawn with different textures, render states, materials, and so on. In addition, the application can use the attribute table to hide portions of a mesh by not drawing a given attribute identifier when drawing the frame. + /// + /// Returns an array of structures, representing the entries in the mesh's attribute table. + /// HRESULT ID3DX10Mesh::GetAttributeTable([Out, Buffer, Optional] D3DX10_ATTRIBUTE_RANGE* pAttribTable,[None] int* pAttribTableSize) + public MeshAttributeRange[] GetAttributeTable() + { + int sizeAttributeTable = 0; + GetAttributeTable(null, ref sizeAttributeTable); + var temp = new MeshAttributeRange[sizeAttributeTable]; + GetAttributeTable(temp, ref sizeAttributeTable); + return temp; + } + + /// + /// Get the mesh's point rep buffer. + /// + /// Returns a mesh buffer containing the mesh's point rep data. See . + /// HRESULT ID3DX10Mesh::GetPointRepBuffer([None] ID3DX10MeshBuffer** ppPointReps) + public MeshBuffer GetPointRepresentationBuffer() + { + MeshBuffer temp; + GetPointRepBuffer(out temp); + return temp; + } + + /// + /// Optimizes the mesh data. + /// + /// Flags indicating which optimizations to perform. + /// A result code. + public Result Optimize(MeshOptimizeFlags flags) + { + Optimize((int) flags, null, IntPtr.Zero); + return Result.Ok; + } + + /// + /// Generates a new mesh with reordered faces and vertices to optimize drawing performance. + /// + /// + /// This method generates a new mesh. Before running Optimize, an application must generate an adjacency buffer by calling . The adjacency buffer contains adjacency data, such as a list of edges and the faces that are adjacent to each other. This method is very similar to the method, except that it can perform optimization while generating the new clone of the mesh. The output mesh inherits all of the creation parameters of the input mesh. + /// + /// Specifies the type of optimization to perform. This parameter can be set to a combination of one or more flags from D3DXMESHOPT and D3DXMESH (except D3DXMESH_32BIT, D3DXMESH_IB_WRITEONLY, and D3DXMESH_WRITEONLY). + /// An array of UINTs, one per face, that identifies the original mesh face that corresponds to each face in the optimized mesh. + /// An array of index for each vertex that specifies how the new vertices map to the old vertices. This remap is useful if you need to alter external data based on the new vertex mapping. + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::Optimize([None] int Flags,[Out, Buffer, Optional] int* pFaceRemap,[In] LPD3D10BLOB* ppVertexRemap) + public void Optimize(MeshOptimizeFlags flags, out int[] faceRemap, out int[] vertexRemap) + { + + IntPtr blobPtr; + DataStream dataStream = null; + unsafe + { + try + { + faceRemap = new int[FaceCount]; + Optimize((int)flags, faceRemap, new IntPtr(&blobPtr)); + dataStream = new DataStream(new Blob(blobPtr)); + vertexRemap = dataStream.ReadRange(VertexCount); + dataStream.Dispose(); + } + catch (Exception) + { + faceRemap = null; + vertexRemap = null; + if (dataStream!=null) + dataStream.Dispose(); + throw; + } + } + } + + /// + /// Set the mesh's adjacency data. + /// + /// The adjacency data to set + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::SetAdjacencyData([In] const int* pAdjacency) + public void SetAdjacencyData(DataStream data) + { + SetAdjacencyData(data.PositionPointer); + } + + /// + /// Set the mesh's attribute data. + /// + /// The attribute data to set. + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::SetAttributeData([In] const int* pData) + public void SetAttributeData(DataStream data) + { + SetAttributeData(data.PositionPointer); + } + + /// + /// Sets the attribute table for a mesh and the number of entries stored in the table. + /// + /// + /// If an application keeps track of the information in an attribute table, and rearranges the table as a result of changes to attributes or faces, this method allows the application to update the attribute tables instead of calling ID3DX10Mesh::Optimize again. + /// + /// an array of structures, representing the entries in the mesh attribute table. + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::SetAttributeTable([In, Buffer] const D3DX10_ATTRIBUTE_RANGE* pAttribTable,[None] int cAttribTableSize) + public void SetAttributeTable(MeshAttributeRange[] data) + { + SetAttributeTable(data, data.Length); + } + + /// + /// Set the mesh's index data. + /// + /// The index data. + /// The number of indices in pData. + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::SetIndexData([None] const void* pData,[None] int cIndices) + public void SetIndexData(DataStream data, int count) + { + SetIndexData(data.PositionPointer, count); + } + + /// + /// Set the point rep data for the mesh. + /// + /// The point rep data to set. + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::SetPointRepData([None] const int* pPointReps) + public void SetPointRepresentationData(DataStream data) + { + SetPointRepData(data.PositionPointer); + } + + /// + /// Set vertex data into one of the mesh's vertex buffers. + /// + /// The vertex buffer to be filled with pData. + /// The vertex data to set. + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT ID3DX10Mesh::SetVertexData([None] int iBuffer,[None] const void* pData) + public void SetVertexData(int index, DataStream data) + { + SetVertexData(index, data.PositionPointer); + } + } +} diff --git a/Source/SharpDX.Direct3D10/MeshBuffer.cs b/Source/SharpDX.Direct3D10/MeshBuffer.cs new file mode 100644 index 000000000..180284751 --- /dev/null +++ b/Source/SharpDX.Direct3D10/MeshBuffer.cs @@ -0,0 +1,42 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class MeshBuffer + { + /// + /// Get a reference to the mesh buffer memory to modify its contents. + /// + /// + /// Differences between Direct3D 9 and Direct3D 10: Map() in Direct3D 10 is analogous to resource Map() in Direct3D 9. ? + /// + /// Returns a reference to the mesh buffer memory to modify its contents + /// HRESULT ID3DX10MeshBuffer::Map([Out] void** ppData,[Out] SIZE_T* pSize) + public DataStream Map() + { + IntPtr dataPointer; + PointerSize dataSize; + Map(out dataPointer, out dataSize); + return new DataStream(dataPointer, dataSize, true, true); + } + } +} diff --git a/Source/SharpDX.Direct3D10/Message.cs b/Source/SharpDX.Direct3D10/Message.cs new file mode 100644 index 000000000..745775dd9 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Message.cs @@ -0,0 +1,50 @@ +// 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. + +using System; +using System.Runtime.InteropServices; + +namespace SharpDX.Direct3D10 +{ + public partial struct Message + { + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal partial struct __Native + { + public SharpDX.Direct3D10.MessageCategory Category; + public SharpDX.Direct3D10.MessageSeverity Severity; + public SharpDX.Direct3D10.MessageId Id; + public System.IntPtr PDescription; + public SharpDX.PointerSize DescriptionByteLength; + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Category = @ref.Category; + this.Severity = @ref.Severity; + this.Id = @ref.Id; + this.Description = (@ref.PDescription == IntPtr.Zero) ? null : Marshal.PtrToStringAnsi(@ref.PDescription); + this.DescriptionByteLength = @ref.DescriptionByteLength; + } + } +} + diff --git a/Source/SharpDX.Direct3D10/NamespaceDoc.cs b/Source/SharpDX.Direct3D10/NamespaceDoc.cs new file mode 100644 index 000000000..6e745bd70 --- /dev/null +++ b/Source/SharpDX.Direct3D10/NamespaceDoc.cs @@ -0,0 +1,32 @@ +// 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. +namespace SharpDX.Direct3D10 +{ + /// + /// The namespace provides a managed Direct3D10 API. + /// + /// bb205066 + /// Direct3D10 + /// Direct3D10 + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + class NamespaceDoc + { + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/PixelShader.cs b/Source/SharpDX.Direct3D10/PixelShader.cs new file mode 100644 index 000000000..e09d08497 --- /dev/null +++ b/Source/SharpDX.Direct3D10/PixelShader.cs @@ -0,0 +1,38 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class PixelShader + { + /// + /// Initializes a new instance of the class. + /// + /// The device used to create the shader. + /// The compiled shader bytecode. + public unsafe PixelShader(Device device, byte[] shaderBytecode) + : base(IntPtr.Zero) + { + fixed (void* ptr = shaderBytecode) + device.CreatePixelShader((IntPtr)ptr, shaderBytecode.Length, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Predicate.cs b/Source/SharpDX.Direct3D10/Predicate.cs new file mode 100644 index 000000000..5f0c645f0 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Predicate.cs @@ -0,0 +1,38 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class Predicate + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The query description. + /// The newly created object. + public Predicate(Device device, QueryDescription description) + : base(IntPtr.Zero) + { + device.CreatePredicate(description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Properties/AssemblyInfo.cs b/Source/SharpDX.Direct3D10/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..304733803 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Properties/AssemblyInfo.cs @@ -0,0 +1,25 @@ +// 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. + +using System.Reflection; + +[assembly: AssemblyProduct("SharpDX.Direct3D10")] +[assembly: AssemblyTitle("SharpDX.Direct3D10")] +[assembly: AssemblyDescription("Assembly providing DirectX - Direct3D10 and Direct3D10.1 managed API")] diff --git a/Source/SharpDX.Direct3D10/Query.cs b/Source/SharpDX.Direct3D10/Query.cs new file mode 100644 index 000000000..57d41ea12 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Query.cs @@ -0,0 +1,38 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class Query + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The query description. + /// The newly created object. + public Query(Device device, QueryDescription description) + : base(IntPtr.Zero) + { + device.CreateQuery(description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/RaterizerState.cs b/Source/SharpDX.Direct3D10/RaterizerState.cs new file mode 100644 index 000000000..8991da280 --- /dev/null +++ b/Source/SharpDX.Direct3D10/RaterizerState.cs @@ -0,0 +1,50 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class RasterizerState + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public RasterizerState(Device device, RasterizerStateDescription description) + : base(IntPtr.Zero) + { + device.CreateRasterizerState(ref description, this); + } + + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public RasterizerState(Device device, ref RasterizerStateDescription description) + : base(IntPtr.Zero) + { + device.CreateRasterizerState(ref description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/RenderTargetView.cs b/Source/SharpDX.Direct3D10/RenderTargetView.cs new file mode 100644 index 000000000..0e2c55344 --- /dev/null +++ b/Source/SharpDX.Direct3D10/RenderTargetView.cs @@ -0,0 +1,51 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class RenderTargetView + { + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the RenderTarget flag. + /// ID3D10Device::CreateRenderTargetView + public RenderTargetView(Device device, Resource resource) + : base(IntPtr.Zero) + { + device.CreateRenderTargetView(resource, null, this); + } + + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the RenderTarget flag. + /// A structure describing the to be created. + /// ID3D10Device::CreateRenderTargetView + public RenderTargetView(Device device, Resource resource, RenderTargetViewDescription description) + : base(IntPtr.Zero) + { + device.CreateRenderTargetView(resource, description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Resource.cs b/Source/SharpDX.Direct3D10/Resource.cs new file mode 100644 index 000000000..552287524 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Resource.cs @@ -0,0 +1,268 @@ +// 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. +using System; +using System.IO; +using System.Runtime.InteropServices; +using SharpDX.Direct3D; +using SharpDX.DXGI; + +namespace SharpDX.Direct3D10 +{ + public partial class Resource + { + /// + /// Gets a swap chain back buffer. + /// + /// The type of the buffer. + /// The swap chain to get the buffer from. + /// The index of the desired buffer. + /// The buffer interface, or null on failure. + public static T FromSwapChain(SwapChain swapChain, int index) where T : Resource + { + return swapChain.GetBackBuffer(index); + } + + /// + /// Loads a texture from an image file. + /// + /// The device used to load the texture. + /// Path to the file on disk. + /// The loaded texture object. + public static T FromFile(Device device, string fileName) where T : Resource + { + System.Diagnostics.Debug.Assert(typeof(T) == typeof(Texture1D) || typeof(T) == typeof(Texture2D) || + typeof (T) == typeof (Texture3D)); + + IntPtr temp; + Result resultOut; + D3DX10.CreateTextureFromFile(device, fileName, null, IntPtr.Zero, out temp, out resultOut); + // TODO Test resultOut + return FromPointer(temp); + } + + /// + /// Loads a texture from an image file. + /// + /// The device used to load the texture. + /// Path to the file on disk. + /// Specifies information used to load the texture. + /// The loaded texture object. + public static T FromFile(Device device, string fileName, ImageLoadInformation loadInfo) where T : Resource + { + System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || + typeof (T) == typeof (Texture3D)); + + IntPtr temp; + Result resultOut; + D3DX10.CreateTextureFromFile(device, fileName, loadInfo, IntPtr.Zero, out temp, out resultOut); + // TODO test resultOut? + return FromPointer(temp); + } + + /// + /// Loads a texture from an image in memory. + /// + /// The device used to load the texture. + /// Array of memory containing the image data to load. + /// The loaded texture object. + public static T FromMemory(Device device, byte[] memory) where T : Resource + { + System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || + typeof (T) == typeof (Texture3D)); + + unsafe + { + System.Diagnostics.Debug.Assert(memory != null); + System.Diagnostics.Debug.Assert(memory.Length > 0); + IntPtr temp; + Result resultOut; + fixed (void* pBuffer = &memory[0]) + D3DX10.CreateTextureFromMemory(device, (IntPtr)pBuffer, memory.Length, null, IntPtr.Zero, + out temp, out resultOut); + // TODO test resultOut + return FromPointer(temp); + } + } + + /// + /// Loads a texture from an image in memory. + /// + /// The device used to load the texture. + /// Array of memory containing the image data to load. + /// Specifies information used to load the texture. + /// The loaded texture object. + public static T FromMemory(Device device, byte[] memory, ImageLoadInformation loadInfo) where T : Resource + { + System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || + typeof (T) == typeof (Texture3D)); + + unsafe + { + System.Diagnostics.Debug.Assert(memory != null); + System.Diagnostics.Debug.Assert(memory.Length > 0); + IntPtr temp; + Result resultOut; + fixed (void* pBuffer = &memory[0]) + D3DX10.CreateTextureFromMemory(device, (IntPtr)pBuffer, memory.Length, loadInfo, IntPtr.Zero, + out temp, out resultOut); + // TODO test resultOut? + return FromPointer(temp); + } + } + + /// + /// Loads a texture from a stream of data. + /// + /// The device used to load the texture. + /// A stream containing the image data to load. + /// Size of the image to load. + /// The loaded texture object. + public static T FromStream(Device device, Stream stream, int sizeInBytes) where T : Resource + { + byte[] buffer = Utilities.ReadStream(stream, ref sizeInBytes); + return FromMemory(device, buffer); + } + + /// + /// Loads a texture from a stream of data. + /// + /// The device used to load the texture. + /// A stream containing the image data to load. + /// Size of the image to load. + /// Specifies information used to load the texture. + /// The loaded texture object. + public static T FromStream(Device device, Stream stream, int sizeInBytes, ImageLoadInformation loadInfo) + where T : Resource + { + byte[] buffer = Utilities.ReadStream(stream, ref sizeInBytes); + return FromMemory(device, buffer, loadInfo); + } + + /// + /// Saves a texture to file. + /// + /// The texture to save. + /// The format the texture will be saved as. + /// Name of the destination output file where the texture will be saved. + /// A object describing the result of the operation. + public static void ToFile(T texture, ImageFileFormat format, string fileName) + where T : Resource + { + System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || + typeof (T) == typeof (Texture3D)); + + D3DX10.SaveTextureToFile(texture, format, fileName); + } + + /// + /// Saves a texture to a stream. + /// + /// The texture to save. + /// The format the texture will be saved as. + /// Destination memory stream where the image will be saved. + /// A object describing the result of the operation. + public static void ToStream(T texture, ImageFileFormat format, Stream stream) + where T : Resource + { + System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || + typeof (T) == typeof (Texture3D)); + + Blob blob; + D3DX10.SaveTextureToMemory(texture, format, out blob, 0); + + IntPtr bufferPtr = blob.BufferPointer; + int blobSize = blob.BufferSize; + + // Write byte-by-byte to avoid allocating a managed byte[] that will wastefully persist. + for (int byteIndex = 0; byteIndex < blobSize; ++byteIndex) + stream.WriteByte(Marshal.ReadByte(bufferPtr, byteIndex)); + + blob.Dispose(); + } + + + /// + /// Load a texture from a texture. + /// + /// Pointer to the source texture. See . + /// Pointer to the destination texture. See . + /// Pointer to texture loading parameters. See . + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT D3DX10LoadTextureFromTexture([None] ID3D10Resource* pSrcTexture,[None] D3DX10_TEXTURE_LOAD_INFO* pLoadInfo,[None] ID3D10Resource* pDstTexture) + public static void LoadTextureFromTexture(Resource source, Resource destination, TextureLoadInformation loadInformation) + { + D3DX10.LoadTextureFromTexture(source, loadInformation, destination); + } + + /// + /// Generates mipmap chain using a particular texture filter. + /// + /// The mipmap level whose data is used to generate the rest of the mipmap chain. + /// Flags controlling how each miplevel is filtered (or D3DX10_DEFAULT for D3DX10_FILTER_BOX). See . + /// The return value is one of the values listed in {{Direct3D 10 Return Codes}}. + /// HRESULT D3DX10FilterTexture([None] ID3D10Resource* pTexture,[None] int SrcLevel,[None] int MipFilter) + public void FilterTexture(int sourceLevel, FilterFlags mipFilter) + { + D3DX10.FilterTexture(this, sourceLevel, (int) mipFilter); + } + + /// + /// Returns a DXGI Surface for this resource. + /// + /// The buffer interface, or null on failure. + public Surface AsSurface() + { + return QueryInterface(); + } + + /// + /// Calculates a subresource index. + /// + /// The index of the desired mip slice. + /// The index of the desired array slice. + /// The total number of mip levels. + /// The subresource index (equivalent to mipSlice + (arraySlice * mipLevels)). + public static int CalculateSubResourceIndex(int mipSlice, int arraySlice, int mipLevels) + { + return ((arraySlice * mipLevels) + mipSlice); + } + + /// + /// Calculate the MipSize + /// + /// + /// + /// + internal static int GetMipSize(int mipSlice, int baseSliceSize) + { + float size = baseSliceSize; + if (mipSlice > 0) + { + do + { + size = (float)Math.Floor(size * 0.5f); + mipSlice -= 1; + } + while (mipSlice > 0); + } + return (int)size; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SamplerState.cs b/Source/SharpDX.Direct3D10/SamplerState.cs new file mode 100644 index 000000000..e53b8e4b3 --- /dev/null +++ b/Source/SharpDX.Direct3D10/SamplerState.cs @@ -0,0 +1,50 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class SamplerState + { + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public SamplerState(Device device, SamplerStateDescription description) + : base(IntPtr.Zero) + { + device.CreateSamplerState(ref description, this); + } + + /// + /// Constructs a new based on the specified description. + /// + /// The device with which to associate the state object. + /// The state description. + /// The newly created object. + public SamplerState(Device device, ref SamplerStateDescription description) + : base(IntPtr.Zero) + { + device.CreateSamplerState(ref description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/ShaderResourceView.cs b/Source/SharpDX.Direct3D10/ShaderResourceView.cs new file mode 100644 index 000000000..56e7dd11b --- /dev/null +++ b/Source/SharpDX.Direct3D10/ShaderResourceView.cs @@ -0,0 +1,151 @@ +// 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. +using System; +using System.IO; + +namespace SharpDX.Direct3D10 +{ + public partial class ShaderResourceView + { + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the ShaderResource flag. + /// ID3D10Device::CreateShaderResourceView + public ShaderResourceView(Device device, Resource resource) + : base(IntPtr.Zero) + { + device.CreateShaderResourceView(resource, null, this); + } + + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the ShaderResource flag. + /// A structure describing the to be created. + /// ID3D10Device::CreateShaderResourceView + public ShaderResourceView(Device device, Resource resource, ShaderResourceViewDescription description) + : base(IntPtr.Zero) + { + device.CreateShaderResourceView(resource, description, this); + } + /// + /// Create a shader-resource view from a file. Read the characteristics of a texture when the texture is loaded. + /// + /// A reference to the device (see ) that will use the resource. + /// Name of the file that contains the shader-resource view. + /// Returns a reference to the shader-resource view (see ). + /// HRESULT D3DX10CreateShaderResourceViewFromFileW([None] ID3D10Device* pDevice,[None] const wchar_t* pSrcFile,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[None] ID3DX10ThreadPump* pPump,[None] ID3D10ShaderResourceView** ppShaderResourceView,[None] HRESULT* pHResult) + public static ShaderResourceView FromFile(Device device, string fileName) + { + ShaderResourceView temp; + Result hResult; + D3DX10.CreateShaderResourceViewFromFile(device, fileName, null, IntPtr.Zero, out temp, out hResult); + return temp; + } + + /// + /// Create a shader-resource view from a file. + /// + /// A reference to the device (see ) that will use the resource. + /// Name of the file that contains the shader-resource view. + /// Identifies the characteristics of a texture (see ) when the data processor is created. + /// Returns a reference to the shader-resource view (see ). + /// HRESULT D3DX10CreateShaderResourceViewFromFileW([None] ID3D10Device* pDevice,[None] const wchar_t* pSrcFile,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[None] ID3DX10ThreadPump* pPump,[None] ID3D10ShaderResourceView** ppShaderResourceView,[None] HRESULT* pHResult) + public static ShaderResourceView FromFile(Device device, string fileName, ImageLoadInformation loadInformation) + { + ShaderResourceView temp; + Result hResult; + D3DX10.CreateShaderResourceViewFromFile(device, fileName, loadInformation, IntPtr.Zero, out temp, out hResult); + return temp; + } + + /// + /// Create a shader-resource view from a file in memory. + /// + /// A reference to the device (see ) that will use the resource. + /// Pointer to a memory location that contains the shader-resource view. + /// Returns a reference to the shader-resource view (see ). + /// HRESULT D3DX10CreateShaderResourceViewFromMemory([None] ID3D10Device* pDevice,[None] const void* pSrcData,[None] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[None] ID3DX10ThreadPump* pPump,[None] ID3D10ShaderResourceView** ppShaderResourceView,[None] HRESULT* pHResult) + public static ShaderResourceView FromMemory(Device device, byte[] memory) + { + unsafe + { + ShaderResourceView temp; + Result hResult; + fixed (void *pMemory = &memory[0]) + D3DX10.CreateShaderResourceViewFromMemory(device, new IntPtr(pMemory), memory.Length, null, IntPtr.Zero, out temp, out hResult); + // TODO test hResult? + return temp; + } + } + + /// + /// Create a shader-resource view from a file in memory. + /// + /// A reference to the device (see ) that will use the resource. + /// Pointer to a memory location that contains the shader-resource view. + /// Identifies the characteristics of a texture (see ) when the data processor is created. + /// Returns a reference to the shader-resource view (see ). + /// HRESULT D3DX10CreateShaderResourceViewFromMemory([None] ID3D10Device* pDevice,[None] const void* pSrcData,[None] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[None] ID3DX10ThreadPump* pPump,[None] ID3D10ShaderResourceView** ppShaderResourceView,[None] HRESULT* pHResult) + public static ShaderResourceView FromMemory(Device device, byte[] memory, ImageLoadInformation loadInformation) + { + unsafe + { + ShaderResourceView temp; + Result hResult; + fixed (void* pMemory = &memory[0]) + D3DX10.CreateShaderResourceViewFromMemory(device, new IntPtr(pMemory), memory.Length, loadInformation, IntPtr.Zero, out temp, out hResult); + return temp; + } + } + + /// + /// Create a shader-resource view from a file in a stream.. + /// + /// A reference to the device (see ) that will use the resource. + /// Pointer to the file in memory that contains the shader-resource view. + /// Size of the file to read from the stream + /// Returns a reference to the shader-resource view (see ). + /// HRESULT D3DX10CreateShaderResourceViewFromMemory([None] ID3D10Device* pDevice,[None] const void* pSrcData,[None] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[None] ID3DX10ThreadPump* pPump,[None] ID3D10ShaderResourceView** ppShaderResourceView,[None] HRESULT* pHResult) + public static ShaderResourceView FromStream(Device device, Stream stream, int sizeInBytes) + { + byte[] memory = Utilities.ReadStream(stream, ref sizeInBytes); + return FromMemory(device, memory); + } + + /// + /// Create a shader-resource view from a file in a stream.. + /// + /// A reference to the device (see ) that will use the resource. + /// Pointer to the file in memory that contains the shader-resource view. + /// Size of the file to read from the stream + /// Identifies the characteristics of a texture (see ) when the data processor is created. + /// Returns a reference to the shader-resource view (see ). + /// HRESULT D3DX10CreateShaderResourceViewFromMemory([None] ID3D10Device* pDevice,[None] const void* pSrcData,[None] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[None] ID3DX10ThreadPump* pPump,[None] ID3D10ShaderResourceView** ppShaderResourceView,[None] HRESULT* pHResult) + public static ShaderResourceView FromStream(Device device, Stream stream, int sizeInBytes, ImageLoadInformation loadInformation) + { + byte[] memory = Utilities.ReadStream(stream, ref sizeInBytes); + return FromMemory(device, memory, loadInformation); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/ShaderResourceView1.cs b/Source/SharpDX.Direct3D10/ShaderResourceView1.cs new file mode 100644 index 000000000..9c5d10a0f --- /dev/null +++ b/Source/SharpDX.Direct3D10/ShaderResourceView1.cs @@ -0,0 +1,51 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class ShaderResourceView1 + { + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the ShaderResource flag. + /// ID3D10Device1::CreateShaderResourceView1 + public ShaderResourceView1(Device1 device, Resource resource) + : base(IntPtr.Zero) + { + device.CreateShaderResourceView1(resource, null, this); + } + + /// + /// Creates a for accessing resource data. + /// + /// The device to use when creating this . + /// The resource that represents the render-target surface. This surface must have been created with the ShaderResource flag. + /// A structure describing the to be created. + /// ID3D10Device1::CreateShaderResourceView1 + public ShaderResourceView1(Device1 device, Resource resource, ShaderResourceViewDescription1 description) + : base(IntPtr.Zero) + { + device.CreateShaderResourceView1(resource, description, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj new file mode 100644 index 000000000..1da678266 --- /dev/null +++ b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj @@ -0,0 +1,140 @@ + + + + true + + + + 8.0.30703 + 2.0 + {618AFA87-81A8-4B1C-8876-5457D49F2DEF} + SharpDX.Direct3D10 + SharpDX.Direct3D10 + + + + + + + + + Properties\SharedAssemblyInfo.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + + + {361d3f81-a48a-47f2-80df-ca4f9536cb4e} + SharpDX.D3DCompiler + False + + + {3fc6de77-b412-4101-9e64-6b9aa831179b} + SharpDX.DXGI + False + + + {d0bcd56a-41c4-4a4e-8590-26864ced07ff} + SharpDX + False + + + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec new file mode 100644 index 000000000..d67108431 --- /dev/null +++ b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec @@ -0,0 +1,52 @@ + + + + + SharpDX.Direct3D10 + $version$ + SharpDX.Direct3D10 + Alexandre Mutel + Alexandre Mutel + http://sharpdx.org/License.txt + http://sharpdx.org + http://sharpdx.org/logo_100x100.png + false + Assembly providing DirectX - Direct3D10 and Direct3D10.1 managed API. + Copyright (c) 2010-2014 Alexandre Mutel + SharpDX DirectX Direct3D MDX 3D Direct3D10 D3D10 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SkinInfo.cs b/Source/SharpDX.Direct3D10/SkinInfo.cs new file mode 100644 index 000000000..3dafb8f37 --- /dev/null +++ b/Source/SharpDX.Direct3D10/SkinInfo.cs @@ -0,0 +1,43 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class SkinInfo + { + /// + /// Get a list of vertices that a given bone influences and a list of the amount of influence that bone has on each vertex. + /// + /// An index that specifies an existing bone. Must be between 0 and the value returned by . + /// An offset from the top of the bone's list of influenced vertices. This must be between 0 and the value returned by . + /// The number of indices and weights to retrieve. Must be between 0 and the value returned by ID3DX10SkinInfo::GetBoneInfluenceCount. + /// A list of indices into the vertex buffer, each one representing a vertex influenced by the bone. These values correspond to the values in pDestWeights, such that pDestIndices[i] corresponds to pDestWeights[i]. + /// A list of the amount of influence the bone has on each vertex. These values correspond to the values in pDestIndices, such that pDestWeights[i] corresponds to pDestIndices[i].f + /// If the method succeeds, the return value is S_OK. If the method fails, the return value can be: E_INVALIDARG or E_OUTOFMEMORY. + /// HRESULT ID3DX10SkinInfo::GetBoneInfluences([None] int BoneIndex,[None] int Offset,[None] int Count,[Out, Buffer] int* pDestIndices,[Out, Buffer] float* pDestWeights) + public void GetBoneInfluences(int boneIndex, int offset, int count, out int[] destIndicesRef, out float[] destWeightsRef) + { + destIndicesRef = new int[count]; + destWeightsRef = new float[count]; + GetBoneInfluences(boneIndex, offset, count, destIndicesRef, destWeightsRef); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Sprite.cs b/Source/SharpDX.Direct3D10/Sprite.cs new file mode 100644 index 000000000..0d0de2d6b --- /dev/null +++ b/Source/SharpDX.Direct3D10/Sprite.cs @@ -0,0 +1,59 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class Sprite + { + /// + /// Create a sprite for drawing a 2D texture. + /// + /// A reference to the device (see ) that will draw the sprite. + /// The size of the vertex buffer, in number of sprites, that will be sent to the device when or is called. This should be a small number if you know you will be rendering a small number of sprites at a time (to save memory) and a large number if you know you will be rendering a large number of sprites at a time. The maximum value is 4096. If 0 is specified, the vertex buffer size will automatically be set to 4096. + /// HRESULT D3DX10CreateSprite([None] ID3D10Device* pDevice,[None] int cDeviceBufferSize,[None] LPD3DX10SPRITE* ppSprite) + public Sprite(Device device, int bufferSize = 0) + { + D3DX10.CreateSprite(device, bufferSize, this); + } + + /// + /// Add an array of sprites to the batch of sprites to be rendered. This must be called in between calls to and , and must be called before End to send all of the batched sprites to the device for rendering. This draw method is most useful when drawing a small number of sprites that you want buffered into a large batch, such as fonts. + /// + /// The array of sprites to draw. See . + /// If the method succeeds, the return value is S_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA. + /// HRESULT ID3DX10Sprite::DrawSpritesBuffered([None] D3DX10_SPRITE* pSprites,[None] int cSprites) + public void DrawSpritesBuffered(SharpDX.Direct3D10.SpriteInstance[] sprites) + { + DrawSpritesBuffered(sprites, sprites.Length); + } + + /// + /// Draw an array of sprites. This will immediately send the sprites to the device for rendering, which is different from which only adds an array of sprites to a batch of sprites to be rendered when is called. This draw method is most useful when drawing a large number of sprites that have already been sorted on the CPU (or do not need to be sorted), such as in a particle system. This must be called in between calls to and . + /// + /// The array of sprites to draw. See . + /// If the method succeeds, the return value is S_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA. + /// HRESULT ID3DX10Sprite::DrawSpritesImmediate([In, Buffer] D3DX10_SPRITE* pSprites,[None] int cSprites,[None] int cbSprite,[None] int flags) + public void DrawSpritesImmediate(SharpDX.Direct3D10.SpriteInstance[] sprites) + { + DrawSpritesImmediate(sprites, sprites.Length, Utilities.SizeOf(), 0); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SpriteInstance.cs b/Source/SharpDX.Direct3D10/SpriteInstance.cs new file mode 100644 index 000000000..7eb2867ee --- /dev/null +++ b/Source/SharpDX.Direct3D10/SpriteInstance.cs @@ -0,0 +1,42 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial struct SpriteInstance + { + /// + /// Gets or sets the texture. + /// + /// The texture. + public ShaderResourceView Texture + { + get + { + return new ShaderResourceView(ShaderResourceViewPointer); + } + set + { + ShaderResourceViewPointer = value.NativePointer; + } + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/StateBlock.cs b/Source/SharpDX.Direct3D10/StateBlock.cs new file mode 100644 index 000000000..281c4691b --- /dev/null +++ b/Source/SharpDX.Direct3D10/StateBlock.cs @@ -0,0 +1,41 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class StateBlock + { + + /// + /// Create a state block. + /// + /// + /// A state block is a collection of device state, and is used for saving and restoring device state. Use a state-block mask to enable subsets of state for saving and restoring. The structure can be filled manually or by using any of the D3D10StateBlockMaskXXX APIs. A state block mask can also be obtained by calling or . Differences between Direct3D 9 and Direct3D 10: In Direct3D 10, a state block object does not contain any valid information about the state of the device until is called. In Direct3D 9, state is saved in a state block object, when it is created. ? + /// + /// The device for which the state block will be created. + /// Indicates which parts of the device state will be captured when calling and reapplied when calling . See remarks. + /// HRESULT D3D10CreateStateBlock([None] ID3D10Device* pDevice,[None] D3D10_STATE_BLOCK_MASK* pStateBlockMask,[None] ID3D10StateBlock** ppStateBlock) + public StateBlock(Device device, StateBlockMask mask) + { + D3D10.CreateStateBlock(device, ref mask, this); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/StreamOutputBufferBinding.cs b/Source/SharpDX.Direct3D10/StreamOutputBufferBinding.cs new file mode 100644 index 000000000..2f6f5485a --- /dev/null +++ b/Source/SharpDX.Direct3D10/StreamOutputBufferBinding.cs @@ -0,0 +1,62 @@ +// 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. +using System.Runtime.InteropServices; + +namespace SharpDX.Direct3D10 +{ + /// + /// Properties defining the way a buffer is bound to the pipeline as a target for stream output operations. + /// + [StructLayout(LayoutKind.Sequential)] + public struct StreamOutputBufferBinding + { + private Buffer _buffer; + private int _offset; + + /// + /// Gets or sets the buffer being bound. + /// + public Buffer Buffer + { + get { return this._buffer; } + set { this._buffer = value; } + } + + /// + /// Gets or sets the offset from the start of the buffer of the first vertex to use (in bytes). + /// + public int Offset + { + get { return this._offset; } + set { this._offset = value; } + } + + /// + /// Initializes a new instance of the struct. + /// + /// The buffer being bound. + /// The offset to the first vertex (in bytes). + public StreamOutputBufferBinding(Buffer buffer, int offset) + { + this._buffer = buffer; + this._offset = offset; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/StreamOutputElement.cs b/Source/SharpDX.Direct3D10/StreamOutputElement.cs new file mode 100644 index 000000000..516804da9 --- /dev/null +++ b/Source/SharpDX.Direct3D10/StreamOutputElement.cs @@ -0,0 +1,43 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial struct StreamOutputElement + { + /// + /// Initializes a new instance of the struct. + /// + /// Name of the semantic. + /// Index of the semantic. + /// The start component. + /// The component count. + /// The output slot. + public StreamOutputElement(string semanticName, int semanticIndex, byte startComponent, byte componentCount, byte outputSlot) + { + SemanticName = semanticName; + SemanticIndex = semanticIndex; + StartComponent = startComponent; + ComponentCount = componentCount; + OutputSlot = outputSlot; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Texture1D.cs b/Source/SharpDX.Direct3D10/Texture1D.cs new file mode 100644 index 000000000..f092b2a93 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Texture1D.cs @@ -0,0 +1,94 @@ +// 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. +using System; +using System.Diagnostics; +using SharpDX.DXGI; + + +namespace SharpDX.Direct3D10 +{ + public partial class Texture1D + { + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + public Texture1D(Device device, Texture1DDescription description) + : base(IntPtr.Zero) + { + device.CreateTexture1D(ref description, null, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + /// The initial texture data. + public Texture1D(Device device, Texture1DDescription description, DataStream data) + : this(device, description, new[] {data}) + { + System.Diagnostics.Debug.Assert(data != null); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + /// An array of initial texture data for each subresource. + public Texture1D(Device device, Texture1DDescription description, DataStream[] data) + : base(IntPtr.Zero) + { + System.Diagnostics.Debug.Assert(data != null); + + var subResourceDatas = new DataBox[data.Length]; + for (int i = 0; i < subResourceDatas.Length; i++) + subResourceDatas[i].DataPointer = data[i].DataPointer; + + device.CreateTexture1D(ref description, subResourceDatas, this); + } + + /// + /// Maps the texture, providing CPU access to its contents. + /// + /// The mip slice to map. + /// The IO operations to enable on the CPU. + /// Flags indicating how the CPU should respond when the GPU is busy. + /// A data stream containing the mapped data. This data stream is invalidated + /// when the buffer is unmapped. + public DataStream Map(int mipSlice, MapMode mode, MapFlags flags) + { + var desc = Description; + int subresource = CalculateSubResourceIndex( mipSlice, 0, desc.MipLevels ); + int mipWidth = GetMipSize( mipSlice, desc.Width ); + int bufferSize = (int)(mipWidth * FormatHelper.SizeOfInBytes(desc.Format)); + + IntPtr dataPointer; + Map(subresource, mode, flags, out dataPointer); + + bool canRead = mode == MapMode.Read || mode == MapMode.ReadWrite; + bool canWrite = mode != MapMode.Read; + + return new DataStream(dataPointer, bufferSize, canRead, canWrite); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Texture2D.cs b/Source/SharpDX.Direct3D10/Texture2D.cs new file mode 100644 index 000000000..5bbe7ca54 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Texture2D.cs @@ -0,0 +1,130 @@ +// 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. +using System; +using SharpDX.DXGI; + +namespace SharpDX.Direct3D10 +{ + public partial class Texture2D + { + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + public Texture2D(Device device, Texture2DDescription description) + : base(IntPtr.Zero) + { + device.CreateTexture2D(ref description, null, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + /// The initial texture data. + public Texture2D(Device device, Texture2DDescription description, DataRectangle data) + : this(device, description, new[] {data}) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + /// An array of initial texture data for each subresource. + public Texture2D(Device device, Texture2DDescription description, DataRectangle[] data) + : base(IntPtr.Zero) + { + DataBox[] subResourceDatas = null; + + if (data != null) + { + subResourceDatas = new DataBox[data.Length]; + for (int i = 0; i < subResourceDatas.Length; i++) + { + subResourceDatas[i].DataPointer = data[i].DataPointer; + subResourceDatas[i].RowPitch = data[i].Pitch; + } + } + device.CreateTexture2D(ref description, subResourceDatas, this); + } + + /// + /// Converts a height map into a normal map. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture. + /// + /// The source height map texture. + /// The destination texture. + /// One or more flags that control generation of normal maps. + /// One or more flag specifying the source of height information. + /// Constant value multiplier that increases (or decreases) the values in the normal map. Higher values usually make bumps more visible, lower values usually make bumps less visible. + /// A object describing the result of the operation. + public static void ComputeNormalMap(Texture2D source, Texture2D destination, + NormalMapFlags flags, Channel channel, float amplitude) + { + D3DX10.ComputeNormalMap(source, flags, channel, amplitude, destination); + } + + /// + /// Maps the texture, providing CPU access to its contents. + /// + /// The mip slice to map. + /// The IO operations to enable on the CPU. + /// Flags indicating how the CPU should respond when the GPU is busy. + /// A data rectangle containing the mapped data. This data stream is invalidated when the buffer is unmapped. + public DataRectangle Map(int mipSlice, MapMode mode, MapFlags flags) + { + var desc = Description; + int subresource = CalculateSubResourceIndex(mipSlice, 0, desc.MipLevels); + + DataRectangle mappedTexture2D; + Map(subresource, mode, flags, out mappedTexture2D); + return mappedTexture2D; + } + + /// + /// Maps the texture, providing CPU access to its contents. + /// + /// The mip slice to map. + /// The IO operations to enable on the CPU. + /// Flags indicating how the CPU should respond when the GPU is busy. + /// The data stream. + /// + /// A data rectangle containing the mapped data. This data stream is invalidated when the buffer is unmapped. + /// + public DataRectangle Map(int mipSlice, MapMode mode, MapFlags flags, out DataStream dataStream) + { + var desc = Description; + int subresource = CalculateSubResourceIndex(mipSlice, 0, desc.MipLevels); + int mipHeight = GetMipSize(mipSlice, desc.Height); + + DataRectangle mappedTexture2D; + Map(subresource, mode, flags, out mappedTexture2D); + + bool canRead = mode == MapMode.Read || mode == MapMode.ReadWrite; + bool canWrite = mode != MapMode.Read; + dataStream = new DataStream(mappedTexture2D.DataPointer, mipHeight * mappedTexture2D.Pitch, canRead, canWrite); + + return mappedTexture2D; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/Texture3D.cs b/Source/SharpDX.Direct3D10/Texture3D.cs new file mode 100644 index 000000000..c5cae4ff1 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Texture3D.cs @@ -0,0 +1,106 @@ +// 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. +using System; +using SharpDX.DXGI; + +namespace SharpDX.Direct3D10 +{ + public partial class Texture3D + { + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + public Texture3D(Device device, Texture3DDescription description) + : base(IntPtr.Zero) + { + device.CreateTexture3D(ref description, null, this); + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + /// The initial texture data. + public Texture3D(Device device, Texture3DDescription description, DataBox data) + : this(device, description, new[] {data}) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The device with which to associate the texture. + /// The description of the texture. + /// An array of initial texture data for each subresource. + public Texture3D(Device device, Texture3DDescription description, DataBox[] data) : base(IntPtr.Zero) + { + device.CreateTexture3D(ref description, data, this); + } + + /// + /// Maps the texture, providing CPU access to its contents. + /// + /// The mip slice to map. + /// The IO operations to enable on the CPU. + /// Flags indicating how the CPU should respond when the GPU is busy. + /// + /// A databox containing the mapped data. This data stream is invalidated when the buffer is unmapped. + /// + public DataBox Map(int mipSlice, MapMode mode, MapFlags flags) + { + var desc = Description; + int subresource = CalculateSubResourceIndex(mipSlice, 0, desc.MipLevels); + + DataBox mappedTexture3D; + Map(subresource, mode, flags, out mappedTexture3D); + + return mappedTexture3D; + } + + /// + /// Maps the texture, providing CPU access to its contents. + /// + /// The mip slice to map. + /// The IO operations to enable on the CPU. + /// Flags indicating how the CPU should respond when the GPU is busy. + /// The data stream. + /// + /// A databox containing the mapped data. This data stream is invalidated when the buffer is unmapped. + /// + public DataBox Map(int mipSlice, MapMode mode, MapFlags flags, out DataStream dataStream) + { + var desc = Description; + int subresource = CalculateSubResourceIndex(mipSlice, 0, desc.MipLevels); + + DataBox mappedTexture3D; + Map(subresource, mode, flags, out mappedTexture3D); + + bool canRead = mode == MapMode.Read || mode == MapMode.ReadWrite; + bool canWrite = mode != MapMode.Read; + int mipDepth = GetMipSize(mipSlice, desc.Depth); + dataStream = new DataStream(mappedTexture3D.DataPointer, mipDepth * mappedTexture3D.SlicePitch, canRead, canWrite); + + return mappedTexture3D; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/TextureLoadInformation.cs b/Source/SharpDX.Direct3D10/TextureLoadInformation.cs new file mode 100644 index 000000000..40d746eba --- /dev/null +++ b/Source/SharpDX.Direct3D10/TextureLoadInformation.cs @@ -0,0 +1,105 @@ +// 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. +using System; +using System.Runtime.InteropServices; + +namespace SharpDX.Direct3D10 +{ + public partial class TextureLoadInformation + { + /// + /// Source texture box (see ). + /// + /// D3D11_BOX* pSrcBox + public ResourceRegion SourceRegion; + + /// + /// Destination texture box (see ). + /// + /// D3D11_BOX* pDstBox + public ResourceRegion DestinationRegion; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal partial struct __Native + { + public IntPtr SourceRegionPointer; + public IntPtr DestinationRegionPointer; + public int FirstSourceMip; + public int FirstDestinationMip; + public int MipCount; + public int FirstSourceElement; + public int FirstDestinationElement; + public int ElementCount; + public SharpDX.Direct3D10.FilterFlags Filter; + public SharpDX.Direct3D10.FilterFlags MipFilter; + // Method to free native struct + internal unsafe void __MarshalFree() + { + if (SourceRegionPointer != IntPtr.Zero) + Marshal.FreeHGlobal(SourceRegionPointer); + if (DestinationRegionPointer != IntPtr.Zero) + Marshal.FreeHGlobal(DestinationRegionPointer); + } + } + + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.SourceRegionPointer = @ref.SourceRegionPointer; + this.DestinationRegionPointer = @ref.DestinationRegionPointer; + this.FirstSourceMip = @ref.FirstSourceMip; + this.FirstDestinationMip = @ref.FirstDestinationMip; + this.MipCount = @ref.MipCount; + this.FirstSourceElement = @ref.FirstSourceElement; + this.FirstDestinationElement = @ref.FirstDestinationElement; + this.ElementCount = @ref.ElementCount; + this.Filter = @ref.Filter; + this.MipFilter = @ref.MipFilter; + this.SourceRegion = new ResourceRegion(); + if (@ref.SourceRegionPointer != IntPtr.Zero) + Utilities.Read(@ref.SourceRegionPointer, ref this.SourceRegion); + this.DestinationRegion = new ResourceRegion(); + if (@ref.DestinationRegionPointer != IntPtr.Zero) + Utilities.Read(@ref.DestinationRegionPointer, ref this.DestinationRegion); + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.SourceRegionPointer = Marshal.AllocHGlobal(Utilities.SizeOf()); + @ref.DestinationRegionPointer = Marshal.AllocHGlobal(Utilities.SizeOf()); + @ref.FirstSourceMip = this.FirstSourceMip; + @ref.FirstDestinationMip = this.FirstDestinationMip; + @ref.MipCount = this.MipCount; + @ref.FirstSourceElement = this.FirstSourceElement; + @ref.FirstDestinationElement = this.FirstDestinationElement; + @ref.ElementCount = this.ElementCount; + @ref.Filter = this.Filter; + @ref.MipFilter = this.MipFilter; + Utilities.Write(@ref.SourceRegionPointer, ref this.SourceRegion); + Utilities.Write(@ref.DestinationRegionPointer, ref this.DestinationRegion); + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/VertexBufferBinding.cs b/Source/SharpDX.Direct3D10/VertexBufferBinding.cs new file mode 100644 index 000000000..be03aa171 --- /dev/null +++ b/Source/SharpDX.Direct3D10/VertexBufferBinding.cs @@ -0,0 +1,75 @@ +// 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. +using System.Runtime.InteropServices; + +namespace SharpDX.Direct3D10 +{ + /// + /// Properties defining the way a buffer (containing vertex data) is bound + /// to the pipeline for rendering. + /// + [StructLayout(LayoutKind.Sequential)] + public struct VertexBufferBinding + { + private Buffer m_Buffer; + private int m_Stride; + private int m_Offset; + + /// + /// Gets or sets the buffer being bound. + /// + public Buffer Buffer + { + get { return this.m_Buffer; } + set { this.m_Buffer = value; } + } + + /// + /// Gets or sets the stride between vertex elements in the buffer (in bytes). + /// + public int Stride + { + get { return this.m_Stride; } + set { this.m_Stride = value; } + } + + /// + /// Gets or sets the offset from the start of the buffer of the first vertex to use (in bytes). + /// + public int Offset + { + get { return this.m_Offset; } + set { this.m_Offset = value; } + } + + /// + /// Initializes a new instance of the struct. + /// + /// The buffer being bound. + /// The stride between vertex element (in bytes). + /// The offset to the first vertex (in bytes). + public VertexBufferBinding(Buffer buffer, int stride, int offset) + { + this.m_Buffer = buffer; + this.m_Stride = stride; + this.m_Offset = offset; + } + } +} \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/VertexShader.cs b/Source/SharpDX.Direct3D10/VertexShader.cs new file mode 100644 index 000000000..2096d35d9 --- /dev/null +++ b/Source/SharpDX.Direct3D10/VertexShader.cs @@ -0,0 +1,37 @@ +// 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. +using System; + +namespace SharpDX.Direct3D10 +{ + public partial class VertexShader + { + /// + /// Initializes a new instance of the class. + /// + /// The device used to create the shader. + /// The compiled shader bytecode. + public unsafe VertexShader(Device device, byte[] shaderBytecode) : base(IntPtr.Zero) + { + fixed (void *ptr = shaderBytecode) + device.CreateVertexShader((IntPtr)ptr, shaderBytecode.Length, this); + } + } +} \ No newline at end of file From c240803c181564c3cc8f4ef32af90cfa82326f40 Mon Sep 17 00:00:00 2001 From: AndrewSt Date: Fri, 17 Jun 2016 01:41:17 +0300 Subject: [PATCH 2/5] [Direct3D10] Adaptation mapping --- SharpDX-StoreApp.sln | 7 +++ Source/Mapping.Direct3D1x.xml | 11 +++- Source/Mapping.xml | 1 + Source/SharpDX.Direct3D10/Device.cs | 8 ++- .../EffectMatrixVariable.cs | 11 ++-- .../EffectVectorVariable.cs | 6 ++- Source/SharpDX.Direct3D10/Font.cs | 10 ---- Source/SharpDX.Direct3D10/Mapping.xml | 53 +++++++++---------- .../SharpDX.Direct3D10.csproj | 5 -- .../SharpDX.Direct3D10.nuspec | 9 ++-- 10 files changed, 64 insertions(+), 57 deletions(-) diff --git a/SharpDX-StoreApp.sln b/SharpDX-StoreApp.sln index 4fe45c905..5187db485 100644 --- a/SharpDX-StoreApp.sln +++ b/SharpDX-StoreApp.sln @@ -50,6 +50,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Mathematics", "Sour EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Direct3D12", "Source\SharpDX.Direct3D12\SharpDX.Direct3D12.csproj", "{E5BB5D1C-6C07-495B-923B-FB80B79C535E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Direct3D10", "Source\SharpDX.Direct3D10\SharpDX.Direct3D10.csproj", "{618AFA87-81A8-4B1C-8876-5457D49F2DEF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -108,6 +110,10 @@ Global {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Debug|Any CPU.Build.0 = Debug|Any CPU {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Release|Any CPU.Build.0 = Release|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -126,5 +132,6 @@ Global {BBB50A46-3291-4C62-B884-D1AB64F71EA5} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {49E4485F-3A2A-4C35-A159-12ECCFC00396} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {E5BB5D1C-6C07-495B-923B-FB80B79C535E} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} + {618AFA87-81A8-4B1C-8876-5457D49F2DEF} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} EndGlobalSection EndGlobal diff --git a/Source/Mapping.Direct3D1x.xml b/Source/Mapping.Direct3D1x.xml index 236b947cc..bc17dee5a 100644 --- a/Source/Mapping.Direct3D1x.xml +++ b/Source/Mapping.Direct3D1x.xml @@ -51,6 +51,14 @@ d3d10misc d3d10sdklayers d3d10shader + d3d10effect + + d3dx10 + d3dx10core + d3dx10tex + d3dx10mesh + d3dx10async + d3d11 d3d11_1 @@ -287,8 +295,7 @@ // ***************************************************************** --> - - + diff --git a/Source/Mapping.xml b/Source/Mapping.xml index a2115afd1..90bc31eac 100644 --- a/Source/Mapping.xml +++ b/Source/Mapping.xml @@ -64,6 +64,7 @@ SharpDX.DXGI\Mapping.xml SharpDX.D3DCompiler\Mapping.xml Mapping.Direct3D1x.xml + SharpDX.Direct3D10\Mapping.xml SharpDX.Direct3D11\Mapping.xml SharpDX.Direct3D12\Mapping.xml SharpDX.Direct3D11.Effects\Mapping.xml diff --git a/Source/SharpDX.Direct3D10/Device.cs b/Source/SharpDX.Direct3D10/Device.cs index 6ce0e4219..75ff576d2 100644 --- a/Source/SharpDX.Direct3D10/Device.cs +++ b/Source/SharpDX.Direct3D10/Device.cs @@ -18,12 +18,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; -using System.Drawing; using System.Runtime.InteropServices; using SharpDX.Direct3D; using SharpDX.DXGI; -using SharpDX; using SharpDX.Mathematics.Interop; namespace SharpDX.Direct3D10 @@ -135,9 +133,9 @@ public CounterMetadata GetCounterMetadata(CounterDescription counterDescription) CheckCounter(counterDescription, out type, out hardwareCounterCount, IntPtr.Zero, new IntPtr(&nameLength), IntPtr.Zero, new IntPtr(&unitsLength), IntPtr.Zero, new IntPtr(&descriptionLength)); - sbyte* name = stackalloc sbyte[nameLength]; - sbyte* units = stackalloc sbyte[unitsLength]; - sbyte* description = stackalloc sbyte[descriptionLength]; + char* name = stackalloc char[nameLength]; + char* units = stackalloc char[unitsLength]; + char* description = stackalloc char[descriptionLength]; // Get strings CheckCounter(counterDescription, out type, out hardwareCounterCount, new IntPtr(name), new IntPtr(&nameLength), new IntPtr(units), new IntPtr(&unitsLength), diff --git a/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs b/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs index d11588866..55e057ac6 100644 --- a/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs +++ b/Source/SharpDX.Direct3D10/EffectMatrixVariable.cs @@ -17,6 +17,8 @@ // 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. + +using System; using System.Diagnostics; using SharpDX.Mathematics.Interop; @@ -75,7 +77,8 @@ public RawMatrix GetMatrix() /// HRESULT ID3D10EffectMatrixVariable::SetMatrix([In] float* pData) public unsafe void SetMatrix(ref T matrix) where T : struct { - Trace.Assert(Utilities.SizeOf() == 64, MatrixInvalidSize); + if (Utilities.SizeOf() != 64) + throw new ArgumentException(MatrixInvalidSize, "matrix"); SetMatrix(ref *(RawMatrix*)Interop.Fixed(ref matrix)); } @@ -99,7 +102,8 @@ public RawMatrix GetMatrix() /// HRESULT ID3D10EffectMatrixVariable::SetMatrixArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) public void SetMatrix(T[] matrixArray, int offset) where T : struct { - Trace.Assert(Utilities.SizeOf() == 64, MatrixInvalidSize); + if (Utilities.SizeOf() != 64) + throw new ArgumentException(MatrixInvalidSize, "matrixArray"); SetMatrixArray(Interop.CastArray(matrixArray), offset, matrixArray.Length); } @@ -153,7 +157,8 @@ public RawMatrix GetMatrix() /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTranspose([In] float* pData) public unsafe void SetMatrixTranspose(ref T matrix) where T : struct { - Trace.Assert(Utilities.SizeOf() == 64, MatrixInvalidSize); + if (Utilities.SizeOf() != 64) + throw new ArgumentException(MatrixInvalidSize, "matrix"); SetMatrixTranspose(ref *(RawMatrix*)Interop.Cast(ref matrix)); } diff --git a/Source/SharpDX.Direct3D10/EffectVectorVariable.cs b/Source/SharpDX.Direct3D10/EffectVectorVariable.cs index e11e77b4f..5c29e0b66 100644 --- a/Source/SharpDX.Direct3D10/EffectVectorVariable.cs +++ b/Source/SharpDX.Direct3D10/EffectVectorVariable.cs @@ -109,7 +109,8 @@ public void Set(RawVector4[] array) /// HRESULT ID3D10EffectVectorVariable::SetFloatVectorArray([In, Buffer] float* pData,[None] int Offset,[None] int Count) public void Set(T[] array) where T : struct { - Trace.Assert(Utilities.SizeOf() == 16, VectorInvalidSize); + if (Utilities.SizeOf() != 16) + throw new ArgumentException(VectorInvalidSize, "array"); Set(Interop.CastArray(array), 0, array.Length); } @@ -132,7 +133,8 @@ public void Set(RawVector4[] array) /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) public unsafe void Set(ref T value) where T : struct { - Trace.Assert(Utilities.SizeOf() <= 16, VectorInvalidSize); + if (Utilities.SizeOf() != 16) + throw new ArgumentException(VectorInvalidSize, "value"); SetRawValue(new IntPtr(Interop.Fixed(ref value)), 0, Utilities.SizeOf()); } diff --git a/Source/SharpDX.Direct3D10/Font.cs b/Source/SharpDX.Direct3D10/Font.cs index 6f91bce8e..28230b05e 100644 --- a/Source/SharpDX.Direct3D10/Font.cs +++ b/Source/SharpDX.Direct3D10/Font.cs @@ -36,16 +36,6 @@ public Font(Device device, FontDescription fontDescription) : base(IntPtr.Zero) D3DX10.CreateFontIndirect(device, ref fontDescription, this); } - /// - /// Initializes a new instance of the class from a - /// - /// The device. - /// The font. - public Font(Device device, System.Drawing.Font font) - { - D3DX10.CreateFont(device, font.Height, 0, (int)(font.Bold ? FontWeight.Bold : FontWeight.Normal), 0, font.Italic, (int)FontCharacterSet.Default, (int)FontPrecision.Default, (int)FontQuality.Default, (int)FontPitchAndFamily.Default, font.Name, this); - } - /// /// Initializes a new instance of the class. /// diff --git a/Source/SharpDX.Direct3D10/Mapping.xml b/Source/SharpDX.Direct3D10/Mapping.xml index 437faccb7..4656a093c 100644 --- a/Source/SharpDX.Direct3D10/Mapping.xml +++ b/Source/SharpDX.Direct3D10/Mapping.xml @@ -35,21 +35,20 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + sharpdx-direct3d10-ext d3d10 @@ -58,13 +57,13 @@ d3d10misc d3d10sdklayers d3d10shader - - d3dx10 - d3dx10core - d3dx10tex - d3dx10mesh - d3dx10async - + d3d10effect + + d3dx10 + d3dx10core + d3dx10tex + d3dx10mesh + d3dx10async @@ -372,6 +371,7 @@ + @@ -381,10 +381,9 @@ - - - - - + + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj index 1da678266..c49ba89f9 100644 --- a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj +++ b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj @@ -11,11 +11,6 @@ SharpDX.Direct3D10 SharpDX.Direct3D10 - - - - - Properties\SharedAssemblyInfo.cs diff --git a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec index d67108431..f489f627e 100644 --- a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec +++ b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec @@ -44,9 +44,12 @@ - - - + + + + + + \ No newline at end of file From 2d97c1857e6bd2f5c741f50fb6e2d98cab536552 Mon Sep 17 00:00:00 2001 From: AndrewSt Date: Fri, 17 Jun 2016 01:44:39 +0300 Subject: [PATCH 3/5] [Direct3D10] freeze sources --- Source/Mapping.xml | 2 +- .../Generated/Enumerations.cs | 7808 +++++++++++ .../SharpDX.Direct3D10/Generated/Functions.cs | 1412 ++ .../Generated/Interfaces.cs | 11443 ++++++++++++++++ .../Generated/LocalInterop.cs | 139 + .../Generated/Structures.cs | 5245 +++++++ 6 files changed, 26048 insertions(+), 1 deletion(-) create mode 100644 Source/SharpDX.Direct3D10/Generated/Enumerations.cs create mode 100644 Source/SharpDX.Direct3D10/Generated/Functions.cs create mode 100644 Source/SharpDX.Direct3D10/Generated/Interfaces.cs create mode 100644 Source/SharpDX.Direct3D10/Generated/LocalInterop.cs create mode 100644 Source/SharpDX.Direct3D10/Generated/Structures.cs diff --git a/Source/Mapping.xml b/Source/Mapping.xml index 90bc31eac..0f272a346 100644 --- a/Source/Mapping.xml +++ b/Source/Mapping.xml @@ -64,7 +64,7 @@ SharpDX.DXGI\Mapping.xml SharpDX.D3DCompiler\Mapping.xml Mapping.Direct3D1x.xml - SharpDX.Direct3D10\Mapping.xml + SharpDX.Direct3D11\Mapping.xml SharpDX.Direct3D12\Mapping.xml SharpDX.Direct3D11.Effects\Mapping.xml diff --git a/Source/SharpDX.Direct3D10/Generated/Enumerations.cs b/Source/SharpDX.Direct3D10/Generated/Enumerations.cs new file mode 100644 index 000000000..e5e7f4cdb --- /dev/null +++ b/Source/SharpDX.Direct3D10/Generated/Enumerations.cs @@ -0,0 +1,7808 @@ +// 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.Direct3D10 namespace. +// This code was generated by a tool. +// Date : 17.06.2016 1:24:36 +// +// 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.Direct3D10 { + +#pragma warning disable 419 +#pragma warning disable 1587 +#pragma warning disable 1574 + + /// + /// bb204887 + /// D3D10_ASYNC_GETDATA_FLAG + /// D3D10_ASYNC_GETDATA_FLAG + [Flags] + public enum AsynchronousFlags : int { + + /// + /// No documentation. + /// + /// + /// bb204887 + /// D3D10_ASYNC_GETDATA_DONOTFLUSH + /// D3D10_ASYNC_GETDATA_DONOTFLUSH + DoNotFlush = unchecked((int)1), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Identifies how to bind a resource to the pipeline.

+ ///
+ /// + ///

In general, binding flags can be combined using a logical OR (except the constant-buffer flag); however, you should use a single flag to allow the device to optimize the resource usage.

This enumeration is used by a:

  • Buffer description when creating a buffer.
  • Texture description when creating a texture (see or or ).

A shader-resource buffer is NOT a constant buffer; rather, it is a texture or buffer resource that is bound to a shader, that contains texture or buffer data (it is not limited to a single element type in the buffer). A shader-resource buffer is created with the flag and is bound to the pipeline using one of these APIs: , , or . Furthermore, a shader-resource buffer cannot use the flag.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_FLAG + /// D3D10_BIND_FLAG + [Flags] + public enum BindFlags : int { + + /// + ///

Bind a buffer as a vertex buffer to the input-assembler stage.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_VERTEX_BUFFER + /// D3D10_BIND_VERTEX_BUFFER + VertexBuffer = unchecked((int)1), + + /// + ///

Bind a buffer as an index buffer to the input-assembler stage.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_INDEX_BUFFER + /// D3D10_BIND_INDEX_BUFFER + IndexBuffer = unchecked((int)2), + + /// + ///

Bind a buffer as a constant buffer to a shader stage; this flag may NOT be combined with any other bind flag.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_CONSTANT_BUFFER + /// D3D10_BIND_CONSTANT_BUFFER + ConstantBuffer = unchecked((int)4), + + /// + ///

Bind a buffer or texture to a shader stage; this flag cannot be used with the flag.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_SHADER_RESOURCE + /// D3D10_BIND_SHADER_RESOURCE + ShaderResource = unchecked((int)8), + + /// + ///

Bind an output buffer for the stream-output stage.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_STREAM_OUTPUT + /// D3D10_BIND_STREAM_OUTPUT + StreamOutput = unchecked((int)16), + + /// + ///

Bind a texture as a render target for the output-merger stage.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_RENDER_TARGET + /// D3D10_BIND_RENDER_TARGET + RenderTarget = unchecked((int)32), + + /// + ///

Bind a texture as a depth-stencil target for the output-merger stage.

+ ///
+ /// + /// bb204891 + /// D3D10_BIND_DEPTH_STENCIL + /// D3D10_BIND_DEPTH_STENCIL + DepthStencil = unchecked((int)64), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

RGB or alpha blending operation.

+ ///
+ /// + ///

The runtime implements RGB blending and alpha blending separately. Therefore, blend state requires separate blend operations for RGB data and alpha data. These blend operations are specified in a blend description. The two sources ? source 1 and source 2 ? are shown in the blending block diagram.

Blend state is used by the output-merger stage to determine how to blend together two RGB pixel values and two alpha values. The two RGB pixel values and two alpha values are the RGB pixel value and alpha value that the pixel shader outputs and the RGB pixel value and alpha value already in the output render target. The blend option controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The blend operation controls how the blending stage mathematically combines these modulated values.

+ ///
+ /// + /// bb204894 + /// D3D10_BLEND_OP + /// D3D10_BLEND_OP + public enum BlendOperation : int { + + /// + ///

Add source 1 and source 2.

+ ///
+ /// + /// bb204894 + /// D3D10_BLEND_OP_ADD + /// D3D10_BLEND_OP_ADD + Add = unchecked((int)1), + + /// + ///

Subtract source 1 from source 2.

+ ///
+ /// + /// bb204894 + /// D3D10_BLEND_OP_SUBTRACT + /// D3D10_BLEND_OP_SUBTRACT + Subtract = unchecked((int)2), + + /// + ///

Subtract source 2 from source 1.

+ ///
+ /// + /// bb204894 + /// D3D10_BLEND_OP_REV_SUBTRACT + /// D3D10_BLEND_OP_REV_SUBTRACT + ReverseSubtract = unchecked((int)3), + + /// + ///

Find the minimum of source 1 and source 2.

+ ///
+ /// + /// bb204894 + /// D3D10_BLEND_OP_MIN + /// D3D10_BLEND_OP_MIN + Minimum = unchecked((int)4), + + /// + ///

Find the maximum of source 1 and source 2.

+ ///
+ /// + /// bb204894 + /// D3D10_BLEND_OP_MAX + /// D3D10_BLEND_OP_MAX + Maximum = unchecked((int)5), + } + + /// + ///

Describes the blend state.

+ ///
+ /// + ///

To see how blending is done, see Output-Merger Stage (Direct3D 10).

These are the default values for blend state.

StateDefault Value
AlphaToCoverageEnable
BlendEnable[8] (for all 8)
SrcBlend
DestBlend
BlendOp
SrcBlendAlpha
DestBlendAlpha
BlendOpAlpha
RenderTargetWriteMask[8] (for all 8)

?

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND + /// D3D10_BLEND + public enum BlendOption : int { + + /// + ///

Determines whether or not to use alpha-to-coverage as a multisampling technique when setting a pixel to a rendertarget.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_ZERO + /// D3D10_BLEND_ZERO + Zero = unchecked((int)1), + + /// + ///

Enable (or disable) blending. There are eight elements in this array; these correspond to the eight rendertargets that can be set to output-merger stage at one time.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_ONE + /// D3D10_BLEND_ONE + One = unchecked((int)2), + + /// + ///

This blend option specifies the first RGB data source and includes an optional pre-blend operation.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_SRC_COLOR + /// D3D10_BLEND_SRC_COLOR + SourceColor = unchecked((int)3), + + /// + ///

This blend option specifies the second RGB data source and includes an optional pre-blend operation.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_INV_SRC_COLOR + /// D3D10_BLEND_INV_SRC_COLOR + InverseSourceColor = unchecked((int)4), + + /// + ///

This blend operation defines how to combine the RGB data sources.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_SRC_ALPHA + /// D3D10_BLEND_SRC_ALPHA + SourceAlpha = unchecked((int)5), + + /// + ///

This blend option specifies the first alpha data source and includes an optional pre-blend operation. Blend options that end in _COLOR are not allowed.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_INV_SRC_ALPHA + /// D3D10_BLEND_INV_SRC_ALPHA + InverseSourceAlpha = unchecked((int)6), + + /// + ///

This blend option specifies the second alpha data source and includes an optional pre-blend operation. Blend options that end in _COLOR are not allowed.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_DEST_ALPHA + /// D3D10_BLEND_DEST_ALPHA + DestinationAlpha = unchecked((int)7), + + /// + ///

This blend operation defines how to combine the alpha data sources.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_INV_DEST_ALPHA + /// D3D10_BLEND_INV_DEST_ALPHA + InverseDestinationAlpha = unchecked((int)8), + + /// + ///

A per-pixel write mask that allows control over which components can be written (see ).

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_DEST_COLOR + /// D3D10_BLEND_DEST_COLOR + DestinationColor = unchecked((int)9), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_INV_DEST_COLOR + /// D3D10_BLEND_INV_DEST_COLOR + InverseDestinationColor = unchecked((int)10), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_SRC_ALPHA_SAT + /// D3D10_BLEND_SRC_ALPHA_SAT + SourceAlphaSaturate = unchecked((int)11), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_BLEND_FACTOR + /// D3D10_BLEND_BLEND_FACTOR + BlendFactor = unchecked((int)14), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_INV_BLEND_FACTOR + /// D3D10_BLEND_INV_BLEND_FACTOR + InverseBlendFactor = unchecked((int)15), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_SRC1_COLOR + /// D3D10_BLEND_SRC1_COLOR + SecondarySourceColor = unchecked((int)16), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_INV_SRC1_COLOR + /// D3D10_BLEND_INV_SRC1_COLOR + InverseSecondarySourceColor = unchecked((int)17), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_SRC1_ALPHA + /// D3D10_BLEND_SRC1_ALPHA + SecondarySourceAlpha = unchecked((int)18), + + /// + /// No documentation. + /// + /// + /// bb204893 + /// D3D10_BLEND_INV_SRC1_ALPHA + /// D3D10_BLEND_INV_SRC1_ALPHA + InverseSecondarySourceAlpha = unchecked((int)19), + } + + /// + ///

These flags are used by functions which operate on one or more channels in a texture.

+ ///
+ /// + /// bb172690 + /// D3DX10_CHANNEL_FLAG + /// D3DX10_CHANNEL_FLAG + [Flags] + public enum Channel : int { + + /// + ///

Indicates the red channel should be used.

+ ///
+ /// + /// bb172690 + /// D3DX10_CHANNEL_RED + /// D3DX10_CHANNEL_RED + Red = unchecked((int)1), + + /// + ///

Indicates the blue channel should be used.

+ ///
+ /// + /// bb172690 + /// D3DX10_CHANNEL_BLUE + /// D3DX10_CHANNEL_BLUE + Blue = unchecked((int)2), + + /// + ///

Indicates the green channel should be used.

+ ///
+ /// + /// bb172690 + /// D3DX10_CHANNEL_GREEN + /// D3DX10_CHANNEL_GREEN + Green = unchecked((int)4), + + /// + ///

Indicates the alpha channel should be used.

+ ///
+ /// + /// bb172690 + /// D3DX10_CHANNEL_ALPHA + /// D3DX10_CHANNEL_ALPHA + Alpha = unchecked((int)8), + + /// + ///

Indicates the luminaces of the red, green, and blue channels should be used.

+ ///
+ /// + /// bb172690 + /// D3DX10_CHANNEL_LUMINANCE + /// D3DX10_CHANNEL_LUMINANCE + Luminance = unchecked((int)16), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Identify which components of each pixel of a render target are writable during blending.

+ ///
+ /// + ///

These flags can be combined with a bitwise OR.

+ ///
+ /// + /// bb204901 + /// D3D10_COLOR_WRITE_ENABLE + /// D3D10_COLOR_WRITE_ENABLE + [Flags] + public enum ColorWriteMaskFlags : byte { + + /// + /// No documentation. + /// + /// + /// bb204901 + /// D3D10_COLOR_WRITE_ENABLE_RED + /// D3D10_COLOR_WRITE_ENABLE_RED + Red = unchecked((byte)1), + + /// + /// No documentation. + /// + /// + /// bb204901 + /// D3D10_COLOR_WRITE_ENABLE_GREEN + /// D3D10_COLOR_WRITE_ENABLE_GREEN + Green = unchecked((byte)2), + + /// + /// No documentation. + /// + /// + /// bb204901 + /// D3D10_COLOR_WRITE_ENABLE_BLUE + /// D3D10_COLOR_WRITE_ENABLE_BLUE + Blue = unchecked((byte)4), + + /// + /// No documentation. + /// + /// + /// bb204901 + /// D3D10_COLOR_WRITE_ENABLE_ALPHA + /// D3D10_COLOR_WRITE_ENABLE_ALPHA + Alpha = unchecked((byte)8), + + /// + /// No documentation. + /// + /// + /// bb204901 + /// D3D10_COLOR_WRITE_ENABLE_ALL + /// D3D10_COLOR_WRITE_ENABLE_ALL + All = unchecked((byte)15), + } + + /// + ///

Comparison options.

+ ///
+ /// + ///

A comparison option determines whether how the runtime compares source (new) data against destination (existing) data before storing the new data. The comparison option is declared in a description before an object is created. The API allows you to set a comparison option for a depth-stencil buffer (see ), depth-stencil operations (see ), or sampler state (see ).

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_FUNC + /// D3D10_COMPARISON_FUNC + public enum Comparison : int { + + /// + ///

Never pass the comparison.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_NEVER + /// D3D10_COMPARISON_NEVER + Never = unchecked((int)1), + + /// + ///

If the source data is less than the destination data, the comparison passes.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_LESS + /// D3D10_COMPARISON_LESS + Less = unchecked((int)2), + + /// + ///

If the source data is equal to the destination data, the comparison passes.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_EQUAL + /// D3D10_COMPARISON_EQUAL + Equal = unchecked((int)3), + + /// + ///

If the source data is less than or equal to the destination data, the comparison passes.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_LESS_EQUAL + /// D3D10_COMPARISON_LESS_EQUAL + LessEqual = unchecked((int)4), + + /// + ///

If the source data is greater than the destination data, the comparison passes.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_GREATER + /// D3D10_COMPARISON_GREATER + Greater = unchecked((int)5), + + /// + ///

If the source data is not equal to the destination data, the comparison passes.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_NOT_EQUAL + /// D3D10_COMPARISON_NOT_EQUAL + NotEqual = unchecked((int)6), + + /// + ///

If the source data is greater than or equal to the destination data, the comparison passes.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_GREATER_EQUAL + /// D3D10_COMPARISON_GREATER_EQUAL + GreaterEqual = unchecked((int)7), + + /// + ///

Always pass the comparison.

+ ///
+ /// + /// bb204902 + /// D3D10_COMPARISON_ALWAYS + /// D3D10_COMPARISON_ALWAYS + Always = unchecked((int)8), + } + + /// + ///

Performance counter types.

+ ///
+ /// + ///

In addition to these performance counters, independent hardware vendors may define their own set of performance counters for their devices. The enum values for these counters would start after and would be defined by those hardware vendors.

A device can support one or more of these performance counters, but it is not required to support any of them.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER + /// D3D10_COUNTER + public enum CounterKind : int { + + /// + ///

Percentage of the time that the GPU is idle.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_GPU_IDLE + /// D3D10_COUNTER_GPU_IDLE + GpuIdle = unchecked((int)0), + + /// + ///

Percentage of the time that the GPU does vertex processing.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_VERTEX_PROCESSING + /// D3D10_COUNTER_VERTEX_PROCESSING + VertexProcessing = unchecked((int)1), + + /// + ///

Percentage of the time that the GPU does geometry processing.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_GEOMETRY_PROCESSING + /// D3D10_COUNTER_GEOMETRY_PROCESSING + GeometryProcessing = unchecked((int)2), + + /// + ///

Percentage of the time that the GPU does pixel processing.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_PIXEL_PROCESSING + /// D3D10_COUNTER_PIXEL_PROCESSING + PixelProcessing = unchecked((int)3), + + /// + ///

Percentage of the time that the GPU does other processing (not vertex, geometry, or pixel processing).

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_OTHER_GPU_PROCESSING + /// D3D10_COUNTER_OTHER_GPU_PROCESSING + OtherGpuProcessing = unchecked((int)4), + + /// + ///

Percentage of bandwidth used on a host adapter. Value returned by between 0.0 and 1.0 when using this counter.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION + /// D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION + HostAdapterBandwidthUtilization = unchecked((int)5), + + /// + ///

Percentage of bandwidth used by the local video memory. Value returned by between 0.0 and 1.0 when using this counter

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION + /// D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION + LocalVidmemBandwidthUtilization = unchecked((int)6), + + /// + ///

Percentage of throughput used for vertices. Value returned by between 0.0 and 1.0 when using this counter

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION + /// D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION + VertexThroughputUtilization = unchecked((int)7), + + /// + ///

Percentage of throughput used for triangle setup. Value returned by between 0.0 and 1.0 when using this counter

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION + /// D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION + TriangleSetupThroughputUtilization = unchecked((int)8), + + /// + ///

Percentage of throughput used for the fillrate. Value returned by between 0.0 and 1.0 when using this counter.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION + /// D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION + FillrateThroughputUtilization = unchecked((int)9), + + /// + ///

Percentage of time that a vertex shader spends sampling resources.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_VS_MEMORY_LIMITED + /// D3D10_COUNTER_VS_MEMORY_LIMITED + VertexShaderMemoryLimited = unchecked((int)10), + + /// + ///

Percentage of time that a vertex shader spends doing computations.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_VS_COMPUTATION_LIMITED + /// D3D10_COUNTER_VS_COMPUTATION_LIMITED + VertexShaderComputationLimited = unchecked((int)11), + + /// + ///

Percentage of time that a geometry shader spends sampling resources.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_GS_MEMORY_LIMITED + /// D3D10_COUNTER_GS_MEMORY_LIMITED + GeometryShaderMemoryLimited = unchecked((int)12), + + /// + ///

Percentage of time that a geometry shader spends doing computations.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_GS_COMPUTATION_LIMITED + /// D3D10_COUNTER_GS_COMPUTATION_LIMITED + GeometryShaderComputationLimited = unchecked((int)13), + + /// + ///

Percentage of time that a pixel shader spends sampling resources.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_PS_MEMORY_LIMITED + /// D3D10_COUNTER_PS_MEMORY_LIMITED + PixelShaderMemoryLimited = unchecked((int)14), + + /// + ///

Percentage of time that a pixel shader spends doing computations.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_PS_COMPUTATION_LIMITED + /// D3D10_COUNTER_PS_COMPUTATION_LIMITED + PixelShaderComputationLimited = unchecked((int)15), + + /// + ///

Percentage of vertex data that was read from the vertex cache. For example, if 6 vertices were added to the cache and 3 of them were read from the cache, then the hit rate would be 0.5.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE + /// D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE + PostTransformCacheHitRate = unchecked((int)16), + + /// + ///

Percentage of texel data that was read from the vertex cache. For example, if 6 texels were added to the cache and 3 of them were read from the cache, then the hit rate would be 0.5.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_TEXTURE_CACHE_HIT_RATE + /// D3D10_COUNTER_TEXTURE_CACHE_HIT_RATE + TextureCacheHitRate = unchecked((int)17), + + /// + ///

Start of the device-dependent counters. See remarks.

+ ///
+ /// + /// bb204904 + /// D3D10_COUNTER_DEVICE_DEPENDENT_0 + /// D3D10_COUNTER_DEVICE_DEPENDENT_0 + DeviceDependent0 = unchecked((int)1073741824), + } + + /// + ///

Data type of a performance counter.

+ ///
+ /// + ///

These flags are an output parameter in .

+ ///
+ /// + /// bb204907 + /// D3D10_COUNTER_TYPE + /// D3D10_COUNTER_TYPE + public enum CounterType : int { + + /// + ///

32-bit floating point.

+ ///
+ /// + /// bb204907 + /// D3D10_COUNTER_TYPE_FLOAT32 + /// D3D10_COUNTER_TYPE_FLOAT32 + Float32 = unchecked((int)0), + + /// + ///

16-bit unsigned integer.

+ ///
+ /// + /// bb204907 + /// D3D10_COUNTER_TYPE_UINT16 + /// D3D10_COUNTER_TYPE_UINT16 + UInt16 = unchecked((int)1), + + /// + ///

32-bit unsigned integer.

+ ///
+ /// + /// bb204907 + /// D3D10_COUNTER_TYPE_UINT32 + /// D3D10_COUNTER_TYPE_UINT32 + UInt32 = unchecked((int)2), + + /// + ///

64-bit unsigned integer.

+ ///
+ /// + /// bb204907 + /// D3D10_COUNTER_TYPE_UINT64 + /// D3D10_COUNTER_TYPE_UINT64 + UInt64 = unchecked((int)3), + } + + /// + ///

Specifies the types of CPU access allowed for a resource.

+ ///
+ /// + ///

This enumeration is used in , , , , and . See Creating Buffer Resources (Direct3D 10) for more details.

Applications can combine one or more of these flags with a bitwise OR. When possible, create resources with no CPU access flags, as this enables better resource optimization.

+ ///
+ /// + /// bb204908 + /// D3D10_CPU_ACCESS_FLAG + /// D3D10_CPU_ACCESS_FLAG + [Flags] + public enum CpuAccessFlags : int { + + /// + ///

The resource is to be mappable so that the CPU can change its contents. Resources created with this flag cannot be set as outputs of the pipeline and must be created with either dynamic or staging usage (see ).

+ ///
+ /// + /// bb204908 + /// D3D10_CPU_ACCESS_WRITE + /// D3D10_CPU_ACCESS_WRITE + Write = unchecked((int)65536), + + /// + ///

The resource is to be mappable so that the CPU can read its contents. Resources created with this flag cannot be set as either inputs or outputs to the pipeline and must be created with staging usage (see ).

+ ///
+ /// + /// bb204908 + /// D3D10_CPU_ACCESS_READ + /// D3D10_CPU_ACCESS_READ + Read = unchecked((int)131072), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Indicates triangles facing a particular direction are not drawn.

+ ///
+ /// + ///

This enumeration is part of a rasterizer-state object description (see ).

+ ///
+ /// + /// bb204911 + /// D3D10_CULL_MODE + /// D3D10_CULL_MODE + public enum CullMode : int { + + /// + ///

Always draw all triangles.

+ ///
+ /// + /// bb204911 + /// D3D10_CULL_NONE + /// D3D10_CULL_NONE + None = unchecked((int)1), + + /// + ///

Do not draw triangles that are front-facing.

+ ///
+ /// + /// bb204911 + /// D3D10_CULL_FRONT + /// D3D10_CULL_FRONT + Front = unchecked((int)2), + + /// + ///

Do not draw triangles that are back-facing.

+ ///
+ /// + /// bb204911 + /// D3D10_CULL_BACK + /// D3D10_CULL_BACK + Back = unchecked((int)3), + } + + /// + /// No documentation. + /// + /// + /// D3D10_DEBUG_FEATURE_FLAGS + /// D3D10_DEBUG_FEATURE_FLAGS + [Flags] + public enum DebugFeatureFlags : int { + + /// + /// No documentation. + /// + /// + /// D3D10_DEBUG_FEATURE_FLUSH_PER_RENDER_OP + /// D3D10_DEBUG_FEATURE_FLUSH_PER_RENDER_OP + FlushPerRender = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// D3D10_DEBUG_FEATURE_FINISH_PER_RENDER_OP + /// D3D10_DEBUG_FEATURE_FINISH_PER_RENDER_OP + FinishPerRender = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// D3D10_DEBUG_FEATURE_PRESENT_PER_RENDER_OP + /// D3D10_DEBUG_FEATURE_PRESENT_PER_RENDER_OP + PresentPerRender = unchecked((int)4), + } + + /// + ///

Specifies the parts of the depth stencil to clear. Usually used with .

+ ///
+ /// + ///

These flags can be bitwise ORed together.

+ ///
+ /// + /// bb204900 + /// D3D10_CLEAR_FLAG + /// D3D10_CLEAR_FLAG + [Flags] + public enum DepthStencilClearFlags : int { + + /// + /// No documentation. + /// + /// + /// bb204900 + /// D3D10_CLEAR_DEPTH + /// D3D10_CLEAR_DEPTH + Depth = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb204900 + /// D3D10_CLEAR_STENCIL + /// D3D10_CLEAR_STENCIL + Stencil = unchecked((int)2), + } + + /// + ///

Specifies how to access a resource used in a depth-stencil view.

+ ///
+ /// + ///

This enumeration is used in to create a depth-stencil view.

+ ///
+ /// + /// bb205043 + /// D3D10_DSV_DIMENSION + /// D3D10_DSV_DIMENSION + public enum DepthStencilViewDimension : int { + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_UNKNOWN + /// D3D10_DSV_DIMENSION_UNKNOWN + Unknown = unchecked((int)0), + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_TEXTURE1D + /// D3D10_DSV_DIMENSION_TEXTURE1D + Texture1D = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_TEXTURE1DARRAY + /// D3D10_DSV_DIMENSION_TEXTURE1DARRAY + Texture1DArray = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_TEXTURE2D + /// D3D10_DSV_DIMENSION_TEXTURE2D + Texture2D = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_TEXTURE2DARRAY + /// D3D10_DSV_DIMENSION_TEXTURE2DARRAY + Texture2DArray = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_TEXTURE2DMS + /// D3D10_DSV_DIMENSION_TEXTURE2DMS + Texture2DMultisampled = unchecked((int)5), + + /// + /// No documentation. + /// + /// + /// bb205043 + /// D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY + /// D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY + Texture2DMultisampledArray = unchecked((int)6), + } + + /// + ///

Identify the portion of a depth-stencil buffer for writing depth data.

+ ///
+ /// + /// bb205038 + /// D3D10_DEPTH_WRITE_MASK + /// D3D10_DEPTH_WRITE_MASK + public enum DepthWriteMask : int { + + /// + /// No documentation. + /// + /// + /// bb205038 + /// D3D10_DEPTH_WRITE_MASK_ZERO + /// D3D10_DEPTH_WRITE_MASK_ZERO + Zero = unchecked((int)0), + + /// + /// No documentation. + /// + /// + /// bb205038 + /// D3D10_DEPTH_WRITE_MASK_ALL + /// D3D10_DEPTH_WRITE_MASK_ALL + All = unchecked((int)1), + } + + /// + ///

Device creation flags.

+ ///
+ /// + ///

Device creation flags are used by and .

An application might dynamically create (and destroy) threads to improve performance especially on a machine with multiple CPU cores. There may be cases, however, when an application needs to prevent extra threads from being created. This can happen when you want to simplify debugging, profile code or develop a tool for instance. For these cases, use to request that the runtime and video driver not create any additional threads that might interfere with the application.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_FLAG + /// D3D10_CREATE_DEVICE_FLAG + [Flags] + public enum DeviceCreationFlags : int { + + /// + ///

Use this flag if an application will only be calling D3D10 from a single thread. If this flag is not specified, the default behavior of D3D10 is to enter a lock during each API call to prevent multiple threads altering internal state. By using this flag no locks will be taken which can slightly increase performance, but could result in undefine behavior if D3D10 is called from multiple threads.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_SINGLETHREADED + /// D3D10_CREATE_DEVICE_SINGLETHREADED + SingleThreaded = unchecked((int)1), + + /// + ///

Create a device that supports the debug layer.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_DEBUG + /// D3D10_CREATE_DEVICE_DEBUG + Debug = unchecked((int)2), + + /// + ///

Create both a software (REF) and hardware (HAL) version of the device simultaneously, which allows an application to switch to a reference device to enable debugging. See Interface for more information.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_SWITCH_TO_REF + /// D3D10_CREATE_DEVICE_SWITCH_TO_REF + SwitchToRef = unchecked((int)4), + + /// + ///

Prevents multiple threads from being created. When this flag is used with a WARP device, no additional threads will be created by WARP and all rasterization will occur on the calling thread. This flag is not recommended for general use. See remarks.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS + /// D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS + PreventInternalThreadingOptimizations = unchecked((int)8), + + /// + ///

Return a null reference instead of triggering an exception on memory exhaustion during invocations to Map. Without this flag an exception will be raised on memory exhaustion. Only valid on Winodws 7.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_ALLOW_NULL_FROM_MAP + /// D3D10_CREATE_DEVICE_ALLOW_NULL_FROM_MAP + AllowNullFromMap = unchecked((int)16), + + /// + ///

Causes device creation to fail if BGRA support is not available.

BGRA support enables the following formats.

is only relevant when a device is created with or using the or feature levels, the flag will be ignored when a device is created with other feature levels.

Note that BGRA support may be present even if the application didn't specify . The flag merely causes device creation to fail if BGRA support isn't available.

is only valid on Windows 7, Windows Server 2008 R2, and updated Windows Vista (KB971644) systems.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_BGRA_SUPPORT + /// D3D10_CREATE_DEVICE_BGRA_SUPPORT + BgraSupport = unchecked((int)32), + + /// + ///

Causes the Direct3D runtime to ignore registry settings that turn on the debug layer. You can turn on the debug layer by using the DirectX Control Panel that was included as part of the DirectX SDK. We shipped the last version of the DirectX SDK in June 2010; you can download it from the Microsoft Download Center. You can set this flag in your app, typically in release builds only, to prevent end users from using the DirectX Control Panel to monitor how the app uses Direct3D.

Note??You can also set this flag in your app to prevent Direct3D debugging tools, such as Visual Studio Ultimate?2012, from hooking your app.

Windows?8.1:??This flag doesn't prevent Visual Studio?2013 and later running on Windows?8.1 and later from hooking your app. But, this flag still prevents Visual Studio?2013 and later running on Windows?8 and earlier from hooking your app.

Direct3D 11:??This value is not supported until Direct3D 11.1.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY + /// D3D10_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY + PreventAlteringLayerSettingsFromRegistry = unchecked((int)128), + + /// + ///

Reserved. This flag is currently not supported. Do not use.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_STRICT_VALIDATION + /// D3D10_CREATE_DEVICE_STRICT_VALIDATION + StrictValidation = unchecked((int)512), + + /// + ///

Causes the device and driver to keep information that you can use for shader debugging. The exact impact from this flag will vary from driver to driver. To use this flag, you must have D3D11_1SDKLayers.dll installed; otherwise, device creation fails. The created device supports the debug layer. To get D3D11_1SDKLayers.dll, you must install the SDK for Windows?8.

Direct3D 11:??This value is not supported until Direct3D 11.1.

+ ///
+ /// + /// bb204909 + /// D3D10_CREATE_DEVICE_DEBUGGABLE + /// D3D10_CREATE_DEVICE_DEBUGGABLE + Debuggable = unchecked((int)1024), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

The device-driver type.

+ ///
+ /// + ///

The device-driver type needs to be specified when the device is created (using or ).

For information about limitations creating nonhardware-type devices on certain feature levels, see Limitations Creating WARP and Reference Devices.

+ ///
+ /// + /// bb205042 + /// D3D10_DRIVER_TYPE + /// D3D10_DRIVER_TYPE + public enum DriverType : int { + + /// + ///

A hardware device; commonly called a HAL device.

+ ///
+ /// + /// bb205042 + /// D3D10_DRIVER_TYPE_HARDWARE + /// D3D10_DRIVER_TYPE_HARDWARE + Hardware = unchecked((int)0), + + /// + ///

A reference device; commonly called a REF device.

+ ///
+ /// + /// bb205042 + /// D3D10_DRIVER_TYPE_REFERENCE + /// D3D10_DRIVER_TYPE_REFERENCE + Reference = unchecked((int)1), + + /// + ///

A null device; which is a reference device without render capability.

+ ///
+ /// + /// bb205042 + /// D3D10_DRIVER_TYPE_NULL + /// D3D10_DRIVER_TYPE_NULL + Null = unchecked((int)2), + + /// + ///

Reserved for later use.

+ ///
+ /// + /// bb205042 + /// D3D10_DRIVER_TYPE_SOFTWARE + /// D3D10_DRIVER_TYPE_SOFTWARE + Software = unchecked((int)3), + + /// + ///

A WARP driver, which is a high-performance software rasterizer. The rasterizer supports feature level 9_1 through level 10.1 with a high performance software implementation when hardware is not available. For more information about using a WARP driver, see Windows Advanced Rasterization Platform (WARP) In-Depth Guide. Note that WARP is only available with the DirectX 11 Runtime (Windows 7, Windows Server 2008 R2, updated Windows Vista [KB971644]).

+ ///
+ /// + /// bb205042 + /// D3D10_DRIVER_TYPE_WARP + /// D3D10_DRIVER_TYPE_WARP + Warp = unchecked((int)5), + } + + /// + ///

Describes an effect variable.

+ ///
+ /// + ///

To get an effect-variable description, call .

+ ///
+ /// + /// bb205056 + /// D3D10_EFFECT_VARIABLE_FLAGS + /// D3D10_EFFECT_VARIABLE_FLAGS + [Flags] + public enum EffectVariableFlags : int { + + /// + ///

A string that contains the variable name.

+ ///
+ /// + /// bb205056 + /// D3D10_EFFECT_VARIABLE_POOLED + /// D3D10_EFFECT_VARIABLE_POOLED + Pooled = unchecked((int)1), + + /// + ///

The semantic attached to the variable; otherwise null.

+ ///
+ /// + /// bb205056 + /// D3D10_EFFECT_VARIABLE_ANNOTATION + /// D3D10_EFFECT_VARIABLE_ANNOTATION + Annotation = unchecked((int)2), + + /// + ///

Optional flags for effect variables.

+ ///
+ /// + /// bb205056 + /// D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT + /// D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT + ExplicitBindPoint = unchecked((int)4), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

The version of hardware acceleration requested.

+ ///
+ /// + ///

Use this enumeration when creating a device with or .

Note that 10level9 feature levels 9_1, 9_2, and 9_3 are only available with the Direct3D 11 runtime (Windows?7, Windows Server?2008?R2, updated Windows?Vista with Service Pack?2 (SP2) [KB 971644], and updated Windows Server?2008 [KB 971512]).

For information about limitations creating nonhardware-type devices on certain feature levels, see Limitations Creating WARP and Reference Devices.

For an overview of the capabilities of each feature level, see Overview For Each Feature Level.

+ ///
+ /// + /// bb694529 + /// D3D10_FEATURE_LEVEL1 + /// D3D10_FEATURE_LEVEL1 + public enum FeatureLevel : int { + + /// + ///

The hardware supports Direct3D 10.0 features.

+ ///
+ /// + /// bb694529 + /// D3D10_FEATURE_LEVEL_10_0 + /// D3D10_FEATURE_LEVEL_10_0 + Level_10_0 = unchecked((int)40960), + + /// + ///

The hardware supports Direct3D 10.1 features.

+ ///
+ /// + /// bb694529 + /// D3D10_FEATURE_LEVEL_10_1 + /// D3D10_FEATURE_LEVEL_10_1 + Level_10_1 = unchecked((int)41216), + + /// + ///

The hardware supports 9.1 feature level.

+ ///
+ /// + /// bb694529 + /// D3D10_FEATURE_LEVEL_9_1 + /// D3D10_FEATURE_LEVEL_9_1 + Level_9_1 = unchecked((int)37120), + + /// + ///

The hardware supports 9.2 feature level.

+ ///
+ /// + /// bb694529 + /// D3D10_FEATURE_LEVEL_9_2 + /// D3D10_FEATURE_LEVEL_9_2 + Level_9_2 = unchecked((int)37376), + + /// + ///

The hardware supports 9.3 feature level.

+ ///
+ /// + /// bb694529 + /// D3D10_FEATURE_LEVEL_9_3 + /// D3D10_FEATURE_LEVEL_9_3 + Level_9_3 = unchecked((int)37632), + } + + /// + ///

Determines the fill mode to use when rendering triangles.

+ ///
+ /// + ///

This enumeration is part of a rasterizer-state object description (see ).

+ ///
+ /// + /// bb205059 + /// D3D10_FILL_MODE + /// D3D10_FILL_MODE + public enum FillMode : int { + + /// + ///

Draw lines connecting the vertices. Adjacent vertices are not drawn.

+ ///
+ /// + /// bb205059 + /// D3D10_FILL_WIREFRAME + /// D3D10_FILL_WIREFRAME + Wireframe = unchecked((int)2), + + /// + ///

Fill the triangles formed by the vertices. Adjacent vertices are not drawn.

+ ///
+ /// + /// bb205059 + /// D3D10_FILL_SOLID + /// D3D10_FILL_SOLID + Solid = unchecked((int)3), + } + + /// + ///

Filtering options during texture sampling.

+ ///
+ /// + ///

During texture sampling, one or more texels are read and combined (this is calling filtering) to produce a single value. Point sampling reads a single texel while linear sampling reads two texels (endpoints) and linearly interpolates a third value between the endpoints.

HLSL texture-sampling functions also support comparison filtering during texture sampling. Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

You can use HLSL intrinsic texture-sampling functions that implement texture filtering only or companion functions that use texture filtering with comparison filtering.

Texture Sampling FunctionTexture Sampling Function with Comparison Filtering
sample samplecmp or samplecmplevelzero

?

Comparison filters only work with textures that have the following formats: R32_FLOAT_X8X24_TYPELESS, R32_FLOAT, R24_UNORM_X8_TYPELESS, R16_UNORM.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER + /// D3D10_FILTER + public enum Filter : int { + + /// + ///

Use point sampling for minification, magnification, and mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_MAG_MIP_POINT + /// D3D10_FILTER_MIN_MAG_MIP_POINT + MinMagMipPoint = unchecked((int)0), + + /// + ///

Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_MAG_POINT_MIP_LINEAR + /// D3D10_FILTER_MIN_MAG_POINT_MIP_LINEAR + MinMagPointMipLinear = unchecked((int)1), + + /// + ///

Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT + /// D3D10_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT + MinPointMagLinearMipPoint = unchecked((int)4), + + /// + ///

Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_POINT_MAG_MIP_LINEAR + /// D3D10_FILTER_MIN_POINT_MAG_MIP_LINEAR + MinPointMagMipLinear = unchecked((int)5), + + /// + ///

Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_LINEAR_MAG_MIP_POINT + /// D3D10_FILTER_MIN_LINEAR_MAG_MIP_POINT + MinLinearMagMipPoint = unchecked((int)16), + + /// + ///

Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR + /// D3D10_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR + MinLinearMagPointMipLinear = unchecked((int)17), + + /// + ///

Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_MAG_LINEAR_MIP_POINT + /// D3D10_FILTER_MIN_MAG_LINEAR_MIP_POINT + MinMagLinearMipPoint = unchecked((int)20), + + /// + ///

Use linear interpolation for minification, magnification, and mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_MIN_MAG_MIP_LINEAR + /// D3D10_FILTER_MIN_MAG_MIP_LINEAR + MinMagMipLinear = unchecked((int)21), + + /// + ///

Use anisotropic interpolation for minification, magnification, and mip-level sampling.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_ANISOTROPIC + /// D3D10_FILTER_ANISOTROPIC + Anisotropic = unchecked((int)85), + + /// + ///

Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_MAG_MIP_POINT + /// D3D10_FILTER_COMPARISON_MIN_MAG_MIP_POINT + ComparisonMinMagMipPoint = unchecked((int)128), + + /// + ///

Use point sampling for minification and magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR + /// D3D10_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR + ComparisonMinMagPointMipLinear = unchecked((int)129), + + /// + ///

Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT + /// D3D10_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT + ComparisonMinPointMagLinearMipPoint = unchecked((int)132), + + /// + ///

Use point sampling for minification; use linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR + /// D3D10_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR + ComparisonMinPointMagMipLinear = unchecked((int)133), + + /// + ///

Use linear interpolation for minification; use point sampling for magnification and mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT + /// D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT + ComparisonMinLinearMagMipPoint = unchecked((int)144), + + /// + ///

Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR + /// D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR + ComparisonMinLinearMagPointMipLinear = unchecked((int)145), + + /// + ///

Use linear interpolation for minification and magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT + /// D3D10_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT + ComparisonMinMagLinearMipPoint = unchecked((int)148), + + /// + ///

Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR + /// D3D10_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR + ComparisonMinMagMipLinear = unchecked((int)149), + + /// + ///

Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_COMPARISON_ANISOTROPIC + /// D3D10_FILTER_COMPARISON_ANISOTROPIC + ComparisonAnisotropic = unchecked((int)213), + + /// + ///

For use in pixel shaders with textures that have the R1_UNORM format.

+ ///
+ /// + /// bb205060 + /// D3D10_FILTER_TEXT_1BIT + /// D3D10_FILTER_TEXT_1BIT + Texture1Bit = unchecked((int)-2147483648), + } + + /// + ///

Texture filtering flags.

+ ///
+ /// + ///

D3DX10 automatically performs gamma correction (to convert color data from RGB space to standard RGB space) when loading texture data. This is automatically done for instance when RGB data is loaded from a .png file into an sRGB texture. Use the SRGB filter flags to indicate if the data does not need to be converted into sRGB space.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_FLAG + /// D3DX10_FILTER_FLAG + [Flags] + public enum FilterFlags : int { + + /// + ///

No scaling or filtering will take place. Pixels outside the bounds of the source image are assumed to be transparent black.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_NONE + /// D3DX10_FILTER_NONE + None = unchecked((int)1), + + /// + ///

Each destination pixel is computed by sampling the nearest pixel from the source image.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_POINT + /// D3DX10_FILTER_POINT + Point = unchecked((int)2), + + /// + ///

Each destination pixel is computed by sampling the four nearest pixels from the source image. This filter works best when the scale on both axes is less than two.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_LINEAR + /// D3DX10_FILTER_LINEAR + Linear = unchecked((int)3), + + /// + ///

Every pixel in the source image contributes equally to the destination image. This is the slowest of the filters.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_TRIANGLE + /// D3DX10_FILTER_TRIANGLE + Triangle = unchecked((int)4), + + /// + ///

Each pixel is computed by averaging a 2x2(x2) box of pixels from the source image. This filter works only when the dimensions of the destination are half those of the source, as is the case with mipmaps.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_BOX + /// D3DX10_FILTER_BOX + Box = unchecked((int)5), + + /// + ///

Pixels off the edge of the texture on the u-axis should be mirrored, not wrapped.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_MIRROR_U + /// D3DX10_FILTER_MIRROR_U + MirrorU = unchecked((int)65536), + + /// + ///

Pixels off the edge of the texture on the v-axis should be mirrored, not wrapped.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_MIRROR_V + /// D3DX10_FILTER_MIRROR_V + MirrorV = unchecked((int)131072), + + /// + ///

Pixels off the edge of the texture on the w-axis should be mirrored, not wrapped.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_MIRROR_W + /// D3DX10_FILTER_MIRROR_W + MirrorW = unchecked((int)262144), + + /// + ///

Specifying this flag is the same as specifying the D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V, and D3DX_FILTER_MIRROR_W flags.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_MIRROR + /// D3DX10_FILTER_MIRROR + Mirror = unchecked((int)458752), + + /// + ///

The resulting image must be dithered using a 4x4 ordered dither algorithm. This happens when converting from one format to another.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_DITHER + /// D3DX10_FILTER_DITHER + Dither = unchecked((int)524288), + + /// + ///

Do diffuse dithering on the image when changing from one format to another.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_DITHER_DIFFUSION + /// D3DX10_FILTER_DITHER_DIFFUSION + DitherDiffusion = unchecked((int)1048576), + + /// + ///

Input data is in standard RGB (sRGB) color space. See remarks.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_SRGB_IN + /// D3DX10_FILTER_SRGB_IN + SRgbIn = unchecked((int)2097152), + + /// + ///

Output data is in standard RGB (sRGB) color space. See remarks.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_SRGB_OUT + /// D3DX10_FILTER_SRGB_OUT + SRgbOut = unchecked((int)4194304), + + /// + ///

Same as specifying D3DX_FILTER_SRGB_IN | D3DX_FILTER_SRGB_OUT. See remarks.

+ ///
+ /// + /// bb172692 + /// D3DX10_FILTER_SRGB + /// D3DX10_FILTER_SRGB + SRgb = unchecked((int)6291456), + } + + /// + ///

Types of magnification or minification sampler filters.

+ ///
+ /// + /// bb205061 + /// D3D10_FILTER_TYPE + /// D3D10_FILTER_TYPE + public enum FilterType : int { + + /// + ///

Point filtering used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture.

+ ///
+ /// + /// bb205061 + /// D3D10_FILTER_TYPE_POINT + /// D3D10_FILTER_TYPE_POINT + Point = unchecked((int)0), + + /// + ///

Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2 x 2 area of texels surrounding the desired pixel is used. The texture filter to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures.

+ ///
+ /// + /// bb205061 + /// D3D10_FILTER_TYPE_LINEAR + /// D3D10_FILTER_TYPE_LINEAR + Linear = unchecked((int)1), + } + + /// + ///

Which resources are supported for a given format and given device (see ).

+ ///
+ /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT + /// D3D10_FORMAT_SUPPORT + [Flags] + public enum FormatSupport : int { + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_BUFFER + /// D3D10_FORMAT_SUPPORT_BUFFER + Buffer = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_IA_VERTEX_BUFFER + /// D3D10_FORMAT_SUPPORT_IA_VERTEX_BUFFER + InputAssemblyVertexBuffer = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER + /// D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER + InputAssemblyIndexBuffer = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_SO_BUFFER + /// D3D10_FORMAT_SUPPORT_SO_BUFFER + StreamOutputBuffer = unchecked((int)8), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_TEXTURE1D + /// D3D10_FORMAT_SUPPORT_TEXTURE1D + Texture1D = unchecked((int)16), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_TEXTURE2D + /// D3D10_FORMAT_SUPPORT_TEXTURE2D + Texture2D = unchecked((int)32), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_TEXTURE3D + /// D3D10_FORMAT_SUPPORT_TEXTURE3D + Texture3D = unchecked((int)64), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_TEXTURECUBE + /// D3D10_FORMAT_SUPPORT_TEXTURECUBE + TextureCube = unchecked((int)128), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_SHADER_LOAD + /// D3D10_FORMAT_SUPPORT_SHADER_LOAD + ShaderLoad = unchecked((int)256), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_SHADER_SAMPLE + /// D3D10_FORMAT_SUPPORT_SHADER_SAMPLE + ShaderSample = unchecked((int)512), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON + /// D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON + ShaderSampleComparison = unchecked((int)1024), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT + /// D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT + ShaderSampleMonoText = unchecked((int)2048), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_MIP + /// D3D10_FORMAT_SUPPORT_MIP + Mip = unchecked((int)4096), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_MIP_AUTOGEN + /// D3D10_FORMAT_SUPPORT_MIP_AUTOGEN + MipAutogen = unchecked((int)8192), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_RENDER_TARGET + /// D3D10_FORMAT_SUPPORT_RENDER_TARGET + RenderTarget = unchecked((int)16384), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_BLENDABLE + /// D3D10_FORMAT_SUPPORT_BLENDABLE + Blendable = unchecked((int)32768), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_DEPTH_STENCIL + /// D3D10_FORMAT_SUPPORT_DEPTH_STENCIL + DepthStencil = unchecked((int)65536), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_CPU_LOCKABLE + /// D3D10_FORMAT_SUPPORT_CPU_LOCKABLE + CpuLockable = unchecked((int)131072), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE + /// D3D10_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE + MultisampleResolve = unchecked((int)262144), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_DISPLAY + /// D3D10_FORMAT_SUPPORT_DISPLAY + Display = unchecked((int)524288), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT + /// D3D10_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT + CastWithinBitLayout = unchecked((int)1048576), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET + /// D3D10_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET + MultisampleRenderTarget = unchecked((int)2097152), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_MULTISAMPLE_LOAD + /// D3D10_FORMAT_SUPPORT_MULTISAMPLE_LOAD + MultisampleLoad = unchecked((int)4194304), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_SHADER_GATHER + /// D3D10_FORMAT_SUPPORT_SHADER_GATHER + ShaderGather = unchecked((int)8388608), + + /// + /// No documentation. + /// + /// + /// bb205063 + /// D3D10_FORMAT_SUPPORT_BACK_BUFFER_CAST + /// D3D10_FORMAT_SUPPORT_BACK_BUFFER_CAST + BackBufferCast = unchecked((int)16777216), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Image file formats supported by D3DXCreatexxx and D3DX10Savexxx functions.

+ ///
+ /// + ///

See Types of Bitmaps (GDI+) for more information on some of these formats.

D3DX10 makes use of the Windows Imaging Component to implement the majority of the supported bitmap file types. See Windows Imaging Component Overview for additional information. + ///

+ ///
+ /// + /// bb172694 + /// D3DX10_IMAGE_FILE_FORMAT + /// D3DX10_IMAGE_FILE_FORMAT + public enum ImageFileFormat : int { + + /// + ///

Windows bitmap (BMP) file format. Contains a header that describes the resolution of the device on which the rectangle of pixels was created, the dimensions of the rectangle, the size of the array of bits, a logical palette, and an array of bits that defines the relationship between pixels in the bitmapped image and entries in the logical palette. The file extension for this format is .bmp.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_BMP + /// D3DX10_IFF_BMP + Bmp = unchecked((int)0), + + /// + ///

Joint Photographic Experts Group (JPEG) compressed file format. Specifies variable compression of 24-bit RGB color and 8-bit gray-scale Tagged Image File Format (TIFF) image document files. The file extension for this format is .jpg.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_JPG + /// D3DX10_IFF_JPG + Jpg = unchecked((int)1), + + /// + ///

Portable Network Graphics (PNG) file format. A non-proprietary bitmap format using lossless compression. The file extension for this format is .png.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_PNG + /// D3DX10_IFF_PNG + Png = unchecked((int)3), + + /// + ///

DirectDraw surface (DDS) file format. Stores textures, volume textures, and cubic environment maps, with or without mipmap levels, and with or without pixel compression. The file extension for this format is .dds.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_DDS + /// D3DX10_IFF_DDS + Dds = unchecked((int)4), + + /// + ///

Tagged Image File Format (TIFF). The file extensions for this format are .tif and .tiff.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_TIFF + /// D3DX10_IFF_TIFF + Tiff = unchecked((int)10), + + /// + ///

Graphics Interchange Format (GIF).The file extension for this format is .gif.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_GIF + /// D3DX10_IFF_GIF + Gif = unchecked((int)11), + + /// + ///

Windows Media Photo format (WMP). This format is also known as HD Photo and JPEG XR. The file extensions for this format are .hdp, .jxr, and .wdp.

To work properly, requires that you initialize COM. Therefore, call CoInitialize or CoInitializeEx in your application before you call D3DX.

+ ///
+ /// + /// bb172694 + /// D3DX10_IFF_WMP + /// D3DX10_IFF_WMP + Wmp = unchecked((int)12), + } + + /// + ///

Type of data contained in an input slot.

+ ///
+ /// + ///

Use these values to specify the type of data for a particular input element (see ) of an input-layout object.

+ ///
+ /// + /// bb205315 + /// D3D10_INPUT_CLASSIFICATION + /// D3D10_INPUT_CLASSIFICATION + public enum InputClassification : int { + + /// + ///

Input data is per-vertex data.

+ ///
+ /// + /// bb205315 + /// D3D10_INPUT_PER_VERTEX_DATA + /// D3D10_INPUT_PER_VERTEX_DATA + PerVertexData = unchecked((int)0), + + /// + ///

Input data is per-instance data.

+ ///
+ /// + /// bb205315 + /// D3D10_INPUT_PER_INSTANCE_DATA + /// D3D10_INPUT_PER_INSTANCE_DATA + PerInstanceData = unchecked((int)1), + } + + /// + ///

Specifies how the CPU should respond when Map is called on a resource being used by the GPU.

+ ///
+ /// + ///

This enumeration is used by , , , and .

cannot be used with or D3D10_MAP_WRITE_NOOVERWRITE.

For more information about potential conflicts between the GPU and CPU during resource mapping, see Copying and Accessing Resource Data (Direct3D 10).

+ ///
+ /// + /// bb205321 + /// D3D10_MAP_FLAG + /// D3D10_MAP_FLAG + [Flags] + public enum MapFlags : int { + + /// + ///

Specifies that Map should return when the GPU blocks the CPU from accessing a resource.

+ ///
+ /// + /// bb205321 + /// D3D10_MAP_FLAG_DO_NOT_WAIT + /// D3D10_MAP_FLAG_DO_NOT_WAIT + DoNotWait = unchecked((int)1048576), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Identifies a resource to be accessed for reading and writing by the CPU. Applications may combine one or more of these flags.

+ ///
+ /// + ///

This enumeration is used in , , , and .

These remarks are divided into the following topics:

  • Meaning
  • Common
+ ///
+ /// + /// bb205318 + /// D3D10_MAP + /// D3D10_MAP + public enum MapMode : int { + + /// + ///

Resource is mapped for reading. The resource must have been created with read access (see ).

+ ///
+ /// + /// bb205318 + /// D3D10_MAP_READ + /// D3D10_MAP_READ + Read = unchecked((int)1), + + /// + ///

Resource is mapped for writing. The resource must have been created with write access (see ).

+ ///
+ /// + /// bb205318 + /// D3D10_MAP_WRITE + /// D3D10_MAP_WRITE + Write = unchecked((int)2), + + /// + ///

Resource is mapped for reading and writing. The resource must have been created with read and write access (see and ).

+ ///
+ /// + /// bb205318 + /// D3D10_MAP_READ_WRITE + /// D3D10_MAP_READ_WRITE + ReadWrite = unchecked((int)3), + + /// + ///

Resource is mapped for writing; the previous contents of the resource will be undefined. The resource must have been created with write access (see ).

+ ///
+ /// + /// bb205318 + /// D3D10_MAP_WRITE_DISCARD + /// D3D10_MAP_WRITE_DISCARD + WriteDiscard = unchecked((int)4), + + /// + ///

Resource is mapped for writing; the existing contents of the resource cannot be overwritten (see Remarks). This flag is only valid on vertex and index buffers. The resource must have been created with write access (see ). Cannot be used on a resource created with the flag.

+ ///
+ /// + /// bb205318 + /// D3D10_MAP_WRITE_NO_OVERWRITE + /// D3D10_MAP_WRITE_NO_OVERWRITE + WriteNoOverwrite = unchecked((int)5), + } + + /// + ///

Specifies which pieces of mesh data to discard from the device. Used with .

+ ///
+ /// + /// bb172700 + /// D3DX10_MESH_DISCARD_FLAGS + /// D3DX10_MESH_DISCARD_FLAGS + [Flags] + public enum MeshDiscardFlags : int { + + /// + /// No documentation. + /// + /// + /// bb172700 + /// D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER + /// D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER + AttributeBuffer = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb172700 + /// D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE + /// D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE + AttributeTable = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb172700 + /// D3DX10_MESH_DISCARD_POINTREPS + /// D3DX10_MESH_DISCARD_POINTREPS + PointRepresentation = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb172700 + /// D3DX10_MESH_DISCARD_ADJACENCY + /// D3DX10_MESH_DISCARD_ADJACENCY + WithAdjacency = unchecked((int)8), + + /// + /// No documentation. + /// + /// + /// bb172700 + /// D3DX10_MESH_DISCARD_DEVICE_BUFFERS + /// D3DX10_MESH_DISCARD_DEVICE_BUFFERS + DeviceBuffers = unchecked((int)16), + } + + /// + ///

Flags used to specify creation options for a mesh.

+ ///
+ /// + ///

A 32-bit mesh (D3DXMESH_32BIT) can theoretically support (232)-1 faces and vertices. However, allocating memory for a mesh that large on a 32-bit operating system is not practical.

+ ///
+ /// + /// bb172698 + /// _D3DX10_MESH + /// _D3DX10_MESH + [Flags] + public enum MeshFlags : int { + + /// + ///

The mesh has 32-bit indices instead of 16-bit indices. See Remarks.

+ ///
+ /// + /// bb172698 + /// D3DX10_MESH_32_BIT + /// D3DX10_MESH_32_BIT + Has32BitIndices = unchecked((int)1), + + /// + ///

Signals that the mesh contains geometry shader adjacency data.

+ ///
+ /// + /// bb172698 + /// D3DX10_MESH_GS_ADJACENCY + /// D3DX10_MESH_GS_ADJACENCY + HasAdjacency = unchecked((int)4), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Specifies the type of mesh optimization to be performed.

+ ///
+ /// + ///

The D3DXMESHOPT_STRIPREORDER and D3DXMESHOPT_VERTEXCACHE optimization flags are mutually exclusive.

The D3DXMESHOPT_SHAREVB flag has been removed from this enumeration. Use D3DXMESH_VB_SHARE instead, in D3DXMESH.

+ ///
+ /// + /// bb172699 + /// _D3DX10_MESHOPT + /// _D3DX10_MESHOPT + [Flags] + public enum MeshOptimizeFlags : int { + + /// + ///

Reorders faces to remove unused vertices and faces.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_COMPACT + /// D3DX10_MESHOPT_COMPACT + Compact = unchecked((int)16777216), + + /// + ///

Reorders faces to optimize for fewer attribute bundle state changes and enhanced DrawSubset performance.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_ATTR_SORT + /// D3DX10_MESHOPT_ATTR_SORT + AttributeSort = unchecked((int)33554432), + + /// + ///

Reorders faces to increase the cache hit rate of vertex caches.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_VERTEX_CACHE + /// D3DX10_MESHOPT_VERTEX_CACHE + VertexCache = unchecked((int)67108864), + + /// + ///

Reorders faces to maximize length of adjacent triangles.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_STRIP_REORDER + /// D3DX10_MESHOPT_STRIP_REORDER + StripReorder = unchecked((int)134217728), + + /// + ///

Optimize the faces only; do not optimize the vertices.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_IGNORE_VERTS + /// D3DX10_MESHOPT_IGNORE_VERTS + IgnoreVertices = unchecked((int)268435456), + + /// + ///

While attribute sorting, do not split vertices that are shared between attribute groups.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_DO_NOT_SPLIT + /// D3DX10_MESHOPT_DO_NOT_SPLIT + DoNotSplit = unchecked((int)536870912), + + /// + ///

Affects the vertex cache size. Using this flag specifies a default vertex cache size that works well on legacy hardware.

+ ///
+ /// + /// bb172699 + /// D3DX10_MESHOPT_DEVICE_INDEPENDENT + /// D3DX10_MESHOPT_DEVICE_INDEPENDENT + DeviceIndependent = unchecked((int)4194304), + } + + /// + ///

Categories of debug messages. This will identify the category of a message when retrieving a message with and when adding a message with . When creating an info queue filter, these values can be used to allow or deny any categories of messages to pass through the storage and retrieval filters.

+ ///
+ /// + ///

This is part of the Information Queue feature. See Interface.

+ ///
+ /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY + /// D3D10_MESSAGE_CATEGORY + public enum MessageCategory : int { + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_APPLICATION_DEFINED + /// D3D10_MESSAGE_CATEGORY_APPLICATION_DEFINED + ApplicationDefined = unchecked((int)0), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_MISCELLANEOUS + /// D3D10_MESSAGE_CATEGORY_MISCELLANEOUS + Miscellaneous = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_INITIALIZATION + /// D3D10_MESSAGE_CATEGORY_INITIALIZATION + Initialization = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_CLEANUP + /// D3D10_MESSAGE_CATEGORY_CLEANUP + Cleanup = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_COMPILATION + /// D3D10_MESSAGE_CATEGORY_COMPILATION + Compilation = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_STATE_CREATION + /// D3D10_MESSAGE_CATEGORY_STATE_CREATION + StateCreation = unchecked((int)5), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_STATE_SETTING + /// D3D10_MESSAGE_CATEGORY_STATE_SETTING + StateSetting = unchecked((int)6), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_STATE_GETTING + /// D3D10_MESSAGE_CATEGORY_STATE_GETTING + StateGetting = unchecked((int)7), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + /// D3D10_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + ResourceManipulation = unchecked((int)8), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_EXECUTION + /// D3D10_MESSAGE_CATEGORY_EXECUTION + Execution = unchecked((int)9), + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY_SHADER + /// D3D10_MESSAGE_CATEGORY_SHADER + Shader = unchecked((int)10), + } + + /// + ///

Debug messages for setting up an info-queue filter (see ); use these messages to allow or deny message categories to pass through the storage and retrieval filters. These IDs are used by methods such as or .

+ ///
+ /// + /// bb205324 + /// D3D10_MESSAGE_ID + /// D3D10_MESSAGE_ID + public enum MessageId : int { + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_UNKNOWN + /// D3D10_MESSAGE_ID_UNKNOWN + Unknown = unchecked((int)0), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_HAZARD + DeviceInputAssemblySetVertexBuffersHazard = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_HAZARD + DeviceInputAssemblySetIndexBufferHazard = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_HAZARD + DeviceVertexShaderSetShaderResourcesHazard = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_HAZARD + DeviceVertexShaderSetConstantBuffersHazard = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_HAZARD + DeviceGeometryShaderSetShaderResourcesHazard = unchecked((int)5), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_HAZARD + DeviceGeometryShaderSetConstantBuffersHazard = unchecked((int)6), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD + DevicePixelShaderSetShaderResourcesHazard = unchecked((int)7), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_HAZARD + DevicePixelShaderSetConstantBuffersHazard = unchecked((int)8), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD + DeviceOutputMergerSetRenderTargetsHazard = unchecked((int)9), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD + /// D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_HAZARD + DeviceStreamOutputSetTargetsHazard = unchecked((int)10), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_STRING_FROM_APPLICATION + /// D3D10_MESSAGE_ID_STRING_FROM_APPLICATION + StringFromApplication = unchecked((int)11), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_THIS + /// D3D10_MESSAGE_ID_CORRUPTED_THIS + CorruptedThis = unchecked((int)12), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER1 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER1 + CorruptedParameter1 = unchecked((int)13), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER2 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER2 + CorruptedParameter2 = unchecked((int)14), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER3 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER3 + CorruptedParameter3 = unchecked((int)15), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER4 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER4 + CorruptedParameter4 = unchecked((int)16), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER5 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER5 + CorruptedParameter5 = unchecked((int)17), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER6 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER6 + CorruptedParameter6 = unchecked((int)18), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER7 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER7 + CorruptedParameter7 = unchecked((int)19), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER8 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER8 + CorruptedParameter8 = unchecked((int)20), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER9 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER9 + CorruptedParameter9 = unchecked((int)21), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER10 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER10 + CorruptedParameter10 = unchecked((int)22), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER11 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER11 + CorruptedParameter11 = unchecked((int)23), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER12 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER12 + CorruptedParameter12 = unchecked((int)24), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER13 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER13 + CorruptedParameter13 = unchecked((int)25), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER14 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER14 + CorruptedParameter14 = unchecked((int)26), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER15 + /// D3D10_MESSAGE_ID_CORRUPTED_PARAMETER15 + CorruptedParameter15 = unchecked((int)27), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CORRUPTED_MULTITHREADING + /// D3D10_MESSAGE_ID_CORRUPTED_MULTITHREADING + CorruptedMultithreading = unchecked((int)28), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY + /// D3D10_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY + MessageReportingOufOfMemory = unchecked((int)29), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_IASETINPUTLAYOUT_UNBINDDELETINGOBJECT + InputAssemblySetInputLayoutUnbindDeletingObject = unchecked((int)30), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT + InputAssemblySetVertexBuffersUnbindDeletingObject = unchecked((int)31), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_IASETINDEXBUFFER_UNBINDDELETINGOBJECT + InputAssemblySetIndexBufferUnbindDeletingObject = unchecked((int)32), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_VSSETSHADER_UNBINDDELETINGOBJECT + VertexShaderSetShaderUnbindDeletingObject = unchecked((int)33), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_VSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + VertexShaderSetShaderResourcesUnbindDeletingObject = unchecked((int)34), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + VertexShaderSetConstantBuffersUnbindDeletingObject = unchecked((int)35), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_VSSETSAMPLERS_UNBINDDELETINGOBJECT + VertexShaderSetSamplersUnbindDeletingObject = unchecked((int)36), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_GSSETSHADER_UNBINDDELETINGOBJECT + GeometryShaderSetShaderUnbindDeletingObject = unchecked((int)37), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_GSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + GeometryShaderSetShaderResourcesUnbindDeletingObject = unchecked((int)38), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + GeometryShaderSetConstantBuffersUnbindDeletingObject = unchecked((int)39), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_GSSETSAMPLERS_UNBINDDELETINGOBJECT + GeometryShaderSetSamplersUnbindDeletingObject = unchecked((int)40), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_SOSETTARGETS_UNBINDDELETINGOBJECT + StreamOutputSetTargetsUnbindDeletingObject = unchecked((int)41), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_PSSETSHADER_UNBINDDELETINGOBJECT + PixelShaderSetShaderUnbindDeletingObject = unchecked((int)42), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT + PixelShaderSetShaderResourcesUnbindDeletingObject = unchecked((int)43), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT + PixelShaderSetConstantBuffersUnbindDeletingObject = unchecked((int)44), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_PSSETSAMPLERS_UNBINDDELETINGOBJECT + PixelShaderSetSamplersUnbindDeletingObject = unchecked((int)45), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_RSSETSTATE_UNBINDDELETINGOBJECT + RasterizerSetStateUnbindDeletingObject = unchecked((int)46), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_OMSETBLENDSTATE_UNBINDDELETINGOBJECT + OutputMergerSetBlendStateUnbindDeletingObject = unchecked((int)47), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT + OutputMergerSetDepthStencilStateUnbindDeletingObject = unchecked((int)48), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_UNBINDDELETINGOBJECT + OutputMergerSetRenderTargetsUnbindDeletingObject = unchecked((int)49), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT + /// D3D10_MESSAGE_ID_SETPREDICATION_UNBINDDELETINGOBJECT + SetPredicationUnbindDeletingObject = unchecked((int)50), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GETPRIVATEDATA_MOREDATA + /// D3D10_MESSAGE_ID_GETPRIVATEDATA_MOREDATA + GetPrivateDataMoreData = unchecked((int)51), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA + SetPrivateDataInvalidFreeData = unchecked((int)52), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN + SetPrivateDataInvalidIUnknown = unchecked((int)53), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS + SetPrivateDataInvalidFlags = unchecked((int)54), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS + SetPrivateDataChangingparams = unchecked((int)55), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY + /// D3D10_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY + SetPrivateDataOufOfMemory = unchecked((int)56), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDFORMAT + CreateBufferUnrecognizedFormat = unchecked((int)57), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDSAMPLES + CreateBufferInvalidSamples = unchecked((int)58), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDUSAGE + CreateBufferUnrecognizedUsage = unchecked((int)59), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDBINDFLAGS + CreateBufferUnrecognizedBindFlags = unchecked((int)60), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDCPUACCESSFLAGS + CreateBufferUnrecognizedCpuAccessFlags = unchecked((int)61), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_UNRECOGNIZEDMISCFLAGS + CreateBufferUnrecognizedMiscFlags = unchecked((int)62), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCPUACCESSFLAGS + CreateBufferInvalidCpuAccessFlags = unchecked((int)63), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDBINDFLAGS + CreateBufferInvalidBindFlags = unchecked((int)64), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDINITIALDATA + CreateBufferInvalidInitialData = unchecked((int)65), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDDIMENSIONS + CreateBufferInvalidDimensions = unchecked((int)66), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMIPLEVELS + CreateBufferInvalidMipLevels = unchecked((int)67), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDMISCFLAGS + CreateBufferInvalidMiscFlags = unchecked((int)68), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDARG_RETURN + CreateBufferInvalidArgumentReturn = unchecked((int)69), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATEBUFFER_OUTOFMEMORY_RETURN + CreateBufferOufOfMemoryReturn = unchecked((int)70), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_NULLDESC + /// D3D10_MESSAGE_ID_CREATEBUFFER_NULLDESC + CreateBufferNullDescription = unchecked((int)71), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS + /// D3D10_MESSAGE_ID_CREATEBUFFER_INVALIDCONSTANTBUFFERBINDINGS + CreateBufferInvalidConstantBufferBindingS = unchecked((int)72), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION + /// D3D10_MESSAGE_ID_CREATEBUFFER_LARGEALLOCATION + CreateBufferLargeAllocation = unchecked((int)73), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDFORMAT + CreateTexture1DUnrecognizedFormat = unchecked((int)74), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNSUPPORTEDFORMAT + CreateTexture1DUnsupportedFormat = unchecked((int)75), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDSAMPLES + CreateTexture1DInvalidSamples = unchecked((int)76), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDUSAGE + CreateTexture1DUnrecognizedUsage = unchecked((int)77), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDBINDFLAGS + CreateTexture1DUnrecognizedBindFlags = unchecked((int)78), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDCPUACCESSFLAGS + CreateTexture1DUnrecognizedCpuAccessFlags = unchecked((int)79), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_UNRECOGNIZEDMISCFLAGS + CreateTexture1DUnrecognizedMiscFlags = unchecked((int)80), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDCPUACCESSFLAGS + CreateTexture1DInvalidCpuAccessFlags = unchecked((int)81), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDBINDFLAGS + CreateTexture1DInvalidBindFlags = unchecked((int)82), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDINITIALDATA + CreateTexture1DInvalidInitialData = unchecked((int)83), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDDIMENSIONS + CreateTexture1DInvalidDimensions = unchecked((int)84), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMIPLEVELS + CreateTexture1DInvalidMipLevels = unchecked((int)85), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDMISCFLAGS + CreateTexture1DInvalidMiscFlags = unchecked((int)86), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_INVALIDARG_RETURN + CreateTexture1DInvalidArgumentReturn = unchecked((int)87), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_OUTOFMEMORY_RETURN + CreateTexture1DOufOfMemoryReturn = unchecked((int)88), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_NULLDESC + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_NULLDESC + CreateTexture1DNullDescription = unchecked((int)89), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION + /// D3D10_MESSAGE_ID_CREATETEXTURE1D_LARGEALLOCATION + CreateTexture1DLargeAllocation = unchecked((int)90), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDFORMAT + CreateTexture2DUnrecognizedFormat = unchecked((int)91), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNSUPPORTEDFORMAT + CreateTexture2DUnsupportedFormat = unchecked((int)92), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDSAMPLES + CreateTexture2DInvalidSamples = unchecked((int)93), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDUSAGE + CreateTexture2DUnrecognizedUsage = unchecked((int)94), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDBINDFLAGS + CreateTexture2DUnrecognizedBindFlags = unchecked((int)95), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDCPUACCESSFLAGS + CreateTexture2DUnrecognizedCpuAccessFlags = unchecked((int)96), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_UNRECOGNIZEDMISCFLAGS + CreateTexture2DUnrecognizedMiscFlags = unchecked((int)97), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDCPUACCESSFLAGS + CreateTexture2DInvalidCpuAccessFlags = unchecked((int)98), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDBINDFLAGS + CreateTexture2DInvalidBindFlags = unchecked((int)99), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDINITIALDATA + CreateTexture2DInvalidInitialData = unchecked((int)100), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS + CreateTexture2DInvalidDimensions = unchecked((int)101), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMIPLEVELS + CreateTexture2DInvalidMipLevels = unchecked((int)102), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDMISCFLAGS + CreateTexture2DInvalidMiscFlags = unchecked((int)103), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN + CreateTexture2DInvalidArgumentReturn = unchecked((int)104), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_OUTOFMEMORY_RETURN + CreateTexture2DOufOfMemoryReturn = unchecked((int)105), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_NULLDESC + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_NULLDESC + CreateTexture2DNullDescription = unchecked((int)106), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION + /// D3D10_MESSAGE_ID_CREATETEXTURE2D_LARGEALLOCATION + CreateTexture2DLargeAllocation = unchecked((int)107), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDFORMAT + CreateTexture3DUnrecognizedFormat = unchecked((int)108), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNSUPPORTEDFORMAT + CreateTexture3DUnsupportedFormat = unchecked((int)109), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDSAMPLES + CreateTexture3DInvalidSamples = unchecked((int)110), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDUSAGE + CreateTexture3DUnrecognizedUsage = unchecked((int)111), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDBINDFLAGS + CreateTexture3DUnrecognizedBindFlags = unchecked((int)112), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDCPUACCESSFLAGS + CreateTexture3DUnrecognizedCpuAccessFlags = unchecked((int)113), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_UNRECOGNIZEDMISCFLAGS + CreateTexture3DUnrecognizedMiscFlags = unchecked((int)114), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDCPUACCESSFLAGS + CreateTexture3DInvalidCpuAccessFlags = unchecked((int)115), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDBINDFLAGS + CreateTexture3DInvalidBindFlags = unchecked((int)116), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDINITIALDATA + CreateTexture3DInvalidInitialData = unchecked((int)117), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDDIMENSIONS + CreateTexture3DInvalidDimensions = unchecked((int)118), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMIPLEVELS + CreateTexture3DInvalidMipLevels = unchecked((int)119), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDMISCFLAGS + CreateTexture3DInvalidMiscFlags = unchecked((int)120), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_INVALIDARG_RETURN + CreateTexture3DInvalidArgumentReturn = unchecked((int)121), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_OUTOFMEMORY_RETURN + CreateTexture3DOufOfMemoryReturn = unchecked((int)122), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_NULLDESC + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_NULLDESC + CreateTexture3DNullDescription = unchecked((int)123), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION + /// D3D10_MESSAGE_ID_CREATETEXTURE3D_LARGEALLOCATION + CreateTexture3DLargeAllocation = unchecked((int)124), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT + CreateShaderResourceViewUnrecognizedFormat = unchecked((int)125), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC + CreateShaderResourceViewInvalidDescription = unchecked((int)126), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT + CreateShaderResourceViewInvalidFormat = unchecked((int)127), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS + CreateShaderResourceViewInvalidDimensions = unchecked((int)128), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE + CreateShaderResourceViewInvalidResource = unchecked((int)129), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_TOOMANYOBJECTS + CreateShaderResourceViewTooManyObjects = unchecked((int)130), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN + CreateShaderResourceViewInvalidArgumentReturn = unchecked((int)131), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN + CreateShaderResourceViewOufOfMemoryReturn = unchecked((int)132), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT + CreateRenderTargetViewUnrecognizedFormat = unchecked((int)133), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT + CreateRenderTargetViewUnsupportedFormat = unchecked((int)134), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC + CreateRenderTargetViewInvalidDescription = unchecked((int)135), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT + CreateRenderTargetViewInvalidFormat = unchecked((int)136), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS + CreateRenderTargetViewInvalidDimensions = unchecked((int)137), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE + CreateRenderTargetViewInvalidResource = unchecked((int)138), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_TOOMANYOBJECTS + CreateRenderTargetViewTooManyObjects = unchecked((int)139), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN + CreateRenderTargetViewInvalidArgumentReturn = unchecked((int)140), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN + CreateRenderTargetViewOufOfMemoryReturn = unchecked((int)141), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT + CreateDepthStencilViewUnrecognizedFormat = unchecked((int)142), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC + CreateDepthStencilViewInvalidDescription = unchecked((int)143), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT + CreateDepthStencilViewInvalidFormat = unchecked((int)144), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS + CreateDepthStencilViewInvalidDimensions = unchecked((int)145), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE + CreateDepthStencilViewInvalidResource = unchecked((int)146), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_TOOMANYOBJECTS + CreateDepthStencilViewTooManyObjects = unchecked((int)147), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN + CreateDepthStencilViewInvalidArgumentReturn = unchecked((int)148), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN + CreateDepthStencilViewOufOfMemoryReturn = unchecked((int)149), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY + CreateInputLayoutOufOfMemory = unchecked((int)150), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS + CreateInputLayoutTooManyElements = unchecked((int)151), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT + CreateInputLayoutInvalidFormat = unchecked((int)152), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT + CreateInputLayoutIncompatibleformat = unchecked((int)153), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT + CreateInputLayoutInvalidSlot = unchecked((int)154), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS + CreateInputLayoutInvalidInputsLotclass = unchecked((int)155), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH + CreateInputLayoutSteprateslotclassmismatch = unchecked((int)156), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE + CreateInputLayoutInvalidSlotClassChange = unchecked((int)157), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE + CreateInputLayoutInvalidStepratechange = unchecked((int)158), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT + CreateInputLayoutInvalidAlignment = unchecked((int)159), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC + CreateInputLayoutDuplicatesemantic = unchecked((int)160), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE + CreateInputLayoutUnparseableinputsignature = unchecked((int)161), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC + CreateInputLayoutNullSemantic = unchecked((int)162), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT + CreateInputLayoutMissingElement = unchecked((int)163), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_NULLDESC + CreateInputLayoutNullDescription = unchecked((int)164), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY + /// D3D10_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY + CreateVertexShaderOufOfMemory = unchecked((int)165), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE + /// D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE + CreateVertexShaderInvalidShaderBytecode = unchecked((int)166), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE + /// D3D10_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE + CreateVertexShaderInvalidShaderType = unchecked((int)167), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY + CreateGeometryShaderOufOfMemory = unchecked((int)168), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE + CreateGeometryShaderInvalidShaderBytecode = unchecked((int)169), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE + CreateGeometryShaderInvalidShaderType = unchecked((int)170), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY + CreateGeometryShaderWithStreamOutputOufOfMemory = unchecked((int)171), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE + CreateGeometryShaderWithStreamOutputInvalidShaderBytecode = unchecked((int)172), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE + CreateGeometryShaderWithStreamOutputInvalidShaderType = unchecked((int)173), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES + CreateGeometryShaderWithStreamOutputInvalidNumentries = unchecked((int)174), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED + CreateGeometryShaderWithStreamOutputOutputStreamsTrideunused = unchecked((int)175), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL + CreateGeometryShaderWithStreamOutputUnexpectedDeclaration = unchecked((int)176), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL + CreateGeometryShaderWithStreamOutputExpectedDeclaration = unchecked((int)177), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED + CreateGeometryShaderWithStreamOutputOutputSlot0expected = unchecked((int)178), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT + CreateGeometryShaderWithStreamOutputInvalidOutputSlot = unchecked((int)179), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT + CreateGeometryShaderWithStreamOutputOnlyoneelementperslot = unchecked((int)180), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT + CreateGeometryShaderWithStreamOutputInvalidComponentcount = unchecked((int)181), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT + CreateGeometryShaderWithStreamOutputInvalidStartcomponentandcomponentcount = unchecked((int)182), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION + CreateGeometryShaderWithStreamOutputInvalidGapdefinition = unchecked((int)183), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT + CreateGeometryShaderWithStreamOutputRepeatedoutput = unchecked((int)184), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE + CreateGeometryShaderWithStreamOutputInvalidOutputStreamsTride = unchecked((int)185), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC + CreateGeometryShaderWithStreamOutputMissingSemantic = unchecked((int)186), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH + CreateGeometryShaderWithStreamOutputMaskmismatch = unchecked((int)187), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS + CreateGeometryShaderWithStreamOutputCanthaveonlygaps = unchecked((int)188), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX + CreateGeometryShaderWithStreamOutputDeclarationTooComplex = unchecked((int)189), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE + CreateGeometryShaderWithStreamOutputMissingOutputSignature = unchecked((int)190), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY + /// D3D10_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY + CreatePixelShaderOufOfMemory = unchecked((int)191), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE + /// D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE + CreatePixelShaderInvalidShaderBytecode = unchecked((int)192), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE + /// D3D10_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE + CreatePixelShaderInvalidShaderType = unchecked((int)193), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE + CreateRasterizerstateInvalidFillmode = unchecked((int)194), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE + CreateRasterizerstateInvalidCullmode = unchecked((int)195), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP + CreateRasterizerstateInvalidDepthBiasclamp = unchecked((int)196), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS + CreateRasterizerstateInvalidSlopescaleddepthbias = unchecked((int)197), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_TOOMANYOBJECTS + CreateRasterizerstateTooManyObjects = unchecked((int)198), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC + CreateRasterizerstateNullDescription = unchecked((int)199), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK + CreateDepthStencilStateInvalidDepthWriteMask = unchecked((int)200), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC + CreateDepthStencilStateInvalidDepthFunction = unchecked((int)201), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP + CreateDepthStencilStateInvalidFrontfacestencilfailop = unchecked((int)202), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP + CreateDepthStencilStateInvalidFrontfacestencilzfailop = unchecked((int)203), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP + CreateDepthStencilStateInvalidFrontfacestencilpassop = unchecked((int)204), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC + CreateDepthStencilStateInvalidFrontfacestencilfunc = unchecked((int)205), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP + CreateDepthStencilStateInvalidBackfaceStencilFailop = unchecked((int)206), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP + CreateDepthStencilStateInvalidBackfaceStencilZfailop = unchecked((int)207), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP + CreateDepthStencilStateInvalidBackfaceStencilPassop = unchecked((int)208), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC + CreateDepthStencilStateInvalidBackfaceStencilFunction = unchecked((int)209), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_TOOMANYOBJECTS + CreateDepthStencilStateTooManyObjects = unchecked((int)210), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC + CreateDepthStencilStateNullDescription = unchecked((int)211), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND + CreateBlendStateInvalidSourceBlend = unchecked((int)212), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND + CreateBlendStateInvalidDestinationBlend = unchecked((int)213), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP + CreateBlendStateInvalidBlendOperation = unchecked((int)214), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA + CreateBlendStateInvalidSourceBlendAlpha = unchecked((int)215), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA + CreateBlendStateInvalidDestinationBlendAlpha = unchecked((int)216), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA + CreateBlendStateInvalidBlendOperationAlpha = unchecked((int)217), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK + CreateBlendStateInvalidRenderTargetWriteMask = unchecked((int)218), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_TOOMANYOBJECTS + CreateBlendStateTooManyObjects = unchecked((int)219), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC + CreateBlendStateNullDescription = unchecked((int)220), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER + CreateSamplerStateInvalidFilter = unchecked((int)221), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU + CreateSamplerStateInvalidAddressU = unchecked((int)222), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV + CreateSamplerStateInvalidAddressV = unchecked((int)223), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW + CreateSamplerStateInvalidAddressW = unchecked((int)224), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS + CreateSamplerStateInvalidMiplodbias = unchecked((int)225), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY + CreateSamplerStateInvalidMaximumAnisotropy = unchecked((int)226), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC + CreateSamplerStateInvalidComparisonfunc = unchecked((int)227), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD + CreateSamplerStateInvalidMinimumLod = unchecked((int)228), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD + CreateSamplerStateInvalidMaximumLod = unchecked((int)229), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_TOOMANYOBJECTS + CreateSamplerStateTooManyObjects = unchecked((int)230), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC + CreateSamplerStateNullDescription = unchecked((int)231), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDQUERY + CreateQueryOrpredicateInvalidQuery = unchecked((int)232), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDMISCFLAGS + CreateQueryOrpredicateInvalidMiscFlags = unchecked((int)233), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_UNEXPECTEDMISCFLAG + CreateQueryOrpredicateUnexpectedMiscFlags = unchecked((int)234), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC + /// D3D10_MESSAGE_ID_CREATEQUERYORPREDICATE_NULLDESC + CreateQueryOrpredicateNullDescription = unchecked((int)235), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED + /// D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED + DeviceInputAssemblySetPrimitivetopologyTopologyUnrecognized = unchecked((int)236), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED + /// D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED + DeviceInputAssemblySetPrimitivetopologyTopologyUndefined = unchecked((int)237), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER + /// D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_INVALIDBUFFER + InputAssemblySetVertexBuffersInvalidBuffer = unchecked((int)238), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_OFFSET_TOO_LARGE + DeviceInputAssemblySetVertexBuffersOffsetTooLarge = unchecked((int)239), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_BUFFERS_EMPTY + DeviceInputAssemblySetVertexBuffersBuffersEmpty = unchecked((int)240), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER + /// D3D10_MESSAGE_ID_IASETINDEXBUFFER_INVALIDBUFFER + InputAssemblySetIndexBufferInvalidBuffer = unchecked((int)241), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_FORMAT_INVALID + DeviceInputAssemblySetIndexBufferFormatInvalid = unchecked((int)242), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_TOO_LARGE + DeviceInputAssemblySetIndexBufferOffsetTooLarge = unchecked((int)243), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED + /// D3D10_MESSAGE_ID_DEVICE_IASETINDEXBUFFER_OFFSET_UNALIGNED + DeviceInputAssemblySetIndexBufferOffsetUnaligned = unchecked((int)244), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_VSSETSHADERRESOURCES_VIEWS_EMPTY + DeviceVertexShaderSetShaderResourcesViewsEmpty = unchecked((int)245), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER + /// D3D10_MESSAGE_ID_VSSETCONSTANTBUFFERS_INVALIDBUFFER + VertexShaderSetConstantBuffersInvalidBuffer = unchecked((int)246), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_VSSETCONSTANTBUFFERS_BUFFERS_EMPTY + DeviceVertexShaderSetConstantBuffersBuffersEmpty = unchecked((int)247), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_VSSETSAMPLERS_SAMPLERS_EMPTY + DeviceVertexShaderSetSamplersSamplersEmpty = unchecked((int)248), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_GSSETSHADERRESOURCES_VIEWS_EMPTY + DeviceGeometryShaderSetShaderResourcesViewsEmpty = unchecked((int)249), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER + /// D3D10_MESSAGE_ID_GSSETCONSTANTBUFFERS_INVALIDBUFFER + GeometryShaderSetConstantBuffersInvalidBuffer = unchecked((int)250), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_GSSETCONSTANTBUFFERS_BUFFERS_EMPTY + DeviceGeometryShaderSetConstantBuffersBuffersEmpty = unchecked((int)251), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_GSSETSAMPLERS_SAMPLERS_EMPTY + DeviceGeometryShaderSetSamplersSamplersEmpty = unchecked((int)252), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER + /// D3D10_MESSAGE_ID_SOSETTARGETS_INVALIDBUFFER + StreamOutputSetTargetsInvalidBuffer = unchecked((int)253), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED + /// D3D10_MESSAGE_ID_DEVICE_SOSETTARGETS_OFFSET_UNALIGNED + DeviceStreamOutputSetTargetsOffsetUnaligned = unchecked((int)254), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_VIEWS_EMPTY + DevicePixelShaderSetShaderResourcesViewsEmpty = unchecked((int)255), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER + /// D3D10_MESSAGE_ID_PSSETCONSTANTBUFFERS_INVALIDBUFFER + PixelShaderSetConstantBuffersInvalidBuffer = unchecked((int)256), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_PSSETCONSTANTBUFFERS_BUFFERS_EMPTY + DevicePixelShaderSetConstantBuffersBuffersEmpty = unchecked((int)257), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_PSSETSAMPLERS_SAMPLERS_EMPTY + DevicePixelShaderSetSamplersSamplersEmpty = unchecked((int)258), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT + /// D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT + DeviceRasterizerSetViewportsInvalidViewport = unchecked((int)259), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR + /// D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR + DeviceRasterizerSetScissorRectanglesInvalidScissor = unchecked((int)260), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH + /// D3D10_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH + ClearrendertargetviewDenormflush = unchecked((int)261), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH + /// D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH + CleardepthstencilviewDenormflush = unchecked((int)262), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID + /// D3D10_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID + CleardepthstencilviewInvalid = unchecked((int)263), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_IAGETVERTEXBUFFERS_BUFFERS_EMPTY + DeviceInputAssemblyGetVertexBuffersBuffersEmpty = unchecked((int)264), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_VSGETSHADERRESOURCES_VIEWS_EMPTY + DeviceVertexShaderGetShaderResourcesViewsEmpty = unchecked((int)265), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_VSGETCONSTANTBUFFERS_BUFFERS_EMPTY + DeviceVertexShaderGetConstantBuffersBuffersEmpty = unchecked((int)266), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_VSGETSAMPLERS_SAMPLERS_EMPTY + DeviceVertexShaderGetSamplersSamplersEmpty = unchecked((int)267), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_GSGETSHADERRESOURCES_VIEWS_EMPTY + DeviceGeometryShaderGetShaderResourcesViewsEmpty = unchecked((int)268), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_GSGETCONSTANTBUFFERS_BUFFERS_EMPTY + DeviceGeometryShaderGetConstantBuffersBuffersEmpty = unchecked((int)269), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_GSGETSAMPLERS_SAMPLERS_EMPTY + DeviceGeometryShaderGetSamplersSamplersEmpty = unchecked((int)270), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_SOGETTARGETS_BUFFERS_EMPTY + DeviceStreamOutputGetTargetsBuffersEmpty = unchecked((int)271), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_PSGETSHADERRESOURCES_VIEWS_EMPTY + DevicePixelShaderGetShaderResourcesViewsEmpty = unchecked((int)272), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_PSGETCONSTANTBUFFERS_BUFFERS_EMPTY + DevicePixelShaderGetConstantBuffersBuffersEmpty = unchecked((int)273), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_PSGETSAMPLERS_SAMPLERS_EMPTY + DevicePixelShaderGetSamplersSamplersEmpty = unchecked((int)274), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_RSGETVIEWPORTS_VIEWPORTS_EMPTY + DeviceRasterizerGetViewportsViewportsEmpty = unchecked((int)275), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY + /// D3D10_MESSAGE_ID_DEVICE_RSGETSCISSORRECTS_RECTS_EMPTY + DeviceRasterizerGetScissorRectanglesRectanglesEmpty = unchecked((int)276), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID + /// D3D10_MESSAGE_ID_DEVICE_GENERATEMIPS_RESOURCE_INVALID + DeviceGeneratemipsResourceInvalid = unchecked((int)277), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSUBRESOURCE + CopySubResourceRegionInvalidDestinationSubResource = unchecked((int)278), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESUBRESOURCE + CopySubResourceRegionInvalidSourceSubResource = unchecked((int)279), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX + CopySubResourceRegionInvalidSourceBox = unchecked((int)280), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCE + CopySubResourceRegionInvalidSource = unchecked((int)281), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDDESTINATIONSTATE + CopySubResourceRegionInvalidDestinationState = unchecked((int)282), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE + /// D3D10_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCESTATE + CopySubResourceRegionInvalidSourceState = unchecked((int)283), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE + /// D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE + CopyResourceInvalidSource = unchecked((int)284), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE + /// D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE + CopyResourceInvalidDestinationState = unchecked((int)285), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE + /// D3D10_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE + CopyResourceInvalidSourceState = unchecked((int)286), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE + /// D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE + UpdatesUbresourceInvalidDestinationSubResource = unchecked((int)287), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX + /// D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX + UpdatesUbresourceInvalidDestinationBox = unchecked((int)288), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE + /// D3D10_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE + UpdatesUbresourceInvalidDestinationState = unchecked((int)289), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID + DeviceResolvesubresourceDestinationInvalid = unchecked((int)290), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID + DeviceResolvesubresourceDestinationSubResourceInvalid = unchecked((int)291), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID + DeviceResolvesubresourceSourceInvalid = unchecked((int)292), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID + DeviceResolvesubresourceSourceSubResourceInvalid = unchecked((int)293), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID + /// D3D10_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID + DeviceResolvesubresourceFormatInvalid = unchecked((int)294), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE + /// D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE + BufferMapInvalidMaptype = unchecked((int)295), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS + /// D3D10_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS + BufferMapInvalidFlags = unchecked((int)296), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED + /// D3D10_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED + BufferMapAlreadymapped = unchecked((int)297), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN + /// D3D10_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN + BufferMapDeviceremovedReturn = unchecked((int)298), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED + /// D3D10_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED + BufferUnmapNotMapped = unchecked((int)299), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE + Texture1DMapInvalidMaptype = unchecked((int)300), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE + Texture1DMapInvalidSubResource = unchecked((int)301), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS + Texture1DMapInvalidFlags = unchecked((int)302), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED + Texture1DMapAlreadymapped = unchecked((int)303), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN + /// D3D10_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN + Texture1DMapDeviceremovedReturn = unchecked((int)304), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE + /// D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE + Texture1DUnmapInvalidSubResource = unchecked((int)305), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED + /// D3D10_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED + Texture1DUnmapNotMapped = unchecked((int)306), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE + Texture2DMapInvalidMaptype = unchecked((int)307), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE + Texture2DMapInvalidSubResource = unchecked((int)308), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS + Texture2DMapInvalidFlags = unchecked((int)309), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED + Texture2DMapAlreadymapped = unchecked((int)310), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN + /// D3D10_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN + Texture2DMapDeviceremovedReturn = unchecked((int)311), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE + /// D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE + Texture2DUnmapInvalidSubResource = unchecked((int)312), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED + /// D3D10_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED + Texture2DUnmapNotMapped = unchecked((int)313), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE + Texture3DMapInvalidMaptype = unchecked((int)314), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE + Texture3DMapInvalidSubResource = unchecked((int)315), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS + Texture3DMapInvalidFlags = unchecked((int)316), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED + Texture3DMapAlreadymapped = unchecked((int)317), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN + /// D3D10_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN + Texture3DMapDeviceremovedReturn = unchecked((int)318), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE + /// D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE + Texture3DUnmapInvalidSubResource = unchecked((int)319), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED + /// D3D10_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED + Texture3DUnmapNotMapped = unchecked((int)320), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED + /// D3D10_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED + CheckFormatSupportFormatDeprecated = unchecked((int)321), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED + /// D3D10_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED + CheckMultisamplequalitylevelsFormatDeprecated = unchecked((int)322), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS + /// D3D10_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS + SetExceptionmodeUnrecognizedFlags = unchecked((int)323), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN + SetExceptionmodeInvalidArgumentReturn = unchecked((int)324), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN + /// D3D10_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN + SetExceptionmodeDeviceremovedReturn = unchecked((int)325), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE + /// D3D10_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE + RefSimulatingInfinitelyFastHardware = unchecked((int)326), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_THREADING_MODE + /// D3D10_MESSAGE_ID_REF_THREADING_MODE + RefThreadingMode = unchecked((int)327), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_UMDRIVER_EXCEPTION + /// D3D10_MESSAGE_ID_REF_UMDRIVER_EXCEPTION + RefUmdriverException = unchecked((int)328), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_KMDRIVER_EXCEPTION + /// D3D10_MESSAGE_ID_REF_KMDRIVER_EXCEPTION + RefKmdriverException = unchecked((int)329), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_HARDWARE_EXCEPTION + /// D3D10_MESSAGE_ID_REF_HARDWARE_EXCEPTION + RefHardwareException = unchecked((int)330), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE + /// D3D10_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE + RefAccessIngIndexAbleTempOutOfRange = unchecked((int)331), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER + /// D3D10_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER + RefProblemParsingShader = unchecked((int)332), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_OUT_OF_MEMORY + /// D3D10_MESSAGE_ID_REF_OUT_OF_MEMORY + RefOutOfMemory = unchecked((int)333), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_REF_INFO + /// D3D10_MESSAGE_ID_REF_INFO + RefInformation = unchecked((int)334), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW + DeviceDrawVertexPosOverflow = unchecked((int)335), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW + /// D3D10_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW + DeviceDrawIndexedIndexPosOverflow = unchecked((int)336), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW + /// D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW + DeviceDrawInstancedVertexPosOverflow = unchecked((int)337), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW + /// D3D10_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW + DeviceDrawInstancedInstancePosOverflow = unchecked((int)338), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW + /// D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW + DeviceDrawIndexedInstancedInstancePosOverflow = unchecked((int)339), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW + /// D3D10_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW + DeviceDrawIndexedInstancedIndexPosOverflow = unchecked((int)340), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET + DeviceDrawVertexShaderNotSet = unchecked((int)341), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND + DeviceShaderLinkageSemanticnameNotFound = unchecked((int)342), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX + DeviceShaderLinkageRegisterindex = unchecked((int)343), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE + DeviceShaderLinkageComponenttype = unchecked((int)344), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK + DeviceShaderLinkageRegistermask = unchecked((int)345), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE + DeviceShaderLinkageSystemvalue = unchecked((int)346), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS + /// D3D10_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS + DeviceShaderLinkageNeverwrittenAlwaysreads = unchecked((int)347), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_NOT_SET + DeviceDrawVertexBufferNotSet = unchecked((int)348), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INPUTLAYOUT_NOT_SET + DeviceDrawInputLayoutNotSet = unchecked((int)349), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET + DeviceDrawConstantBufferNotSet = unchecked((int)350), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL + /// D3D10_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL + DeviceDrawConstantBufferTooSmall = unchecked((int)351), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_NOT_SET + DeviceDrawSamplerNotSet = unchecked((int)352), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET + DeviceDrawShaderResourceViewNotSet = unchecked((int)353), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VIEW_DIMENSION_MISMATCH + DeviceDrawViewDimensionMismatch = unchecked((int)354), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL + DeviceDrawVertexBufferStrideTooSmall = unchecked((int)355), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL + DeviceDrawVertexBufferTooSmall = unchecked((int)356), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_NOT_SET + DeviceDrawIndexBufferNotSet = unchecked((int)357), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_FORMAT_INVALID + DeviceDrawIndexBufferFormatInvalid = unchecked((int)358), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL + DeviceDrawIndexBufferTooSmall = unchecked((int)359), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH + /// D3D10_MESSAGE_ID_DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH + DeviceDrawGeometryShaderInputPrimitiveMismatch = unchecked((int)360), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_RETURN_TYPE_MISMATCH + DeviceDrawResourceReturnTypeMismatch = unchecked((int)361), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT + /// D3D10_MESSAGE_ID_DEVICE_DRAW_POSITION_NOT_PRESENT + DeviceDrawPositionNotPresent = unchecked((int)362), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_NOT_SET + DeviceDrawOutputStreamNotSet = unchecked((int)363), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_BOUND_RESOURCE_MAPPED + DeviceDrawBoundResourceMapped = unchecked((int)364), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_PRIMITIVETOPOLOGY + DeviceDrawInvalidPrimitivetopology = unchecked((int)365), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_OFFSET_UNALIGNED + DeviceDrawVertexOffsetUnaligned = unchecked((int)366), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VERTEX_STRIDE_UNALIGNED + DeviceDrawVertexStrideUnaligned = unchecked((int)367), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INDEX_OFFSET_UNALIGNED + DeviceDrawIndexOffsetUnaligned = unchecked((int)368), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED + DeviceDrawOutputStreamOffsetUnaligned = unchecked((int)369), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED + DeviceDrawResourceFormatLdUnsupported = unchecked((int)370), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED + DeviceDrawResourceFormatSampleUnsupported = unchecked((int)371), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED + DeviceDrawResourceFormatSampleCUnsupported = unchecked((int)372), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED + DeviceDrawResourceMultisampleUnsupported = unchecked((int)373), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE + DeviceDrawStreamOutputTargetsBoundWithoutSource = unchecked((int)374), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SO_STRIDE_LARGER_THAN_BUFFER + DeviceDrawStreamOutputStrideLargeRThanBuffer = unchecked((int)375), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING + DeviceDrawOutputMergerRenderTargetDoesNotSupportBlending = unchecked((int)376), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 + DeviceDrawOutputMergerDualSourceBlendingCanOnlyHaveRenderTarget0 = unchecked((int)377), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT + /// D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT + DeviceRemovalProcessAtFault = unchecked((int)378), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT + /// D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT + DeviceRemovalProcessPossiblyAtFault = unchecked((int)379), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT + /// D3D10_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT + DeviceRemovalProcessNotAtFault = unchecked((int)380), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN + /// D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN + DeviceOpenSharedResourceInvalidArgumentReturn = unchecked((int)381), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN + DeviceOpenSharedResourceOufOfMemoryReturn = unchecked((int)382), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN + /// D3D10_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN + DeviceOpenSharedResourceBadinterfaceReturn = unchecked((int)383), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET + /// D3D10_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET + DeviceDrawViewportNotSet = unchecked((int)384), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC + CreateInputLayoutTrailingDigitInSemantic = unchecked((int)385), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC + /// D3D10_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC + CreateGeometryShaderWithStreamOutputTrailingDigitInSemantic = unchecked((int)386), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH + /// D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH + DeviceRasterizerSetViewportsDenormflush = unchecked((int)387), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW + OutputMergerSetRenderTargetsInvalidView = unchecked((int)388), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS + /// D3D10_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS + DeviceSetTextFiltersizeInvalidDimensions = unchecked((int)389), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH + /// D3D10_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH + DeviceDrawSamplerMismatch = unchecked((int)390), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH + CreateInputLayoutTypeMismatch = unchecked((int)391), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY + /// D3D10_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY + BlendStateGetDescriptionLegacy = unchecked((int)392), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY + /// D3D10_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY + ShaderResourceViewGetDescriptionLegacy = unchecked((int)393), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATEQUERY_OUTOFMEMORY_RETURN + CreateQueryOufOfMemoryReturn = unchecked((int)394), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATEPREDICATE_OUTOFMEMORY_RETURN + CreatePredicateOufOfMemoryReturn = unchecked((int)395), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER + /// D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFRANGE_COUNTER + CreateCounterOufOfRangeCounter = unchecked((int)396), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED + /// D3D10_MESSAGE_ID_CREATECOUNTER_SIMULTANEOUS_ACTIVE_COUNTERS_EXHAUSTED + CreateCounterSimultaneousActiveCountersExhausted = unchecked((int)397), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + /// D3D10_MESSAGE_ID_CREATECOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + CreateCounterUnsupportedWellknownCounter = unchecked((int)398), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN + /// D3D10_MESSAGE_ID_CREATECOUNTER_OUTOFMEMORY_RETURN + CreateCounterOufOfMemoryReturn = unchecked((int)399), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN + /// D3D10_MESSAGE_ID_CREATECOUNTER_NONEXCLUSIVE_RETURN + CreateCounterNonexclusiveReturn = unchecked((int)400), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATECOUNTER_NULLDESC + /// D3D10_MESSAGE_ID_CREATECOUNTER_NULLDESC + CreateCounterNullDescription = unchecked((int)401), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER + /// D3D10_MESSAGE_ID_CHECKCOUNTER_OUTOFRANGE_COUNTER + CheckCounterOufOfRangeCounter = unchecked((int)402), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + /// D3D10_MESSAGE_ID_CHECKCOUNTER_UNSUPPORTED_WELLKNOWN_COUNTER + CheckCounterUnsupportedWellknownCounter = unchecked((int)403), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE + /// D3D10_MESSAGE_ID_SETPREDICATION_INVALID_PREDICATE_STATE + SetPredicationInvalidPredicateState = unchecked((int)404), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED + /// D3D10_MESSAGE_ID_QUERY_BEGIN_UNSUPPORTED + QueryBeginUnsupported = unchecked((int)405), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION + /// D3D10_MESSAGE_ID_PREDICATE_BEGIN_DURING_PREDICATION + PredicateBeginDuringPredication = unchecked((int)406), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_BEGIN_DUPLICATE + /// D3D10_MESSAGE_ID_QUERY_BEGIN_DUPLICATE + QueryBeginDuplicate = unchecked((int)407), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS + /// D3D10_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS + QueryBeginAbandoningPreviousResults = unchecked((int)408), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION + /// D3D10_MESSAGE_ID_PREDICATE_END_DURING_PREDICATION + PredicateEndDuringPredication = unchecked((int)409), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS + /// D3D10_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS + QueryEndAbandoningPreviousResults = unchecked((int)410), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN + /// D3D10_MESSAGE_ID_QUERY_END_WITHOUT_BEGIN + QueryEndWithoutBegin = unchecked((int)411), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE + /// D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_DATASIZE + QueryGetDataInvalidDataSize = unchecked((int)412), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS + /// D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_FLAGS + QueryGetDataInvalidFlags = unchecked((int)413), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL + /// D3D10_MESSAGE_ID_QUERY_GETDATA_INVALID_CALL + QueryGetDataInvalidCall = unchecked((int)414), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH + /// D3D10_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH + DeviceDrawPixelShaderOutputTypeMismatch = unchecked((int)415), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED + DeviceDrawResourceFormatGatherUnsupported = unchecked((int)416), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN + /// D3D10_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN + DeviceDrawInvalidUseOfCenterMultisamplePattern = unchecked((int)417), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE + DeviceInputAssemblySetVertexBuffersStrideTooLarge = unchecked((int)418), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE + /// D3D10_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE + DeviceInputAssemblySetVertexBuffersInvalidRange = unchecked((int)419), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT + CreateInputLayoutEmptyLayout = unchecked((int)420), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH + /// D3D10_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH + DeviceDrawResourceSampleCountMismatch = unchecked((int)421), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_OBJECT_SUMMARY + /// D3D10_MESSAGE_ID_LIVE_OBJECT_SUMMARY + LiveObjectSummary = unchecked((int)422), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_BUFFER + /// D3D10_MESSAGE_ID_LIVE_BUFFER + LiveBuffer = unchecked((int)423), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_TEXTURE1D + /// D3D10_MESSAGE_ID_LIVE_TEXTURE1D + LiveTexture1D = unchecked((int)424), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_TEXTURE2D + /// D3D10_MESSAGE_ID_LIVE_TEXTURE2D + LiveTexture2D = unchecked((int)425), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_TEXTURE3D + /// D3D10_MESSAGE_ID_LIVE_TEXTURE3D + LiveTexture3D = unchecked((int)426), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW + /// D3D10_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW + LiveShaderResourceView = unchecked((int)427), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_RENDERTARGETVIEW + /// D3D10_MESSAGE_ID_LIVE_RENDERTARGETVIEW + LiveRenderTargetView = unchecked((int)428), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW + /// D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW + LiveDepthStencilView = unchecked((int)429), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_VERTEXSHADER + /// D3D10_MESSAGE_ID_LIVE_VERTEXSHADER + LiveVertexShader = unchecked((int)430), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_GEOMETRYSHADER + /// D3D10_MESSAGE_ID_LIVE_GEOMETRYSHADER + LiveGeometryShader = unchecked((int)431), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_PIXELSHADER + /// D3D10_MESSAGE_ID_LIVE_PIXELSHADER + LivePixelShader = unchecked((int)432), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_INPUTLAYOUT + /// D3D10_MESSAGE_ID_LIVE_INPUTLAYOUT + LiveInputLayout = unchecked((int)433), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_SAMPLER + /// D3D10_MESSAGE_ID_LIVE_SAMPLER + LiveSampler = unchecked((int)434), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_BLENDSTATE + /// D3D10_MESSAGE_ID_LIVE_BLENDSTATE + LiveBlendState = unchecked((int)435), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE + /// D3D10_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE + LiveDepthStencilState = unchecked((int)436), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_RASTERIZERSTATE + /// D3D10_MESSAGE_ID_LIVE_RASTERIZERSTATE + LiveRasterizerstate = unchecked((int)437), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_QUERY + /// D3D10_MESSAGE_ID_LIVE_QUERY + LiveQuery = unchecked((int)438), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_PREDICATE + /// D3D10_MESSAGE_ID_LIVE_PREDICATE + LivePredicate = unchecked((int)439), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_COUNTER + /// D3D10_MESSAGE_ID_LIVE_COUNTER + LiveCounter = unchecked((int)440), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_DEVICE + /// D3D10_MESSAGE_ID_LIVE_DEVICE + LiveDevice = unchecked((int)441), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_LIVE_SWAPCHAIN + /// D3D10_MESSAGE_ID_LIVE_SWAPCHAIN + LiveSwapchain = unchecked((int)442), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_D3D10_MESSAGES_END + /// D3D10_MESSAGE_ID_D3D10_MESSAGES_END + D3D10MessagesEnd = unchecked((int)443), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_D3D10L9_MESSAGES_START + /// D3D10_MESSAGE_ID_D3D10L9_MESSAGES_START + D3D10L9MessagesStart = unchecked((int)1048576), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED + /// D3D10_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_STENCIL_NO_TWO_SIDED + CreateDepthStencilStateStencilNoTwoSided = unchecked((int)1048577), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthBiasClamp_NOT_SUPPORTED + CreateRasterizerstateDepthBiasClampNotSupported = unchecked((int)1048578), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_COMPARISON_SUPPORT + CreateSamplerStateNoComparisonSupport = unchecked((int)1048579), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_EXCESSIVE_ANISOTROPY + CreateSamplerStateExcessiveAnisotropy = unchecked((int)1048580), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_OUT_OF_RANGE + CreateSamplerStateBorderOutOfRange = unchecked((int)1048581), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_VSSETSAMPLERS_NOT_SUPPORTED + VertexShaderSetSamplersNotSupported = unchecked((int)1048582), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS + /// D3D10_MESSAGE_ID_VSSETSAMPLERS_TOO_MANY_SAMPLERS + VertexShaderSetSamplersTooManySamplers = unchecked((int)1048583), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS + /// D3D10_MESSAGE_ID_PSSETSAMPLERS_TOO_MANY_SAMPLERS + PixelShaderSetSamplersTooManySamplers = unchecked((int)1048584), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_ARRAYS + CreateResourceNoArrays = unchecked((int)1048585), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_VB_AND_IB_BIND + CreateResourceNoVertexBufferAndIndexBufferBind = unchecked((int)1048586), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_TEXTURE_1D + CreateResourceNoTexture1D = unchecked((int)1048587), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE + /// D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_OUT_OF_RANGE + CreateResourceDimensionOutOfRange = unchecked((int)1048588), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE + /// D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_SHADER_RESOURCE + CreateResourceNotBindableAsShaderResource = unchecked((int)1048589), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_TOO_MANY_RENDER_TARGETS + OutputMergerSetRenderTargetsTooManyRenderTargets = unchecked((int)1048590), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_DIFFERING_BIT_DEPTHS + OutputMergerSetRenderTargetsNoDifferingBitDepthS = unchecked((int)1048591), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX + /// D3D10_MESSAGE_ID_IASETVERTEXBUFFERS_BAD_BUFFER_INDEX + InputAssemblySetVertexBuffersBadBufferIndex = unchecked((int)1048592), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS + /// D3D10_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_TOO_MANY_VIEWPORTS + DeviceRasterizerSetViewportsTooManyViewports = unchecked((int)1048593), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED + /// D3D10_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_ADJACENCY_UNSUPPORTED + DeviceInputAssemblySetPrimitivetopologyWithAdjacencyUnsupported = unchecked((int)1048594), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS + /// D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_TOO_MANY_SCISSORS + DeviceRasterizerSetScissorRectanglesTooManyScissors = unchecked((int)1048595), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY + /// D3D10_MESSAGE_ID_COPYRESOURCE_ONLY_TEXTURE_2D_WITHIN_GPU_MEMORY + CopyResourceOnlyTexture2DWithinGpuMemory = unchecked((int)1048596), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK + /// D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_3D_READBACK + CopyResourceNoTexture3DReadback = unchecked((int)1048597), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK + /// D3D10_MESSAGE_ID_COPYRESOURCE_NO_TEXTURE_ONLY_READBACK + CopyResourceNoTextureOnlyReadback = unchecked((int)1048598), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT + /// D3D10_MESSAGE_ID_CREATEINPUTLAYOUT_UNSUPPORTED_FORMAT + CreateInputLayoutUnsupportedFormat = unchecked((int)1048599), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_ALPHA_TO_COVERAGE + CreateBlendStateNoAlphaToCoverage = unchecked((int)1048600), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE + /// D3D10_MESSAGE_ID_CREATERASTERIZERSTATE_DepthClipEnable_MUST_BE_TRUE + CreateRasterizerstateDepthClipEnableMustBeTrue = unchecked((int)1048601), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE + /// D3D10_MESSAGE_ID_DRAWINDEXED_STARTINDEXLOCATION_MUST_BE_POSITIVE + DrawIndexedStartindexlocationMustBePositive = unchecked((int)1048602), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_MUST_USE_LOWEST_LOD + CreateShaderResourceViewMustUseLowestLod = unchecked((int)1048603), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MINLOD_MUST_NOT_BE_FRACTIONAL + CreateSamplerStateMinimumLodMustNotBeFractional = unchecked((int)1048604), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_MAXLOD_MUST_BE_FLT_MAX + CreateSamplerStateMaximumLodMustBeFltMaximum = unchecked((int)1048605), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_FIRSTARRAYSLICE_MUST_BE_ZERO + CreateShaderResourceViewFirstArraySliceMustBeZero = unchecked((int)1048606), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES + /// D3D10_MESSAGE_ID_CREATESHADERRESOURCEVIEW_CUBES_MUST_HAVE_6_SIDES + CreateShaderResourceViewCubeSMustHave6Sides = unchecked((int)1048607), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET + /// D3D10_MESSAGE_ID_CREATERESOURCE_NOT_BINDABLE_AS_RENDER_TARGET + CreateResourceNotBindableAsRenderTarget = unchecked((int)1048608), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_DWORD_INDEX_BUFFER + CreateResourceNoDwordIndexBuffer = unchecked((int)1048609), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE + /// D3D10_MESSAGE_ID_CREATERESOURCE_MSAA_PRECLUDES_SHADER_RESOURCE + CreateResourceMSAAPrecludesShaderResource = unchecked((int)1048610), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE + /// D3D10_MESSAGE_ID_CREATERESOURCE_PRESENTATION_PRECLUDES_SHADER_RESOURCE + CreateResourcePresentationPrecludesShaderResource = unchecked((int)1048611), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_BLEND_ENABLE + CreateBlendStateNoIndependentBlendEnable = unchecked((int)1048612), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_INDEPENDENT_WRITE_MASKS + CreateBlendStateNoIndependentWriteMasks = unchecked((int)1048613), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_STREAM_OUT + CreateResourceNoStreamOut = unchecked((int)1048614), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS + /// D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_VB_IB_FOR_BUFFERS + CreateResourceOnlyVertexBufferIndexBufferForBuffers = unchecked((int)1048615), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES + /// D3D10_MESSAGE_ID_CREATERESOURCE_NO_AUTOGEN_FOR_VOLUMES + CreateResourceNoAutogenForVolumes = unchecked((int)1048616), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED + /// D3D10_MESSAGE_ID_CREATERESOURCE_DXGI_FORMAT_R8G8B8A8_CANNOT_BE_SHARED + CreateResourceDxgiFormatR8G8B8A8CannotBeShared = unchecked((int)1048617), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_VSSHADERRESOURCES_NOT_SUPPORTED + VertexShaderShaderResourcesNotSupported = unchecked((int)1048618), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_GEOMETRY_SHADER_NOT_SUPPORTED + GeometryShaderNotSupported = unchecked((int)1048619), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_STREAM_OUT_NOT_SUPPORTED + StreamOutNotSupported = unchecked((int)1048620), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_TEXT_FILTER_NOT_SUPPORTED + TextFilterNotSupported = unchecked((int)1048621), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_SEPARATE_ALPHA_BLEND + CreateBlendStateNoSeparateAlphaBlend = unchecked((int)1048622), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_NO_MRT_BLEND + CreateBlendStateNoMrtBlend = unchecked((int)1048623), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_CREATEBLENDSTATE_OPERATION_NOT_SUPPORTED + CreateBlendStateOperationNotSupported = unchecked((int)1048624), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_NO_MIRRORONCE + CreateSamplerStateNoMirrorOnce = unchecked((int)1048625), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_DRAWINSTANCED_NOT_SUPPORTED + DrawInstancedNotSupported = unchecked((int)1048626), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3 + /// D3D10_MESSAGE_ID_DRAWINDEXEDINSTANCED_NOT_SUPPORTED_BELOW_9_3 + DrawIndexedInstancedNotSupportedBelow93 = unchecked((int)1048627), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED + /// D3D10_MESSAGE_ID_DRAWINDEXED_POINTLIST_UNSUPPORTED + DrawIndexedPointListUnsupported = unchecked((int)1048628), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO + /// D3D10_MESSAGE_ID_SETBLENDSTATE_SAMPLE_MASK_CANNOT_BE_ZERO + SetBlendStateSampleMaskCannotBeZero = unchecked((int)1048629), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION + /// D3D10_MESSAGE_ID_CREATERESOURCE_DIMENSION_EXCEEDS_FEATURE_LEVEL_DEFINITION + CreateResourceDimensionExceedsFeatureLevelDefinition = unchecked((int)1048630), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED + /// D3D10_MESSAGE_ID_CREATERESOURCE_ONLY_SINGLE_MIP_LEVEL_DEPTH_STENCIL_SUPPORTED + CreateResourceOnlySingleMipLevelDepthStencilSupported = unchecked((int)1048631), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR + /// D3D10_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_NEGATIVESCISSOR + DeviceRasterizerSetScissorRectanglesNegativeScissor = unchecked((int)1048632), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA + /// D3D10_MESSAGE_ID_SLOT_ZERO_MUST_BE_D3D10_INPUT_PER_VERTEX_DATA + SlotZeroMustBeD3D10InputPerVertexData = unchecked((int)1048633), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP + /// D3D10_MESSAGE_ID_CREATERESOURCE_NON_POW_2_MIPMAP + CreateResourceNonPow2Mipmap = unchecked((int)1048634), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED + /// D3D10_MESSAGE_ID_CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED + CreateSamplerStateBorderNotSupported = unchecked((int)1048635), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT + /// D3D10_MESSAGE_ID_OMSETRENDERTARGETS_NO_SRGB_MRT + OutputMergerSetRenderTargetsNoSRgbMrt = unchecked((int)1048636), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_COPYRESOURCE_NO_3D_MISMATCHED_UPDATES + /// D3D10_MESSAGE_ID_COPYRESOURCE_NO_3D_MISMATCHED_UPDATES + CopyResourceNo3DMismatchedUpdates = unchecked((int)1048637), + + /// + /// No documentation. + /// + /// + /// bb205324 + /// D3D10_MESSAGE_ID_D3D10L9_MESSAGES_END + /// D3D10_MESSAGE_ID_D3D10L9_MESSAGES_END + D3D10L9MessagesEnd = unchecked((int)1048638), + } + + /// + ///

Debug message severity levels for an information queue.

+ ///
+ /// + ///

Use these values to allow or deny message categories to pass through the storage and retrieval filters for an information queue (see ). This API is used by .

+ ///
+ /// + /// bb205325 + /// D3D10_MESSAGE_SEVERITY + /// D3D10_MESSAGE_SEVERITY + public enum MessageSeverity : int { + + /// + ///

Defines some type of corruption which has occurred.

+ ///
+ /// + /// bb205325 + /// D3D10_MESSAGE_SEVERITY_CORRUPTION + /// D3D10_MESSAGE_SEVERITY_CORRUPTION + Corruption = unchecked((int)0), + + /// + ///

Defines an error message.

+ ///
+ /// + /// bb205325 + /// D3D10_MESSAGE_SEVERITY_ERROR + /// D3D10_MESSAGE_SEVERITY_ERROR + Error = unchecked((int)1), + + /// + ///

Defines a warning message.

+ ///
+ /// + /// bb205325 + /// D3D10_MESSAGE_SEVERITY_WARNING + /// D3D10_MESSAGE_SEVERITY_WARNING + Warning = unchecked((int)2), + + /// + ///

Defines an information message.

+ ///
+ /// + /// bb205325 + /// D3D10_MESSAGE_SEVERITY_INFO + /// D3D10_MESSAGE_SEVERITY_INFO + Information = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb205325 + /// D3D10_MESSAGE_SEVERITY_MESSAGE + /// D3D10_MESSAGE_SEVERITY_MESSAGE + Message = unchecked((int)4), + } + + /// + ///

These flags are used to control how generates normal maps. Any number of these flags may be OR'd together in any combination.

+ ///
+ /// + /// bb172701 + /// D3DX10_NORMALMAP_FLAG + /// D3DX10_NORMALMAP_FLAG + [Flags] + public enum NormalMapFlags : int { + + /// + /// No documentation. + /// + /// + /// bb172701 + /// D3DX10_NORMALMAP_MIRROR_U + /// D3DX10_NORMALMAP_MIRROR_U + MirrorU = unchecked((int)65536), + + /// + /// No documentation. + /// + /// + /// bb172701 + /// D3DX10_NORMALMAP_MIRROR_V + /// D3DX10_NORMALMAP_MIRROR_V + MirrorV = unchecked((int)131072), + + /// + /// No documentation. + /// + /// + /// bb172701 + /// D3DX10_NORMALMAP_MIRROR + /// D3DX10_NORMALMAP_MIRROR + Mirror = unchecked((int)196608), + + /// + /// No documentation. + /// + /// + /// bb172701 + /// D3DX10_NORMALMAP_INVERTSIGN + /// D3DX10_NORMALMAP_INVERTSIGN + InvertSign = unchecked((int)524288), + + /// + /// No documentation. + /// + /// + /// bb172701 + /// D3DX10_NORMALMAP_COMPUTE_OCCLUSION + /// D3DX10_NORMALMAP_COMPUTE_OCCLUSION + ComputeOcclusion = unchecked((int)1048576), + } + + /// + ///

Flags that describe miscellaneous query behavior.

+ ///
+ /// + ///

This flag is part of a query description (see ).

+ ///
+ /// + /// bb172406 + /// D3D10_QUERY_MISC_FLAG + /// D3D10_QUERY_MISC_FLAG + [Flags] + public enum QueryFlags : int { + + /// + ///

Tell the hardware that if it is not yet sure if something is hidden or not to draw it anyway. This is only used with an occlusion predicate. Predication data cannot be returned to your application via when using this flag.

+ ///
+ /// + /// bb172406 + /// D3D10_QUERY_MISC_PREDICATEHINT + /// D3D10_QUERY_MISC_PREDICATEHINT + Predicatehint = unchecked((int)1), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Query types.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY + /// D3D10_QUERY + public enum QueryType : int { + + /// + ///

Determines whether or not the GPU is finished processing commands. When the GPU is finished processing commands GetData will return , and pData will point to a with a value of TRUE. When using this type of query, Begin is disabled.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_EVENT + /// D3D10_QUERY_EVENT + Event = unchecked((int)0), + + /// + ///

Get the number of samples that passed the depth and stencil tests in between Begin and End. GetData returns a UINT64. If a depth or stencil test is disabled, then each of those tests will be counted as a pass.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_OCCLUSION + /// D3D10_QUERY_OCCLUSION + Occlusion = unchecked((int)1), + + /// + ///

Get a timestamp value where GetData returns a UINT64. This kind of query is only useful if two timestamp queries are done in the middle of a query. The difference of two timestamps can be used to determine how many ticks have elapsed, and the query will determine if that difference is a reliable value and also has a value that shows how to convert the number of ticks into seconds. See . When using this type of query, Begin is disabled.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_TIMESTAMP + /// D3D10_QUERY_TIMESTAMP + Timestamp = unchecked((int)2), + + /// + ///

Determines whether or not a is returning reliable values, and also gives the frequency of the processor enabling you to convert the number of elapsed ticks into seconds. GetData will return a . This type of query should only be invoked once per frame or less.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_TIMESTAMP_DISJOINT + /// D3D10_QUERY_TIMESTAMP_DISJOINT + TimestampDisjoint = unchecked((int)3), + + /// + ///

Get pipeline statistics, such as the number of pixel shader invocations in between Begin and End. GetData will return a .

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_PIPELINE_STATISTICS + /// D3D10_QUERY_PIPELINE_STATISTICS + PipelineStatistics = unchecked((int)4), + + /// + ///

Similar to , except GetData returns a indicating whether or not any samples passed the depth and stencil tests - TRUE meaning at least one passed, meaning none passed.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_OCCLUSION_PREDICATE + /// D3D10_QUERY_OCCLUSION_PREDICATE + OcclusionPredicate = unchecked((int)5), + + /// + ///

Get streaming output statistics, such as the number of primitives streamed out in between Begin and End. GetData will return a structure.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_SO_STATISTICS + /// D3D10_QUERY_SO_STATISTICS + StreamOutputStatistics = unchecked((int)6), + + /// + ///

Determines whether or not any of the streaming output buffers overflowed in between Begin and End. GetData returns a - TRUE meaning there was an overflow, meaning there was not an overflow. If streaming output writes to multiple buffers, and one of the buffers overflows, then it will stop writing to all the output buffers. When an overflow is detected by Direct3D it is prevented from happening - no memory is corrupted. This predication may be used in conjunction with an SO_STATISTICS query so that when an overflow occurs the SO_STATISTIC query will let the application know how much memory was needed to prevent an overflow.

+ ///
+ /// + /// bb205335 + /// D3D10_QUERY_SO_OVERFLOW_PREDICATE + /// D3D10_QUERY_SO_OVERFLOW_PREDICATE + StreamOutputOverflowPredicate = unchecked((int)7), + } + + /// + ///

Specifies how to access a resource used in a render-target view.

+ ///
+ /// + ///

This enumeration is used in to create a render-target view.

+ ///
+ /// + /// bb172414 + /// D3D10_RTV_DIMENSION + /// D3D10_RTV_DIMENSION + public enum RenderTargetViewDimension : int { + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_UNKNOWN + /// D3D10_RTV_DIMENSION_UNKNOWN + Unknown = unchecked((int)0), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_BUFFER + /// D3D10_RTV_DIMENSION_BUFFER + Buffer = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE1D + /// D3D10_RTV_DIMENSION_TEXTURE1D + Texture1D = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE1DARRAY + /// D3D10_RTV_DIMENSION_TEXTURE1DARRAY + Texture1DArray = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE2D + /// D3D10_RTV_DIMENSION_TEXTURE2D + Texture2D = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE2DARRAY + /// D3D10_RTV_DIMENSION_TEXTURE2DARRAY + Texture2DArray = unchecked((int)5), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE2DMS + /// D3D10_RTV_DIMENSION_TEXTURE2DMS + Texture2DMultisampled = unchecked((int)6), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY + /// D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY + Texture2DMultisampledArray = unchecked((int)7), + + /// + /// No documentation. + /// + /// + /// bb172414 + /// D3D10_RTV_DIMENSION_TEXTURE3D + /// D3D10_RTV_DIMENSION_TEXTURE3D + Texture3D = unchecked((int)8), + } + + /// + ///

Identifies the type of resource being used.

+ ///
+ /// + ///

This enumeration is used in , and .

+ ///
+ /// + /// bb172411 + /// D3D10_RESOURCE_DIMENSION + /// D3D10_RESOURCE_DIMENSION + public enum ResourceDimension : int { + + /// + /// No documentation. + /// + /// + /// bb172411 + /// D3D10_RESOURCE_DIMENSION_UNKNOWN + /// D3D10_RESOURCE_DIMENSION_UNKNOWN + Unknown = unchecked((int)0), + + /// + /// No documentation. + /// + /// + /// bb172411 + /// D3D10_RESOURCE_DIMENSION_BUFFER + /// D3D10_RESOURCE_DIMENSION_BUFFER + Buffer = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb172411 + /// D3D10_RESOURCE_DIMENSION_TEXTURE1D + /// D3D10_RESOURCE_DIMENSION_TEXTURE1D + Texture1D = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb172411 + /// D3D10_RESOURCE_DIMENSION_TEXTURE2D + /// D3D10_RESOURCE_DIMENSION_TEXTURE2D + Texture2D = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb172411 + /// D3D10_RESOURCE_DIMENSION_TEXTURE3D + /// D3D10_RESOURCE_DIMENSION_TEXTURE3D + Texture3D = unchecked((int)4), + } + + /// + ///

Identifies other, less common options for resources.

+ ///
+ /// + ///

This enumeration is used in , , , , , and .

These flags can be combined by bitwise OR.

and are mutually exclusive flags: either one may be set in the resource creation calls but not both simultaneously.

+ ///
+ /// + /// bb172412 + /// D3D10_RESOURCE_MISC_FLAG + /// D3D10_RESOURCE_MISC_FLAG + [Flags] + public enum ResourceOptionFlags : int { + + /// + ///

Enables an application to call on a texture resource. The resource must be created with the bind flags that specify that the resource is a render target and a shader resource.

+ ///
+ /// + /// bb172412 + /// D3D10_RESOURCE_MISC_GENERATE_MIPS + /// D3D10_RESOURCE_MISC_GENERATE_MIPS + GenerateMipMaps = unchecked((int)1), + + /// + ///

Enables the sharing of resource data between two or more Direct3D devices. The only resources that can be shared are 2D non-mipmapped textures.

WARP and REF devices do not support shared resources. Attempting to create a resource with this flag on either a WARP or REF device will cause the create method to return an E_OUTOFMEMORY error code.

+ ///
+ /// + /// bb172412 + /// D3D10_RESOURCE_MISC_SHARED + /// D3D10_RESOURCE_MISC_SHARED + Shared = unchecked((int)2), + + /// + ///

Enables an application to create a cube texture from a Texture2DArray that contains 6 textures.

+ ///
+ /// + /// bb172412 + /// D3D10_RESOURCE_MISC_TEXTURECUBE + /// D3D10_RESOURCE_MISC_TEXTURECUBE + TextureCube = unchecked((int)4), + + /// + ///

Enables the resource created to be synchronized using the and ReleaseSync APIs. The following resource creation D3D10 APIs, that all take a parameter, have been extended to support the new flag.

  • ID3D10Device1::CreateTexture1D
  • ID3D10Device1::CreateTexture2D
  • ID3D10Device1::CreateTexture3D
  • ID3D10Device1::CreateBuffer

If any of the listed functions are called with the flag set, the interface returned can be queried for an interface, which implements AcquireSync and ReleaseSync APIs to synchronize access to the surface. The device creating the surface, and any other device opening the surface (using OpenSharedResource) is required to call before any rendering commands to the surface, and when it is done rendering.

WARP and REF devices do not support shared resources. Attempting to create a resource with this flag on either a WARP or REF device will cause the create method to return an E_OUTOFMEMORY error code.

+ ///
+ /// + /// bb172412 + /// D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX + /// D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX + SharedKeyedmutex = unchecked((int)16), + + /// + ///

Enables a surface to be used for GDI interoperability. Setting this flag enables rendering on the surface via .

+ ///
+ /// + /// bb172412 + /// D3D10_RESOURCE_MISC_GDI_COMPATIBLE + /// D3D10_RESOURCE_MISC_GDI_COMPATIBLE + GdiCompatible = unchecked((int)32), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Identifies expected resource use during rendering. The usage directly reflects whether a resource is accessible by the CPU and/or the GPU.

+ ///
+ /// + ///

An application identifies the way a resource is intended to be used (its usage) in a resource description. There are several structures for creating resources including: , , , , and .

Differences between Direct3D 9 and Direct3D 10:

In Direct3D 9, you specify the type of memory a resource should be created in at resource creation time (using D3DPOOL). It was an application's job to decide what memory pool would provide the best combination of functionality and performance.

In Direct3D 10, an application no longer specifies what type of memory (the pool) to create a resource in. Instead, you specify the intended usage of the resource, and let the runtime (in concert with the driver and a memory manager) choose the type of memory that will achieve the best performance.

?

+ ///
+ /// + /// bb172499 + /// D3D10_USAGE + /// D3D10_USAGE + public enum ResourceUsage : int { + + /// + ///

A resource that requires read and write access by the GPU. This is likely to be the most common usage choice.

+ ///
+ /// + /// bb172499 + /// D3D10_USAGE_DEFAULT + /// D3D10_USAGE_DEFAULT + Default = unchecked((int)0), + + /// + ///

A resource that can only be read by the GPU. It cannot be written by the GPU, and cannot be accessed at all by the CPU. This type of resource must be initialized when it is created, since it cannot be changed after creation.

+ ///
+ /// + /// bb172499 + /// D3D10_USAGE_IMMUTABLE + /// D3D10_USAGE_IMMUTABLE + Immutable = unchecked((int)1), + + /// + ///

A resource that is accessible by both the GPU and the CPU (write only). A dynamic resource is a good choice for a resource that will be updated by the CPU at least once per frame. To write to a dynamic resource on the CPU, use a Map method. You can write to a dynamic resource on the GPU using CopyResource or CopySubresourceRegion.

+ ///
+ /// + /// bb172499 + /// D3D10_USAGE_DYNAMIC + /// D3D10_USAGE_DYNAMIC + Dynamic = unchecked((int)2), + + /// + ///

A resource that supports data transfer (copy) from the GPU to the CPU.

+ ///
+ /// + /// bb172499 + /// D3D10_USAGE_STAGING + /// D3D10_USAGE_STAGING + Staging = unchecked((int)3), + } + + /// + ///

Sprite flags that tell the sprite drawing API how to behave. These are passed into .

+ ///
+ /// + ///

After a front-to-back or back-to-front sort is done, it will automatically do a secondary sort by texture. This is helpful for when there are many sprites with the same texture all on the same plane, such as when drawing the user interface in a game.

+ ///
+ /// + /// bb172704 + /// D3DX10_SPRITE_FLAG + /// D3DX10_SPRITE_FLAG + [Flags] + public enum SpriteFlags : int { + + /// + /// No documentation. + /// + /// + /// bb172704 + /// D3DX10_SPRITE_SORT_TEXTURE + /// D3DX10_SPRITE_SORT_TEXTURE + GroupByTexture = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb172704 + /// D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT + /// D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT + SortBackToFront = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb172704 + /// D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK + /// D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK + SortFrontToBack = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb172704 + /// D3DX10_SPRITE_SAVE_STATE + /// D3DX10_SPRITE_SAVE_STATE + SaveState = unchecked((int)8), + + /// + /// No documentation. + /// + /// + /// bb172704 + /// D3DX10_SPRITE_ADDREF_TEXTURES + /// D3DX10_SPRITE_ADDREF_TEXTURES + IncreaseTextureReferenceCount = unchecked((int)16), + + /// + /// None. + /// + /// + /// None + /// None + None = unchecked((int)0), + } + + /// + ///

Describes multi-sampling parameters for a resource.

+ ///
+ /// + ///

The default sampler mode, with no anti-aliasing, has a count of 1 and a quality level of 0.

If multi-sample antialiasing is being used, all bound render targets and depth buffers must have the same sample counts and quality levels.

Differences between Direct3D 10.0 and Direct3D 10.1 and between Direct3D 10.0 and Direct3D 11:

Direct3D 10.1 has defined two standard quality levels: and in the enumeration in D3D10_1.h.

Direct3D 11 has defined two standard quality levels: and in the enumeration in D3D11.h.

?

+ ///
+ /// + /// bb173072 + /// D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS + /// D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS + public enum StandardMultisampleQualityLevels : int { + + /// + ///

The number of multisamples per pixel.

+ ///
+ /// + /// bb173072 + /// D3D10_STANDARD_MULTISAMPLE_PATTERN + /// D3D10_STANDARD_MULTISAMPLE_PATTERN + StandardMultisamplePattern = unchecked((int)-1), + + /// + ///

The image quality level. The higher the quality, the lower the performance. The valid range is between zero and one less than the level returned by for Direct3D 10 or for Direct3D 11.

For Direct3D 10.1 and Direct3D 11, you can use two special quality level values. For more information about these quality level values, see Remarks.

+ ///
+ /// + /// bb173072 + /// D3D10_CENTER_MULTISAMPLE_PATTERN + /// D3D10_CENTER_MULTISAMPLE_PATTERN + CenterMultisamplePattern = unchecked((int)-2), + } + + /// + ///

The stencil operations that can be performed during depth-stencil testing.

+ ///
+ /// + /// bb172455 + /// D3D10_STENCIL_OP + /// D3D10_STENCIL_OP + public enum StencilOperation : int { + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_KEEP + /// D3D10_STENCIL_OP_KEEP + Keep = unchecked((int)1), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_ZERO + /// D3D10_STENCIL_OP_ZERO + Zero = unchecked((int)2), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_REPLACE + /// D3D10_STENCIL_OP_REPLACE + Replace = unchecked((int)3), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_INCR_SAT + /// D3D10_STENCIL_OP_INCR_SAT + IncrementAndClamp = unchecked((int)4), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_DECR_SAT + /// D3D10_STENCIL_OP_DECR_SAT + DecrementAndClamp = unchecked((int)5), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_INVERT + /// D3D10_STENCIL_OP_INVERT + Invert = unchecked((int)6), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_INCR + /// D3D10_STENCIL_OP_INCR + Increment = unchecked((int)7), + + /// + /// No documentation. + /// + /// + /// bb172455 + /// D3D10_STENCIL_OP_DECR + /// D3D10_STENCIL_OP_DECR + Decrement = unchecked((int)8), + } + + /// + ///

Identify a technique for resolving texture coordinates that are outside of the boundaries of a texture.

+ ///
+ /// + /// bb172483 + /// D3D10_TEXTURE_ADDRESS_MODE + /// D3D10_TEXTURE_ADDRESS_MODE + public enum TextureAddressMode : int { + + /// + ///

Tile the texture at every integer junction. For example, for u values between 0 and 3, the texture is repeated three times.

+ ///
+ /// + /// bb172483 + /// D3D10_TEXTURE_ADDRESS_WRAP + /// D3D10_TEXTURE_ADDRESS_WRAP + Wrap = unchecked((int)1), + + /// + ///

Flip the texture at every integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on.

+ ///
+ /// + /// bb172483 + /// D3D10_TEXTURE_ADDRESS_MIRROR + /// D3D10_TEXTURE_ADDRESS_MIRROR + Mirror = unchecked((int)2), + + /// + ///

Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.

+ ///
+ /// + /// bb172483 + /// D3D10_TEXTURE_ADDRESS_CLAMP + /// D3D10_TEXTURE_ADDRESS_CLAMP + Clamp = unchecked((int)3), + + /// + ///

Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in or HLSL code.

+ ///
+ /// + /// bb172483 + /// D3D10_TEXTURE_ADDRESS_BORDER + /// D3D10_TEXTURE_ADDRESS_BORDER + Border = unchecked((int)4), + + /// + ///

Similar to and . Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value.

+ ///
+ /// + /// bb172483 + /// D3D10_TEXTURE_ADDRESS_MIRROR_ONCE + /// D3D10_TEXTURE_ADDRESS_MIRROR_ONCE + MirrorOnce = unchecked((int)5), + } + + /// + ///

The different faces of a cube texture.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE + /// D3D10_TEXTURECUBE_FACE + public enum TextureCubeFace : int { + + /// + ///

Positive X face.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE_POSITIVE_X + /// D3D10_TEXTURECUBE_FACE_POSITIVE_X + PositiveX = unchecked((int)0), + + /// + ///

Negative X face.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE_NEGATIVE_X + /// D3D10_TEXTURECUBE_FACE_NEGATIVE_X + NegativeX = unchecked((int)1), + + /// + ///

Positive Y face.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE_POSITIVE_Y + /// D3D10_TEXTURECUBE_FACE_POSITIVE_Y + PositiveY = unchecked((int)2), + + /// + ///

Negative Y face.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE_NEGATIVE_Y + /// D3D10_TEXTURECUBE_FACE_NEGATIVE_Y + NegativeY = unchecked((int)3), + + /// + ///

Positive Z face.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE_POSITIVE_Z + /// D3D10_TEXTURECUBE_FACE_POSITIVE_Z + PositiveZ = unchecked((int)4), + + /// + ///

Negative Z face.

+ ///
+ /// + /// bb172482 + /// D3D10_TEXTURECUBE_FACE_NEGATIVE_Z + /// D3D10_TEXTURECUBE_FACE_NEGATIVE_Z + NegativeZ = unchecked((int)5), + } +} diff --git a/Source/SharpDX.Direct3D10/Generated/Functions.cs b/Source/SharpDX.Direct3D10/Generated/Functions.cs new file mode 100644 index 000000000..db161d83d --- /dev/null +++ b/Source/SharpDX.Direct3D10/Generated/Functions.cs @@ -0,0 +1,1412 @@ +// 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.Direct3D10 namespace. +// This code was generated by a tool. +// Date : 17.06.2016 1:24:51 +// +// 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.Direct3D10 { + +#pragma warning disable 419 +#pragma warning disable 1587 +#pragma warning disable 1574 + + /// + /// Functions + /// + /// + static partial class D3D10 { + + /// Constant SdkVersion. + /// D3D10_SDK_VERSION + public const int SdkVersion = 29; + + /// Constant SdkVersion1. + /// D3D10_1_SDK_VERSION + public const int SdkVersion1 = 32; + + /// + ///

Create a Direct3D 10.1 device and a swap chain.

+ ///
+ ///

Pointer to a .

+ ///

The type of driver for the device. See .

+ ///

A handle to the DLL that implements a software rasterizer. Must be null if DriverType is non-software. The HMODULE of a DLL can be obtained with LoadLibrary, LoadLibraryEx, or GetModuleHandle.

+ ///

Optional. Device creation flags (see ) that enable API layers. These flags can be bitwise OR'd together.

+ ///

The version of hardware that is available for acceleration (see ).

+ ///

Bit flag that indicates the version of the SDK. Should be , defined in D3D10.h.

+ ///

Description of the swap chain. See .

+ ///

Address of a reference to an .

+ ///

Address of a reference to an Interface that will receive the newly created device.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

To create a device without creating a swap chain, see .

This method requires Windows Vista Service Pack 1, Windows Server 2008, or later release of Windows.

Note??If you call this API in a Session 0 process, it returns .

+ ///
+ /// + /// bb694527 + /// HRESULT D3D10CreateDeviceAndSwapChain1([In, Optional] IDXGIAdapter* pAdapter,[In] D3D10_DRIVER_TYPE DriverType,[In] HINSTANCE Software,[In] D3D10_CREATE_DEVICE_FLAG Flags,[In] D3D10_FEATURE_LEVEL1 HardwareLevel,[In] unsigned int SDKVersion,[In] DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,[Out] IDXGISwapChain** ppSwapChain,[Out] ID3D10Device1** ppDevice) + /// D3D10CreateDeviceAndSwapChain1 + public static void CreateDeviceAndSwapChain1(SharpDX.DXGI.Adapter adapterRef, SharpDX.Direct3D10.DriverType driverType, System.IntPtr software, SharpDX.Direct3D10.DeviceCreationFlags flags, SharpDX.Direct3D10.FeatureLevel hardwareLevel, int sDKVersion, ref SharpDX.DXGI.SwapChainDescription swapChainDescRef, out SharpDX.DXGI.SwapChain swapChainOut, out SharpDX.Direct3D10.Device1 deviceOut) { + unsafe { + IntPtr swapChainOut_ = IntPtr.Zero; + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* swapChainDescRef_ = &swapChainDescRef) + __result__= + D3D10CreateDeviceAndSwapChain1_((void*)((adapterRef == null)?IntPtr.Zero:adapterRef.NativePointer), unchecked((int)driverType), (void*)software, unchecked((int)flags), unchecked((int)hardwareLevel), sDKVersion, swapChainDescRef_, &swapChainOut_, &deviceOut_); + swapChainOut= (swapChainOut_ == IntPtr.Zero)?null:new SharpDX.DXGI.SwapChain(swapChainOut_); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device1(deviceOut_); + __result__.CheckError(); + } + } + [DllImport("d3d10_1.dll", EntryPoint = "D3D10CreateDeviceAndSwapChain1", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateDeviceAndSwapChain1_(void* arg0,int arg1,void* arg2,int arg3,int arg4,int arg5,void* arg6,void* arg7,void* arg8); + + /// + ///

Create a Direct3D 10.1 device that represents the display adapter.

+ ///
+ ///

Pointer to the display adapter (see ) when creating a hardware device; otherwise set this parameter to null. If null is specified when creating a hardware device, Direct3D will use the first adapter enumerated by EnumAdapters.

+ ///

The device-driver type (see ). The driver type determines the type of device you will create.

+ ///

This is set to null except for driver types.

+ ///

Optional. Device creation flags (see ) that enable API layers. These flags can be bitwise OR'd together.

+ ///

The version of hardware that is available for acceleration (see ).

+ ///

Bit flag that indicates the version of the SDK. Should be , defined in D3D10.h.

+ ///

Address of a reference to the device created (see Interface).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

To create a device and a swap chain at the same time, see .

This method requires Windows Vista Service Pack 1, Windows Server 2008, or later release of Windows.

The object returned by implements the interface and can be queried for other interfaces the object supports. To retrieve the interface of the object the following code could be used.

  * pDXGIDevice;	
+        /// hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice); 
+ ///
+ /// + /// bb694526 + /// HRESULT D3D10CreateDevice1([In, Optional] IDXGIAdapter* pAdapter,[In] D3D10_DRIVER_TYPE DriverType,[In] HINSTANCE Software,[In] D3D10_CREATE_DEVICE_FLAG Flags,[In] D3D10_FEATURE_LEVEL1 HardwareLevel,[In] unsigned int SDKVersion,[Out, Fast] ID3D10Device1** ppDevice) + /// D3D10CreateDevice1 + public static void CreateDevice1(SharpDX.DXGI.Adapter adapterRef, SharpDX.Direct3D10.DriverType driverType, System.IntPtr software, SharpDX.Direct3D10.DeviceCreationFlags flags, SharpDX.Direct3D10.FeatureLevel hardwareLevel, int sDKVersion, SharpDX.Direct3D10.Device1 deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3D10CreateDevice1_((void*)((adapterRef == null)?IntPtr.Zero:adapterRef.NativePointer), unchecked((int)driverType), (void*)software, unchecked((int)flags), unchecked((int)hardwareLevel), sDKVersion, &deviceOut_); + ((SharpDX.Direct3D10.Device1)deviceOut).NativePointer = deviceOut_; + __result__.CheckError(); + } + } + [DllImport("d3d10_1.dll", EntryPoint = "D3D10CreateDevice1", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateDevice1_(void* arg0,int arg1,void* arg2,int arg3,int arg4,int arg5,void* arg6); + + /// + ///

Create a Direct3D 10.0 device and a swap chain.

+ ///
+ ///

Pointer to a .

+ ///

The type of driver for the device. See .

+ ///

A handle to the DLL that implements a software rasterizer. Must be null if DriverType is non-software. The HMODULE of a DLL can be obtained with LoadLibrary, LoadLibraryEx, or GetModuleHandle.

+ ///

Optional. Device creation flags (see ) that enable API layers. These flags can be bitwise OR'd together.

+ ///

Bit flag that indicates the version of the SDK. Should be , defined in d3d10.h.

+ ///

Description of the swap chain. See .

+ ///

Address of a reference to an .

+ ///

Address of a reference to an Interface that will receive the newly created device.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

To create a device without creating a swap chain, see .

Note??If you call this API in a Session 0 process, it returns .

+ ///
+ /// + /// bb205087 + /// HRESULT D3D10CreateDeviceAndSwapChain([In, Optional] IDXGIAdapter* pAdapter,[In] D3D10_DRIVER_TYPE DriverType,[In] HINSTANCE Software,[In] D3D10_CREATE_DEVICE_FLAG Flags,[In] unsigned int SDKVersion,[In] DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,[Out] IDXGISwapChain** ppSwapChain,[Out] ID3D10Device** ppDevice) + /// D3D10CreateDeviceAndSwapChain + public static void CreateDeviceAndSwapChain(SharpDX.DXGI.Adapter adapterRef, SharpDX.Direct3D10.DriverType driverType, System.IntPtr software, SharpDX.Direct3D10.DeviceCreationFlags flags, int sDKVersion, ref SharpDX.DXGI.SwapChainDescription swapChainDescRef, out SharpDX.DXGI.SwapChain swapChainOut, out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr swapChainOut_ = IntPtr.Zero; + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* swapChainDescRef_ = &swapChainDescRef) + __result__= + D3D10CreateDeviceAndSwapChain_((void*)((adapterRef == null)?IntPtr.Zero:adapterRef.NativePointer), unchecked((int)driverType), (void*)software, unchecked((int)flags), sDKVersion, swapChainDescRef_, &swapChainOut_, &deviceOut_); + swapChainOut= (swapChainOut_ == IntPtr.Zero)?null:new SharpDX.DXGI.SwapChain(swapChainOut_); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10CreateDeviceAndSwapChain", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateDeviceAndSwapChain_(void* arg0,int arg1,void* arg2,int arg3,int arg4,void* arg5,void* arg6,void* arg7); + + /// + ///

Create a Direct3D 10.0 device that represents the display adapter.

+ ///
+ ///

Pointer to the display adapter (see ) when creating a hardware device; otherwise set this parameter to null. If null is specified when creating a hardware device, Direct3D will use the first adapter enumerated by EnumAdapters.

+ ///

The device-driver type (see ). The driver type determines the type of device you will create.

+ ///

Reserved. Set to null.

+ ///

Optional. Device creation flags (see ) that enable API layers. These flags can be bitwise OR'd together.

+ ///

Bit flag that indicates the version of the SDK. Should always be .

+ ///

Address of a reference to the device created (see Interface).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This example creates a reference device.

 * g_pd3dDevice = null;	
+        /// ( null, , null, 0,  , &g_pd3dDevice );              

To create a device and a swap chain at the same time, see .

The object returned by implements the interface and can be queried for other interfaces the object supports. To retrieve the interface of the object the following code could be used.

  * pDXGIDevice;	
+        /// hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice); 
+ ///
+ /// + /// bb205086 + /// HRESULT D3D10CreateDevice([In, Optional] IDXGIAdapter* pAdapter,[In] D3D10_DRIVER_TYPE DriverType,[In] HINSTANCE Software,[In] D3D10_CREATE_DEVICE_FLAG Flags,[In] unsigned int SDKVersion,[Out, Fast] ID3D10Device** ppDevice) + /// D3D10CreateDevice + public static void CreateDevice(SharpDX.DXGI.Adapter adapterRef, SharpDX.Direct3D10.DriverType driverType, System.IntPtr software, SharpDX.Direct3D10.DeviceCreationFlags flags, int sDKVersion, SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3D10CreateDevice_((void*)((adapterRef == null)?IntPtr.Zero:adapterRef.NativePointer), unchecked((int)driverType), (void*)software, unchecked((int)flags), sDKVersion, &deviceOut_); + ((SharpDX.Direct3D10.Device)deviceOut).NativePointer = deviceOut_; + __result__.CheckError(); + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10CreateDevice", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateDevice_(void* arg0,int arg1,void* arg2,int arg3,int arg4,void* arg5); + + /// + ///

Get the vertex shader profile best suited to a given device.

+ ///
+ /// No documentation. + ///

The shader profile.

+ /// + /// bb205099 + /// const char* D3D10GetVertexShaderProfile([In] ID3D10Device* pDevice) + /// D3D10GetVertexShaderProfile + public static string GetVertexShaderProfile(SharpDX.Direct3D10.Device deviceRef) { + unsafe { + string __result__; + __result__= + Marshal.PtrToStringAnsi(D3D10GetVertexShaderProfile_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer))); + return __result__; + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10GetVertexShaderProfile", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern System.IntPtr D3D10GetVertexShaderProfile_(void* arg0); + + /// + ///

Get the pixel shader profile best suited to a given device.

+ ///
+ /// No documentation. + ///

The shader profile.

+ /// + /// bb205097 + /// const char* D3D10GetPixelShaderProfile([In] ID3D10Device* pDevice) + /// D3D10GetPixelShaderProfile + public static string GetPixelShaderProfile(SharpDX.Direct3D10.Device deviceRef) { + unsafe { + string __result__; + __result__= + Marshal.PtrToStringAnsi(D3D10GetPixelShaderProfile_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer))); + return __result__; + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10GetPixelShaderProfile", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern System.IntPtr D3D10GetPixelShaderProfile_(void* arg0); + + /// + ///

Get the geometry shader profile best suited to a given device.

+ ///
+ /// No documentation. + ///

The shader profile.

+ /// + /// bb205093 + /// const char* D3D10GetGeometryShaderProfile([In] ID3D10Device* pDevice) + /// D3D10GetGeometryShaderProfile + public static string GetGeometryShaderProfile(SharpDX.Direct3D10.Device deviceRef) { + unsafe { + string __result__; + __result__= + Marshal.PtrToStringAnsi(D3D10GetGeometryShaderProfile_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer))); + return __result__; + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10GetGeometryShaderProfile", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern System.IntPtr D3D10GetGeometryShaderProfile_(void* arg0); + + /// + ///

Create an effect pool (or shared memory location), to enable sharing variables between effects.

+ ///
+ ///

A reference to a compiled effect.

+ ///

Length of pData.

+ ///

Effect compile options.

+ ///

A reference to the device (see Interface).

+ ///

A reference to the Interface that contains the effect pool.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A pool is a shared location in memory. Effect variables that are located in a pool can be updated once, and the effect system will take care of updating each effect that uses that variable. To pool an effect variable, tell the effect to locate the variable in a pool when the effect is created, using a helper function such as .

For help compiling an effect, see Compile an Effect (Direct3D 10).

+ ///
+ /// + /// bb205089 + /// HRESULT D3D10CreateEffectPoolFromMemory([In, Buffer] void* pData,[In] SIZE_T DataLength,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[Out, Fast] ID3D10EffectPool** ppEffectPool) + /// D3D10CreateEffectPoolFromMemory + public static void CreateEffectPoolFromMemory(System.IntPtr dataRef, SharpDX.PointerSize dataLength, int fXFlags, SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.EffectPool effectPoolOut) { + unsafe { + IntPtr effectPoolOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3D10CreateEffectPoolFromMemory_((void*)dataRef, (void*)dataLength, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), &effectPoolOut_); + ((SharpDX.Direct3D10.EffectPool)effectPoolOut).NativePointer = effectPoolOut_; + __result__.CheckError(); + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10CreateEffectPoolFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateEffectPoolFromMemory_(void* arg0,void* arg1,int arg2,void* arg3,void* arg4); + + /// + ///

Creates an from a buffer containing a compiled effect.

+ ///
+ ///

A reference to a compiled effect.

+ ///

Length of pData.

+ ///

Effect compile options.

+ ///

A reference to the device (see Interface).

+ ///

Optional. A reference to an memory space for effect variables that are shared across effects (see Interface).

+ ///

A reference to an Interface which contains the created effect.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This method is used to create an Interface object from an effect that has been compiled before runtime and loaded into memory. For help precompiling an effect, see Offline Compiling. To load and compile an ASCII .fx file see Compile an Effect (Direct3D 10).

+ ///
+ /// + /// bb205088 + /// HRESULT D3D10CreateEffectFromMemory([In, Buffer] void* pData,[In] SIZE_T DataLength,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In, Optional] ID3D10EffectPool* pEffectPool,[Out, Fast] ID3D10Effect** ppEffect) + /// D3D10CreateEffectFromMemory + public static void CreateEffectFromMemory(System.IntPtr dataRef, SharpDX.PointerSize dataLength, int fXFlags, SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.EffectPool effectPoolRef, SharpDX.Direct3D10.Effect effectOut) { + unsafe { + IntPtr effectOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3D10CreateEffectFromMemory_((void*)dataRef, (void*)dataLength, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)((effectPoolRef == null)?IntPtr.Zero:effectPoolRef.NativePointer), &effectOut_); + ((SharpDX.Direct3D10.Effect)effectOut).NativePointer = effectOut_; + __result__.CheckError(); + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10CreateEffectFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateEffectFromMemory_(void* arg0,void* arg1,int arg2,void* arg3,void* arg4,void* arg5); + + /// + ///

Create a state block.

+ ///
+ ///

The device for which the state block will be created.

+ ///

Indicates which parts of the device state will be captured when calling and reapplied when calling . See remarks.

+ ///

Address of a reference to the buffer created (see Interface).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A state block is a collection of device state, and is used for saving and restoring device state. Use a state-block mask to enable subsets of state for saving and restoring.

The structure can be filled manually or by using any of the D3D10StateBlockMaskXXX APIs. A state block mask can also be obtained by calling or .

Differences between Direct3D 9 and Direct3D 10:

In Direct3D 10, a state block object does not contain any valid information about the state of the device until is called. In Direct3D 9, state is saved in a state block object, when it is created.

?

+ ///
+ /// + /// bb205090 + /// HRESULT D3D10CreateStateBlock([In] ID3D10Device* pDevice,[In] D3D10_STATE_BLOCK_MASK* pStateBlockMask,[Out, Fast] ID3D10StateBlock** ppStateBlock) + /// D3D10CreateStateBlock + public static void CreateStateBlock(SharpDX.Direct3D10.Device deviceRef, ref SharpDX.Direct3D10.StateBlockMask stateBlockMaskRef, SharpDX.Direct3D10.StateBlock stateBlockOut) { + unsafe { + var stateBlockMaskRef_ = new SharpDX.Direct3D10.StateBlockMask.__Native(); + stateBlockMaskRef.__MarshalTo(ref stateBlockMaskRef_); + IntPtr stateBlockOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3D10CreateStateBlock_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), &stateBlockMaskRef_, &stateBlockOut_); + stateBlockMaskRef.__MarshalFree(ref stateBlockMaskRef_); + ((SharpDX.Direct3D10.StateBlock)stateBlockOut).NativePointer = stateBlockOut_; + __result__.CheckError(); + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10CreateStateBlock", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CreateStateBlock_(void* arg0,void* arg1,void* arg2); + + /// + ///

Compile an effect. + ///

Note??Use D3DX10CompileFromMemory instead of this function.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This function uses the version of the HLSL compiler released in the November 2006 DirectX SDK.

For an example, see Compile an Effect (Direct3D 10).

+ ///
+ /// + /// bb205083 + /// HRESULT D3D10CompileEffectFromMemory([In, Buffer] void* pData,[In] SIZE_T DataLength,[In] const char* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In, Optional] ID3DInclude* pInclude,[In] D3DCOMPILE_SHADER_FLAGS HLSLFlags,[In] D3DCOMPILE_EFFECT_FLAGS FXFlags,[Out] ID3D10Blob** ppCompiledEffect,[Out, Optional] ID3D10Blob** ppErrors) + /// D3D10CompileEffectFromMemory + public static void CompileEffect10FromMemory(System.IntPtr dataRef, SharpDX.PointerSize dataLength, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, SharpDX.D3DCompiler.ShaderFlags hLSLFlags, SharpDX.D3DCompiler.EffectFlags fXFlags, out SharpDX.Direct3D.Blob compiledEffectOut, out SharpDX.Direct3D.Blob errorsOut) { + unsafe { + IntPtr srcFileNameRef_ = Utilities.StringToHGlobalAnsi(srcFileNameRef); + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr compiledEffectOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* definesRef_ = definesRef__) + __result__= + D3D10CompileEffectFromMemory_((void*)dataRef, (void*)dataLength, (void*)srcFileNameRef_, definesRef_, (void*)includeRef, unchecked((int)hLSLFlags), unchecked((int)fXFlags), &compiledEffectOut_, &errorsOut_); + Marshal.FreeHGlobal(srcFileNameRef_ ); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + compiledEffectOut= (compiledEffectOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(compiledEffectOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3d10.dll", EntryPoint = "D3D10CompileEffectFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3D10CompileEffectFromMemory_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,int arg5,int arg6,void* arg7,void* arg8); + } + /// + /// Functions + /// + /// + static partial class D3DX10 { + + /// + ///

Creates a font object for a device and font.

Note??Instead of using this function, we recommend that you use DirectWrite and the DirectXTK library, SpriteFont class.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + ///

If the function succeeds, the return value is . If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.

+ /// + ///

The compiler setting also determines the function version. If Unicode is defined, the function call resolves to D3DXCreateFontW. Otherwise, the function call resolves to D3DXCreateFontA because ANSI strings are being used.

If you want more information about font parameters, see The Logical Font.

+ ///
+ /// + /// bb172664 + /// HRESULT D3DX10CreateFontW([In] ID3D10Device* pDevice,[In] int Height,[In] unsigned int Width,[In] unsigned int Weight,[In] unsigned int MipLevels,[In] BOOL Italic,[In] unsigned int CharSet,[In] unsigned int OutputPrecision,[In] unsigned int Quality,[In] unsigned int PitchAndFamily,[In] const wchar_t* pFaceName,[Out, Fast] ID3DX10Font** ppFont) + /// D3DX10CreateFontW + public static void CreateFont(SharpDX.Direct3D10.Device deviceRef, int height, int width, int weight, int mipLevels, SharpDX.Mathematics.Interop.RawBool italic, int charSet, int outputPrecision, int quality, int pitchAndFamily, string faceNameRef, SharpDX.Direct3D10.Font fontOut) { + unsafe { + IntPtr fontOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (char* faceNameRef_ = faceNameRef) + __result__= + D3DX10CreateFontW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), height, width, weight, mipLevels, italic, charSet, outputPrecision, quality, pitchAndFamily, (void*)faceNameRef_, &fontOut_); + ((SharpDX.Direct3D10.Font)fontOut).NativePointer = fontOut_; + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateFontW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateFontW_(void* arg0,int arg1,int arg2,int arg3,int arg4,SharpDX.Mathematics.Interop.RawBool arg5,int arg6,int arg7,int arg8,int arg9,void* arg10,void* arg11); + + /// + ///

Creates a font object.

Note??Instead of using this function, we recommend that you use DirectWrite and the DirectXTK library, SpriteFont class.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

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

+ /// + /// bb172665 + /// HRESULT D3DX10CreateFontIndirectW([In] ID3D10Device* pDevice,[In] const D3DX10_FONT_DESCW* pDesc,[Out, Fast] ID3DX10Font** ppFont) + /// D3DX10CreateFontIndirectW + public static void CreateFontIndirect(SharpDX.Direct3D10.Device deviceRef, ref SharpDX.Direct3D10.FontDescription descRef, SharpDX.Direct3D10.Font fontOut) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.FontDescription.__Native(); + descRef.__MarshalTo(ref descRef_); + IntPtr fontOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3DX10CreateFontIndirectW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), &descRef_, &fontOut_); + descRef.__MarshalFree(ref descRef_); + ((SharpDX.Direct3D10.Font)fontOut).NativePointer = fontOut_; + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateFontIndirectW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateFontIndirectW_(void* arg0,void* arg1,void* arg2); + + /// + ///

Create a sprite for drawing a 2D texture.

Note??Instead of using this function, we recommend that you use Direct2D and the DirectXTK library, SpriteBatch class.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

If the function succeeds, the return value is . If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

+ /// + /// bb172670 + /// HRESULT D3DX10CreateSprite([In] ID3D10Device* pDevice,[In] unsigned int cDeviceBufferSize,[Out, Fast] ID3DX10Sprite** ppSprite) + /// D3DX10CreateSprite + public static void CreateSprite(SharpDX.Direct3D10.Device deviceRef, int cDeviceBufferSize, SharpDX.Direct3D10.Sprite spriteOut) { + unsafe { + IntPtr spriteOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3DX10CreateSprite_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), cDeviceBufferSize, &spriteOut_); + ((SharpDX.Direct3D10.Sprite)spriteOut).NativePointer = spriteOut_; + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateSprite", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateSprite_(void* arg0,int arg1,void* arg2); + + /// + ///

Create the best Direct3D device and a swap chain.

+ ///
+ ///

Pointer to a .

+ ///

The type of driver for the device. See .

+ ///

A handle to the DLL that implements a software rasterizer. Must be null if DriverType is non-software. The HMODULE of a DLL can be obtained with LoadLibrary, LoadLibraryEx, or GetModuleHandle.

+ ///

Optional. Device creation flags (see ) that enable API layers. These flags can be bitwise OR'd together.

+ ///

Description of the swap chain. See .

+ ///

Address of a reference to an .

+ ///

Address of a reference to an Interface that will receive the newly created device.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

To create the best device, this method implements more than one device creation option. First, the method attempts to create a 10.1 device (and swap chain). If that fails, the method attempts to create a 10.0 device. If that fails, the method will fail. If your application needs to create only a 10.1 device, or a 10.0 device only, use these APIs instead:

  • Use to create a Direct3D 10.0 (only) device and swap chain.
  • Use to create a Direct3D 10.1 (only) device and swap chain.

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694538 + /// HRESULT D3DX10CreateDeviceAndSwapChain([In] IDXGIAdapter* pAdapter,[In] D3D10_DRIVER_TYPE DriverType,[In] HINSTANCE Software,[In] unsigned int Flags,[In] DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,[In] IDXGISwapChain** ppSwapChain,[In] ID3D10Device** ppDevice) + /// D3DX10CreateDeviceAndSwapChain + public static void CreateDeviceAndSwapChain(SharpDX.DXGI.Adapter adapterRef, SharpDX.Direct3D10.DriverType driverType, System.IntPtr software, int flags, ref SharpDX.DXGI.SwapChainDescription swapChainDescRef, out SharpDX.DXGI.SwapChain swapChainOut, out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr swapChainOut_ = IntPtr.Zero; + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* swapChainDescRef_ = &swapChainDescRef) + __result__= + D3DX10CreateDeviceAndSwapChain_((void*)((adapterRef == null)?IntPtr.Zero:adapterRef.NativePointer), unchecked((int)driverType), (void*)software, flags, swapChainDescRef_, &swapChainOut_, &deviceOut_); + swapChainOut= (swapChainOut_ == IntPtr.Zero)?null:new SharpDX.DXGI.SwapChain(swapChainOut_); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateDeviceAndSwapChain", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateDeviceAndSwapChain_(void* arg0,int arg1,void* arg2,int arg3,void* arg4,void* arg5,void* arg6); + + /// + ///

Verify that the version of D3DX you compiled with is the version that you are running.

+ ///
+ ///

Use . See remarks.

+ ///

Use D3DX10_SDK_VERSION. See remarks.

+ ///

If the version doesn't match, the function will return (a number less than or equal to 0, the number itself has no meaning).

+ /// + ///

Use this function during the initialization of your application.

  hr; if( FAILED( (, D3DX10_SDK_VERSION) ) ) return E_FAIL;	
+            /// 
+ ///
+ /// + /// bb172639 + /// HRESULT D3DX10CheckVersion([In] unsigned int D3DSdkVersion,[In] unsigned int D3DX10SdkVersion) + /// D3DX10CheckVersion + public static void CheckVersion(int d3DSdkVersion, int d3DX10SdkVersion) { + unsafe { + SharpDX.Result __result__; + __result__= + D3DX10CheckVersion_(d3DSdkVersion, d3DX10SdkVersion); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CheckVersion", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CheckVersion_(int arg0,int arg1); + + /// + ///

Create the best Direct3D 10 device that represents the display adapter. If a Direct3D 10.1-compatible device can be created, it will be possible to acquire an Interface reference from the returned device interface reference.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + ///

This function returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This function attempts to create the best device for the hardware. First, the function attempts to create a 10.1 device. If a 10.1 device cannot be created, the function attempts to create a 10.0 device. If neither device is successfully created, the function returns E_FAIL.

If your application needs to create only a 10.1 device, or a 10.0 device only, use the following functions instead:

  • Use the function to create a Direct3D 10.0 device only.
  • Use the function to create a Direct3D 10.1 device only.
  • Use the function to get an interface reference from an interface reference.

A Direct3D 10.1 device can only be created on computers running Windows Vista Service Pack 1 or later, and with Direct3D 10.1-compatible hardware installed. However, it is legal to call this function on computers running any version of Windows that has the D3DX10 DLL installed.

+ ///
+ /// + /// bb694537 + /// HRESULT D3DX10CreateDevice([In] IDXGIAdapter* pAdapter,[In] D3D10_DRIVER_TYPE DriverType,[In] HINSTANCE Software,[In] unsigned int Flags,[In] ID3D10Device** ppDevice) + /// D3DX10CreateDevice + public static void CreateDevice(SharpDX.DXGI.Adapter adapterRef, SharpDX.Direct3D10.DriverType driverType, System.IntPtr software, int flags, out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3DX10CreateDevice_((void*)((adapterRef == null)?IntPtr.Zero:adapterRef.NativePointer), unchecked((int)driverType), (void*)software, flags, &deviceOut_); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateDevice", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateDevice_(void* arg0,int arg1,void* arg2,int arg3,void* arg4); + + /// + ///

Get a Direct3D 10.1 device interface reference from a Direct3D 10.0 interface reference.

+ ///
+ ///

Pointer to the Direct3D 10.0 device (see the interface).

+ ///

Pointer to the Direct3D 10.1 device (see the interface).

+ ///

This function returns one of the following Direct3D 10 Return Codes. If a Direct3D 10.1 device interface can be acquired, this function succeeds and passes a reference to the 10.1 interface using the ppDevice parameter. If a Direct3D 10.1 device interface cannot be acquired, this function returns E_FAIL, and will not return anything for the ppDevice parameter.

+ /// + ///

For this function to succeed, you must have acquired the supplied reference using a call to the function, the function, the function, or the function.

You can only create a Direct3D 10.1 device on computers running Windows Vista Service Pack 1 or later, and with Direct3D 10.1-compatible hardware installed. This function will return E_FAIL on any computer not meeting these requirements. + /// However, you can call this function on any version of Windows that has the D3DX10 DLL installed.

+ ///
+ /// + /// bb694539 + /// HRESULT D3DX10GetFeatureLevel1([In] ID3D10Device* pDevice,[In] ID3D10Device1** ppDevice1) + /// D3DX10GetFeatureLevel1 + public static void GetFeatureLevel1(SharpDX.Direct3D10.Device deviceRef, out SharpDX.Direct3D10.Device1 device1Out) { + unsafe { + IntPtr device1Out_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3DX10GetFeatureLevel1_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), &device1Out_); + device1Out= (device1Out_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device1(device1Out_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10GetFeatureLevel1", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10GetFeatureLevel1_(void* arg0,void* arg1); + + /// + ///

Create a shader-resource view from a file.

+ ///
+ ///

A reference to the device (see Interface) that will use the resource.

+ ///

Name of the file that contains the shader-resource view. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

Optional. Identifies the characteristics of a texture (see ) when the data processor is created; set this to null to read the characteristics of a texture when the texture is loaded.

+ ///

Pointer to a thread-pump interface (see Interface). If null is specified, this function will behave synchronously and will not return until it is finished.

+ ///

Address of a reference to the shader-resource view (see Interface).

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + ///

For a list of supported image formats, see .

+ ///
+ /// + /// bb172667 + /// HRESULT D3DX10CreateShaderResourceViewFromFileW([In] ID3D10Device* pDevice,[In] const wchar_t* pSrcFile,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[In] ID3D10ShaderResourceView** ppShaderResourceView,[Out] HRESULT* pHResult) + /// D3DX10CreateShaderResourceViewFromFileW + public static void CreateShaderResourceViewFromFile(SharpDX.Direct3D10.Device deviceRef, string srcFileRef, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.ShaderResourceView shaderResourceViewOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_; + if (loadInfoRef.HasValue) + loadInfoRef_ = loadInfoRef.Value; + IntPtr shaderResourceViewOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* srcFileRef_ = srcFileRef) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateShaderResourceViewFromFileW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)srcFileRef_, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, &shaderResourceViewOut_, hResultRef_); + shaderResourceViewOut= (shaderResourceViewOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateShaderResourceViewFromFileW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateShaderResourceViewFromFileW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5); + + /// + ///

Save a texture to a file.

+ ///
+ ///

Pointer to the texture to be saved. See Interface.

+ ///

The format the texture will be saved as (see ). is the preferred format since it is the only option that supports all the formats in .

+ ///

Name of the destination output file where the texture will be saved. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

The return value is one of the values listed in Direct3D 10 Return Codes; use the return value to see if the DestFormat is supported.

+ /// + ///

writes out the extra DDS_HEADER_DXT10 structure for the input texture only if necessary (for example, because the input texture is in standard RGB (sRGB) format). If writes out the DDS_HEADER_DXT10 structure, it sets the dwFourCC member of the DDS_PIXELFORMAT structure for the texture to DX10 to indicate the prescense of the DDS_HEADER_DXT10 extended header.

+ ///
+ /// + /// bb172684 + /// HRESULT D3DX10SaveTextureToFileW([In] ID3D10Resource* pSrcTexture,[In] D3DX10_IMAGE_FILE_FORMAT DestFormat,[In] const wchar_t* pDestFile) + /// D3DX10SaveTextureToFileW + public static void SaveTextureToFile(SharpDX.Direct3D10.Resource srcTextureRef, SharpDX.Direct3D10.ImageFileFormat destFormat, string destFileRef) { + unsafe { + SharpDX.Result __result__; + fixed (char* destFileRef_ = destFileRef) + __result__= + D3DX10SaveTextureToFileW_((void*)((srcTextureRef == null)?IntPtr.Zero:srcTextureRef.NativePointer), unchecked((int)destFormat), (void*)destFileRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10SaveTextureToFileW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10SaveTextureToFileW_(void* arg0,int arg1,void* arg2); + + /// + ///

Get information about an image already loaded into memory.

+ ///
+ ///

Pointer to the image in memory.

+ ///

Size of the image in memory, in bytes.

+ ///

Optional thread pump that can be used to load the info asynchronously. Can be null. See .

+ ///

Information about the image in memory.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172678 + /// HRESULT D3DX10GetImageInfoFromMemory([In] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] ID3DX10ThreadPump* pPump,[In] D3DX10_IMAGE_INFO* pSrcInfo,[Out] HRESULT* pHResult) + /// D3DX10GetImageInfoFromMemory + public static void GetImageInfoFromMemory(System.IntPtr srcDataRef, SharpDX.PointerSize srcDataSize, System.IntPtr pumpRef, ref SharpDX.Direct3D10.ImageInformation srcInfoRef, out SharpDX.Result hResultRef) { + unsafe { + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (void* srcInfoRef_ = &srcInfoRef) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10GetImageInfoFromMemory_((void*)srcDataRef, (void*)srcDataSize, (void*)pumpRef, srcInfoRef_, hResultRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10GetImageInfoFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10GetImageInfoFromMemory_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4); + + /// + ///

Retrieves information about a given image in a resource.

+ ///
+ ///

Module where the resource is loaded. Set this parameter to null to specify the module associated with the image that the operating system used to create the current process.

+ ///

Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR. See Remarks.

+ ///

Optional thread pump that can be used to load the info asynchronously. Can be null. See .

+ ///

Pointer to a structure to be filled with the description of the data in the source file.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following: D3DERR_INVALIDCALL

+ /// + ///

The compiler setting also determines the function version. If Unicode is defined, the function call resolves to . Otherwise, the function call resolves to D3DX10GetImageInfoFromResourceA because ANSI strings are being used.

+ ///
+ /// + /// bb172679 + /// HRESULT D3DX10GetImageInfoFromResourceW([In] HINSTANCE hSrcModule,[In] const wchar_t* pSrcResource,[In] ID3DX10ThreadPump* pPump,[In] D3DX10_IMAGE_INFO* pSrcInfo,[Out] HRESULT* pHResult) + /// D3DX10GetImageInfoFromResourceW + public static void GetImageInfoFromResource(System.IntPtr hSrcModule, string srcResourceRef, System.IntPtr pumpRef, ref SharpDX.Direct3D10.ImageInformation srcInfoRef, out SharpDX.Result hResultRef) { + unsafe { + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* srcResourceRef_ = srcResourceRef) + fixed (void* srcInfoRef_ = &srcInfoRef) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10GetImageInfoFromResourceW_((void*)hSrcModule, (void*)srcResourceRef_, (void*)pumpRef, srcInfoRef_, hResultRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10GetImageInfoFromResourceW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10GetImageInfoFromResourceW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4); + + /// + ///

Create a texture resource from a file.

+ ///
+ ///

A reference to the device (see Interface) that will use the resource.

+ ///

The name of the file containing the resource. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR. See enumeration for a list of the supported image file formats.

+ ///

Optional. Identifies the characteristics of a texture (see ) when the data processor is created; set this to null to read the characteristics of a texture when the texture is loaded.

+ ///

A reference to a thread pump interface (see Interface). If null is specified, this function will behave synchronously and will not return until it is finished.

+ ///

The address of a reference to the texture resource (see Interface).

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + ///

For a list of supported image formats see .

+ ///
+ /// + /// bb172671 + /// HRESULT D3DX10CreateTextureFromFileW([In] ID3D10Device* pDevice,[In] const wchar_t* pSrcFile,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[Out] void** ppTexture,[Out] HRESULT* pHResult) + /// D3DX10CreateTextureFromFileW + internal static void CreateTextureFromFile(SharpDX.Direct3D10.Device deviceRef, string srcFileRef, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out System.IntPtr textureOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_; + if (loadInfoRef.HasValue) + loadInfoRef_ = loadInfoRef.Value; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* srcFileRef_ = srcFileRef) + fixed (void* textureOut_ = &textureOut) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateTextureFromFileW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)srcFileRef_, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, textureOut_, hResultRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateTextureFromFileW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateTextureFromFileW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5); + + /// + ///

Save a texture to memory.

+ ///
+ ///

Pointer to the texture to be saved. See Interface.

+ ///

The format the texture will be saved as. See .

+ ///

Address of a reference to the memory containing the saved texture. See Interface.

+ ///

Optional.

+ ///

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

+ /// + /// bb172685 + /// HRESULT D3DX10SaveTextureToMemory([In] ID3D10Resource* pSrcTexture,[In] D3DX10_IMAGE_FILE_FORMAT DestFormat,[Out] ID3D10Blob** ppDestBuf,[In] unsigned int Flags) + /// D3DX10SaveTextureToMemory + internal static void SaveTextureToMemory(SharpDX.Direct3D10.Resource srcTextureRef, SharpDX.Direct3D10.ImageFileFormat destFormat, out SharpDX.Direct3D.Blob destBufOut, int flags) { + unsafe { + IntPtr destBufOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3DX10SaveTextureToMemory_((void*)((srcTextureRef == null)?IntPtr.Zero:srcTextureRef.NativePointer), unchecked((int)destFormat), &destBufOut_, flags); + destBufOut= (destBufOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(destBufOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10SaveTextureToMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10SaveTextureToMemory_(void* arg0,int arg1,void* arg2,int arg3); + + /// + ///

Create a shader-resource view from a resource.

+ ///
+ ///

A reference to the device (see Interface) that will use the resource.

+ ///

Handle to the resource module containing the shader-resource view. HMODULE can be obtained with GetModuleHandle Function.

+ ///

Name of the shader resource view in hSrcModule. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

Optional. Identifies the characteristics of a texture (see ) when the data processor is created; set this to null to read the characteristics of a texture when the texture is loaded.

+ ///

A reference to a thread pump interface (see Interface). If null is specified, this function will behave synchronously and will not return until it is finished.

+ ///

Address of a reference to the shader-resource view (see Interface).

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172669 + /// HRESULT D3DX10CreateShaderResourceViewFromResourceW([In] ID3D10Device* pDevice,[In] HINSTANCE hSrcModule,[In] const wchar_t* pSrcResource,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[In] ID3D10ShaderResourceView** ppShaderResourceView,[Out] HRESULT* pHResult) + /// D3DX10CreateShaderResourceViewFromResourceW + public static void CreateShaderResourceViewFromResource(SharpDX.Direct3D10.Device deviceRef, System.IntPtr hSrcModule, string srcResourceRef, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.ShaderResourceView shaderResourceViewOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_; + if (loadInfoRef.HasValue) + loadInfoRef_ = loadInfoRef.Value; + IntPtr shaderResourceViewOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* srcResourceRef_ = srcResourceRef) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateShaderResourceViewFromResourceW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)hSrcModule, (void*)srcResourceRef_, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, &shaderResourceViewOut_, hResultRef_); + shaderResourceViewOut= (shaderResourceViewOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateShaderResourceViewFromResourceW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateShaderResourceViewFromResourceW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* arg6); + + /// + ///

Projects a function represented in a cube map into spherical harmonics.

+ ///
+ ///

Order of the SH evaluation, generates Order^2 coefs, degree is Order-1.

+ ///

Cubemap that is going to be projected into spherical harmonics. See .

+ ///

Output SH vector for red.

+ ///

Output SH vector for green.

+ ///

Output SH vector for blue.

+ ///

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

+ /// + /// bb172686 + /// HRESULT D3DX10SHProjectCubeMap([In] unsigned int Order,[In] ID3D10Texture2D* pCubeMap,[Out, Buffer] float* pROut,[Out, Buffer, Optional] float* pGOut,[Out, Buffer, Optional] float* pBOut) + /// D3DX10SHProjectCubeMap + public static void SHProjectCubeMap(int order, SharpDX.Direct3D10.Texture2D cubeMapRef, float[] rOutRef, float[] gOutRef, float[] bOutRef) { + unsafe { + float[] gOutRef__ = gOutRef; + float[] bOutRef__ = bOutRef; + SharpDX.Result __result__; + fixed (void* rOutRef_ = rOutRef) + fixed (void* gOutRef_ = gOutRef__) + fixed (void* bOutRef_ = bOutRef__) + __result__= + D3DX10SHProjectCubeMap_(order, (void*)((cubeMapRef == null)?IntPtr.Zero:cubeMapRef.NativePointer), rOutRef_, gOutRef_, bOutRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10SHProjectCubeMap", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10SHProjectCubeMap_(int arg0,void* arg1,void* arg2,void* arg3,void* arg4); + + /// + ///

Load a texture from a texture.

+ ///
+ ///

Pointer to the source texture. See .

+ ///

Pointer to texture loading parameters. See .

+ ///

Pointer to the destination texture. See Interface.

+ ///

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

+ /// + /// bb172680 + /// HRESULT D3DX10LoadTextureFromTexture([In] ID3D10Resource* pSrcTexture,[In] D3DX10_TEXTURE_LOAD_INFO* pLoadInfo,[In] ID3D10Resource* pDstTexture) + /// D3DX10LoadTextureFromTexture + public static void LoadTextureFromTexture(SharpDX.Direct3D10.Resource srcTextureRef, SharpDX.Direct3D10.TextureLoadInformation loadInfoRef, SharpDX.Direct3D10.Resource dstTextureRef) { + unsafe { + var loadInfoRef_ = new SharpDX.Direct3D10.TextureLoadInformation.__Native(); + loadInfoRef.__MarshalTo(ref loadInfoRef_); + SharpDX.Result __result__; + __result__= + D3DX10LoadTextureFromTexture_((void*)((srcTextureRef == null)?IntPtr.Zero:srcTextureRef.NativePointer), &loadInfoRef_, (void*)((dstTextureRef == null)?IntPtr.Zero:dstTextureRef.NativePointer)); + loadInfoRef.__MarshalFree(ref loadInfoRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10LoadTextureFromTexture", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10LoadTextureFromTexture_(void* arg0,void* arg1,void* arg2); + + /// + ///

Retrieves information about a given image file.

+ ///
+ ///

File name of image to retrieve information about. If UNICODE or _UNICODE are defined, this parameter type is LPCWSTR, otherwise, the type is LPCSTR.

+ ///

Optional thread pump that can be used to load the info asynchronously. Can be null. See .

+ ///

Pointer to a structure to be filled with the description of the data in the source file.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following: D3DERR_INVALIDCALL

+ /// + ///

This function supports both Unicode and ANSI strings.

+ ///
+ /// + /// bb172677 + /// HRESULT D3DX10GetImageInfoFromFileW([In] const wchar_t* pSrcFile,[In] ID3DX10ThreadPump* pPump,[In] D3DX10_IMAGE_INFO* pSrcInfo,[Out] HRESULT* pHResult) + /// D3DX10GetImageInfoFromFileW + public static void GetImageInfoFromFile(string srcFileRef, System.IntPtr pumpRef, ref SharpDX.Direct3D10.ImageInformation srcInfoRef, out SharpDX.Result hResultRef) { + unsafe { + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* srcFileRef_ = srcFileRef) + fixed (void* srcInfoRef_ = &srcInfoRef) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10GetImageInfoFromFileW_((void*)srcFileRef_, (void*)pumpRef, srcInfoRef_, hResultRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10GetImageInfoFromFileW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10GetImageInfoFromFileW_(void* arg0,void* arg1,void* arg2,void* arg3); + + /// + ///

Create a shader-resource view from a file in memory.

+ ///
+ ///

A reference to the device (see Interface) that will use the resource.

+ ///

Pointer to the file in memory that contains the shader-resource view.

+ ///

Size of the file in memory.

+ ///

Optional. Identifies the characteristics of a texture (see ) when the data processor is created; set this to null to read the characteristics of a texture when the texture is loaded.

+ ///

A reference to a thread pump interface (see Interface). If null is specified, this function will behave synchronously and will not return until it is finished.

+ ///

Address of a reference to the newly created shader resource view. See Interface.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172668 + /// HRESULT D3DX10CreateShaderResourceViewFromMemory([In] ID3D10Device* pDevice,[In] const void* pSrcData,[In] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[In] ID3D10ShaderResourceView** ppShaderResourceView,[Out] HRESULT* pHResult) + /// D3DX10CreateShaderResourceViewFromMemory + public static void CreateShaderResourceViewFromMemory(SharpDX.Direct3D10.Device deviceRef, System.IntPtr srcDataRef, SharpDX.PointerSize srcDataSize, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.ShaderResourceView shaderResourceViewOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_; + if (loadInfoRef.HasValue) + loadInfoRef_ = loadInfoRef.Value; + IntPtr shaderResourceViewOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateShaderResourceViewFromMemory_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)srcDataRef, (void*)srcDataSize, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, &shaderResourceViewOut_, hResultRef_); + shaderResourceViewOut= (shaderResourceViewOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateShaderResourceViewFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateShaderResourceViewFromMemory_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* arg6); + + /// + ///

Converts a height map into a normal map. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture.

+ ///
+ ///

Pointer to an interface, representing the source height-map texture.

+ ///

One or more D3DX_NORMALMAP flags that control generation of normal maps.

+ ///

One D3DX_CHANNEL flag specifying the source of height information.

+ ///

Constant value multiplier that increases (or decreases) the values in the normal map. Higher values usually make bumps more visible, lower values usually make bumps less visible.

+ ///

Pointer to an interface, representing the destination texture.

+ ///

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following value: D3DERR_INVALIDCALL.

+ /// + ///

This method computes the normal by using the central difference with a kernel size of 3x3. RGB channels in the destination contain biased (x,y,z) components of the normal. The central differencing denominator is hardcoded to 2.0.

+ ///
+ /// + /// bb172646 + /// HRESULT D3DX10ComputeNormalMap([In] ID3D10Texture2D* pSrcTexture,[In] D3DX10_NORMALMAP_FLAG Flags,[In] D3DX10_CHANNEL_FLAG Channel,[In] float Amplitude,[In] ID3D10Texture2D* pDestTexture) + /// D3DX10ComputeNormalMap + public static void ComputeNormalMap(SharpDX.Direct3D10.Texture2D srcTextureRef, SharpDX.Direct3D10.NormalMapFlags flags, SharpDX.Direct3D10.Channel channel, float amplitude, SharpDX.Direct3D10.Texture2D destTextureRef) { + unsafe { + SharpDX.Result __result__; + __result__= + D3DX10ComputeNormalMap_((void*)((srcTextureRef == null)?IntPtr.Zero:srcTextureRef.NativePointer), unchecked((int)flags), unchecked((int)channel), amplitude, (void*)((destTextureRef == null)?IntPtr.Zero:destTextureRef.NativePointer)); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10ComputeNormalMap", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10ComputeNormalMap_(void* arg0,int arg1,int arg2,float arg3,void* arg4); + + /// + ///

Generates mipmap chain using a particular texture filter.

+ ///
+ ///

The texture object to be filtered. See .

+ ///

The mipmap level whose data is used to generate the rest of the mipmap chain.

+ ///

Flags controlling how each miplevel is filtered (or D3DX10_DEFAULT for ). See .

+ ///

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

+ /// + /// bb172675 + /// HRESULT D3DX10FilterTexture([In] ID3D10Resource* pTexture,[In] unsigned int SrcLevel,[In] unsigned int MipFilter) + /// D3DX10FilterTexture + public static void FilterTexture(SharpDX.Direct3D10.Resource textureRef, int srcLevel, int mipFilter) { + unsafe { + SharpDX.Result __result__; + __result__= + D3DX10FilterTexture_((void*)((textureRef == null)?IntPtr.Zero:textureRef.NativePointer), srcLevel, mipFilter); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10FilterTexture", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10FilterTexture_(void* arg0,int arg1,int arg2); + + /// + ///

Create a texture from another resource.

+ ///
+ ///

A reference to the device (see Interface) that will use the resource.

+ ///

A handle to the source resource. HMODULE can be obtained with GetModuleHandle Function.

+ ///

A string that contains the name of the source resource. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

Optional. Identifies the characteristics of a texture (see ) when the data processor is created; set this to null to read the characteristics of a texture when the texture is loaded.

+ ///

A reference to a thread pump interface (see Interface). If null is specified, this function will behave synchronously and will not return until it is finished.

+ ///

The address of a reference to the texture resource (see Interface).

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + ///

For a list of supported image formats see .

+ ///
+ /// + /// bb172673 + /// HRESULT D3DX10CreateTextureFromResourceW([In] ID3D10Device* pDevice,[In] HINSTANCE hSrcModule,[In] const wchar_t* pSrcResource,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[Out] void** ppTexture,[Out] HRESULT* pHResult) + /// D3DX10CreateTextureFromResourceW + internal static void CreateTextureFromResource(SharpDX.Direct3D10.Device deviceRef, System.IntPtr hSrcModule, string srcResourceRef, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out System.IntPtr textureOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_; + if (loadInfoRef.HasValue) + loadInfoRef_ = loadInfoRef.Value; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* srcResourceRef_ = srcResourceRef) + fixed (void* textureOut_ = &textureOut) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateTextureFromResourceW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)hSrcModule, (void*)srcResourceRef_, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, textureOut_, hResultRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateTextureFromResourceW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateTextureFromResourceW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* arg6); + + /// + ///

Create a texture resource from a file residing in system memory.

+ ///
+ ///

A reference to the device (see Interface) that will use the resource.

+ ///

Pointer to the resource in system memory.

+ ///

Size of the resource in system memory.

+ ///

Optional. Identifies the characteristics of a texture (see ) when the data processor is created; set this to null to read the characteristics of a texture when the texture is loaded.

+ ///

A reference to a thread pump interface (see Interface). If null is specified, this function will behave synchronously and will not return until it is finished.

+ ///

Address of a reference to the created resource. See Interface.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + ///

For a list of supported image formats see .

+ ///
+ /// + /// bb172672 + /// HRESULT D3DX10CreateTextureFromMemory([In] ID3D10Device* pDevice,[In] const void* pSrcData,[In] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[Out] void** ppTexture,[Out] HRESULT* pHResult) + /// D3DX10CreateTextureFromMemory + internal static void CreateTextureFromMemory(SharpDX.Direct3D10.Device deviceRef, System.IntPtr srcDataRef, SharpDX.PointerSize srcDataSize, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out System.IntPtr textureOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_; + if (loadInfoRef.HasValue) + loadInfoRef_ = loadInfoRef.Value; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (void* textureOut_ = &textureOut) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateTextureFromMemory_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)srcDataRef, (void*)srcDataSize, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, textureOut_, hResultRef_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateTextureFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateTextureFromMemory_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* arg6); + + /// + ///

Creates a mesh object using a declarator.

+ ///
+ ///

Pointer to an Interface, the device object to be associated with the mesh.

+ ///

Array of elements, describing the vertex format for the returned mesh. This parameter must map directly to a flexible vertex format (FVF).

+ ///

The number of elements in pDeclaration.

+ ///

Semantic that identifies which part of the vertex declaration contains position information.

+ ///

Number of vertices for the mesh. This parameter must be greater than 0.

+ ///

Number of faces for the mesh. The valid range for this number is greater than 0, and one less than the maximum DWORD (typically 65534), because the last index is reserved.

+ ///

Combination of one or more flags from the D3DX10_MESH, specifying options for the mesh.

+ ///

Address of a reference to an Interface, representing the created mesh object.

+ ///

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

+ /// + /// bb204914 + /// HRESULT D3DX10CreateMesh([In] ID3D10Device* pDevice,[In, Buffer] const D3D10_INPUT_ELEMENT_DESC* pDeclaration,[In] unsigned int DeclCount,[In] const char* pPositionSemantic,[In] unsigned int VertexCount,[In] unsigned int FaceCount,[In] unsigned int Options,[Out, Fast] ID3DX10Mesh** ppMesh) + /// D3DX10CreateMesh + public static void CreateMesh(SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.InputElement[] declarationRef, int declCount, string positionSemanticRef, int vertexCount, int faceCount, int options, SharpDX.Direct3D10.Mesh meshOut) { + unsafe { + SharpDX.Direct3D10.InputElement.__Native[] declarationRef__ = new SharpDX.Direct3D10.InputElement.__Native[declarationRef.Length]; + for (int i = 0; i < declarationRef.Length; i++) + declarationRef[i].__MarshalTo(ref declarationRef__[i]); + IntPtr positionSemanticRef_ = Utilities.StringToHGlobalAnsi(positionSemanticRef); + IntPtr meshOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* declarationRef_ = declarationRef__) + __result__= + D3DX10CreateMesh_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), declarationRef_, declCount, (void*)positionSemanticRef_, vertexCount, faceCount, options, &meshOut_); + for (int i = 0; i < declarationRef.Length; i++) + declarationRef[i].__MarshalFree(ref declarationRef__[i]); + Marshal.FreeHGlobal(positionSemanticRef_ ); + ((SharpDX.Direct3D10.Mesh)meshOut).NativePointer = meshOut_; + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateMesh", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateMesh_(void* arg0,void* arg1,int arg2,void* arg3,int arg4,int arg5,int arg6,void* arg7); + + /// + ///

Creates an empty skin mesh object using a declarator.

+ ///
+ ///

Address of a reference to an Interface, representing the created skin mesh object.

+ ///

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be: E_OUTOFMEMORY.

+ /// + ///

Use the to populate the empty skin mesh object returned by this method.

+ ///
+ /// + /// bb204915 + /// HRESULT D3DX10CreateSkinInfo([In] ID3DX10SkinInfo** ppSkinInfo) + /// D3DX10CreateSkinInfo + public static void CreateSkinInfo(out SharpDX.Direct3D10.SkinInfo skinInfoOut) { + unsafe { + IntPtr skinInfoOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + D3DX10CreateSkinInfo_(&skinInfoOut_); + skinInfoOut= (skinInfoOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.SkinInfo(skinInfoOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateSkinInfo", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateSkinInfo_(void* arg0); + + /// + ///

Create an effect pool from a resource.

+ ///
+ ///

A handle to the resource module containing the effect. HMODULE can be obtained with GetModuleHandle Function.

+ ///

The name of the resource in hModule. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

Optional. Effect file name, which is used for error messages only. Can be null.

+ ///

A null-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to null to specify no macros.

+ ///

A reference to an include interface (see ID3D10Include Interface). This parameter can be null.

+ ///

A string that specifies the shader profile, or shader model.

+ ///

HLSL compile options (see D3D10_SHADER Constants).

+ ///

Effect compile options (see Compile and Effect Flags).

+ ///

A reference to the device (see Interface) that will use the resources.

+ ///

A reference to a thread pump interface (see Interface). Use null to specify that this function should not return until it is completed.

+ ///

The address of a reference to the effect pool (see Interface).

+ ///

The address of a reference to memory (see Interface) that contains effect compile errors, if there were any.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172663 + /// HRESULT D3DX10CreateEffectPoolFromResourceW([In] HINSTANCE hModule,[In] const wchar_t* pResourceName,[In] const wchar_t* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3DX10ThreadPump* pPump,[In] ID3D10EffectPool** ppEffectPool,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult) + /// D3DX10CreateEffectPoolFromResourceW + public static void CreateEffectPoolFromResource(System.IntPtr hModule, string resourceNameRef, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.EffectPool effectPoolOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr profileRef_ = Utilities.StringToHGlobalAnsi(profileRef); + IntPtr effectPoolOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* resourceNameRef_ = resourceNameRef) + fixed (char* srcFileNameRef_ = srcFileNameRef) + fixed (void* definesRef_ = definesRef__) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateEffectPoolFromResourceW_((void*)hModule, (void*)resourceNameRef_, (void*)srcFileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)pumpRef, &effectPoolOut_, &errorsOut_, hResultRef_); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + Marshal.FreeHGlobal(profileRef_ ); + effectPoolOut= (effectPoolOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.EffectPool(effectPoolOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateEffectPoolFromResourceW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateEffectPoolFromResourceW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,int arg6,int arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* arg12); + + /// + ///

Create an effect pool from an effect file.

+ ///
+ ///

The effect filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

A null-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to null to specify no macros.

+ ///

A reference to an include interface (see ID3D10Include Interface). This parameter can be null.

+ ///

A string that specifies the shader profile, or shader model.

+ ///

HLSL compile options (see D3D10_SHADER Constants).

+ ///

Effect compile options (see Compile and Effect Flags).

+ ///

A reference to the device (see Interface) that will use the resources.

+ ///

A reference to a thread pump interface (see Interface). Use null to specify that this function should not return until it is completed.

+ ///

The address of a reference to the effect pool (see Interface).

+ ///

The address of a reference to memory (see Interface) that contains effect compile errors, if there were any.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + ///

This example creates an effect pool from the effect used in the BasicHLSL10 Sample.

 // Create an effect pool from an effect in memory	
+                                                ///  * l_pEffectPool = null;	
+                                                /// *	l_pBlob_Errors = null;	
+                                                /// WCHAR str[MAX_PATH];	
+                                                /// hr = DXUTFindDXSDKMediaFileCch( str, MAX_PATH, L"BasicHLSL10.fx" );	
+                                                /// hr = ( str,  null, null, D3D10_SHADER_ENABLE_STRICTNESS,  0, pd3dDevice, null, &l_pEffectPool, &l_pBlob_Errors );	
+                                                /// 
+ ///
+ /// + /// bb172661 + /// HRESULT D3DX10CreateEffectPoolFromFileW([In] const wchar_t* pFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3DX10ThreadPump* pPump,[In] ID3D10EffectPool** ppEffectPool,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult) + /// D3DX10CreateEffectPoolFromFileW + public static void CreateEffectPoolFromFile(string fileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.EffectPool effectPoolOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr profileRef_ = Utilities.StringToHGlobalAnsi(profileRef); + IntPtr effectPoolOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* fileNameRef_ = fileNameRef) + fixed (void* definesRef_ = definesRef__) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateEffectPoolFromFileW_((void*)fileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)pumpRef, &effectPoolOut_, &errorsOut_, hResultRef_); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + Marshal.FreeHGlobal(profileRef_ ); + effectPoolOut= (effectPoolOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.EffectPool(effectPoolOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateEffectPoolFromFileW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateEffectPoolFromFileW_(void* arg0,void* arg1,void* arg2,void* arg3,int arg4,int arg5,void* arg6,void* arg7,void* arg8,void* arg9,void* arg10); + + /// + ///

Create an effect from a file.

+ ///
+ ///

Name of the ASCII effect file. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

A null-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to null to specify no macros.

+ ///

A reference to an include interface (see ID3D10Include Interface). This parameter can be null.

+ ///

A string that specifies the shader profile, or shader model.

+ ///

HLSL compile options (see D3D10_SHADER Constants).

+ ///

Effect compile options (see Compile and Effect Flags).

+ ///

A reference to the device (see Interface) that will use the resources.

+ ///

Pointer to an effect pool (see Interface) for sharing variables between effects.

+ ///

A reference to a thread pump interface (see Interface). Use null to specify that this function should not return until it is completed.

+ ///

Address of a reference to the effect (see Interface) that is created.

+ ///

The address of a reference to memory (see Interface) that contains effect compile errors, if there were any.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172658 + /// HRESULT D3DX10CreateEffectFromFileW([In] const wchar_t* pFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3D10EffectPool* pEffectPool,[In] ID3DX10ThreadPump* pPump,[In] ID3D10Effect** ppEffect,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult) + /// D3DX10CreateEffectFromFileW + public static void CreateEffectFromFile(string fileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.EffectPool effectPoolRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.Effect effectOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr profileRef_ = Utilities.StringToHGlobalAnsi(profileRef); + IntPtr effectOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* fileNameRef_ = fileNameRef) + fixed (void* definesRef_ = definesRef__) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateEffectFromFileW_((void*)fileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)((effectPoolRef == null)?IntPtr.Zero:effectPoolRef.NativePointer), (void*)pumpRef, &effectOut_, &errorsOut_, hResultRef_); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + Marshal.FreeHGlobal(profileRef_ ); + effectOut= (effectOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Effect(effectOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateEffectFromFileW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateEffectFromFileW_(void* arg0,void* arg1,void* arg2,void* arg3,int arg4,int arg5,void* arg6,void* arg7,void* arg8,void* arg9,void* arg10,void* arg11); + + /// + ///

Create an effect from memory.

+ ///
+ ///

Pointer to the effect in memory.

+ ///

Size of the effect in memory.

+ ///

Name of the effect file in memory.

+ ///

A null-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to null to specify no macros.

+ ///

A reference to an include interface (see ID3D10Include Interface). This parameter can be null.

+ ///

A string that specifies the shader profile, or shader model.

+ ///

HLSL compile options (see D3D10_SHADER Constants).

+ ///

Effect compile options (see D3D10_EFFECT Constants).

+ ///

A reference to the device (see Interface) that will use the resources.

+ ///

Pointer to an effect pool (see Interface) for sharing variables between effects.

+ ///

A reference to a thread pump interface (see Interface). Use null to specify that this function should not return until it is completed.

+ ///

Address of a reference to the effect (see Interface) that is created.

+ ///

The address of a reference to memory (see Interface) that contains effect compile errors, if there were any.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172659 + /// HRESULT D3DX10CreateEffectFromMemory([In] const void* pData,[In] SIZE_T DataLength,[In] const char* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3D10EffectPool* pEffectPool,[In] ID3DX10ThreadPump* pPump,[In] ID3D10Effect** ppEffect,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult) + /// D3DX10CreateEffectFromMemory + public static void CreateEffectFromMemory(System.IntPtr dataRef, SharpDX.PointerSize dataLength, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.EffectPool effectPoolRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.Effect effectOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) { + unsafe { + IntPtr srcFileNameRef_ = Utilities.StringToHGlobalAnsi(srcFileNameRef); + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr profileRef_ = Utilities.StringToHGlobalAnsi(profileRef); + IntPtr effectOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (void* definesRef_ = definesRef__) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateEffectFromMemory_((void*)dataRef, (void*)dataLength, (void*)srcFileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)((effectPoolRef == null)?IntPtr.Zero:effectPoolRef.NativePointer), (void*)pumpRef, &effectOut_, &errorsOut_, hResultRef_); + Marshal.FreeHGlobal(srcFileNameRef_ ); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + Marshal.FreeHGlobal(profileRef_ ); + effectOut= (effectOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Effect(effectOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateEffectFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateEffectFromMemory_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,int arg6,int arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* arg12,void* arg13); + + /// + ///

Create an effect pool from an effect in memory.

+ ///
+ ///

A reference to the effect.

+ ///

The size of the effect.

+ ///

The name of the effect file.

+ ///

A null-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to null to specify no macros.

+ ///

A reference to an include interface (see ID3D10Include Interface). This parameter can be null.

+ ///

A string that specifies the shader profile, or shader model.

+ ///

HLSL compile options (see D3D10_SHADER Constants).

+ ///

Effect compile options (see Compile and Effect Flags).

+ ///

A reference to the device (see Interface) that will use the resources.

+ ///

A reference to a thread pump interface (see Interface). Use null to specify that this function should not return until it is completed.

+ ///

The address of a reference to the effect pool (see Interface).

+ ///

The address of a reference to memory (see Interface) that contains effect compile errors, if there were any.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb172662 + /// HRESULT D3DX10CreateEffectPoolFromMemory([In] const void* pData,[In] SIZE_T DataLength,[In] const char* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3DX10ThreadPump* pPump,[In] ID3D10EffectPool** ppEffectPool,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult) + /// D3DX10CreateEffectPoolFromMemory + public static void CreateEffectPoolFromMemory(System.IntPtr dataRef, SharpDX.PointerSize dataLength, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.EffectPool effectPoolOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) { + unsafe { + IntPtr srcFileNameRef_ = Utilities.StringToHGlobalAnsi(srcFileNameRef); + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr profileRef_ = Utilities.StringToHGlobalAnsi(profileRef); + IntPtr effectPoolOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (void* definesRef_ = definesRef__) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateEffectPoolFromMemory_((void*)dataRef, (void*)dataLength, (void*)srcFileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)pumpRef, &effectPoolOut_, &errorsOut_, hResultRef_); + Marshal.FreeHGlobal(srcFileNameRef_ ); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + Marshal.FreeHGlobal(profileRef_ ); + effectPoolOut= (effectPoolOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.EffectPool(effectPoolOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateEffectPoolFromMemory", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateEffectPoolFromMemory_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,int arg6,int arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* arg12); + + /// + ///

Create an effect from a resource.

+ ///
+ ///

A handle to the resource module containing the effect. HMODULE can be obtained with GetModuleHandle Function.

+ ///

Name of the resource in hModule. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

+ ///

Optional. Effect file name, which is used for error messages only. Can be null.

+ ///

A null-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to null to specify no macros.

+ ///

A reference to an include interface (see ID3D10Include Interface). This parameter can be null.

+ ///

A string that specifies the shader profile, or shader model.

+ ///

HLSL compile options (see D3D10_SHADER Constants).

+ ///

Effect compile options (see Compile and Effect Flags).

+ ///

A reference to the device (see Interface) that will use the resources.

+ ///

Pointer to an effect pool (see Interface) for sharing variables between effects.

+ ///

A reference to a thread pump interface (see Interface). Use null to specify that this function should not return until it is completed.

+ ///

Address of a reference to the effect (see Interface) that is created.

+ ///

The address of a reference to memory (see Interface) that contains effect compile errors, if there were any.

+ ///

A reference to the return value. May be null. If pPump is not null, then pHResult must be a valid memory location until the asynchronous execution completes.

+ ///

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

+ /// + /// bb172660 + /// HRESULT D3DX10CreateEffectFromResourceW([In] HINSTANCE hModule,[In] const wchar_t* pResourceName,[In] const wchar_t* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3D10EffectPool* pEffectPool,[In] ID3DX10ThreadPump* pPump,[In] ID3D10Effect** ppEffect,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult) + /// D3DX10CreateEffectFromResourceW + public static void CreateEffectFromResource(System.IntPtr hModule, string resourceNameRef, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.EffectPool effectPoolRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.Effect effectOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) { + unsafe { + SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null)? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; + if (definesRef != null) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalTo(ref definesRef__[i]); + IntPtr profileRef_ = Utilities.StringToHGlobalAnsi(profileRef); + IntPtr effectOut_ = IntPtr.Zero; + IntPtr errorsOut_ = IntPtr.Zero; + hResultRef = new SharpDX.Result(); + SharpDX.Result __result__; + fixed (char* resourceNameRef_ = resourceNameRef) + fixed (char* srcFileNameRef_ = srcFileNameRef) + fixed (void* definesRef_ = definesRef__) + fixed (void* hResultRef_ = &hResultRef) + __result__= + D3DX10CreateEffectFromResourceW_((void*)hModule, (void*)resourceNameRef_, (void*)srcFileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)((effectPoolRef == null)?IntPtr.Zero:effectPoolRef.NativePointer), (void*)pumpRef, &effectOut_, &errorsOut_, hResultRef_); + if (definesRef != null ) + for (int i = 0; i < definesRef.Length; i++) + definesRef[i].__MarshalFree(ref definesRef__[i]); + Marshal.FreeHGlobal(profileRef_ ); + effectOut= (effectOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Effect(effectOut_); + errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_); + __result__.CheckError(); + } + } + [DllImport("d3dx10_43.dll", EntryPoint = "D3DX10CreateEffectFromResourceW", CallingConvention = CallingConvention.StdCall)] + private unsafe static extern int D3DX10CreateEffectFromResourceW_(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,int arg6,int arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* arg12,void* arg13); + } + } diff --git a/Source/SharpDX.Direct3D10/Generated/Interfaces.cs b/Source/SharpDX.Direct3D10/Generated/Interfaces.cs new file mode 100644 index 000000000..267fb587f --- /dev/null +++ b/Source/SharpDX.Direct3D10/Generated/Interfaces.cs @@ -0,0 +1,11443 @@ +// 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.Direct3D10 namespace. +// This code was generated by a tool. +// Date : 17.06.2016 1:24:45 +// +// 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.Direct3D10 { + +// Disable warning : XML comment is not placed on a valid language element +#pragma warning disable 419 +#pragma warning disable 1587 +#pragma warning disable 1574 + /// + ///

This interface encapsulates methods for retrieving data from the GPU asynchronously.

+ ///
+ /// + ///

There are three types of asynchronous interfaces, all of which inherit this interface:

  • Interface - Queries information from the GPU.
  • Interface - Determines whether a piece of geometry should be processed or not depending on the results of a previous draw call.
  • Interface - Measures GPU performance.
+ ///
+ /// + /// bb173500 + /// ID3D10Asynchronous + /// ID3D10Asynchronous + [Guid("9B7E4C0D-342C-4106-A19F-4F2704F689F0")] + public partial class Asynchronous : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Asynchronous(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Asynchronous(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Asynchronous(nativePointer); + } + + + /// + ///

Starts the collection of GPU data.

+ ///
+ /// + ///

Calling Begin starts the asynchronous collection of GPU data. Calling causes data collection to stop. See Interface for additional information.

+ ///
+ /// + /// bb173501 + /// void ID3D10Asynchronous::Begin() + /// ID3D10Asynchronous::Begin + public void Begin() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[7]); + } + } + + /// + ///

Ends the collection of GPU data.

+ ///
+ /// + ///

Calling starts the asynchronous collection of GPU data. Calling causes data collection to stop. See Interface for additional information.

+ ///
+ /// + /// bb173502 + /// void ID3D10Asynchronous::End() + /// ID3D10Asynchronous::End + public void End() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[8]); + } + } + + /// + ///

Get data from the GPU asynchronously.

+ ///
+ ///

Address of memory that will receive the data. If null, GetData will be used only to check status. The type of data output depends on the type of asynchronous interface. See Remarks.

+ ///

Size of the data to retrieve or 0. This value can be obtained with . Must be 0 when pData is null.

+ ///

Optional flags. Can be 0 or any combination of the flags enumerated by .

+ ///

If this function succeeds, it returns . Otherwise, possible return values are the following:

  • S_FALSE
+ /// + ///

GetData retrieves the data collected between calls to and . Certain queries only require a call to in which case the data returned by GetData is accurate up to the last call to (See Interface).

If DataSize is 0, GetData is only used to check status where a return value of indicates that data is available to give to an application, and a return value of S_FALSE indicates data is not yet available.

It is invalid to invoke this function on a predicate created with the flag D3D10_QUERY_MISCFLAG_PREDICATEHINT.

If the asynchronous interface that calls this function is Interface, then the following table applies.

Query TypeOutput Data TypeSupports Begin Method
NO
UINT64YES
UINT64NO
YES
YES
YES
YES
YES

?

If the asynchronous interface that calls this API is Interface, then the following applies.

Counter TypeOutput Data TypeUnits
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of theoretical maximum
FLOAT32fraction of theoretical maximum
FLOAT32fraction of theoretical maximum
FLOAT32fraction of theoretical maximum
FLOAT32fraction of theoretical maximum
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction of time
FLOAT32fraction
FLOAT32fraction

?

The value returned by a , , , , or counter may be different depending on the number of parallel counters that exist on a video card, and those values can be interpreted with the following equation:

The number of parallel counters that a video card has is available from NumDetectableParallelUnits in , and it can be retrieved by calling .

+ ///
+ /// + /// bb173503 + /// HRESULT ID3D10Asynchronous::GetData([Out, Buffer, Optional] void* pData,[In] unsigned int DataSize,[In] unsigned int GetDataFlags) + /// ID3D10Asynchronous::GetData + internal SharpDX.Result GetData(System.IntPtr dataRef, int dataSize, int getDataFlags) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)dataRef, dataSize, getDataFlags,((void**)(*(void**)_nativePointer))[9]); + return __result__; + } + } + + /// + ///

Get the size of the data (in bytes) that is output when calling .

+ ///
+ ///

Size of the data (in bytes) that is output when calling GetData.

+ /// + /// bb173504 + /// unsigned int ID3D10Asynchronous::GetDataSize() + /// ID3D10Asynchronous::GetDataSize + internal int GetDataSize() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[10]); + return __result__; + } + } + } + /// + ///

This blend-state interface accesses blending state for a Direct3D 10.0 device for the output-merger stage.

+ ///
+ /// + ///

Blending combines two pixel values. You have control over how the pixels are blended by using a predefined set of blending operations, as well as preblending operations. The Blending Block Diagram shows conceptually how blending works.

To create a blend-state interface, call . To initialize the blend state, call .

+ ///
+ /// + /// bb173505 + /// ID3D10BlendState + /// ID3D10BlendState + [Guid("EDAD8D19-8A35-4d6d-8566-2EA276CDE161")] + public partial class BlendState : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public BlendState(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.BlendState(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.BlendState(nativePointer); + } + + + /// + ///

Get the blend state.

+ ///
+ /// + /// bb173506 + /// GetDesc + /// GetDesc + /// void ID3D10BlendState::GetDesc([Out] D3D10_BLEND_DESC* pDesc) + public SharpDX.Direct3D10.BlendStateDescription Description { + get { SharpDX.Direct3D10.BlendStateDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the blend state.

+ ///
+ ///

A reference to the blend state (see ).

+ /// + /// bb173506 + /// void ID3D10BlendState::GetDesc([Out] D3D10_BLEND_DESC* pDesc) + /// ID3D10BlendState::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.BlendStateDescription descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.BlendStateDescription.__Native(); + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[7]); + descRef = new SharpDX.Direct3D10.BlendStateDescription(); + descRef.__MarshalFrom(ref descRef_); + } + } + } + /// + ///

This blend-state interface accesses blending state for a Direct3D 10.1 device for the output-merger stage.

+ ///
+ /// + ///

Blending combines two pixel values. You have control over how the pixels are blended by using a predefined set of blending operations, as well as preblending operations. The Blending Block Diagram shows conceptually how blending works.

To create a blend-state interface, call . To initialize the blend state, call .

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694544 + /// ID3D10BlendState1 + /// ID3D10BlendState1 + [Guid("EDAD8D99-8A35-4d6d-8566-2EA276CDE161")] + public partial class BlendState1 : SharpDX.Direct3D10.BlendState { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public BlendState1(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.BlendState1(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.BlendState1(nativePointer); + } + + + /// + /// No documentation. + /// + /// + /// GetDesc1 + /// GetDesc1 + /// void ID3D10BlendState1::GetDesc1([Out] D3D10_BLEND_DESC1* pDesc) + public SharpDX.Direct3D10.BlendStateDescription1 Description1 { + get { SharpDX.Direct3D10.BlendStateDescription1 __output__; GetDescription1(out __output__); return __output__; } + } + + /// + /// No documentation. + /// + /// No documentation. + /// + /// void ID3D10BlendState1::GetDesc1([Out] D3D10_BLEND_DESC1* pDesc) + /// ID3D10BlendState1::GetDesc1 + internal void GetDescription1(out SharpDX.Direct3D10.BlendStateDescription1 descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.BlendStateDescription1.__Native(); + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[8]); + descRef = new SharpDX.Direct3D10.BlendStateDescription1(); + descRef.__MarshalFrom(ref descRef_); + } + } + } + /// + ///

A buffer interface accesses a buffer resource, which is unstructured memory. Buffers typically store vertex or index data.

+ ///
+ /// + ///

Three types of buffers can be created; vertex, index, and shader-constant buffers. To create a buffer resource, call .

A buffer must be bound to the pipeline before it can be accessed. Buffers can be bound to the input-assembler stage by calls to and , and to the stream-output stage by a call to .

Buffers can be bound to multiple pipeline stages simultaneously for reading. A buffer can also be bound to a single pipeline stage for writing; however, the same buffer cannot be bound for reading and writing simultaneously. For more information, see binding resources.

+ ///
+ /// + /// bb173510 + /// ID3D10Buffer + /// ID3D10Buffer + [Guid("9B7E4C02-342C-4106-A19F-4F2704F689F0")] + public partial class Buffer : SharpDX.Direct3D10.Resource { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Buffer(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Buffer(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Buffer(nativePointer); + } + + + /// + ///

Get the properties of a buffer resource.

+ ///
+ /// + /// bb173511 + /// GetDesc + /// GetDesc + /// void ID3D10Buffer::GetDesc([Out] D3D10_BUFFER_DESC* pDesc) + public SharpDX.Direct3D10.BufferDescription Description { + get { SharpDX.Direct3D10.BufferDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a reference to the data contained in the resource and deny GPU access to the resource.

+ ///
+ ///

Flag that specifies the CPU's permissions for the reading and writing of a resource. For possible values, see .

+ ///

Flag that specifies what the CPU should do when the GPU is busy (see ). This flag is optional.

+ ///

Pointer to the buffer resource data.

+ ///

If this function succeeds, it returns . The following list contains some of the reasons that Map can fail:

  • If MapFlags specifies and the GPU is not yet finished with the resource, returns .
  • returns if MapType includes any flags that permit reading and the hardware device (that is, the video card) has been removed.

For more information about the preceding return values, see DXGI_ERROR.

+ /// + ///

For the CPU to write the contents of a resource, the resource must be created with the dynamic usage flag, . To both read and write those contents, the resource must be created with the staging usage flag, . (For more information about these flags, see .) will retrieve a reference to the resource data. For a discussion on how to access resources efficiently, see Copying and Accessing Resource Data (Direct3D 10).

Call to signify that the application has finished accessing the resource.

has a few other restrictions. For example:

  • The same buffer cannot be mapped multiple times; in other words, do not call on a buffer that is already mapped.
  • Any buffer that is bound to the pipeline must be unmapped before any rendering operation (that is, ) can be executed.

Differences between Direct3D 9 and Direct3D 10:

in Direct3D 10 is analogous to resource Lock in Direct3D 9.

?

+ ///
+ /// + /// bb173512 + /// HRESULT ID3D10Buffer::Map([In] D3D10_MAP MapType,[In] D3D10_MAP_FLAG MapFlags,[Out] void** ppData) + /// ID3D10Buffer::Map + internal void Map(SharpDX.Direct3D10.MapMode mapType, SharpDX.Direct3D10.MapFlags mapFlags, out System.IntPtr dataOut) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataOut_ = &dataOut) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)mapType), unchecked((int)mapFlags), dataOut_,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Invalidate the reference to the resource retrieved by and reenable GPU access to the resource.

+ ///
+ /// + ///

Differences between Direct3D 9 and Direct3D 10:

Unmap() in Direct3D 10 is analogous to resource Unlock() in Direct3D 9.

?

+ ///
+ /// + /// bb173513 + /// void ID3D10Buffer::Unmap() + /// ID3D10Buffer::Unmap + public void Unmap() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[11]); + } + } + + /// + ///

Get the properties of a buffer resource.

+ ///
+ ///

Pointer to a resource description (see ) filled in by the method. This reference cannot be null.

+ /// + /// bb173511 + /// void ID3D10Buffer::GetDesc([Out] D3D10_BUFFER_DESC* pDesc) + /// ID3D10Buffer::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.BufferDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.BufferDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[12]); + } + } + } + /// + ///

This interface encapsulates methods for measuring GPU performance.

+ ///
+ /// + ///

A counter can be created with .

This is a derived class of Interface.

Counter data is gathered by issuing an command, issuing some graphics commands, issuing an command, and then calling to get data about what happened in between the Begin and End calls. The data returned by GetData will be different depending on the type of counter. The call to End causes the data returned by GetData to be accurate up until the last call to End.

Counters are best suited for profiling.

For a list of the types of performance counters, see .

+ ///
+ /// + /// bb173514 + /// ID3D10Counter + /// ID3D10Counter + [Guid("9B7E4C11-342C-4106-A19F-4F2704F689F0")] + public partial class Counter : SharpDX.Direct3D10.Asynchronous { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Counter(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Counter(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Counter(nativePointer); + } + + + /// + ///

Get a counter description.

+ ///
+ /// + /// bb173515 + /// GetDesc + /// GetDesc + /// void ID3D10Counter::GetDesc([Out] D3D10_COUNTER_DESC* pDesc) + public SharpDX.Direct3D10.CounterDescription Description { + get { SharpDX.Direct3D10.CounterDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a counter description.

+ ///
+ ///

Pointer to a counter description (see ).

+ /// + /// bb173515 + /// void ID3D10Counter::GetDesc([Out] D3D10_COUNTER_DESC* pDesc) + /// ID3D10Counter::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.CounterDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.CounterDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[11]); + } + } + } + /// + ///

A depth-stencil-state interface accesses depth-stencil state which sets up the depth-stencil test for the output-merger stage.

+ ///
+ /// + ///

Create a depth-stencil state object by calling .

To initialize depth-stencil state, bind the depth-stencil-state object to the pipeline by calling .

+ ///
+ /// + /// bb173524 + /// ID3D10DepthStencilState + /// ID3D10DepthStencilState + [Guid("2B4B1CC8-A4AD-41f8-8322-CA86FC3EC675")] + public partial class DepthStencilState : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public DepthStencilState(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.DepthStencilState(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.DepthStencilState(nativePointer); + } + + + /// + ///

Get the depth-stencil state.

+ ///
+ /// + /// bb173525 + /// GetDesc + /// GetDesc + /// void ID3D10DepthStencilState::GetDesc([Out] D3D10_DEPTH_STENCIL_DESC* pDesc) + public SharpDX.Direct3D10.DepthStencilStateDescription Description { + get { SharpDX.Direct3D10.DepthStencilStateDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the depth-stencil state.

+ ///
+ ///

A reference to the depth-stencil state (see ).

+ /// + /// bb173525 + /// void ID3D10DepthStencilState::GetDesc([Out] D3D10_DEPTH_STENCIL_DESC* pDesc) + /// ID3D10DepthStencilState::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.DepthStencilStateDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.DepthStencilStateDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[7]); + } + } + } + /// + ///

A depth-stencil-view interface accesses a texture resource during depth-stencil testing.

+ ///
+ /// + ///

To create a depth-stencil view, call .

To bind a depth-stencil view to the pipeline, call .

+ ///
+ /// + /// bb173526 + /// ID3D10DepthStencilView + /// ID3D10DepthStencilView + [Guid("9B7E4C09-342C-4106-A19F-4F2704F689F0")] + public partial class DepthStencilView : SharpDX.Direct3D10.ResourceView { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public DepthStencilView(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.DepthStencilView(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.DepthStencilView(nativePointer); + } + + + /// + ///

Get the depth-stencil view.

+ ///
+ /// + /// bb173527 + /// GetDesc + /// GetDesc + /// void ID3D10DepthStencilView::GetDesc([Out] D3D10_DEPTH_STENCIL_VIEW_DESC* pDesc) + public SharpDX.Direct3D10.DepthStencilViewDescription Description { + get { SharpDX.Direct3D10.DepthStencilViewDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the depth-stencil view.

+ ///
+ /// No documentation. + /// + /// bb173527 + /// void ID3D10DepthStencilView::GetDesc([Out] D3D10_DEPTH_STENCIL_VIEW_DESC* pDesc) + /// ID3D10DepthStencilView::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.DepthStencilViewDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.DepthStencilViewDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[8]); + } + } + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class Device : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Device(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Device(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Device(nativePointer); + } + + + /// Update nested inner interfaces pointer + protected override void NativePointerUpdated(IntPtr oldPointer) + { + base.NativePointerUpdated(oldPointer); + if (VertexShader == null) + VertexShader = new SharpDX.Direct3D10.VertexShaderStage(IntPtr.Zero); + VertexShader.NativePointer = NativePointer; + if (PixelShader == null) + PixelShader = new SharpDX.Direct3D10.PixelShaderStage(IntPtr.Zero); + PixelShader.NativePointer = NativePointer; + if (InputAssembler == null) + InputAssembler = new SharpDX.Direct3D10.InputAssemblerStage(IntPtr.Zero); + InputAssembler.NativePointer = NativePointer; + if (GeometryShader == null) + GeometryShader = new SharpDX.Direct3D10.GeometryShaderStage(IntPtr.Zero); + GeometryShader.NativePointer = NativePointer; + if (OutputMerger == null) + OutputMerger = new SharpDX.Direct3D10.OutputMergerStage(IntPtr.Zero); + OutputMerger.NativePointer = NativePointer; + if (StreamOutput == null) + StreamOutput = new SharpDX.Direct3D10.StreamOutputStage(IntPtr.Zero); + StreamOutput.NativePointer = NativePointer; + if (Rasterizer == null) + Rasterizer = new SharpDX.Direct3D10.RasterizerStage(IntPtr.Zero); + Rasterizer.NativePointer = NativePointer; + } + + /// Inner interface giving access to VertexShaderStage methods. + public VertexShaderStage VertexShader { get; private set; } + + /// Inner interface giving access to PixelShaderStage methods. + public PixelShaderStage PixelShader { get; private set; } + + /// Inner interface giving access to InputAssemblerStage methods. + public InputAssemblerStage InputAssembler { get; private set; } + + /// Inner interface giving access to GeometryShaderStage methods. + public GeometryShaderStage GeometryShader { get; private set; } + + /// Inner interface giving access to OutputMergerStage methods. + public OutputMergerStage OutputMerger { get; private set; } + + /// Inner interface giving access to StreamOutputStage methods. + public StreamOutputStage StreamOutput { get; private set; } + + /// Inner interface giving access to RasterizerStage methods. + public RasterizerStage Rasterizer { get; private set; } + + /// + ///

Get the reason why the device was removed.

+ ///
+ /// + /// bb173571 + /// GetDeviceRemovedReason + /// GetDeviceRemovedReason + /// HRESULT ID3D10Device::GetDeviceRemovedReason() + public SharpDX.Result DeviceRemovedReason { + get { return GetDeviceRemovedReason(); } + } + + /// + ///

Get or sets the exception-mode flags.

+ ///
+ /// + ///

An exception-mode flag is used to elevate an error condition to a non-continuable exception.

+ ///
+ /// + /// bb173572 + /// GetExceptionMode / SetExceptionMode + /// GetExceptionMode + /// unsigned int ID3D10Device::GetExceptionMode() + public int ExceptionMode { + get { return GetExceptionMode(); } + set { SetExceptionMode(value); } + } + + /// + ///

Draw indexed, non-instanced primitives.

+ ///
+ ///

Number of indices to draw.

+ ///

Index of the first index to use when accesssing the vertex buffer; begin at StartIndexLocation to index vertices from the vertex buffer.

+ ///

Offset from the start of the vertex buffer to the first vertex.

+ /// + ///

A draw API submits work to the rendering pipeline.

If the sum of both indices is negative, the result of the function call is undefined.

+ ///
+ /// + /// bb173565 + /// void ID3D10Device::DrawIndexed([In] unsigned int IndexCount,[In] unsigned int StartIndexLocation,[In] int BaseVertexLocation) + /// ID3D10Device::DrawIndexed + public void DrawIndexed(int indexCount, int startIndexLocation, int baseVertexLocation) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, indexCount, startIndexLocation, baseVertexLocation,((void**)(*(void**)_nativePointer))[8]); + } + } + + /// + ///

Draw non-indexed, non-instanced primitives.

+ ///
+ ///

Number of vertices to draw.

+ ///

Index of the first vertex, which is usually an offset in a vertex buffer; it could also be used as the first vertex id generated for a shader parameter marked with the SV_TargetId?system-value semantic.

+ /// + ///

A draw API submits work to the rendering pipeline.

The vertex data for a draw call normally comes from a vertex buffer that is bound to the pipeline. However, you could also provide the vertex data from a shader that has vertex data marked with the SV_VertexId?system-value semantic.

+ ///
+ /// + /// bb173563 + /// void ID3D10Device::Draw([In] unsigned int VertexCount,[In] unsigned int StartVertexLocation) + /// ID3D10Device::Draw + public void Draw(int vertexCount, int startVertexLocation) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, vertexCount, startVertexLocation,((void**)(*(void**)_nativePointer))[9]); + } + } + + /// + ///

Draw indexed, instanced primitives.

+ ///
+ ///

Size of the index buffer used in each instance.

+ ///

Number of instances to draw.

+ ///

Index of the first index.

+ ///

Index of the first vertex. The index is signed, which allows a negative index. If the negative index plus the index value from the index buffer are less than 0, the result is undefined.

+ ///

Index of the first instance.

+ /// + ///

A draw API submits work to the rendering pipeline.

Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. Indexing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data. For an example of instancing, see the Instancing10 Sample.

+ ///
+ /// + /// bb173566 + /// void ID3D10Device::DrawIndexedInstanced([In] unsigned int IndexCountPerInstance,[In] unsigned int InstanceCount,[In] unsigned int StartIndexLocation,[In] int BaseVertexLocation,[In] unsigned int StartInstanceLocation) + /// ID3D10Device::DrawIndexedInstanced + public void DrawIndexedInstanced(int indexCountPerInstance, int instanceCount, int startIndexLocation, int baseVertexLocation, int startInstanceLocation) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, indexCountPerInstance, instanceCount, startIndexLocation, baseVertexLocation, startInstanceLocation,((void**)(*(void**)_nativePointer))[14]); + } + } + + /// + ///

Draw non-indexed, instanced primitives.

+ ///
+ ///

Number of vertices to draw.

+ ///

Number of instances to draw.

+ ///

Index of the first vertex.

+ ///

Index of the first instance.

+ /// + ///

A draw API submits work to the rendering pipeline.

Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. For an example of instancing, see the Instancing10 Sample.

The vertex data for an instanced draw call normally comes from a vertex buffer that is bound to the pipeline. However, you could also provide the vertex data from a shader that has instanced data identified with a system-value semantic (SV_InstanceID).

+ ///
+ /// + /// bb173567 + /// void ID3D10Device::DrawInstanced([In] unsigned int VertexCountPerInstance,[In] unsigned int InstanceCount,[In] unsigned int StartVertexLocation,[In] unsigned int StartInstanceLocation) + /// ID3D10Device::DrawInstanced + public void DrawInstanced(int vertexCountPerInstance, int instanceCount, int startVertexLocation, int startInstanceLocation) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, vertexCountPerInstance, instanceCount, startVertexLocation, startInstanceLocation,((void**)(*(void**)_nativePointer))[15]); + } + } + + /// + ///

Set a rendering predicate.

+ ///
+ ///

Pointer to a predicate (see ). A null value indicates "no" predication; in this case, the value of PredicateValue is irrelevent but will be preserved for .

+ ///

If TRUE, rendering will be affected by when the predicate's conditions are met. If , rendering will be affected when the conditions are not met.

+ /// + ///

The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to and are invalid.

This method is used to denote that subsequent rendering and resource manipulation commands are not actually performed if the resulting Predicate data of the Predicate is equal to the PredicateValue. However, some Predicates are only hints, so they may not actually prevent operations from being performed.

The primary usefulness of Predication is to allow an application to issue graphics commands without taking the performance hit of spinning, waiting for to return. So, Predication can occur while returns S_FALSE. Another way to think of it: an application can also use Predication as a fallback, if it is possible that returns S_FALSE. If returns , the application can skip calling the graphics commands manually with it's own application logic.

+ ///
+ /// + /// bb173615 + /// void ID3D10Device::SetPredication([In, Optional] ID3D10Predicate* pPredicate,[In] BOOL PredicateValue) + /// ID3D10Device::SetPredication + public void SetPredication(SharpDX.Direct3D10.Predicate predicateRef, SharpDX.Mathematics.Interop.RawBool predicateValue) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid9(_nativePointer, (void*)((predicateRef == null)?IntPtr.Zero:predicateRef.NativePointer), predicateValue,((void**)(*(void**)_nativePointer))[21]); + } + } + + /// + ///

Draw geometry of an unknown size that was created by the geometry shader stage. See remarks.

+ ///
+ /// + ///

A draw API submits work to the rendering pipeline.

After data has been streamed out to SO stage buffers, those buffers can be again bound to the Input Assembler stage at input slot 0 and DrawAuto will draw them without the application needing to know the amount of data that was written to the buffers. A measurement of the amount of data written to the SO stage buffers is maintained internally when the data is streamed out. This means that the CPU does not need to fetch the measurement before re-binding the data that was streamed as input data. Although this amount is tracked internally, it is still the responsibility of applications to use input layouts to describe the format of the data in the SO stage buffers so that the layouts are available when the buffers are again bound to the input assembler.

The following diagram shows the DrawAuto process.

Calling DrawAuto does not change the state of the streaming-output buffers that were bound again as inputs.

DrawAuto only works when drawing with one input buffer bound as an input to the IA stage at slot 0. Applications must create the SO buffer resource with both binding flags, and .

This API does not support indexing or instancing.

If an application needs to retrieve the size of the streaming-output buffer, it can query for statistics on streaming output by using .

Example of using DrawAuto can be found in the ParticlesGS Sample and PipesGS Sample.

+ ///
+ /// + /// bb173564 + /// void ID3D10Device::DrawAuto() + /// ID3D10Device::DrawAuto + public void DrawAuto() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[28]); + } + } + + /// + ///

Copy a region from a source resource to a destination resource.

+ ///
+ ///

A reference to the destination resource (see ).

+ ///

Subresource index of the destination.

+ ///

The x coordinate of the upper left corner of the destination region.

+ ///

The y coordinate of the upper left corner of the destination region.

+ ///

The z coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero.

+ ///

A reference to the source resource (see ).

+ ///

Subresource index of the source.

+ ///

A 3D box (see ) that defines the source subresource that can be copied. If null, the entire source subresource is copied. The box must fit within the source resource.

An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, CopySubresourceRegion doesn't perform a copy operation.

+ /// + ///

The source box must be within the size of the source resource. The destination location is an absolute value (not a relative value). The destination location can be offset from the source location; however, the size of the region to copy (including the destination location) must fit in the destination resource.

If the resources are buffers, all coordinates are in bytes; if the resources are textures, all coordinates are in texels.

D3D10CalcSubresource is a helper function for calculating subresource indexes.

CopySubresourceRegion performs the copy on the GPU (similar to a memcpy by the CPU). As a consequence, the source and destination resources must meet the following criteria:

  • Must be different subresources (although they can be from the same resource).
  • Must be the same type.
  • Must have compatible formats (the formats must either be identical or be from the same type group). For example, a texture can be copied to an texture because both of these formats are in the group. Beginning with Direct3D 10.1, CopySubresourceRegion can copy between a few format types. For more info, see Format Conversion using Direct3D 10.1.
  • May not be currently mapped.

CopySubresourceRegion supports only copy; it does not support any stretch, color key, blend, or format conversions. Beginning with Direct3D 10.1, CopySubresourceRegion can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.

If your app needs to copy an entire resource, we recommend to use instead.

CopySubresourceRegion is an asynchronous call that the runtime can add to the command-buffer queue. This asynchronous behaviorattempts to remove pipeline stalls that may occur when copying data. See performance considerations for more details.

Differences between Direct3D 10 and Direct3D 10.1:

Direct3D 10 has the following limitations:

  • You cannot use a depth-stencil resource as a destination.
  • You cannot use an immutable resource as a destination.
  • You cannot use a multisampled texture as either a source or a destination

Direct3D 10.1 has added support for the following features:

  • You can use a depth-stencil buffer as a source or a destination.
  • You can use multisampled resources as source and destination only if both source and destination have identical multisampled count and quality. If source and destination differ in multisampled count and quality or if the source is multisampled and the destination is not multisampled (or vice versa), the call to fails.
  • You can copy between uncompressed and compressed resources. During copy, the format conversions that are specified in Format Conversion using Direct3D 10.1 are supported automatically. The uncompressed resource must be at least prestructured, and typed. You must also account for the difference between the virtual and the physical size of the mipmaps levels.

?

Note??If you use CopySubresourceRegion with a depth-stencil buffer or a multisampled resource, you must copy the whole subresource. You must also pass 0 to the DstX, DstY, and DstZ parameters and null to the pSrcBox parameter. In addition, source and destination resources, which are represented by the pSrcResource and pDstResource parameters respectively, must have identical sample count values.

+ ///
+ /// + /// bb173542 + /// void ID3D10Device::CopySubresourceRegion([In] ID3D10Resource* pDstResource,[In] unsigned int DstSubresource,[In] unsigned int DstX,[In] unsigned int DstY,[In] unsigned int DstZ,[In] ID3D10Resource* pSrcResource,[In] unsigned int SrcSubresource,[In, Optional] const D3D10_BOX* pSrcBox) + /// ID3D10Device::CopySubresourceRegion + internal void CopySubresourceRegion_(SharpDX.Direct3D10.Resource dstResourceRef, int dstSubresource, int dstX, int dstY, int dstZ, SharpDX.Direct3D10.Resource srcResourceRef, int srcSubresource, SharpDX.Direct3D10.ResourceRegion? srcBoxRef) { + unsafe { + SharpDX.Direct3D10.ResourceRegion srcBoxRef_; + if (srcBoxRef.HasValue) + srcBoxRef_ = srcBoxRef.Value; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((dstResourceRef == null)?IntPtr.Zero:dstResourceRef.NativePointer), dstSubresource, dstX, dstY, dstZ, (void*)((srcResourceRef == null)?IntPtr.Zero:srcResourceRef.NativePointer), srcSubresource, (srcBoxRef.HasValue)?&srcBoxRef_:(void*)IntPtr.Zero,((void**)(*(void**)_nativePointer))[32]); + } + } + + /// + ///

Copy the entire contents of the source resource to the destination resource using the GPU.

+ ///
+ ///

A reference to the destination resource (see ).

+ ///

A reference to the source resource (see ).

+ /// + ///

This method is unusual in that it causes the GPU to perform the copy operation (similar to a memcpy by the CPU). As a result, it has a few restrictions designed for improving performance. For instance, the source and destination resources:

  • Must be different resources.
  • Must be the same type.
  • Must have identical dimensions (including width, height, depth, and size as appropriate).
  • Must have compatible formats, which means the formats must be identical or at least from the same type group. For example, a texture can be copied to an texture since both of these formats are in the group. Beginning with Direct3D 10.1, CopyResource can copy between a few format types. For more info, see Format Conversion using Direct3D 10.1.
  • May not be currently mapped.

CopyResource supports only copy; it does not support any stretch, color key, blend, or format conversions. Beginning with Direct3D 10.1, CopyResource can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.

Immutable, and depth-stencil resources cannot be used as a destination. Resources created with multisampling capability cannot be used as either a source or destination.

The method is an asynchronous call which may be added to the command-buffer queue. This attempts to remove pipeline stalls that may occur when copying data. See performance considerations for more details.

An application that only needs to copy a portion of the data in a resource should use instead.

Differences between Direct3D 10 and Direct3D 10.1:

Direct3D 10.1 enables depth-stencil resources to be used as either a source or destination. Direct3D 10.1 enables multisampled resources to be used as source and destination only if both source and destination have identical multisampled count and quality. If source and destination differ in multisampled count and quality or one of them is multisampled and the other is not multisampled, the call to fails.

It is possible to copy between prestructured+typed resources and block-compressed textures. See Format Conversion using Direct3D 10.1.

?

+ ///
+ /// + /// bb173541 + /// void ID3D10Device::CopyResource([In] ID3D10Resource* pDstResource,[In] ID3D10Resource* pSrcResource) + /// ID3D10Device::CopyResource + internal void CopyResource_(SharpDX.Direct3D10.Resource dstResourceRef, SharpDX.Direct3D10.Resource srcResourceRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((dstResourceRef == null)?IntPtr.Zero:dstResourceRef.NativePointer), (void*)((srcResourceRef == null)?IntPtr.Zero:srcResourceRef.NativePointer),((void**)(*(void**)_nativePointer))[33]); + } + } + + /// + ///

The CPU copies data from memory to a subresource created in non-mappable memory. See remarks.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

For a shader-constant buffer; set pDstBox to null. It is not possible to use this method to partially update a shader-constant buffer.

A resource cannot be used as a destination if:

  • the resource is created with immutable or dynamic usage.
  • the resource is created as a depth-stencil resource.
  • the resource is created with multisampling capability (see ).

When UpdateSubresource returns, the application is free to change or even free the data pointed to by pSrcData because the method has already copied/snapped away the original contents.

The performance of UpdateSubresource depends on whether or not there is contention for the destination resource. For example, contention for a vertex buffer resource occurs when the application executes a Draw call and later calls UpdateSubresource on the same vertex buffer before the Draw call is actually executed by the GPU.

  • When there is contention for the resource, UpdateSubresource will perform 2 copies of the source data. First, the data is copied by the CPU to a temporary storage space accessible by the command buffer. This copy happens before the method returns. A second copy is then performed by the GPU to copy the source data into non-mappable memory. This second copy happens asynchronously because it is executed by GPU when the command buffer is flushed.
  • When there is no resource contention, the behavior of UpdateSubresource is dependent on which is faster (from the CPU's perspective): copying the data to the command buffer and then having a second copy execute when the command buffer is flushed, or having the CPU copy the data to the final resource location. This is dependent on the architecture of the underlying system.

To better understand the source row pitch and source depth pitch parameters, consider the following illustration of a 3D volume texture.

Each block in this visual represents an element of data, and the size of each element is dependent on the resource's format. For example, if the resource format is , then the size of each element would be 128 bits, or 16 bytes. This 3D volume texture has a width of two, a height of three, and a depth of four.

To calculate the source row pitch and source depth pitch for a given resource, use the following formulas:

  • Source Row Pitch = [size of one element in bytes] * [number of elements in one row]
  • Source Depth Pitch = [Source Row Pitch] * [number of rows (height)]

In the case of this example 3D volume texture where the size of each element is 16 bytes, the formulas are as follows:

  • Source Row Pitch = 16 * 2 = 32
  • Source Depth Pitch = 16 * 2 * 3 = 96

The following illustration shows the resource as it is laid out in memory.

For example, the following code snippet shows how to specify a destination region in a 2D texture. Assume the destination texture is 512x512 and the operation will copy the data pointed to by pData to [(120,100)..(200,220)] in the destination texture. Also assume that rowPitch has been initialized with the proper value (as explained above). Front and back are set to 0 and 1 respectively, because by having front equal to back, the box is technically empty.

  destRegion;	
+        /// destRegion.left = 120;	
+        /// destRegion.right = 200;	
+        /// destRegion.top = 100;	
+        /// destRegion.bottom = 220;	
+        /// destRegion.front = 0;	
+        /// destRegion.back = 1; pd3dDevice->UpdateSubresource( pDestTexture, 0, &destRegion, pData, rowPitch, 0 );	
+        /// 

The 1D case is similar. The following snippet shows how to specify a destination region in a 1D texture. Use the same assumptions as above, except that the texture is 512 in length.

  destRegion;	
+        /// destRegion.left = 120;	
+        /// destRegion.right = 200;	
+        /// destRegion.top = 0;	
+        /// destRegion.bottom = 1;	
+        /// destRegion.front = 0;	
+        /// destRegion.back = 1; pd3dDevice->UpdateSubresource( pDestTexture, 0, &destRegion, pData, rowPitch, 0 );	
+        /// 

Differences between Direct3D 10 and Direct3D 10.1:

Direct3D 10.1 enables depth-stencil resources to be used as either a source or destination.

?

+ ///
+ /// + /// bb173621 + /// void ID3D10Device::UpdateSubresource([In] ID3D10Resource* pDstResource,[In] unsigned int DstSubresource,[In, Optional] const D3D10_BOX* pDstBox,[In] const void* pSrcData,[In] unsigned int SrcRowPitch,[In] unsigned int SrcDepthPitch) + /// ID3D10Device::UpdateSubresource + public void UpdateSubresource(SharpDX.Direct3D10.Resource dstResourceRef, int dstSubresource, SharpDX.Direct3D10.ResourceRegion? dstBoxRef, System.IntPtr srcDataRef, int srcRowPitch, int srcDepthPitch) { + unsafe { + SharpDX.Direct3D10.ResourceRegion dstBoxRef_; + if (dstBoxRef.HasValue) + dstBoxRef_ = dstBoxRef.Value; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((dstResourceRef == null)?IntPtr.Zero:dstResourceRef.NativePointer), dstSubresource, (dstBoxRef.HasValue)?&dstBoxRef_:(void*)IntPtr.Zero, (void*)srcDataRef, srcRowPitch, srcDepthPitch,((void**)(*(void**)_nativePointer))[34]); + } + } + + /// + ///

Set all the elements in a render target to one value.

+ ///
+ ///

Pointer to the render target.

+ ///

A 4-component array that represents the color to fill the render target with.

+ /// + ///

Applications that wish to clear a render target to a specific integer value bit pattern should render a screen-aligned quad instead of using this method. The reason for this is because this method accepts as input a floating point value, which may not have the same bit pattern as the original integer.

Differences between Direct3D 9 and Direct3D 10:

Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied.

?

When using 10Level9, ClearRenderTargetView only clears the first array slice in the render target view. This can impact (for example) cube map rendering scenarios. Applications should create a render target view for each face or array slice, then clear each view individually.

+ ///
+ /// + /// bb173539 + /// void ID3D10Device::ClearRenderTargetView([In] ID3D10RenderTargetView* pRenderTargetView,[In] const SHARPDX_COLOR4* ColorRGBA) + /// ID3D10Device::ClearRenderTargetView + public void ClearRenderTargetView(SharpDX.Direct3D10.RenderTargetView renderTargetViewRef, SharpDX.Mathematics.Interop.RawColor4 colorRGBA) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((renderTargetViewRef == null)?IntPtr.Zero:renderTargetViewRef.NativePointer), &colorRGBA,((void**)(*(void**)_nativePointer))[35]); + } + } + + /// + ///

Clears the depth-stencil resource.

+ ///
+ ///

Pointer to the depth stencil to be cleared.

+ ///

Which parts of the buffer to clear. See .

+ ///

Clear the depth buffer with this value. This value will be clamped between 0 and 1.

+ ///

Clear the stencil buffer with this value.

+ /// + ///

Differences between Direct3D 9 and Direct3D 10:

Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied.

?

+ ///
+ /// + /// bb173538 + /// void ID3D10Device::ClearDepthStencilView([In] ID3D10DepthStencilView* pDepthStencilView,[In] D3D10_CLEAR_FLAG ClearFlags,[In] float Depth,[In] unsigned char Stencil) + /// ID3D10Device::ClearDepthStencilView + public void ClearDepthStencilView(SharpDX.Direct3D10.DepthStencilView depthStencilViewRef, SharpDX.Direct3D10.DepthStencilClearFlags clearFlags, float depth, byte stencil) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((depthStencilViewRef == null)?IntPtr.Zero:depthStencilViewRef.NativePointer), unchecked((int)clearFlags), depth, stencil,((void**)(*(void**)_nativePointer))[36]); + } + } + + /// + ///

Generates mipmaps for the given shader resource.

+ ///
+ ///

A reference to an . The mipmaps will be generated for this shader resource.

+ /// + ///

GenerateMips may be called on any in order to generate the lower mipmap levels. GenerateMips uses the largest mipmap level of the view to recursively generate the lower levels of the mip, stopping with the smallest level specified by the view. If the base resource was not created with and , this call has no effect.

Video adapters that support feature level 9.1 and higher support generating mipmaps if you use any of these formats:

 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 

Video adapters that support feature level 9.2 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature level 9.1:

 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 

Video adapters that support feature level 9.3 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature levels 9.1 and 9.2:

 	
+        /// DXGI_FORMAT_B4G4R4A4 (optional)	
+        /// 

Video adapters that support feature level 10 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature levels 9.1, 9.2, and 9.3:

  (optional)	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        /// 	
+        ///  (optional)	
+        /// 

For all other unsupported formats, this method will silently fail.

+ ///
+ /// + /// bb173569 + /// void ID3D10Device::GenerateMips([In] ID3D10ShaderResourceView* pShaderResourceView) + /// ID3D10Device::GenerateMips + public void GenerateMips(SharpDX.Direct3D10.ShaderResourceView shaderResourceViewRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((shaderResourceViewRef == null)?IntPtr.Zero:shaderResourceViewRef.NativePointer),((void**)(*(void**)_nativePointer))[37]); + } + } + + /// + ///

Copy a multisampled resource into a non-multisampled resource. This API is most useful when re-using the resulting rendertarget of one render pass as an input to a second render pass.

+ ///
+ ///

Destination resource. Must be a created with the flag and be single-sampled. See .

+ ///

A zero-based index, that identifies the destination subresource. See D3D10CalcSubresource for more details.

+ ///

Source resource. Must be multisampled.

+ ///

The source subresource of the source resource.

+ ///

that indicates how the multisampled resource will be resolved to a single-sampled resource. See remarks.

+ /// + ///

Both the source and destination resources must be the same resource type and have the same dimensions.

The source and destination must have compatible formats. There are three scenarios for this:

ScenarioRequirements
Source and destination are prestructured and typedBoth the source and destination must have identical formats and that format must be specified in the Format parameter.
One resource is prestructured and typed and the other is prestructured and typelessThe typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is and the typeless resource is ). The format of the typed resource must be specified in the Format parameter.
Source and destination are prestructured and typelessBoth the source and desintation must have the same typeless format (i.e. both must have ), and the Format parameter must specify a format that is compatible with the source and destination (i.e. if both are then or could be specified in the Format parameter).

?

+ ///
+ /// + /// bb173607 + /// void ID3D10Device::ResolveSubresource([In] ID3D10Resource* pDstResource,[In] unsigned int DstSubresource,[In] ID3D10Resource* pSrcResource,[In] unsigned int SrcSubresource,[In] DXGI_FORMAT Format) + /// ID3D10Device::ResolveSubresource + internal void ResolveSubresource_(SharpDX.Direct3D10.Resource dstResourceRef, int dstSubresource, SharpDX.Direct3D10.Resource srcResourceRef, int srcSubresource, SharpDX.DXGI.Format format) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((dstResourceRef == null)?IntPtr.Zero:dstResourceRef.NativePointer), dstSubresource, (void*)((srcResourceRef == null)?IntPtr.Zero:srcResourceRef.NativePointer), srcSubresource, unchecked((int)format),((void**)(*(void**)_nativePointer))[38]); + } + } + + /// + ///

Get the rendering predicate state.

+ ///
+ ///

Address of a reference to a predicate (see ). Value stored here will be null upon device creation.

+ ///

Address of a boolean to fill with the predicate comparison value. upon device creation.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173573 + /// void ID3D10Device::GetPredication([Out, Optional] ID3D10Predicate** ppPredicate,[Out, Optional] BOOL* pPredicateValue) + /// ID3D10Device::GetPredication + internal void GetPredication(out SharpDX.Direct3D10.Predicate predicateOut, out SharpDX.Mathematics.Interop.RawBool predicateValueRef) { + unsafe { + IntPtr predicateOut_ = IntPtr.Zero; + predicateValueRef = new SharpDX.Mathematics.Interop.RawBool(); + fixed (void* predicateValueRef_ = &predicateValueRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &predicateOut_, predicateValueRef_,((void**)(*(void**)_nativePointer))[53]); + predicateOut= (predicateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Predicate(predicateOut_); + } + } + + /// + ///

Get the reason why the device was removed.

+ ///
+ ///

Possible return values include:

For more detail on these return codes, see DXGI_ERROR.

+ /// + /// bb173571 + /// HRESULT ID3D10Device::GetDeviceRemovedReason() + /// ID3D10Device::GetDeviceRemovedReason + internal SharpDX.Result GetDeviceRemovedReason() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[63]); + return __result__; + } + } + + /// + ///

Get the exception-mode flags.

+ ///
+ ///

A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in D3D10_RAISE_FLAG. A default value of 0 means there are no flags.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Set an exception-mode flag to elevate an error condition to a non-continuable exception.

Whenever an error occurs, a Direct3D device enters the DEVICEREMOVED state and if the appropriate exception flag has been set, an exception is raised. A raised exception is designed to terminate an application. Before termination, the last chance an application has to persist data is by using an UnhandledExceptionFilter (see Structured Exception Handling). In general, UnhandledExceptionFilters are leveraged to try to persist data when an application is crashing (to disk, for example). Any code that executes during an UnhandledExceptionFilter is not guaranteed to reliably execute (due to possible process corruption). Any data that the UnhandledExceptionFilter manages to persist, before the UnhandledExceptionFilter crashes again, should be treated as suspect, and therefore inspected by a new, non-corrupted process to see if it is usable.

+ ///
+ /// + /// bb173614 + /// HRESULT ID3D10Device::SetExceptionMode([In] unsigned int RaiseFlags) + /// ID3D10Device::SetExceptionMode + internal void SetExceptionMode(int raiseFlags) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, raiseFlags,((void**)(*(void**)_nativePointer))[64]); + __result__.CheckError(); + } + } + + /// + ///

Get the exception-mode flags.

+ ///
+ ///

A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in D3D10_RAISE_FLAG. A default value of 0 means there are no flags.

+ /// + ///

An exception-mode flag is used to elevate an error condition to a non-continuable exception.

+ ///
+ /// + /// bb173572 + /// unsigned int ID3D10Device::GetExceptionMode() + /// ID3D10Device::GetExceptionMode + internal int GetExceptionMode() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[65]); + return __result__; + } + } + + /// + ///

Get data from a device that is associated with a guid.

+ ///
+ ///

Guid associated with the data.

+ ///

Size of the data.

+ ///

Pointer to the data stored with the device. If pData is null, DataSize must also be 0, and any data previously associated with the guid will be destroyed.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

The data stored in the device is set with .

The data retrieved and the guid will typically be application-defined.

+ ///
+ /// + /// bb173574 + /// HRESULT ID3D10Device::GetPrivateData([In] const GUID& guid,[InOut] unsigned int* pDataSize,[Out, Buffer, Optional] void* pData) + /// ID3D10Device::GetPrivateData + public SharpDX.Result GetPrivateData(System.Guid guid, ref int dataSizeRef, System.IntPtr dataRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataSizeRef_ = &dataSizeRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &guid, dataSizeRef_, (void*)dataRef,((void**)(*(void**)_nativePointer))[66]); + return __result__; + } + } + + /// + ///

Set data to a device and associate that data with a guid.

+ ///
+ ///

Guid associated with the data.

+ ///

Size of the data.

+ ///

Pointer to the data to be stored with this device. If pData is null, DataSize must also be 0, and any data previously associated with the guid will be destroyed.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

The data stored in the device with this method can be retrieved with .

The data and guid set with this method will typically be application-defined.

+ ///
+ /// + /// bb173616 + /// HRESULT ID3D10Device::SetPrivateData([In] const GUID& guid,[In] unsigned int DataSize,[In, Buffer, Optional] const void* pData) + /// ID3D10Device::SetPrivateData + public void SetPrivateData(System.Guid guid, int dataSize, System.IntPtr dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &guid, dataSize, (void*)dataRef,((void**)(*(void**)_nativePointer))[67]); + __result__.CheckError(); + } + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// + /// HRESULT ID3D10Device::SetPrivateDataInterface([In] const GUID& guid,[In, Optional] const IUnknown* pData) + /// ID3D10Device::SetPrivateDataInterface + public void SetPrivateDataInterface(System.Guid guid, SharpDX.ComObject dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &guid, (void*)((dataRef == null)?IntPtr.Zero:dataRef.NativePointer),((void**)(*(void**)_nativePointer))[68]); + __result__.CheckError(); + } + } + + /// + ///

Restore all default device settings; return the device to the state it was in when it was created. This will set all set all input/output resource slots, shaders, input layouts, predications, scissor rectangles, depth-stencil state, rasterizer state, blend state, sampler state, and viewports to null. The primitive topology will be set to UNDEFINED.

+ ///
+ /// + /// bb173540 + /// void ID3D10Device::ClearState() + /// ID3D10Device::ClearState + public void ClearState() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[69]); + } + } + + /// + ///

Send queued-up commands in the command buffer to the GPU.

+ ///
+ /// + ///

Most applications will not need to call this method. Calling this method when not necessary will incur a performance penalty. Each call to Flush incurs a significant amount of overhead.

When Direct3D state-setting, present, or draw commands are called by an application, those commands are queued into an internal command buffer. Flush sends those commands to the GPU for processing. Normally, these commands are sent to the GPU automatically whenever Direct3D determines that they need to be, such as when the command buffer is full or when mapping a resource. Flush will send the commands manually.

Flush should be used when the CPU waits for an arbitrary amount of time (such as when calling Sleep, ID3DX10ThreadPump::WaitForAllItems, or WaitForVBlank.

For more information about how flushing works, see Accurately Profiling Direct3D API Calls (Direct3D 9).

+ ///
+ /// + /// bb173568 + /// void ID3D10Device::Flush() + /// ID3D10Device::Flush + public void Flush() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[70]); + } + } + + /// + ///

Create a buffer (vertex buffer, index buffer, or shader-constant buffer).

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

For example code, see:

  • Create a Vertex Buffer
  • Create an Index Buffer
+ ///
+ /// + /// bb173544 + /// HRESULT ID3D10Device::CreateBuffer([In] const D3D10_BUFFER_DESC* pDesc,[In, Optional] const D3D10_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D10Buffer** ppBuffer) + /// ID3D10Device::CreateBuffer + internal void CreateBuffer(ref SharpDX.Direct3D10.BufferDescription descRef, SharpDX.DataBox? initialDataRef, SharpDX.Direct3D10.Buffer bufferOut) { + unsafe { + SharpDX.DataBox initialDataRef_; + if (initialDataRef.HasValue) + initialDataRef_ = initialDataRef.Value; + IntPtr bufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_, (initialDataRef.HasValue)?&initialDataRef_:(void*)IntPtr.Zero, &bufferOut_,((void**)(*(void**)_nativePointer))[71]); + ((SharpDX.Direct3D10.Buffer)bufferOut).NativePointer = bufferOut_; + __result__.CheckError(); + } + } + + /// + ///

Create an array of 1D textures (see Texture1D).

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

If the method succeeds, the return code is . See Direct3D 10 Return Codes for failing error codes.

+ /// + ///

CreateTexture1D creates a 1D texture resource, which contains an array of 1D textures. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.

All resources are made up of one or more subresources. To load data into the texture, applications may supply the data initially as part of structure pointed to by pInitialData, or it may use one of the Texturing Functions supplied by the SDK.

+ ///
+ /// + /// bb173559 + /// HRESULT ID3D10Device::CreateTexture1D([In] const D3D10_TEXTURE1D_DESC* pDesc,[In, Buffer, Optional] const D3D10_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D10Texture1D** ppTexture1D) + /// ID3D10Device::CreateTexture1D + internal void CreateTexture1D(ref SharpDX.Direct3D10.Texture1DDescription descRef, SharpDX.DataBox[] initialDataRef, SharpDX.Direct3D10.Texture1D texture1DOut) { + unsafe { + SharpDX.DataBox[] initialDataRef__ = initialDataRef; + IntPtr texture1DOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + fixed (void* initialDataRef_ = initialDataRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_, initialDataRef_, &texture1DOut_,((void**)(*(void**)_nativePointer))[72]); + ((SharpDX.Direct3D10.Texture1D)texture1DOut).NativePointer = texture1DOut_; + __result__.CheckError(); + } + } + + /// + ///

Create an array of 2D textures (see Texture2D).

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

If the method succeeds, the return code is . See Direct3D 10 Return Codes for failing error codes.

+ /// + ///

CreateTexture2D creates a 2D texture resource, which contains an array of 1D textures. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.

All resources are made up of one or more subresources. To load data into the texture, applications may supply the data initially as part of structure pointed to by pInitialData, or it may use one of the Texturing Functions supplied by the SDK.

+ ///
+ /// + /// bb173560 + /// HRESULT ID3D10Device::CreateTexture2D([In] const D3D10_TEXTURE2D_DESC* pDesc,[In, Buffer, Optional] const D3D10_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D10Texture2D** ppTexture2D) + /// ID3D10Device::CreateTexture2D + internal void CreateTexture2D(ref SharpDX.Direct3D10.Texture2DDescription descRef, SharpDX.DataBox[] initialDataRef, SharpDX.Direct3D10.Texture2D texture2DOut) { + unsafe { + SharpDX.DataBox[] initialDataRef__ = initialDataRef; + IntPtr texture2DOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + fixed (void* initialDataRef_ = initialDataRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_, initialDataRef_, &texture2DOut_,((void**)(*(void**)_nativePointer))[73]); + ((SharpDX.Direct3D10.Texture2D)texture2DOut).NativePointer = texture2DOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a single 3D texture (see Texture3D).

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

If the method succeeds, the return code is . See Direct3D 10 Return Codes for failing error codes.

+ /// + ///

CreateTexture3D creates a 3D texture resource, which contains an array of 1D textures. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.

All resources are made up of one or more subresources. To load data into the texture, applications may supply the data initially as part of structure pointed to by pInitialData, or it may use one of the Texturing Functions supplied by the SDK.

+ ///
+ /// + /// bb173561 + /// HRESULT ID3D10Device::CreateTexture3D([In] const D3D10_TEXTURE3D_DESC* pDesc,[In, Buffer, Optional] const D3D10_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D10Texture3D** ppTexture3D) + /// ID3D10Device::CreateTexture3D + internal void CreateTexture3D(ref SharpDX.Direct3D10.Texture3DDescription descRef, SharpDX.DataBox[] initialDataRef, SharpDX.Direct3D10.Texture3D texture3DOut) { + unsafe { + SharpDX.DataBox[] initialDataRef__ = initialDataRef; + IntPtr texture3DOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + fixed (void* initialDataRef_ = initialDataRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_, initialDataRef_, &texture3DOut_,((void**)(*(void**)_nativePointer))[74]); + ((SharpDX.Direct3D10.Texture3D)texture3DOut).NativePointer = texture3DOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a shader-resource view for accessing data in a resource.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A resource is made up of one or more subresources, a view identifies which subresources to allow the pipeline to access. In addition, each resource is bound to the pipeline using a view. A shader-resource view is designed to bind any buffer or texture resource to the shader stages using the following API methods: VSSetShaderResources, GSSetShaderResources and PSSetShaderResources.

Since a view is fully typed, this means that typeless resources become fully typed when bound to the pipeline.

+ ///
+ /// + /// bb173558 + /// HRESULT ID3D10Device::CreateShaderResourceView([In] ID3D10Resource* pResource,[In, Optional] const D3D10_SHADER_RESOURCE_VIEW_DESC* pDesc,[Out, Fast] ID3D10ShaderResourceView** ppSRView) + /// ID3D10Device::CreateShaderResourceView + internal void CreateShaderResourceView(SharpDX.Direct3D10.Resource resourceRef, SharpDX.Direct3D10.ShaderResourceViewDescription? descRef, SharpDX.Direct3D10.ShaderResourceView sRViewOut) { + unsafe { + SharpDX.Direct3D10.ShaderResourceViewDescription descRef_; + if (descRef.HasValue) + descRef_ = descRef.Value; + IntPtr sRViewOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer), (descRef.HasValue)?&descRef_:(void*)IntPtr.Zero, &sRViewOut_,((void**)(*(void**)_nativePointer))[75]); + ((SharpDX.Direct3D10.ShaderResourceView)sRViewOut).NativePointer = sRViewOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a render-target view for accessing resource data.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A rendertarget view can be bound to the output merger stage by calling .

+ ///
+ /// + /// bb173556 + /// HRESULT ID3D10Device::CreateRenderTargetView([In] ID3D10Resource* pResource,[In, Optional] const D3D10_RENDER_TARGET_VIEW_DESC* pDesc,[Out, Fast] ID3D10RenderTargetView** ppRTView) + /// ID3D10Device::CreateRenderTargetView + internal void CreateRenderTargetView(SharpDX.Direct3D10.Resource resourceRef, SharpDX.Direct3D10.RenderTargetViewDescription? descRef, SharpDX.Direct3D10.RenderTargetView rTViewOut) { + unsafe { + SharpDX.Direct3D10.RenderTargetViewDescription descRef_; + if (descRef.HasValue) + descRef_ = descRef.Value; + IntPtr rTViewOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer), (descRef.HasValue)?&descRef_:(void*)IntPtr.Zero, &rTViewOut_,((void**)(*(void**)_nativePointer))[76]); + ((SharpDX.Direct3D10.RenderTargetView)rTViewOut).NativePointer = rTViewOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a depth-stencil view for accessing resource data.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A depth-stencil view can be bound to the output-merger stage by calling .

For more background information, see the programming guide page about depth stencils.

+ ///
+ /// + /// bb173547 + /// HRESULT ID3D10Device::CreateDepthStencilView([In] ID3D10Resource* pResource,[In, Optional] const D3D10_DEPTH_STENCIL_VIEW_DESC* pDesc,[Out, Fast] ID3D10DepthStencilView** ppDepthStencilView) + /// ID3D10Device::CreateDepthStencilView + internal void CreateDepthStencilView(SharpDX.Direct3D10.Resource resourceRef, SharpDX.Direct3D10.DepthStencilViewDescription? descRef, SharpDX.Direct3D10.DepthStencilView depthStencilViewOut) { + unsafe { + SharpDX.Direct3D10.DepthStencilViewDescription descRef_; + if (descRef.HasValue) + descRef_ = descRef.Value; + IntPtr depthStencilViewOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer), (descRef.HasValue)?&descRef_:(void*)IntPtr.Zero, &depthStencilViewOut_,((void**)(*(void**)_nativePointer))[77]); + ((SharpDX.Direct3D10.DepthStencilView)depthStencilViewOut).NativePointer = depthStencilViewOut_; + __result__.CheckError(); + } + } + + /// + ///

Create an input-layout object to describe the input-buffer data for the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + ///

If the method succeeds, the return code is . See Direct3D 10 Return Codes for failing error codes.

+ /// + ///

After creating an input layout object, it must be bound to the input-assembler stage before calling a draw API. See Getting Started with the Input-Assembler Stage (Direct3D 10) for example code.

Once an input-layout object is created from a shader signature, the input-layout object can be reused with any other shader that has an identical input signature (semantics included). This can simplify the creation of input-layout objects when you are working with many shaders with identical inputs.

If a data type in the input-layout declaration does not match the data type in a shader-input signature, CreateInputLayout will generate a warning during compilation. The warning is simply to call attention to the fact that the data may be reinterpreted when read from a register. You may either disregard this warning (if reinterpretation is intentional) or make the data types match in both declarations to eliminate the warning. The Data Conversion Rules overview describes the rules applied for data type conversion.

Differences between Direct3D 9 and Direct3D 10:

Mapping the vertex data to the shader inputs with an input layout is a new way of doing things in Direct3D 10 that improves performance.

In Direct3D 10 the vertex data is mapped to the shader inputs when the input layout object is created, whereas in Direct3D 9 this mapping was done at Draw time based on the currently bound vertex declarations, vertex buffers, and vertex shaders. Doing this mapping when the input layout object is created reduces or eliminates extra linkage work for drivers at Draw time because this re-mapping is no longer necessary.

?

+ ///
+ /// + /// bb173550 + /// HRESULT ID3D10Device::CreateInputLayout([In, Buffer] const D3D10_INPUT_ELEMENT_DESC* pInputElementDescs,[In] unsigned int NumElements,[In, Buffer] const void* pShaderBytecodeWithInputSignature,[In] SIZE_T BytecodeLength,[Out, Fast] ID3D10InputLayout** ppInputLayout) + /// ID3D10Device::CreateInputLayout + internal void CreateInputLayout(SharpDX.Direct3D10.InputElement[] inputElementDescsRef, int numElements, System.IntPtr shaderBytecodeWithInputSignatureRef, SharpDX.PointerSize bytecodeLength, SharpDX.Direct3D10.InputLayout inputLayoutOut) { + unsafe { + SharpDX.Direct3D10.InputElement.__Native[] inputElementDescsRef__ = new SharpDX.Direct3D10.InputElement.__Native[inputElementDescsRef.Length]; + for (int i = 0; i < inputElementDescsRef.Length; i++) + inputElementDescsRef[i].__MarshalTo(ref inputElementDescsRef__[i]); + IntPtr inputLayoutOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* inputElementDescsRef_ = inputElementDescsRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, inputElementDescsRef_, numElements, (void*)shaderBytecodeWithInputSignatureRef, (void*)bytecodeLength, &inputLayoutOut_,((void**)(*(void**)_nativePointer))[78]); + for (int i = 0; i < inputElementDescsRef.Length; i++) + inputElementDescsRef[i].__MarshalFree(ref inputElementDescsRef__[i]); + ((SharpDX.Direct3D10.InputLayout)inputLayoutOut).NativePointer = inputLayoutOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a vertex-shader object from a compiled shader.

+ ///
+ ///

A reference to the compiled shader. To get this reference see Getting a Pointer to a Compiled Shader.

+ ///

Size of the compiled vertex shader.

+ ///

Address of a reference to an Interface. If this is null, all other parameters will be validated, and if all parameters pass validation this API will return S_FALSE instead of .

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173562 + /// HRESULT ID3D10Device::CreateVertexShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[Out, Fast] ID3D10VertexShader** ppVertexShader) + /// ID3D10Device::CreateVertexShader + internal void CreateVertexShader(System.IntPtr shaderBytecodeRef, SharpDX.PointerSize bytecodeLength, SharpDX.Direct3D10.VertexShader vertexShaderOut) { + unsafe { + IntPtr vertexShaderOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)shaderBytecodeRef, (void*)bytecodeLength, &vertexShaderOut_,((void**)(*(void**)_nativePointer))[79]); + ((SharpDX.Direct3D10.VertexShader)vertexShaderOut).NativePointer = vertexShaderOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a geometry shader.

+ ///
+ ///

A reference to the compiled shader. To get this reference see Getting a Pointer to a Compiled Shader.

+ ///

Size of the compiled geometry shader.

+ ///

Address of a reference to an Interface. If this is null, all other parameters will be validated, and if all parameters pass validation this API will return S_FALSE instead of .

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Once created, the shader can be set to the device by calling .

+ ///
+ /// + /// bb173548 + /// HRESULT ID3D10Device::CreateGeometryShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[Out, Fast] ID3D10GeometryShader** ppGeometryShader) + /// ID3D10Device::CreateGeometryShader + internal void CreateGeometryShader(System.IntPtr shaderBytecodeRef, SharpDX.PointerSize bytecodeLength, SharpDX.Direct3D10.GeometryShader geometryShaderOut) { + unsafe { + IntPtr geometryShaderOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)shaderBytecodeRef, (void*)bytecodeLength, &geometryShaderOut_,((void**)(*(void**)_nativePointer))[80]); + ((SharpDX.Direct3D10.GeometryShader)geometryShaderOut).NativePointer = geometryShaderOut_; + __result__.CheckError(); + } + } + + /// + ///

Creates a geometry shader that can write to streaming output buffers.

+ ///
+ ///

A reference to the compiled geometry shader for a standard geometry shader plus stream output. For info on how to get this reference, see Getting a Pointer to a Compiled Shader.

To create the stream output without using a geometry shader, pass a reference to the output signature for the prior stage. To obtain this output signature, call the compiler function. You can also pass a reference to the compiled vertex shader that is used in the prior stage. This compiled shader provides the output signature for the data.

+ ///

Size of the compiled geometry shader.

+ ///

Pointer to a array. Cannot be null if NumEntries> 0.

+ ///

The number of entries in the array pointed to by pSODeclaration. Minimum 0, maximum 64.

+ ///

The size, in bytes, of each element in the array pointed to by pSODeclaration. This parameter is only used when the output slot is 0 for all entries in pSODeclaration.

+ ///

Address of a reference to an Interface. If this is null, all other parameters will be validated, and if all parameters pass validation this API will return S_FALSE instead of .

+ ///

This method returns one of the Direct3D 10 Return Codes.

+ /// + ///

For more info about using CreateGeometryShaderWithStreamOutput, see Create a Geometry-Shader Object with Stream Output.

+ ///
+ /// + /// bb173549 + /// HRESULT ID3D10Device::CreateGeometryShaderWithStreamOutput([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Buffer, Optional] const D3D10_SO_DECLARATION_ENTRY* pSODeclaration,[In] unsigned int NumEntries,[In] unsigned int OutputStreamStride,[Out, Fast] ID3D10GeometryShader** ppGeometryShader) + /// ID3D10Device::CreateGeometryShaderWithStreamOutput + internal void CreateGeometryShaderWithStreamOutput(System.IntPtr shaderBytecodeRef, SharpDX.PointerSize bytecodeLength, SharpDX.Direct3D10.StreamOutputElement[] sODeclarationRef, int numEntries, int outputStreamStride, SharpDX.Direct3D10.GeometryShader geometryShaderOut) { + unsafe { + SharpDX.Direct3D10.StreamOutputElement.__Native[] sODeclarationRef__ = (sODeclarationRef == null)? null : new SharpDX.Direct3D10.StreamOutputElement.__Native[sODeclarationRef.Length]; + if (sODeclarationRef != null) + for (int i = 0; i < sODeclarationRef.Length; i++) + sODeclarationRef[i].__MarshalTo(ref sODeclarationRef__[i]); + IntPtr geometryShaderOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* sODeclarationRef_ = sODeclarationRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)shaderBytecodeRef, (void*)bytecodeLength, sODeclarationRef_, numEntries, outputStreamStride, &geometryShaderOut_,((void**)(*(void**)_nativePointer))[81]); + if (sODeclarationRef != null ) + for (int i = 0; i < sODeclarationRef.Length; i++) + sODeclarationRef[i].__MarshalFree(ref sODeclarationRef__[i]); + ((SharpDX.Direct3D10.GeometryShader)geometryShaderOut).NativePointer = geometryShaderOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a pixel shader.

+ ///
+ ///

A reference to the compiled shader. To get this reference see Getting a Pointer to a Compiled Shader.

+ ///

Size of the compiled pixel shader.

+ ///

Address of a reference to an Interface. If this is null, all other parameters will be validated, and if all parameters pass validation this API will return S_FALSE instead of .

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

After creating the pixel shader, you can set it to the device using .

+ ///
+ /// + /// bb173551 + /// HRESULT ID3D10Device::CreatePixelShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[Out, Fast] ID3D10PixelShader** ppPixelShader) + /// ID3D10Device::CreatePixelShader + internal void CreatePixelShader(System.IntPtr shaderBytecodeRef, SharpDX.PointerSize bytecodeLength, SharpDX.Direct3D10.PixelShader pixelShaderOut) { + unsafe { + IntPtr pixelShaderOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)shaderBytecodeRef, (void*)bytecodeLength, &pixelShaderOut_,((void**)(*(void**)_nativePointer))[82]); + ((SharpDX.Direct3D10.PixelShader)pixelShaderOut).NativePointer = pixelShaderOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a blend-state object that encapsules blend state for the output-merger stage.

+ ///
+ ///

Pointer to a blend-state description (see ).

+ ///

Address of a reference to the blend-state object created (see Interface).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An application can create up to 4096 unique blend-state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.

+ ///
+ /// + /// bb173543 + /// HRESULT ID3D10Device::CreateBlendState([In] const D3D10_BLEND_DESC* pBlendStateDesc,[Out, Fast] ID3D10BlendState** ppBlendState) + /// ID3D10Device::CreateBlendState + internal void CreateBlendState(ref SharpDX.Direct3D10.BlendStateDescription blendStateDescRef, SharpDX.Direct3D10.BlendState blendStateOut) { + unsafe { + var blendStateDescRef_ = new SharpDX.Direct3D10.BlendStateDescription.__Native(); + blendStateDescRef.__MarshalTo(ref blendStateDescRef_); + IntPtr blendStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &blendStateDescRef_, &blendStateOut_,((void**)(*(void**)_nativePointer))[83]); + blendStateDescRef.__MarshalFree(ref blendStateDescRef_); + ((SharpDX.Direct3D10.BlendState)blendStateOut).NativePointer = blendStateOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

4096 unique depth-stencil state objects can be created on a device at a time.

If an application attempts to create a depth-stencil state with the same description as an already existing depth-stencil state, then the same interface with an incremented reference count will be returned and the total number of unique depth-stencil state objects will stay the same.

+ ///
+ /// + /// bb173546 + /// HRESULT ID3D10Device::CreateDepthStencilState([In] const D3D10_DEPTH_STENCIL_DESC* pDepthStencilDesc,[Out, Fast] ID3D10DepthStencilState** ppDepthStencilState) + /// ID3D10Device::CreateDepthStencilState + internal void CreateDepthStencilState(ref SharpDX.Direct3D10.DepthStencilStateDescription depthStencilDescRef, SharpDX.Direct3D10.DepthStencilState depthStencilStateOut) { + unsafe { + IntPtr depthStencilStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* depthStencilDescRef_ = &depthStencilDescRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, depthStencilDescRef_, &depthStencilStateOut_,((void**)(*(void**)_nativePointer))[84]); + ((SharpDX.Direct3D10.DepthStencilState)depthStencilStateOut).NativePointer = depthStencilStateOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a rasterizer state object that tells the rasterizer stage how to behave.

+ ///
+ /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

4096 unique rasterizer state objects can be created on a device at a time.

If an application attempts to create a rasterizer state with the same description as an already existing rasterizer state, then the same interface with an incremented reference count will be returned and the total number of unique rasterizer state objects will stay the same.

+ ///
+ /// + /// bb173554 + /// HRESULT ID3D10Device::CreateRasterizerState([In] const D3D10_RASTERIZER_DESC* pRasterizerDesc,[Out, Fast] ID3D10RasterizerState** ppRasterizerState) + /// ID3D10Device::CreateRasterizerState + internal void CreateRasterizerState(ref SharpDX.Direct3D10.RasterizerStateDescription rasterizerDescRef, SharpDX.Direct3D10.RasterizerState rasterizerStateOut) { + unsafe { + IntPtr rasterizerStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* rasterizerDescRef_ = &rasterizerDescRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, rasterizerDescRef_, &rasterizerStateOut_,((void**)(*(void**)_nativePointer))[85]); + ((SharpDX.Direct3D10.RasterizerState)rasterizerStateOut).NativePointer = rasterizerStateOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a sampler-state object that encapsulates sampling information for a texture.

+ ///
+ /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

4096 unique sampler state objects can be created on a device at a time.

If an application attempts to create a sampler state with the same description as an already existing sampler state, then the same interface with an incremented reference count will be returned and the total number of unique sampler state objects will stay the same.

+ ///
+ /// + /// bb173557 + /// HRESULT ID3D10Device::CreateSamplerState([In] const D3D10_SAMPLER_DESC* pSamplerDesc,[Out, Fast] ID3D10SamplerState** ppSamplerState) + /// ID3D10Device::CreateSamplerState + internal void CreateSamplerState(ref SharpDX.Direct3D10.SamplerStateDescription samplerDescRef, SharpDX.Direct3D10.SamplerState samplerStateOut) { + unsafe { + IntPtr samplerStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* samplerDescRef_ = &samplerDescRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, samplerDescRef_, &samplerStateOut_,((void**)(*(void**)_nativePointer))[86]); + ((SharpDX.Direct3D10.SamplerState)samplerStateOut).NativePointer = samplerStateOut_; + __result__.CheckError(); + } + } + + /// + ///

This interface encapsulates methods for querying information from the GPU.

+ ///
+ ///

Pointer to a query description (see ).

+ ///

Address of a reference to the query object created (see ).

+ ///

This method returns E_OUTOFMEMORY if there is insufficient memory to create the query object. See Direct3D 11 Return Codes for other possible return values.

+ /// + ///

Windows?Phone?8: This API is supported.

+ ///
+ /// + /// ff476515 + /// HRESULT ID3D10Device::CreateQuery([In] const D3D10_QUERY_DESC* pQueryDesc,[Out, Fast] ID3D10Query** ppQuery) + /// ID3D10Device::CreateQuery + internal void CreateQuery(SharpDX.Direct3D10.QueryDescription queryDescRef, SharpDX.Direct3D10.Query queryOut) { + unsafe { + IntPtr queryOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &queryDescRef, &queryOut_,((void**)(*(void**)_nativePointer))[87]); + ((SharpDX.Direct3D10.Query)queryOut).NativePointer = queryOut_; + __result__.CheckError(); + } + } + + /// + ///

Creates a predicate.

+ ///
+ ///

Pointer to a query description where the type of query must be a or (see ).

+ ///

Address of a reference to a predicate (see Interface).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173552 + /// HRESULT ID3D10Device::CreatePredicate([In] const D3D10_QUERY_DESC* pPredicateDesc,[Out, Fast] ID3D10Predicate** ppPredicate) + /// ID3D10Device::CreatePredicate + internal void CreatePredicate(SharpDX.Direct3D10.QueryDescription predicateDescRef, SharpDX.Direct3D10.Predicate predicateOut) { + unsafe { + IntPtr predicateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &predicateDescRef, &predicateOut_,((void**)(*(void**)_nativePointer))[88]); + ((SharpDX.Direct3D10.Predicate)predicateOut).NativePointer = predicateOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a counter object for measuring GPU performance.

+ ///
+ ///

Pointer to a counter description (see ).

+ ///

Address of a reference to a counter (see Interface).

+ ///

If this function succeeds, it will return . If it fails, possible return values are: S_FALSE, E_OUTOFMEMORY, , , or E_INVALIDARG.

is returned whenever the application requests to create a well-known counter, but the current device does not support it.

indicates that another device object is currently using the counters, so they cannot be used by this device at the moment.

E_INVALIDARG is returned whenever an out-of-range well-known or device-dependent counter is requested, or when the simulataneously active counters have been exhausted.

+ /// + /// bb173545 + /// HRESULT ID3D10Device::CreateCounter([In] const D3D10_COUNTER_DESC* pCounterDesc,[Out, Fast] ID3D10Counter** ppCounter) + /// ID3D10Device::CreateCounter + internal void CreateCounter(SharpDX.Direct3D10.CounterDescription counterDescRef, SharpDX.Direct3D10.Counter counterOut) { + unsafe { + IntPtr counterOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &counterDescRef, &counterOut_,((void**)(*(void**)_nativePointer))[89]); + ((SharpDX.Direct3D10.Counter)counterOut).NativePointer = counterOut_; + __result__.CheckError(); + } + } + + /// + ///

Get the support of a given format on the installed video device.

+ ///
+ ///

A enumeration that describes a format for which to check for support.

+ ///

A bitfield of enumeration values describing how the specified format is supported on the installed device. The values are ORed together.

+ /// + ///

Most format support is based on the Direct3D feature level. Only a few specific use cases require checking for support. See Hardware Support for Direct3D 10 Formats and Hardware Support for Direct3D 10.1 Formats for additional information.

+ ///
+ /// + /// bb173536 + /// HRESULT ID3D10Device::CheckFormatSupport([In] DXGI_FORMAT Format,[Out] D3D10_FORMAT_SUPPORT* pFormatSupport) + /// ID3D10Device::CheckFormatSupport + public SharpDX.Direct3D10.FormatSupport CheckFormatSupport(SharpDX.DXGI.Format format) { + unsafe { + SharpDX.Direct3D10.FormatSupport formatSupportRef; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)format), &formatSupportRef,((void**)(*(void**)_nativePointer))[90]); + return formatSupportRef; + } + } + + /// + ///

Get the number of quality levels available during multisampling.

+ ///
+ ///

The texture format. See .

+ ///

The number of samples during multisampling.

+ ///

Number of quality levels supported by the adapter. See remarks.

+ /// + ///

When multisampling a texture, the number of quality levels available for an adapter is dependent on the texture format used and the number of samples requested. The maximum sample count defined by D3D10_MAX_MULTISAMPLE_SAMPLE_COUNT in d3d10.h is 32. If the returned value of pNumQualityLevels is 0, the format and sample count combination is not supported for the installed adapter.

Furthermore, the definition of a quality level is up to each hardware vendor to define, however no facility is provided by Direct3D to help discover this information.

Direct3D 10.1 devices are required to support 4x MSAA for all formats except R32G32B32A32 and R32G32B32 formats.

+ ///
+ /// + /// bb173537 + /// HRESULT ID3D10Device::CheckMultisampleQualityLevels([In] DXGI_FORMAT Format,[In] unsigned int SampleCount,[Out] unsigned int* pNumQualityLevels) + /// ID3D10Device::CheckMultisampleQualityLevels + public int CheckMultisampleQualityLevels(SharpDX.DXGI.Format format, int sampleCount) { + unsafe { + int numQualityLevelsRef; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)format), sampleCount, &numQualityLevelsRef,((void**)(*(void**)_nativePointer))[91]); + return numQualityLevelsRef; + } + } + + /// + ///

Get a counter's information.

+ ///
+ /// + /// bb173535 + /// void ID3D10Device::CheckCounterInfo([Out] D3D10_COUNTER_INFO* pCounterInfo) + /// ID3D10Device::CheckCounterInfo + public SharpDX.Direct3D10.CounterCapabilities GetCounterCapabilities() { + unsafe { + SharpDX.Direct3D10.CounterCapabilities counterInfoRef; + counterInfoRef = new SharpDX.Direct3D10.CounterCapabilities(); + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &counterInfoRef,((void**)(*(void**)_nativePointer))[92]); + return counterInfoRef; + } + } + + /// + ///

Get the type, name, units of measure, and a description of an existing counter.

+ ///
+ ///

Pointer to a counter description (see ). Specifies which counter information is to be retrieved about.

+ ///

Pointer to the data type of a counter (see ). Specifies the data type of the counter being retrieved.

+ ///

Pointer to the number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters.

+ ///

String to be filled with a brief name for the counter. May be null if the application is not interested in the name of the counter.

+ ///

Length of the string returned to szName. Can be null.

+ ///

Name of the units a counter measures, provided the memory the reference points to has enough room to hold the string. Can be null. The returned string will always be in English.

+ ///

Length of the string returned to szUnits. Can be null.

+ ///

A description of the counter, provided the memory the reference points to has enough room to hold the string. Can be null. The returned string will always be in English.

+ ///

Length of the string returned to szDescription. Can be null.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Length parameters can be null, which indicates the application is not interested in the length nor the corresponding string value. When a length parameter is non-null and the corresponding string is null, the input value of the length parameter is ignored, and the length of the corresponding string (including terminating null) will be returned through the length parameter. When length and the corresponding parameter are both non-null, the input value of length is checked to ensure there is enough room, and then the length of the string (including terminating null character) is passed out through the length parameter.

+ ///
+ /// + /// bb173534 + /// HRESULT ID3D10Device::CheckCounter([In] const D3D10_COUNTER_DESC* pDesc,[Out] D3D10_COUNTER_TYPE* pType,[Out] unsigned int* pActiveCounters,[Out, Buffer, Optional] char* szName,[InOut, Optional] unsigned int* pNameLength,[Out, Buffer, Optional] char* szUnits,[InOut, Optional] unsigned int* pUnitsLength,[Out, Buffer, Optional] char* szDescription,[InOut, Optional] unsigned int* pDescriptionLength) + /// ID3D10Device::CheckCounter + internal void CheckCounter(SharpDX.Direct3D10.CounterDescription descRef, out SharpDX.Direct3D10.CounterType typeRef, out int activeCountersRef, System.IntPtr szName, System.IntPtr nameLengthRef, System.IntPtr szUnits, System.IntPtr unitsLengthRef, System.IntPtr szDescription, System.IntPtr descriptionLengthRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* typeRef_ = &typeRef) + fixed (void* activeCountersRef_ = &activeCountersRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &descRef, typeRef_, activeCountersRef_, (void*)szName, (void*)nameLengthRef, (void*)szUnits, (void*)unitsLengthRef, (void*)szDescription, (void*)descriptionLengthRef,((void**)(*(void**)_nativePointer))[93]); + __result__.CheckError(); + } + } + + /// + ///

Get the flags used during the call to create the device with .

+ ///
+ ///

A bitfield containing the flags used to create the device. See .

+ /// + /// bb173570 + /// unsigned int ID3D10Device::GetCreationFlags() + /// ID3D10Device::GetCreationFlags + internal SharpDX.Direct3D10.DeviceCreationFlags GetCreationFlags() { + unsafe { + SharpDX.Direct3D10.DeviceCreationFlags __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXDirect3D10DeviceCreationFlags(_nativePointer,((void**)(*(void**)_nativePointer))[94]); + return __result__; + } + } + + /// + ///

Give a device access to a shared resource created on a different Direct3d device.

+ ///
+ ///

A resource handle. See remarks.

+ ///

The globally unique identifier () for the resource interface. See remarks.

+ ///

Address of a reference to the resource we are gaining access to.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

To share a resource between two Direct3D 10 devices the resource must have been created with the flag, if it was created using the interface. If it was created using the interface, then the resource is always shared.

The REFIID, or , of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof() will get the of the interface to a buffer resource.

When sharing a resource between two Direct3D 10 devices the unique handle of the resource can be obtained by querying the resource for the interface and then calling GetSharedHandle.

 * pOtherResource(null);	
+        /// hr = pOtherDeviceResource->QueryInterface( __uuidof(), (void**)&pOtherResource );	
+        /// HANDLE sharedHandle;	
+        /// pOtherResource->GetSharedHandle(&sharedHandle); 

The only resources that can be shared are 2D non-mipmapped textures.

To share a resource between a Direct3D 9 device and a Direct3D 10 device the texture must have been created using the pSharedHandle argument of CreateTexture. The shared Direct3D 9 handle is then passed to OpenSharedResource in the hResource argument.

The following code illustrates the method calls involved.

 sharedHandle = null; // must be set to null to create, can use a valid handle here to open in D3D9 	
+        /// pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle); 	
+        /// ... 	
+        /// pDevice10->OpenSharedResource(sharedHandle, __uuidof(), (void**)(&tempResource10)); 	
+        /// tempResource10->QueryInterface(__uuidof(), (void**)(&pTex2D_10)); 	
+        /// tempResource10->Release(); 	
+        /// // now use pTex2D_10 with pDevice10    

Textures being shared from D3D9 to D3D10 have the following restrictions.

  • Textures must be 2D
  • Only 1 mip level is allowed
  • Texture must have default usage
  • Texture must be write only
  • MSAA textures are not allowed
  • Bind flags must have SHADER_RESOURCE and RENDER_TARGET set
  • Only R10G10B10A2_UNORM, R16G16B16A16_FLOAT and R8G8B8A8_UNORM formats are allowed

If a shared texture is updated on one device must be called on that device.

+ ///
+ /// + /// bb173598 + /// HRESULT ID3D10Device::OpenSharedResource([In] void* hResource,[In] const GUID& ReturnedInterface,[Out, Optional] void** ppResource) + /// ID3D10Device::OpenSharedResource + internal void OpenSharedResource(System.IntPtr hResource, System.Guid returnedInterface, out System.IntPtr resourceOut) { + unsafe { + SharpDX.Result __result__; + fixed (void* resourceOut_ = &resourceOut) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)hResource, &returnedInterface, resourceOut_,((void**)(*(void**)_nativePointer))[95]); + __result__.CheckError(); + } + } + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.1; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694546 + /// ID3D10Device1 + /// ID3D10Device1 + [Guid("9B7E4C8F-342C-4106-A19F-4F2704F689F0")] + public partial class Device1 : SharpDX.Direct3D10.Device { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Device1(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Device1(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Device1(nativePointer); + } + + + /// + ///

Gets the feature level of the hardware device.

+ ///
+ /// + ///

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694549 + /// GetFeatureLevel + /// GetFeatureLevel + /// D3D10_FEATURE_LEVEL1 ID3D10Device1::GetFeatureLevel() + public SharpDX.Direct3D10.FeatureLevel FeatureLevel { + get { return GetFeatureLevel(); } + } + + /// + ///

Create a shader-resource view for accessing data in a resource.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A resource is made up of one or more subresources, a view identifies which subresources to allow the pipeline to access. In addition, each resource is bound to the pipeline using a view. A shader-resource view is designed to bind any buffer or texture resource to the shader stages using the following API methods: VSSetShaderResources, GSSetShaderResources and PSSetShaderResources.

Since a view is fully typed, this means that typeless resources become fully typed when bound to the pipeline.

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694548 + /// HRESULT ID3D10Device1::CreateShaderResourceView1([In] ID3D10Resource* pResource,[In, Optional] const D3D10_SHADER_RESOURCE_VIEW_DESC1* pDesc,[Out, Fast] ID3D10ShaderResourceView1** ppSRView) + /// ID3D10Device1::CreateShaderResourceView1 + internal void CreateShaderResourceView1(SharpDX.Direct3D10.Resource resourceRef, SharpDX.Direct3D10.ShaderResourceViewDescription1? descRef, SharpDX.Direct3D10.ShaderResourceView1 sRViewOut) { + unsafe { + SharpDX.Direct3D10.ShaderResourceViewDescription1 descRef_; + if (descRef.HasValue) + descRef_ = descRef.Value; + IntPtr sRViewOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer), (descRef.HasValue)?&descRef_:(void*)IntPtr.Zero, &sRViewOut_,((void**)(*(void**)_nativePointer))[98]); + ((SharpDX.Direct3D10.ShaderResourceView1)sRViewOut).NativePointer = sRViewOut_; + __result__.CheckError(); + } + } + + /// + ///

Create a blend-state object that encapsules blend state for the output-merger stage.

+ ///
+ ///

Pointer to a blend-state description (see ).

+ ///

Address of a reference to the blend-state object created (see Interface).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An application can create up to 4096 unique blend-state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694547 + /// HRESULT ID3D10Device1::CreateBlendState1([In] const D3D10_BLEND_DESC1* pBlendStateDesc,[Out, Fast] ID3D10BlendState1** ppBlendState) + /// ID3D10Device1::CreateBlendState1 + internal void CreateBlendState1(ref SharpDX.Direct3D10.BlendStateDescription1 blendStateDescRef, SharpDX.Direct3D10.BlendState1 blendStateOut) { + unsafe { + var blendStateDescRef_ = new SharpDX.Direct3D10.BlendStateDescription1.__Native(); + blendStateDescRef.__MarshalTo(ref blendStateDescRef_); + IntPtr blendStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &blendStateDescRef_, &blendStateOut_,((void**)(*(void**)_nativePointer))[99]); + blendStateDescRef.__MarshalFree(ref blendStateDescRef_); + ((SharpDX.Direct3D10.BlendState1)blendStateOut).NativePointer = blendStateOut_; + __result__.CheckError(); + } + } + + /// + ///

Gets the feature level of the hardware device.

+ ///
+ ///

The feature level (see ).

+ /// + ///

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694549 + /// D3D10_FEATURE_LEVEL1 ID3D10Device1::GetFeatureLevel() + /// ID3D10Device1::GetFeatureLevel + internal SharpDX.Direct3D10.FeatureLevel GetFeatureLevel() { + unsafe { + SharpDX.Direct3D10.FeatureLevel __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXDirect3D10FeatureLevel(_nativePointer,((void**)(*(void**)_nativePointer))[100]); + return __result__; + } + } + } + /// + ///

A device-child interface accesses data used by a device.

+ ///
+ /// + ///

There are several types of device child interfaces, all of which inherit this interface. They include shaders, state objects, and input layouts.

+ ///
+ /// + /// bb173529 + /// ID3D10DeviceChild + /// ID3D10DeviceChild + [Guid("9B7E4C00-342C-4106-A19F-4F2704F689F0")] + public partial class DeviceChild : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public DeviceChild(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.DeviceChild(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.DeviceChild(nativePointer); + } + + + /// + ///

Get a reference to the device that created this interface.

+ ///
+ /// + ///

Any returned interfaces will have their reference count incremented by one, so be sure to call ::release() on the returned reference(s) before they are freed or else you will have a memory leak.

+ ///
+ /// + /// bb173530 + /// GetDevice + /// GetDevice + /// void ID3D10DeviceChild::GetDevice([Out] ID3D10Device** ppDevice) + public SharpDX.Direct3D10.Device Device { + get { SharpDX.Direct3D10.Device __output__; GetDevice(out __output__); return __output__; } + } + + /// + ///

Get a reference to the device that created this interface.

+ ///
+ ///

Address of a reference to a device (see Interface).

+ /// + ///

Any returned interfaces will have their reference count incremented by one, so be sure to call ::release() on the returned reference(s) before they are freed or else you will have a memory leak.

+ ///
+ /// + /// bb173530 + /// void ID3D10DeviceChild::GetDevice([Out] ID3D10Device** ppDevice) + /// ID3D10DeviceChild::GetDevice + internal void GetDevice(out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &deviceOut_,((void**)(*(void**)_nativePointer))[3]); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + } + } + + /// + ///

Get application-defined data from a device child.

+ ///
+ ///

Guid associated with the data.

+ ///

Size of the data.

+ ///

Pointer to the data stored with the device child. If pData is null, DataSize must also be 0, and any data previously associated with the guid will be destroyed.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

The data stored in the device child is set with .

+ ///
+ /// + /// bb173531 + /// HRESULT ID3D10DeviceChild::GetPrivateData([In] const GUID& guid,[InOut] unsigned int* pDataSize,[Out, Buffer, Optional] void* pData) + /// ID3D10DeviceChild::GetPrivateData + public SharpDX.Result GetPrivateData(System.Guid guid, ref int dataSizeRef, System.IntPtr dataRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataSizeRef_ = &dataSizeRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &guid, dataSizeRef_, (void*)dataRef,((void**)(*(void**)_nativePointer))[4]); + return __result__; + } + } + + /// + ///

Set application-defined data to a device child and associate that data with an application-defined guid.

+ ///
+ ///

Guid associated with the data.

+ ///

Size of the data.

+ ///

Pointer to the data to be stored with this device child. If pData is null, DataSize must also be 0, and any data previously associated with the specified guid will be destroyed.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

The data stored in the device child with this method can be retrieved with .

+ ///
+ /// + /// bb173532 + /// HRESULT ID3D10DeviceChild::SetPrivateData([In] const GUID& guid,[In] unsigned int DataSize,[In, Buffer, Optional] const void* pData) + /// ID3D10DeviceChild::SetPrivateData + public void SetPrivateData(System.Guid guid, int dataSize, System.IntPtr dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &guid, dataSize, (void*)dataRef,((void**)(*(void**)_nativePointer))[5]); + __result__.CheckError(); + } + } + + /// + ///

Associate an -derived interface with this device child and associate that interface with an application-defined guid.

+ ///
+ /// No documentation. + /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

When this method is called ::addref() will be called on the -derived interface, and when the device child is detroyed ::release() will be called on the -derived interface.

+ ///
+ /// + /// bb173533 + /// HRESULT ID3D10DeviceChild::SetPrivateDataInterface([In] const GUID& guid,[In, Optional] const IUnknown* pData) + /// ID3D10DeviceChild::SetPrivateDataInterface + public void SetPrivateDataInterface(System.Guid guid, SharpDX.ComObject dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &guid, (void*)((dataRef == null)?IntPtr.Zero:dataRef.NativePointer),((void**)(*(void**)_nativePointer))[6]); + __result__.CheckError(); + } + } + } + /// + ///

A debug interface controls debug settings, validates pipeline state and can only be used if the debug layer is turned on.

+ ///
+ /// + ///

This interface is obtained by querying it from the Interface using IUnknown::QueryInterface.

+ ///
+ /// + /// bb173516 + /// ID3D10Debug + /// ID3D10Debug + [Guid("9B7E4E01-342C-4106-A19F-4F2704F689F0")] + public partial class DeviceDebug : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public DeviceDebug(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.DeviceDebug(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.DeviceDebug(nativePointer); + } + + + /// + ///

Get or sets the number of milliseconds to sleep after Present is called.

+ ///
+ /// + ///

Value is set with .

+ ///
+ /// + /// bb173518 + /// GetPresentPerRenderOpDelay / SetPresentPerRenderOpDelay + /// GetPresentPerRenderOpDelay + /// unsigned int ID3D10Debug::GetPresentPerRenderOpDelay() + public int PresentPerRenderOpDelay { + get { return GetPresentPerRenderOpDelay(); } + set { SetPresentPerRenderOpDelay(value); } + } + + /// + ///

Get or sets the swap chain that the runtime will use for automatically calling Present.

+ ///
+ /// + ///

The swap chain retrieved by this method will only be used if is set in the feature mask.

+ ///
+ /// + /// bb173519 + /// GetSwapChain / SetSwapChain + /// GetSwapChain + /// HRESULT ID3D10Debug::GetSwapChain([Out] IDXGISwapChain** ppSwapChain) + public SharpDX.DXGI.SwapChain SwapChain { + get { SharpDX.DXGI.SwapChain __output__; GetSwapChain(out __output__); return __output__; } + set { SetSwapChain(value); } + } + + /// + ///

Set a bitfield of flags that will turn debug features on and off.

+ ///
+ ///

Feature-mask flags bitwise ORed together. If a flag is present, then that feature will be set to on, otherwise the feature will be set to off. See remarks for a list of flags.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Note??If you call this API in a Session 0 process, it returns .

Setting a feature-mask flag will cause a rendering-operation method (listed below) to do some extra task when called. The possible feature flags are:

Application will wait for the GPU to finish processing the rendering operation before continuing.
Runtime will additionally call .
Runtime will call Present. Presentation of render buffers will occur according to the settings established by prior calls to and .

?

These feature-mask flags apply to the following rendering-operation methods:

+ ///
+ /// + /// bb173520 + /// HRESULT ID3D10Debug::SetFeatureMask([In] unsigned int Mask) + /// ID3D10Debug::SetFeatureMask + internal void SetFeatureFlags(int mask) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, mask,((void**)(*(void**)_nativePointer))[3]); + __result__.CheckError(); + } + } + + /// + ///

Get a bitfield of flags that indicates which debug features are on or off.

+ ///
+ ///

Mask of feature-mask flags bitwise ORed together. If a flag is present, then that feature will be set to on, otherwise the feature will be set to off. See for a list of possible feature-mask flags.

+ /// + /// bb173517 + /// unsigned int ID3D10Debug::GetFeatureMask() + /// ID3D10Debug::GetFeatureMask + internal int GetFeatureFlags() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + return __result__; + } + } + + /// + ///

Set the number of milliseconds to sleep after Present is called.

+ ///
+ /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Note??If you call this API in a Session 0 process, it returns .

The application will only sleep if is a set in the feature mask. If that flag is not set the number of milliseconds is set but ignored and the application does not sleep. 10ms is used as a default value if this method is never called.

+ ///
+ /// + /// bb173521 + /// HRESULT ID3D10Debug::SetPresentPerRenderOpDelay([In] unsigned int Milliseconds) + /// ID3D10Debug::SetPresentPerRenderOpDelay + internal void SetPresentPerRenderOpDelay(int milliseconds) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, milliseconds,((void**)(*(void**)_nativePointer))[5]); + __result__.CheckError(); + } + } + + /// + ///

Get the number of milliseconds to sleep after Present is called.

+ ///
+ ///

Number of milliseconds to sleep after Present is called.

+ /// + ///

Value is set with .

+ ///
+ /// + /// bb173518 + /// unsigned int ID3D10Debug::GetPresentPerRenderOpDelay() + /// ID3D10Debug::GetPresentPerRenderOpDelay + internal int GetPresentPerRenderOpDelay() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[6]); + return __result__; + } + } + + /// + ///

Set a swap chain that the runtime will use for automatically calling Present.

+ ///
+ /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Note??If you call this API in a Session 0 process, it returns .

The swap chain set by this method will only be used if is set in the feature mask.

+ ///
+ /// + /// bb173522 + /// HRESULT ID3D10Debug::SetSwapChain([In, Optional] IDXGISwapChain* pSwapChain) + /// ID3D10Debug::SetSwapChain + internal void SetSwapChain(SharpDX.DXGI.SwapChain swapChainRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((swapChainRef == null)?IntPtr.Zero:swapChainRef.NativePointer),((void**)(*(void**)_nativePointer))[7]); + __result__.CheckError(); + } + } + + /// + ///

Get the swap chain that the runtime will use for automatically calling Present.

+ ///
+ /// No documentation. + ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

The swap chain retrieved by this method will only be used if is set in the feature mask.

+ ///
+ /// + /// bb173519 + /// HRESULT ID3D10Debug::GetSwapChain([Out] IDXGISwapChain** ppSwapChain) + /// ID3D10Debug::GetSwapChain + internal void GetSwapChain(out SharpDX.DXGI.SwapChain swapChainOut) { + unsafe { + IntPtr swapChainOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &swapChainOut_,((void**)(*(void**)_nativePointer))[8]); + swapChainOut= (swapChainOut_ == IntPtr.Zero)?null:new SharpDX.DXGI.SwapChain(swapChainOut_); + __result__.CheckError(); + } + } + + /// + ///

Check the validity of pipeline state.

+ ///
+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

When the debug layer is turned on all draw functions will do this operation.

+ ///
+ /// + /// bb173523 + /// HRESULT ID3D10Debug::Validate() + /// ID3D10Debug::Validate + public void Validate() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[9]); + __result__.CheckError(); + } + } + } + /// + ///

An interface manages a set of state objects, resources, and shaders for implementing a rendering effect.

+ ///
+ /// + ///

An effect is created by calling .

The effect system groups the information required for rendering into an effect which contains: state objects for assigning state changes in groups, resources for supplying input data and storing output data, and programs that control how the rendering is done called shaders. For more information, see Effects (Direct3D 10).

Note??

If you call QueryInterface on an object to retrieve the interface, QueryInterface returns E_NOINTERFACE. To work around this issue, use the following code:

 * pIUnknown = (*)pEffect; pIUnknown->AddRef();	
+    /// 
+ ///
+ /// + /// bb173630 + /// ID3D10Effect + /// ID3D10Effect + [Guid("51b0ca8b-ec0b-4519-870d-8ee1cb5017c7")] + public partial class Effect : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Effect(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Effect(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Effect(nativePointer); + } + + + /// + ///

Test an effect to see if it contains valid syntax.

+ ///
+ /// + /// bb173772 + /// IsValid + /// IsValid + /// BOOL ID3D10Effect::IsValid() + public SharpDX.Mathematics.Interop.RawBool IsValid { + get { return IsValid_(); } + } + + /// + ///

Test an effect to see if it is part of a memory pool.

+ ///
+ /// + /// bb173771 + /// IsPool + /// IsPool + /// BOOL ID3D10Effect::IsPool() + public SharpDX.Mathematics.Interop.RawBool IsPool { + get { return IsPool_(); } + } + + /// + ///

Get the device that created the effect.

+ ///
+ /// + ///

An effect is created for a specific device, by calling a function such as .

+ ///
+ /// + /// bb173764 + /// GetDevice + /// GetDevice + /// HRESULT ID3D10Effect::GetDevice([Out] ID3D10Device** ppDevice) + public SharpDX.Direct3D10.Device Device { + get { SharpDX.Direct3D10.Device __output__; GetDevice(out __output__); return __output__; } + } + + /// + ///

Get an effect description.

+ ///
+ /// + ///

An effect description contains basic information about an effect such as the techniques it contains and the constant buffer resources it requires.

+ ///
+ /// + /// bb173763 + /// GetDesc + /// GetDesc + /// HRESULT ID3D10Effect::GetDesc([Out] D3D10_EFFECT_DESC* pDesc) + public SharpDX.Direct3D10.EffectDescription Description { + get { SharpDX.Direct3D10.EffectDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Test an effect to see if the reflection metadata has been removed from memory.

+ ///
+ /// + ///

An effect uses memory space two different ways: to store the information required by the runtime to execute an effect, and to store the metadata required to reflect information back to an application using the API. You can minimize the amount of memory required by an effect by calling which removes the reflection metadata from memory. Of course, API methods to read variables will no longer work once reflection data has been removed.

+ ///
+ /// + /// bb173770 + /// IsOptimized + /// IsOptimized + /// BOOL ID3D10Effect::IsOptimized() + public SharpDX.Mathematics.Interop.RawBool IsOptimized { + get { return IsOptimized_(); } + } + + /// + ///

Test an effect to see if it contains valid syntax.

+ ///
+ ///

TRUE if the code syntax is valid; otherwise .

+ /// + /// bb173772 + /// BOOL ID3D10Effect::IsValid() + /// ID3D10Effect::IsValid + internal SharpDX.Mathematics.Interop.RawBool IsValid_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[3]); + return __result__; + } + } + + /// + ///

Test an effect to see if it is part of a memory pool.

+ ///
+ ///

TRUE if the effect is pooled; otherwise . See Interface.

+ /// + /// bb173771 + /// BOOL ID3D10Effect::IsPool() + /// ID3D10Effect::IsPool + internal SharpDX.Mathematics.Interop.RawBool IsPool_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + return __result__; + } + } + + /// + ///

Get the device that created the effect.

+ ///
+ ///

A reference to an Interface.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An effect is created for a specific device, by calling a function such as .

+ ///
+ /// + /// bb173764 + /// HRESULT ID3D10Effect::GetDevice([Out] ID3D10Device** ppDevice) + /// ID3D10Effect::GetDevice + internal void GetDevice(out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &deviceOut_,((void**)(*(void**)_nativePointer))[5]); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + + /// + ///

Get an effect description.

+ ///
+ ///

A reference to an effect description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An effect description contains basic information about an effect such as the techniques it contains and the constant buffer resources it requires.

+ ///
+ /// + /// bb173763 + /// HRESULT ID3D10Effect::GetDesc([Out] D3D10_EFFECT_DESC* pDesc) + /// ID3D10Effect::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.EffectDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.EffectDescription(); + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[6]); + __result__.CheckError(); + } + } + + /// + ///

Get a constant buffer by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a Interface.

+ /// + ///

An effect that contains a variable that will be read/written by an application requires at least one constant buffer. For best performance, an effect should organize variables into one or more constant buffers based on their frequency of update.

+ ///
+ /// + /// bb173761 + /// ID3D10EffectConstantBuffer* ID3D10Effect::GetConstantBufferByIndex([In] unsigned int Index) + /// ID3D10Effect::GetConstantBufferByIndex + public SharpDX.Direct3D10.EffectConstantBuffer GetConstantBufferByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectConstantBuffer __result__; + __result__= + new SharpDX.Direct3D10.EffectConstantBuffer((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[7])); + return __result__; + } + } + + /// + ///

Get a constant buffer by name.

+ ///
+ ///

The constant-buffer name.

+ ///

A reference to the constant buffer indicated by the Name. See .

+ /// + ///

An effect that contains a variable that will be read/written by an application requires at least one constant buffer. For best performance, an effect should organize variables into one or more constant buffers based on their frequency of update.

+ ///
+ /// + /// bb173762 + /// ID3D10EffectConstantBuffer* ID3D10Effect::GetConstantBufferByName([In] const char* Name) + /// ID3D10Effect::GetConstantBufferByName + public SharpDX.Direct3D10.EffectConstantBuffer GetConstantBufferByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectConstantBuffer __result__; + __result__= + new SharpDX.Direct3D10.EffectConstantBuffer((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[8])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Get a variable by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a Interface.

+ /// + ///

An effect may contain one or more variables. Variables outside of a technique are considered global to all effects, those located inside of a technique are local to that technique. You can access any local non-static effect variable using its name or with an index.

The method returns a reference to an effect-variable interface if a variable is not found; you can call to verify whether or not the index exists.

+ ///
+ /// + /// bb173767 + /// ID3D10EffectVariable* ID3D10Effect::GetVariableByIndex([In] unsigned int Index) + /// ID3D10Effect::GetVariableByIndex + public SharpDX.Direct3D10.EffectVariable GetVariableByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[9])); + return __result__; + } + } + + /// + ///

Get a variable by name.

+ ///
+ ///

The variable name.

+ ///

A reference to an Interface.

+ /// + ///

An effect may contain one or more variables. Variables outside of a technique are considered global to all effects, those located inside of a technique are local to that technique. You can access an effect variable using its name or with an index.

The method returns a reference to an effect-variable interface if a variable is not found; you can call to verify whether or not the name exists.

+ ///
+ /// + /// bb173768 + /// ID3D10EffectVariable* ID3D10Effect::GetVariableByName([In] const char* Name) + /// ID3D10Effect::GetVariableByName + public SharpDX.Direct3D10.EffectVariable GetVariableByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[10])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Get a variable by semantic.

+ ///
+ ///

The semantic name.

+ ///

A reference to the effect variable indicated by the Semantic. See Interface.

+ /// + ///

Each effect variable can have a semantic attached, which is a user defined metadata string. Some system-value semantics are reserved words that trigger built in functionality by pipeline stages.

The method returns a reference to an effect-variable interface if a variable is not found; you can call to verify whether or not the semantic exists.

+ ///
+ /// + /// bb173769 + /// ID3D10EffectVariable* ID3D10Effect::GetVariableBySemantic([In] const char* Semantic) + /// ID3D10Effect::GetVariableBySemantic + public SharpDX.Direct3D10.EffectVariable GetVariableBySemantic(string semantic) { + unsafe { + IntPtr semantic_ = Utilities.StringToHGlobalAnsi(semantic); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)semantic_,((void**)(*(void**)_nativePointer))[11])); + Marshal.FreeHGlobal(semantic_ ); + return __result__; + } + } + + /// + ///

Get a technique by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to an Interface.

+ /// + ///

An effect contains one or more techniques; each technique contains one or more passes. You can access a technique using its name or with an index. For more about techniques, see techniques and passes.

+ ///
+ /// + /// bb173765 + /// ID3D10EffectTechnique* ID3D10Effect::GetTechniqueByIndex([In] unsigned int Index) + /// ID3D10Effect::GetTechniqueByIndex + public SharpDX.Direct3D10.EffectTechnique GetTechniqueByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectTechnique __result__; + __result__= + new SharpDX.Direct3D10.EffectTechnique((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[12])); + return __result__; + } + } + + /// + ///

Get a technique by name.

+ ///
+ ///

The name of the technique.

+ ///

A reference to an Interface, or null if the technique is not found.

+ /// + ///

An effect contains one or more techniques; each technique contains one or more passes. You can access a technique using its name or with an index. For more about techniques, see techniques and passes.

+ ///
+ /// + /// bb173766 + /// ID3D10EffectTechnique* ID3D10Effect::GetTechniqueByName([In] const char* Name) + /// ID3D10Effect::GetTechniqueByName + public SharpDX.Direct3D10.EffectTechnique GetTechniqueByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectTechnique __result__; + __result__= + new SharpDX.Direct3D10.EffectTechnique((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[13])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Minimize the amount of memory required for an effect.

+ ///
+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An effect uses memory space two different ways: to store the information required by the runtime to execute an effect, and to store the metadata required to reflect information back to an application using the API. You can minimize the amount of memory required by an effect by calling which removes the reflection metadata from memory. API methods to read variables will no longer work once reflection data has been removed.

The following methods will fail after Optimize has been called on an effect.

Note that references retrieved with these methods before calling are still valid after is called. This allows the application to get all the variables, techniques, and passes it will use, call Optimize, and then use the effect.

+ ///
+ /// + /// bb173773 + /// HRESULT ID3D10Effect::Optimize() + /// ID3D10Effect::Optimize + public void Optimize() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[14]); + __result__.CheckError(); + } + } + + /// + ///

Test an effect to see if the reflection metadata has been removed from memory.

+ ///
+ ///

TRUE if the effect is optimized; otherwise .

+ /// + ///

An effect uses memory space two different ways: to store the information required by the runtime to execute an effect, and to store the metadata required to reflect information back to an application using the API. You can minimize the amount of memory required by an effect by calling which removes the reflection metadata from memory. Of course, API methods to read variables will no longer work once reflection data has been removed.

+ ///
+ /// + /// bb173770 + /// BOOL ID3D10Effect::IsOptimized() + /// ID3D10Effect::IsOptimized + internal SharpDX.Mathematics.Interop.RawBool IsOptimized_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[15]); + return __result__; + } + } + } + /// + ///

The blend-variable interface accesses blend state.

+ ///
+ /// + ///

An Interface is created when an effect is read into memory.

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state. For examples, see Two Ways to Get the State in an Effect Variable.

+ ///
+ /// + /// bb173631 + /// ID3D10EffectBlendVariable + /// ID3D10EffectBlendVariable + [Guid("1fcd2294-df6d-4eae-86b3-0e9160cfb07b")] + public partial class EffectBlendVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectBlendVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectBlendVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectBlendVariable(nativePointer); + } + + + /// + ///

Get a reference to a blend-state interface.

+ ///
+ ///

Index into an array of blend-state interfaces. If there is only one blend-state interface, use 0.

+ ///

The address of a reference to a blend-state interface (see Interface).

+ /// + /// bb173633 + /// HRESULT ID3D10EffectBlendVariable::GetBlendState([In] unsigned int Index,[Out] ID3D10BlendState** ppBlendState) + /// ID3D10EffectBlendVariable::GetBlendState + public SharpDX.Direct3D10.BlendState GetBlendState(int index) { + unsafe { + SharpDX.Direct3D10.BlendState blendStateOut; + IntPtr blendStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, &blendStateOut_,((void**)(*(void**)_nativePointer))[25]); + blendStateOut= (blendStateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.BlendState(blendStateOut_); + __result__.CheckError(); + return blendStateOut; + } + } + + /// + ///

Get a reference to a blend-state variable.

+ ///
+ ///

Index into an array of blend-state descriptions. If there is only one blend-state variable in the effect, use 0.

+ ///

A reference to a blend-state description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. Backing store data can used to recreate the variable when necessary.

+ ///
+ /// + /// bb173632 + /// HRESULT ID3D10EffectBlendVariable::GetBackingStore([In] unsigned int Index,[Out] D3D10_BLEND_DESC* pBlendDesc) + /// ID3D10EffectBlendVariable::GetBackingStore + public void GetBackingStore(int index, out SharpDX.Direct3D10.BlendStateDescription blendDescRef) { + unsafe { + var blendDescRef_ = new SharpDX.Direct3D10.BlendStateDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, &blendDescRef_,((void**)(*(void**)_nativePointer))[26]); + blendDescRef = new SharpDX.Direct3D10.BlendStateDescription(); + blendDescRef.__MarshalFrom(ref blendDescRef_); + __result__.CheckError(); + } + } + } + /// + ///

A constant-buffer interface accesses constant buffers or texture buffers.

+ ///
+ /// + ///

Use constant buffers to store many effect constants; grouping constants into buffers based on their frequency of update. This allows you to minimize the number of state changes as well as make the fewest API calls to change state. Both of these factors lead to better performance.

+ ///
+ /// + /// bb173634 + /// ID3D10EffectConstantBuffer + /// ID3D10EffectConstantBuffer + [Guid("56648f4d-cc8b-4444-a5ad-b5a3d76e91b3")] + public partial class EffectConstantBuffer : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectConstantBuffer(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectConstantBuffer(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectConstantBuffer(nativePointer); + } + + + /// + ///

Set a constant-buffer.

+ ///
+ ///

A reference to a constant-buffer interface. See Interface.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173637 + /// HRESULT ID3D10EffectConstantBuffer::SetConstantBuffer([In, Optional] ID3D10Buffer* pConstantBuffer) + /// ID3D10EffectConstantBuffer::SetConstantBuffer + public void SetConstantBuffer(SharpDX.Direct3D10.Buffer constantBufferRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((constantBufferRef == null)?IntPtr.Zero:constantBufferRef.NativePointer),((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get a constant-buffer.

+ ///
+ ///

The address of a reference to a constant-buffer interface. See Interface.

+ /// + /// bb173635 + /// HRESULT ID3D10EffectConstantBuffer::GetConstantBuffer([Out] ID3D10Buffer** ppConstantBuffer) + /// ID3D10EffectConstantBuffer::GetConstantBuffer + public SharpDX.Direct3D10.Buffer GetConstantBuffer() { + unsafe { + SharpDX.Direct3D10.Buffer constantBufferOut; + IntPtr constantBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &constantBufferOut_,((void**)(*(void**)_nativePointer))[26]); + constantBufferOut= (constantBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(constantBufferOut_); + __result__.CheckError(); + return constantBufferOut; + } + } + + /// + ///

Set a texture-buffer.

+ ///
+ ///

A reference to a shader-resource-view interface for accessing a texture buffer.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173638 + /// HRESULT ID3D10EffectConstantBuffer::SetTextureBuffer([In, Optional] ID3D10ShaderResourceView* pTextureBuffer) + /// ID3D10EffectConstantBuffer::SetTextureBuffer + public void SetTextureBuffer(SharpDX.Direct3D10.ShaderResourceView textureBufferRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((textureBufferRef == null)?IntPtr.Zero:textureBufferRef.NativePointer),((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get a texture-buffer.

+ ///
+ ///

The address of a reference to a shader-resource-view interface for accessing a texture buffer. See Interface.

+ /// + /// bb173636 + /// HRESULT ID3D10EffectConstantBuffer::GetTextureBuffer([Out] ID3D10ShaderResourceView** ppTextureBuffer) + /// ID3D10EffectConstantBuffer::GetTextureBuffer + public SharpDX.Direct3D10.ShaderResourceView GetTextureBuffer() { + unsafe { + SharpDX.Direct3D10.ShaderResourceView textureBufferOut; + IntPtr textureBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &textureBufferOut_,((void**)(*(void**)_nativePointer))[28]); + textureBufferOut= (textureBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(textureBufferOut_); + __result__.CheckError(); + return textureBufferOut; + } + } + } + /// + ///

A depth-stencil-variable interface accesses depth-stencil state.

+ ///
+ /// + ///

An Interface is created when an effect is read into memory.

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state. For examples, see Two Ways to Get the State in an Effect Variable.

+ ///
+ /// + /// bb173639 + /// ID3D10EffectDepthStencilVariable + /// ID3D10EffectDepthStencilVariable + [Guid("af482368-330a-46a5-9a5c-01c71af24c8d")] + public partial class EffectDepthStencilVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectDepthStencilVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectDepthStencilVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectDepthStencilVariable(nativePointer); + } + + + /// + ///

Get a reference to a depth-stencil interface.

+ ///
+ ///

Index into an array of depth-stencil interfaces. If there is only one depth-stencil interface, use 0.

+ ///

The address of a reference to a blend-state interface (see Interface).

+ /// + /// bb173641 + /// HRESULT ID3D10EffectDepthStencilVariable::GetDepthStencilState([In] unsigned int Index,[Out] ID3D10DepthStencilState** ppDepthStencilState) + /// ID3D10EffectDepthStencilVariable::GetDepthStencilState + public SharpDX.Direct3D10.DepthStencilState GetDepthStencilState(int index) { + unsafe { + SharpDX.Direct3D10.DepthStencilState depthStencilStateOut; + IntPtr depthStencilStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, &depthStencilStateOut_,((void**)(*(void**)_nativePointer))[25]); + depthStencilStateOut= (depthStencilStateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.DepthStencilState(depthStencilStateOut_); + __result__.CheckError(); + return depthStencilStateOut; + } + } + + /// + ///

Get a reference to a variable that contains depth-stencil state.

+ ///
+ ///

Index into an array of depth-stencil-state descriptions. If there is only one depth-stencil variable in the effect, use 0.

+ ///

A reference to a depth-stencil-state description (see ).

+ /// + ///

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. Backing store data can used to recreate the variable when necessary.

+ ///
+ /// + /// bb173640 + /// HRESULT ID3D10EffectDepthStencilVariable::GetBackingStore([In] unsigned int Index,[Out] D3D10_DEPTH_STENCIL_DESC* pDepthStencilDesc) + /// ID3D10EffectDepthStencilVariable::GetBackingStore + public SharpDX.Direct3D10.DepthStencilStateDescription GetBackingStore(int index) { + unsafe { + SharpDX.Direct3D10.DepthStencilStateDescription depthStencilDescRef; + depthStencilDescRef = new SharpDX.Direct3D10.DepthStencilStateDescription(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, &depthStencilDescRef,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + return depthStencilDescRef; + } + } + } + /// + ///

A depth-stencil-view-variable interface accesses a depth-stencil view.

+ ///
+ /// + /// bb173642 + /// ID3D10EffectDepthStencilViewVariable + /// ID3D10EffectDepthStencilViewVariable + [Guid("3e02c918-cc79-4985-b622-2d92ad701623")] + public partial class EffectDepthStencilViewVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectDepthStencilViewVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectDepthStencilViewVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectDepthStencilViewVariable(nativePointer); + } + + + /// + ///

Set a depth-stencil-view resource.

+ ///
+ ///

A reference to a depth-stencil-view interface. See Interface.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173645 + /// HRESULT ID3D10EffectDepthStencilViewVariable::SetDepthStencil([In, Optional] ID3D10DepthStencilView* pResource) + /// ID3D10EffectDepthStencilViewVariable::SetDepthStencil + public void SetDepthStencil(SharpDX.Direct3D10.DepthStencilView resourceRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer),((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get a depth-stencil-view resource.

+ ///
+ ///

The address of a reference to a depth-stencil-view interface. See Interface.

+ /// + /// bb173643 + /// HRESULT ID3D10EffectDepthStencilViewVariable::GetDepthStencil([Out] ID3D10DepthStencilView** ppResource) + /// ID3D10EffectDepthStencilViewVariable::GetDepthStencil + public SharpDX.Direct3D10.DepthStencilView GetDepthStencil() { + unsafe { + SharpDX.Direct3D10.DepthStencilView resourceOut; + IntPtr resourceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &resourceOut_,((void**)(*(void**)_nativePointer))[26]); + resourceOut= (resourceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.DepthStencilView(resourceOut_); + __result__.CheckError(); + return resourceOut; + } + } + + /// + ///

Set an array of depth-stencil-view resources.

+ ///
+ ///

A reference to an array of depth-stencil-view interfaces. See Interface.

+ ///

The zero-based array index to set the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173646 + /// HRESULT ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray([In, Buffer] ID3D10DepthStencilView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray + internal void SetDepthStencilArray(SharpDX.Direct3D10.DepthStencilView[] resourcesOut, int offset, int count) { + unsafe { + IntPtr* resourcesOut_ = (IntPtr*)0; + if ( resourcesOut != null ) { + IntPtr* resourcesOut__ = stackalloc IntPtr[resourcesOut.Length]; + resourcesOut_ = resourcesOut__; + for (int i = 0; i < resourcesOut.Length; i++) + resourcesOut_[i] = (resourcesOut[i] == null)? IntPtr.Zero : resourcesOut[i].NativePointer; + } + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, resourcesOut_, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of depth-stencil-view resources.

+ ///
+ ///

A reference to an array of depth-stencil-view interfaces. See Interface.

+ ///

The zero-based array index to set the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173646 + /// HRESULT ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray([In, Buffer] ID3D10DepthStencilView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray + internal void SetDepthStencilArray(SharpDX.ComArray resourcesOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourcesOut == null)?IntPtr.Zero:resourcesOut.NativePointer), offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of depth-stencil-view resources.

+ ///
+ ///

A reference to an array of depth-stencil-view interfaces. See Interface.

+ ///

The zero-based array index to set the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173646 + /// HRESULT ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray([In, Buffer] ID3D10DepthStencilView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectDepthStencilViewVariable::SetDepthStencilArray + private void SetDepthStencilArray(System.IntPtr resourcesOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)resourcesOut, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of depth-stencil-view resources.

+ ///
+ ///

A reference to an array of depth-stencil-view interfaces. See Interface.

+ ///

The zero-based array index to get the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173644 + /// HRESULT ID3D10EffectDepthStencilViewVariable::GetDepthStencilArray([Out, Buffer] ID3D10DepthStencilView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectDepthStencilViewVariable::GetDepthStencilArray + internal void GetDepthStencilArray(SharpDX.Direct3D10.DepthStencilView[] resourcesOut, int offset, int count) { + unsafe { + IntPtr* resourcesOut_ = stackalloc IntPtr[resourcesOut.Length]; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, resourcesOut_, offset, count,((void**)(*(void**)_nativePointer))[28]); + for (int i = 0; i < resourcesOut.Length; i++) + resourcesOut[i] = (resourcesOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.DepthStencilView(resourcesOut_[i]); + __result__.CheckError(); + } + } + } + /// + ///

A matrix-variable interface accesses a matrix.

+ ///
+ /// + /// bb173647 + /// ID3D10EffectMatrixVariable + /// ID3D10EffectMatrixVariable + [Guid("50666c24-b82f-4eed-a172-5b6e7e8522e0")] + public partial class EffectMatrixVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectMatrixVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectMatrixVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectMatrixVariable(nativePointer); + } + + + /// + ///

Set a floating-point matrix.

+ ///
+ ///

A reference to the first element in the matrix.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173652 + /// HRESULT ID3D10EffectMatrixVariable::SetMatrix([In] SHARPDX_MATRIX* pData) + /// ID3D10EffectMatrixVariable::SetMatrix + public void SetMatrix(ref SharpDX.Mathematics.Interop.RawMatrix dataRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get a matrix.

+ ///
+ ///

A reference to the first element in a matrix.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173648 + /// HRESULT ID3D10EffectMatrixVariable::GetMatrix([Out] SHARPDX_MATRIX* pData) + /// ID3D10EffectMatrixVariable::GetMatrix + internal void GetMatrix(out SharpDX.Mathematics.Interop.RawMatrix dataRef) { + unsafe { + dataRef = new SharpDX.Mathematics.Interop.RawMatrix(); + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of floating-point matrices.

+ ///
+ ///

A reference to the first matrix.

+ ///

The number of matrix elements to skip from the start of the array.

+ ///

The number of elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173653 + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixArray([In, Buffer] SHARPDX_MATRIX* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectMatrixVariable::SetMatrixArray + internal void SetMatrixArray(SharpDX.Mathematics.Interop.RawMatrix[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of matrices.

+ ///
+ ///

A reference to the first element of the first matrix in an array of matrices.

+ ///

The offset (in number of matrices) between the start of the array and the first matrix returned.

+ ///

The number of matrices in the returned array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173649 + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixArray([Out, Buffer] SHARPDX_MATRIX* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectMatrixVariable::GetMatrixArray + internal void GetMatrixArray(SharpDX.Mathematics.Interop.RawMatrix[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[28]); + __result__.CheckError(); + } + } + + /// + ///

Transpose and set a floating-point matrix.

+ ///
+ ///

A reference to the first element of a matrix.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).

+ ///
+ /// + /// bb173654 + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTranspose([In] SHARPDX_MATRIX* pData) + /// ID3D10EffectMatrixVariable::SetMatrixTranspose + public void SetMatrixTranspose(ref SharpDX.Mathematics.Interop.RawMatrix dataRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[29]); + __result__.CheckError(); + } + } + + /// + ///

Transpose and get a floating-point matrix.

+ ///
+ ///

A reference to the first element of a transposed matrix.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).

+ ///
+ /// + /// bb173650 + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixTranspose([Out] SHARPDX_MATRIX* pData) + /// ID3D10EffectMatrixVariable::GetMatrixTranspose + internal void GetMatrixTranspose(out SharpDX.Mathematics.Interop.RawMatrix dataRef) { + unsafe { + dataRef = new SharpDX.Mathematics.Interop.RawMatrix(); + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[30]); + __result__.CheckError(); + } + } + + /// + ///

Transpose and set an array of floating-point matrices.

+ ///
+ ///

A reference to an array of matrices.

+ ///

The offset (in number of matrices) between the start of the array and the first matrix to set.

+ ///

The number of matrices in the array to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).

+ ///
+ /// + /// bb173655 + /// HRESULT ID3D10EffectMatrixVariable::SetMatrixTransposeArray([In, Buffer] SHARPDX_MATRIX* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectMatrixVariable::SetMatrixTransposeArray + internal void SetMatrixTransposeArray(SharpDX.Mathematics.Interop.RawMatrix[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[31]); + __result__.CheckError(); + } + } + + /// + ///

Transpose and get an array of floating-point matrices.

+ ///
+ ///

A reference to the first element of an array of tranposed matrices.

+ ///

The offset (in number of matrices) between the start of the array and the first matrix to get.

+ ///

The number of matrices in the array to get.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).

+ ///
+ /// + /// bb173651 + /// HRESULT ID3D10EffectMatrixVariable::GetMatrixTransposeArray([Out, Buffer] SHARPDX_MATRIX* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectMatrixVariable::GetMatrixTransposeArray + internal void GetMatrixTransposeArray(SharpDX.Mathematics.Interop.RawMatrix[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[32]); + __result__.CheckError(); + } + } + } + /// + ///

A pass interface encapsulates state assignments within a technique.

The lifetime of an object is equal to the lifetime of its parent object.

  • Methods
+ ///
+ /// + ///

A pass is a block of code that sets render-state objects and shaders. A pass is declared within a technique; the syntax for a technique is shown in Effect Technique Syntax (Direct3D 10).

To get an effect-pass interface, call a method like .

+ ///
+ /// + /// bb173656 + /// ID3D10EffectPass + /// ID3D10EffectPass + [Guid("5cfbeb89-1a06-46e0-b282-e3f9bfa36a54")] + public partial class EffectPass : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectPass(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectPass(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectPass(nativePointer); + } + + + /// + ///

Test a pass to see if it contains valid syntax.

+ ///
+ /// + /// bb173665 + /// IsValid + /// IsValid + /// BOOL ID3D10EffectPass::IsValid() + public SharpDX.Mathematics.Interop.RawBool IsValid { + get { return IsValid_(); } + } + + /// + ///

Get a pass description.

+ ///
+ /// + ///

A pass is a block of code that sets render state and shaders (which in turn sets constant buffers, samplers and textures). An effect technique contains one or more passes. See techniques and passes.

+ ///
+ /// + /// bb173661 + /// GetDesc + /// GetDesc + /// HRESULT ID3D10EffectPass::GetDesc([Out] D3D10_PASS_DESC* pDesc) + public SharpDX.Direct3D10.EffectPassDescription Description { + get { SharpDX.Direct3D10.EffectPassDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a vertex-shader description.

+ ///
+ /// + ///

An effect pass can contain render state assignments and shader object assignments.

+ ///
+ /// + /// bb173664 + /// GetVertexShaderDesc + /// GetVertexShaderDesc + /// HRESULT ID3D10EffectPass::GetVertexShaderDesc([Out] D3D10_PASS_SHADER_DESC* pDesc) + public SharpDX.Direct3D10.EffectPassShaderDescription VertexShaderDescription { + get { SharpDX.Direct3D10.EffectPassShaderDescription __output__; GetVertexShaderDescription(out __output__); return __output__; } + } + + /// + ///

Get a geometry-shader description.

+ ///
+ /// + ///

An effect pass can contain render state assignments and shader object assignments.

+ ///
+ /// + /// bb173662 + /// GetGeometryShaderDesc + /// GetGeometryShaderDesc + /// HRESULT ID3D10EffectPass::GetGeometryShaderDesc([Out] D3D10_PASS_SHADER_DESC* pDesc) + public SharpDX.Direct3D10.EffectPassShaderDescription GeometryShaderDescription { + get { SharpDX.Direct3D10.EffectPassShaderDescription __output__; GetGeometryShaderDescription(out __output__); return __output__; } + } + + /// + ///

Get a pixel-shader description.

+ ///
+ /// + ///

An effect pass can contain render state assignments and shader object assignments.

+ ///
+ /// + /// bb173663 + /// GetPixelShaderDesc + /// GetPixelShaderDesc + /// HRESULT ID3D10EffectPass::GetPixelShaderDesc([Out] D3D10_PASS_SHADER_DESC* pDesc) + public SharpDX.Direct3D10.EffectPassShaderDescription PixelShaderDescription { + get { SharpDX.Direct3D10.EffectPassShaderDescription __output__; GetPixelShaderDescription(out __output__); return __output__; } + } + + /// + ///

Test a pass to see if it contains valid syntax.

+ ///
+ ///

TRUE if the code syntax is valid; otherwise .

+ /// + /// bb173665 + /// BOOL ID3D10EffectPass::IsValid() + /// ID3D10EffectPass::IsValid + internal SharpDX.Mathematics.Interop.RawBool IsValid_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[0]); + return __result__; + } + } + + /// + ///

Get a pass description.

+ ///
+ ///

A reference to a pass description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A pass is a block of code that sets render state and shaders (which in turn sets constant buffers, samplers and textures). An effect technique contains one or more passes. See techniques and passes.

+ ///
+ /// + /// bb173661 + /// HRESULT ID3D10EffectPass::GetDesc([Out] D3D10_PASS_DESC* pDesc) + /// ID3D10EffectPass::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.EffectPassDescription descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.EffectPassDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[1]); + descRef = new SharpDX.Direct3D10.EffectPassDescription(); + descRef.__MarshalFrom(ref descRef_); + __result__.CheckError(); + } + } + + /// + ///

Get a vertex-shader description.

+ ///
+ ///

A reference to a vertex-shader description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An effect pass can contain render state assignments and shader object assignments.

+ ///
+ /// + /// bb173664 + /// HRESULT ID3D10EffectPass::GetVertexShaderDesc([Out] D3D10_PASS_SHADER_DESC* pDesc) + /// ID3D10EffectPass::GetVertexShaderDesc + internal void GetVertexShaderDescription(out SharpDX.Direct3D10.EffectPassShaderDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.EffectPassShaderDescription(); + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[2]); + __result__.CheckError(); + } + } + + /// + ///

Get a geometry-shader description.

+ ///
+ ///

A reference to a geometry-shader description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An effect pass can contain render state assignments and shader object assignments.

+ ///
+ /// + /// bb173662 + /// HRESULT ID3D10EffectPass::GetGeometryShaderDesc([Out] D3D10_PASS_SHADER_DESC* pDesc) + /// ID3D10EffectPass::GetGeometryShaderDesc + internal void GetGeometryShaderDescription(out SharpDX.Direct3D10.EffectPassShaderDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.EffectPassShaderDescription(); + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[3]); + __result__.CheckError(); + } + } + + /// + ///

Get a pixel-shader description.

+ ///
+ ///

A reference to a pixel-shader description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An effect pass can contain render state assignments and shader object assignments.

+ ///
+ /// + /// bb173663 + /// HRESULT ID3D10EffectPass::GetPixelShaderDesc([Out] D3D10_PASS_SHADER_DESC* pDesc) + /// ID3D10EffectPass::GetPixelShaderDesc + internal void GetPixelShaderDescription(out SharpDX.Direct3D10.EffectPassShaderDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.EffectPassShaderDescription(); + SharpDX.Result __result__; + fixed (void* descRef_ = &descRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[4]); + __result__.CheckError(); + } + } + + /// + ///

Get an annotation by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to an Interface.

+ /// + /// bb173659 + /// ID3D10EffectVariable* ID3D10EffectPass::GetAnnotationByIndex([In] unsigned int Index) + /// ID3D10EffectPass::GetAnnotationByIndex + public SharpDX.Direct3D10.EffectVariable GetAnnotationByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[5])); + return __result__; + } + } + + /// + ///

Get an annotation by name.

+ ///
+ ///

The name of the annotation.

+ ///

A reference to an Interface.

+ /// + /// bb173660 + /// ID3D10EffectVariable* ID3D10EffectPass::GetAnnotationByName([In] const char* Name) + /// ID3D10EffectPass::GetAnnotationByName + public SharpDX.Direct3D10.EffectVariable GetAnnotationByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[6])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Set the state contained in a pass to the device.

+ ///
+ ///

Unused.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173657 + /// HRESULT ID3D10EffectPass::Apply([In] unsigned int Flags) + /// ID3D10EffectPass::Apply + internal void Apply(int flags) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, flags,((void**)(*(void**)_nativePointer))[7]); + __result__.CheckError(); + } + } + + /// + ///

Generate a mask for allowing/preventing state changes.

+ ///
+ ///

A reference to a state-block mask (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173658 + /// HRESULT ID3D10EffectPass::ComputeStateBlockMask([Out] D3D10_STATE_BLOCK_MASK* pStateBlockMask) + /// ID3D10EffectPass::ComputeStateBlockMask + public void ComputeStateBlockMask(out SharpDX.Direct3D10.StateBlockMask stateBlockMaskRef) { + unsafe { + var stateBlockMaskRef_ = new SharpDX.Direct3D10.StateBlockMask.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &stateBlockMaskRef_,((void**)(*(void**)_nativePointer))[8]); + stateBlockMaskRef = new SharpDX.Direct3D10.StateBlockMask(); + stateBlockMaskRef.__MarshalFrom(ref stateBlockMaskRef_); + __result__.CheckError(); + } + } + } + /// + ///

A pool interface represents a common memory space (or pool) for sharing variables between effects.

+ ///
+ /// + ///

To create an effect pool, call a function like . Effect pools can improve performance by reducing the number of API calls required to make state changes (see Using Effect Pools).

+ ///
+ /// + /// bb173667 + /// ID3D10EffectPool + /// ID3D10EffectPool + [Guid("9537ab04-3250-412e-8213-fcd2f8677933")] + public partial class EffectPool : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectPool(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectPool(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectPool(nativePointer); + } + + + /// + ///

Get the effect that created the effect pool.

+ ///
+ ///

A reference to an Interface interface.

+ /// + /// bb173668 + /// ID3D10Effect* ID3D10EffectPool::AsEffect() + /// ID3D10EffectPool::AsEffect + public SharpDX.Direct3D10.Effect AsEffect() { + unsafe { + SharpDX.Direct3D10.Effect __result__; + __result__= + new SharpDX.Direct3D10.Effect((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[3])); + return __result__; + } + } + } + /// + ///

A rasterizer-variable interface accesses rasterizer state.

+ ///
+ /// + ///

An Interface is created when an effect is read into memory.

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state. For examples, see Two Ways to Get the State in an Effect Variable.

+ ///
+ /// + /// bb173669 + /// ID3D10EffectRasterizerVariable + /// ID3D10EffectRasterizerVariable + [Guid("21af9f0e-4d94-4ea9-9785-2cb76b8c0b34")] + public partial class EffectRasterizerVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectRasterizerVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectRasterizerVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectRasterizerVariable(nativePointer); + } + + + /// + ///

Get a reference to a rasterizer interface.

+ ///
+ ///

Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0.

+ ///

The address of a reference to a rasterizer interface (see Interface).

+ /// + /// bb173671 + /// HRESULT ID3D10EffectRasterizerVariable::GetRasterizerState([In] unsigned int Index,[Out] ID3D10RasterizerState** ppRasterizerState) + /// ID3D10EffectRasterizerVariable::GetRasterizerState + public SharpDX.Direct3D10.RasterizerState GetRasterizerState(int index) { + unsafe { + SharpDX.Direct3D10.RasterizerState rasterizerStateOut; + IntPtr rasterizerStateOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, &rasterizerStateOut_,((void**)(*(void**)_nativePointer))[25]); + rasterizerStateOut= (rasterizerStateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.RasterizerState(rasterizerStateOut_); + __result__.CheckError(); + return rasterizerStateOut; + } + } + + /// + ///

Get a reference to a variable that contains rasteriser state.

+ ///
+ ///

Index into an array of rasteriser-state descriptions. If there is only one rasteriser variable in the effect, use 0.

+ ///

A reference to a rasteriser-state description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. Backing store data can used to recreate the variable when necessary.

+ ///
+ /// + /// bb173670 + /// HRESULT ID3D10EffectRasterizerVariable::GetBackingStore([In] unsigned int Index,[Out] D3D10_RASTERIZER_DESC* pRasterizerDesc) + /// ID3D10EffectRasterizerVariable::GetBackingStore + public void GetBackingStore(int index, out SharpDX.Direct3D10.RasterizerStateDescription rasterizerDescRef) { + unsafe { + rasterizerDescRef = new SharpDX.Direct3D10.RasterizerStateDescription(); + SharpDX.Result __result__; + fixed (void* rasterizerDescRef_ = &rasterizerDescRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, rasterizerDescRef_,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + } + } + } + /// + ///

A render-target-view interface accesses a render target.

+ ///
+ /// + /// bb173672 + /// ID3D10EffectRenderTargetViewVariable + /// ID3D10EffectRenderTargetViewVariable + [Guid("28ca0cc3-c2c9-40bb-b57f-67b737122b17")] + public partial class EffectRenderTargetViewVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectRenderTargetViewVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectRenderTargetViewVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectRenderTargetViewVariable(nativePointer); + } + + + /// + ///

Set a render-target.

+ ///
+ ///

A reference to a render-target-view interface. See Interface.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173675 + /// HRESULT ID3D10EffectRenderTargetViewVariable::SetRenderTarget([In, Optional] ID3D10RenderTargetView* pResource) + /// ID3D10EffectRenderTargetViewVariable::SetRenderTarget + public void SetRenderTarget(SharpDX.Direct3D10.RenderTargetView resourceRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer),((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get a render-target.

+ ///
+ ///

The address of a reference to a render-target-view interface. See Interface.

+ /// + /// bb173673 + /// HRESULT ID3D10EffectRenderTargetViewVariable::GetRenderTarget([Out] ID3D10RenderTargetView** ppResource) + /// ID3D10EffectRenderTargetViewVariable::GetRenderTarget + public SharpDX.Direct3D10.RenderTargetView GetRenderTarget() { + unsafe { + SharpDX.Direct3D10.RenderTargetView resourceOut; + IntPtr resourceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &resourceOut_,((void**)(*(void**)_nativePointer))[26]); + resourceOut= (resourceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.RenderTargetView(resourceOut_); + __result__.CheckError(); + return resourceOut; + } + } + + /// + ///

Set an array of render-targets.

+ ///
+ ///

Set an array of render-target-view interfaces. See Interface.

+ ///

The zero-based array index to store the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173676 + /// HRESULT ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray([In, Buffer] ID3D10RenderTargetView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray + internal void SetRenderTargetArray(SharpDX.Direct3D10.RenderTargetView[] resourcesOut, int offset, int count) { + unsafe { + IntPtr* resourcesOut_ = (IntPtr*)0; + if ( resourcesOut != null ) { + IntPtr* resourcesOut__ = stackalloc IntPtr[resourcesOut.Length]; + resourcesOut_ = resourcesOut__; + for (int i = 0; i < resourcesOut.Length; i++) + resourcesOut_[i] = (resourcesOut[i] == null)? IntPtr.Zero : resourcesOut[i].NativePointer; + } + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, resourcesOut_, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of render-targets.

+ ///
+ ///

Set an array of render-target-view interfaces. See Interface.

+ ///

The zero-based array index to store the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173676 + /// HRESULT ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray([In, Buffer] ID3D10RenderTargetView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray + internal void SetRenderTargetArray(SharpDX.ComArray resourcesOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourcesOut == null)?IntPtr.Zero:resourcesOut.NativePointer), offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of render-targets.

+ ///
+ ///

Set an array of render-target-view interfaces. See Interface.

+ ///

The zero-based array index to store the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173676 + /// HRESULT ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray([In, Buffer] ID3D10RenderTargetView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectRenderTargetViewVariable::SetRenderTargetArray + private void SetRenderTargetArray(System.IntPtr resourcesOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)resourcesOut, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of render-targets.

+ ///
+ ///

A reference to an array of render-target-view interfaces. See Interface.

+ ///

The zero-based array index to get the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173674 + /// HRESULT ID3D10EffectRenderTargetViewVariable::GetRenderTargetArray([Out, Buffer] ID3D10RenderTargetView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectRenderTargetViewVariable::GetRenderTargetArray + internal void GetRenderTargetArray(SharpDX.Direct3D10.RenderTargetView[] resourcesOut, int offset, int count) { + unsafe { + IntPtr* resourcesOut_ = stackalloc IntPtr[resourcesOut.Length]; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, resourcesOut_, offset, count,((void**)(*(void**)_nativePointer))[28]); + for (int i = 0; i < resourcesOut.Length; i++) + resourcesOut[i] = (resourcesOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.RenderTargetView(resourcesOut_[i]); + __result__.CheckError(); + } + } + } + /// + ///

A sampler interface accesses sampler state.

+ ///
+ /// + ///

An Interface is created when an effect is read into memory.

Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state. For examples, see Two Ways to Get the State in an Effect Variable.

+ ///
+ /// + /// bb173677 + /// ID3D10EffectSamplerVariable + /// ID3D10EffectSamplerVariable + [Guid("6530d5c7-07e9-4271-a418-e7ce4bd1e480")] + public partial class EffectSamplerVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectSamplerVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectSamplerVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectSamplerVariable(nativePointer); + } + + + /// + ///

Get a reference to a sampler interface.

+ ///
+ ///

Index into an array of sampler interfaces. If there is only one sampler interface, use 0.

+ ///

The address of a reference to a sampler interface (see Interface).

+ /// + /// bb173679 + /// HRESULT ID3D10EffectSamplerVariable::GetSampler([In] unsigned int Index,[Out] ID3D10SamplerState** ppSampler) + /// ID3D10EffectSamplerVariable::GetSampler + public SharpDX.Direct3D10.SamplerState GetSampler(int index) { + unsafe { + SharpDX.Direct3D10.SamplerState samplerOut; + IntPtr samplerOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, &samplerOut_,((void**)(*(void**)_nativePointer))[25]); + samplerOut= (samplerOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.SamplerState(samplerOut_); + __result__.CheckError(); + return samplerOut; + } + } + + /// + ///

Get a reference to a variable that contains sampler state.

+ ///
+ ///

Index into an array of sampler descriptions. If there is only one sampler variable in the effect, use 0.

+ ///

A reference to a sampler description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173678 + /// HRESULT ID3D10EffectSamplerVariable::GetBackingStore([In] unsigned int Index,[Out] D3D10_SAMPLER_DESC* pSamplerDesc) + /// ID3D10EffectSamplerVariable::GetBackingStore + public void GetBackingStore(int index, out SharpDX.Direct3D10.SamplerStateDescription samplerDescRef) { + unsafe { + samplerDescRef = new SharpDX.Direct3D10.SamplerStateDescription(); + SharpDX.Result __result__; + fixed (void* samplerDescRef_ = &samplerDescRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index, samplerDescRef_,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + } + } + } + /// + ///

An effect-scalar-variable interface accesses scalar values.

+ ///
+ /// + /// bb173680 + /// ID3D10EffectScalarVariable + /// ID3D10EffectScalarVariable + [Guid("00e48f7b-d2c8-49e8-a86c-022dee53431f")] + public partial class EffectScalarVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectScalarVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectScalarVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectScalarVariable(nativePointer); + } + + + /// + ///

Set a floating-point variable.

+ ///
+ ///

A reference to the variable.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173689 + /// HRESULT ID3D10EffectScalarVariable::SetFloat([In] float Value) + /// ID3D10EffectScalarVariable::SetFloat + internal void SetFloat(float value) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, value,((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get a floating-point variable.

+ ///
+ ///

A reference to the variable.

+ /// + /// bb173683 + /// HRESULT ID3D10EffectScalarVariable::GetFloat([Out] float* pValue) + /// ID3D10EffectScalarVariable::GetFloat + public float GetFloat() { + unsafe { + float valueRef; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &valueRef,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + return valueRef; + } + } + + /// + ///

Set an array of floating-point variables.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173690 + /// HRESULT ID3D10EffectScalarVariable::SetFloatArray([In, Buffer] float* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectScalarVariable::SetFloatArray + internal void SetFloatArray(float[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of floating-point variables.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173684 + /// HRESULT ID3D10EffectScalarVariable::GetFloatArray([Out, Buffer] float* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectScalarVariable::GetFloatArray + internal void GetFloatArray(float[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[28]); + __result__.CheckError(); + } + } + + /// + ///

Set an integer variable.

+ ///
+ ///

A reference to the variable.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173691 + /// HRESULT ID3D10EffectScalarVariable::SetInt([In] int Value) + /// ID3D10EffectScalarVariable::SetInt + internal void SetInt(int value) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, value,((void**)(*(void**)_nativePointer))[29]); + __result__.CheckError(); + } + } + + /// + ///

Get an integer variable.

+ ///
+ ///

A reference to the variable.

+ /// + /// bb173685 + /// HRESULT ID3D10EffectScalarVariable::GetInt([Out] int* pValue) + /// ID3D10EffectScalarVariable::GetInt + public int GetInt() { + unsafe { + int valueRef; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &valueRef,((void**)(*(void**)_nativePointer))[30]); + __result__.CheckError(); + return valueRef; + } + } + + /// + ///

Set an array of integer variables.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173692 + /// HRESULT ID3D10EffectScalarVariable::SetIntArray([In, Buffer] int* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectScalarVariable::SetIntArray + internal void SetIntArray(int[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[31]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of integer variables.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173686 + /// HRESULT ID3D10EffectScalarVariable::GetIntArray([Out, Buffer] int* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectScalarVariable::GetIntArray + internal void GetIntArray(int[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[32]); + __result__.CheckError(); + } + } + + /// + ///

Set a boolean variable.

+ ///
+ ///

A reference to the variable.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173687 + /// HRESULT ID3D10EffectScalarVariable::SetBool([In] BOOL Value) + /// ID3D10EffectScalarVariable::SetBool + internal void SetBool(SharpDX.Mathematics.Interop.RawBool value) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint48(_nativePointer, value,((void**)(*(void**)_nativePointer))[33]); + __result__.CheckError(); + } + } + + /// + ///

Get a boolean variable.

+ ///
+ ///

A reference to the variable.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173681 + /// HRESULT ID3D10EffectScalarVariable::GetBool([Out] BOOL* pValue) + /// ID3D10EffectScalarVariable::GetBool + internal void GetBool(out SharpDX.Mathematics.Interop.RawBool valueRef) { + unsafe { + valueRef = new SharpDX.Mathematics.Interop.RawBool(); + SharpDX.Result __result__; + fixed (void* valueRef_ = &valueRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, valueRef_,((void**)(*(void**)_nativePointer))[34]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of boolean variables.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173688 + /// HRESULT ID3D10EffectScalarVariable::SetBoolArray([In, Buffer] BOOL* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectScalarVariable::SetBoolArray + internal void SetBoolArray(SharpDX.Mathematics.Interop.RawBool[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[35]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of boolean variables.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173682 + /// HRESULT ID3D10EffectScalarVariable::GetBoolArray([Out, Buffer] BOOL* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectScalarVariable::GetBoolArray + internal void GetBoolArray(SharpDX.Mathematics.Interop.RawBool[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[36]); + __result__.CheckError(); + } + } + } + /// + ///

A shader-resource interface accesses a shader resource.

+ ///
+ /// + /// bb173693 + /// ID3D10EffectShaderResourceVariable + /// ID3D10EffectShaderResourceVariable + [Guid("c0a7157b-d872-4b1d-8073-efc2acd4b1fc")] + public partial class EffectShaderResourceVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectShaderResourceVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectShaderResourceVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectShaderResourceVariable(nativePointer); + } + + + /// + ///

Set a shader resource.

+ ///
+ ///

The address of a reference to a shader-resource-view interface. See Interface.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173696 + /// HRESULT ID3D10EffectShaderResourceVariable::SetResource([In, Optional] ID3D10ShaderResourceView* pResource) + /// ID3D10EffectShaderResourceVariable::SetResource + public void SetResource(SharpDX.Direct3D10.ShaderResourceView resourceRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourceRef == null)?IntPtr.Zero:resourceRef.NativePointer),((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get a shader resource.

+ ///
+ ///

The address of a reference to a shader-resource-view interface. See Interface.

+ /// + /// bb173694 + /// HRESULT ID3D10EffectShaderResourceVariable::GetResource([Out] ID3D10ShaderResourceView** ppResource) + /// ID3D10EffectShaderResourceVariable::GetResource + public SharpDX.Direct3D10.ShaderResourceView GetResource() { + unsafe { + SharpDX.Direct3D10.ShaderResourceView resourceOut; + IntPtr resourceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &resourceOut_,((void**)(*(void**)_nativePointer))[26]); + resourceOut= (resourceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(resourceOut_); + __result__.CheckError(); + return resourceOut; + } + } + + /// + ///

Set an array of shader resources.

+ ///
+ ///

The address of an array of shader-resource-view interfaces. See Interface.

+ ///

The zero-based array index to get the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173697 + /// HRESULT ID3D10EffectShaderResourceVariable::SetResourceArray([In, Buffer] ID3D10ShaderResourceView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectShaderResourceVariable::SetResourceArray + internal void SetResourceArray(SharpDX.Direct3D10.ShaderResourceView[] resourcesOut, int offset, int count) { + unsafe { + IntPtr* resourcesOut_ = (IntPtr*)0; + if ( resourcesOut != null ) { + IntPtr* resourcesOut__ = stackalloc IntPtr[resourcesOut.Length]; + resourcesOut_ = resourcesOut__; + for (int i = 0; i < resourcesOut.Length; i++) + resourcesOut_[i] = (resourcesOut[i] == null)? IntPtr.Zero : resourcesOut[i].NativePointer; + } + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, resourcesOut_, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of shader resources.

+ ///
+ ///

The address of an array of shader-resource-view interfaces. See Interface.

+ ///

The zero-based array index to get the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173697 + /// HRESULT ID3D10EffectShaderResourceVariable::SetResourceArray([In, Buffer] ID3D10ShaderResourceView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectShaderResourceVariable::SetResourceArray + internal void SetResourceArray(SharpDX.ComArray resourcesOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)((resourcesOut == null)?IntPtr.Zero:resourcesOut.NativePointer), offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of shader resources.

+ ///
+ ///

The address of an array of shader-resource-view interfaces. See Interface.

+ ///

The zero-based array index to get the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173697 + /// HRESULT ID3D10EffectShaderResourceVariable::SetResourceArray([In, Buffer] ID3D10ShaderResourceView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectShaderResourceVariable::SetResourceArray + private void SetResourceArray(System.IntPtr resourcesOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)resourcesOut, offset, count,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of shader resources.

+ ///
+ ///

The address of an array of shader-resource-view interfaces. See Interface.

+ ///

The zero-based array index to get the first interface.

+ ///

The number of elements in the array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173695 + /// HRESULT ID3D10EffectShaderResourceVariable::GetResourceArray([Out, Buffer] ID3D10ShaderResourceView** ppResources,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectShaderResourceVariable::GetResourceArray + internal void GetResourceArray(SharpDX.Direct3D10.ShaderResourceView[] resourcesOut, int offset, int count) { + unsafe { + IntPtr* resourcesOut_ = stackalloc IntPtr[resourcesOut.Length]; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, resourcesOut_, offset, count,((void**)(*(void**)_nativePointer))[28]); + for (int i = 0; i < resourcesOut.Length; i++) + resourcesOut[i] = (resourcesOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(resourcesOut_[i]); + __result__.CheckError(); + } + } + } + /// + ///

A shader-variable interface accesses a shader variable.

+ ///
+ /// + /// bb173698 + /// ID3D10EffectShaderVariable + /// ID3D10EffectShaderVariable + [Guid("80849279-c799-4797-8c33-0407a07d9e06")] + public partial class EffectShaderVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectShaderVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectShaderVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectShaderVariable(nativePointer); + } + + + /// + ///

Get a shader description.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a shader description (see ).

+ /// + /// bb173703 + /// HRESULT ID3D10EffectShaderVariable::GetShaderDesc([In] unsigned int ShaderIndex,[Out] D3D10_EFFECT_SHADER_DESC* pDesc) + /// ID3D10EffectShaderVariable::GetShaderDesc + public SharpDX.Direct3D10.EffectShaderDescription GetShaderDescription(int shaderIndex) { + unsafe { + SharpDX.Direct3D10.EffectShaderDescription descRef; + var descRef_ = new SharpDX.Direct3D10.EffectShaderDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, shaderIndex, &descRef_,((void**)(*(void**)_nativePointer))[25]); + descRef = new SharpDX.Direct3D10.EffectShaderDescription(); + descRef.__MarshalFrom(ref descRef_); + __result__.CheckError(); + return descRef; + } + } + + /// + ///

Get a vertex shader.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a Interface.

+ /// + /// bb173704 + /// HRESULT ID3D10EffectShaderVariable::GetVertexShader([In] unsigned int ShaderIndex,[Out] ID3D10VertexShader** ppVS) + /// ID3D10EffectShaderVariable::GetVertexShader + public SharpDX.Direct3D10.VertexShader GetVertexShader(int shaderIndex) { + unsafe { + SharpDX.Direct3D10.VertexShader vSOut; + IntPtr vSOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, shaderIndex, &vSOut_,((void**)(*(void**)_nativePointer))[26]); + vSOut= (vSOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.VertexShader(vSOut_); + __result__.CheckError(); + return vSOut; + } + } + + /// + ///

Get a geometry shader.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a Interface.

+ /// + /// bb173699 + /// HRESULT ID3D10EffectShaderVariable::GetGeometryShader([In] unsigned int ShaderIndex,[Out] ID3D10GeometryShader** ppGS) + /// ID3D10EffectShaderVariable::GetGeometryShader + public SharpDX.Direct3D10.GeometryShader GetGeometryShader(int shaderIndex) { + unsafe { + SharpDX.Direct3D10.GeometryShader gSOut; + IntPtr gSOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, shaderIndex, &gSOut_,((void**)(*(void**)_nativePointer))[27]); + gSOut= (gSOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.GeometryShader(gSOut_); + __result__.CheckError(); + return gSOut; + } + } + + /// + ///

Get a pixel shader.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a Interface.

+ /// + /// bb173702 + /// HRESULT ID3D10EffectShaderVariable::GetPixelShader([In] unsigned int ShaderIndex,[Out] ID3D10PixelShader** ppPS) + /// ID3D10EffectShaderVariable::GetPixelShader + public SharpDX.Direct3D10.PixelShader GetPixelShader(int shaderIndex) { + unsafe { + SharpDX.Direct3D10.PixelShader pSOut; + IntPtr pSOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, shaderIndex, &pSOut_,((void**)(*(void**)_nativePointer))[28]); + pSOut= (pSOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.PixelShader(pSOut_); + __result__.CheckError(); + return pSOut; + } + } + + /// + ///

Get an input-signature description.

+ ///
+ ///

A zero-based shader index.

+ ///

A zero-based shader-element index.

+ ///

A reference to a parameter description (see ).

+ /// + ///

An effect contains one or more shaders; each shader has an input and output signature; each signature contains one or more elements (or parameters). The shader index identifies the shader and the element index identifies the element (or parameter) in the shader signature.

+ ///
+ /// + /// bb173700 + /// HRESULT ID3D10EffectShaderVariable::GetInputSignatureElementDesc([In] unsigned int ShaderIndex,[In] unsigned int Element,[Out] D3D10_SIGNATURE_PARAMETER_DESC* pDesc) + /// ID3D10EffectShaderVariable::GetInputSignatureElementDesc + public SharpDX.Direct3D10.ShaderParameterDescription GetInputSignatureElementDescription(int shaderIndex, int element) { + unsafe { + SharpDX.Direct3D10.ShaderParameterDescription etInputParameterDescriptionRef; + var etInputParameterDescriptionRef_ = new SharpDX.Direct3D10.ShaderParameterDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, shaderIndex, element, &etInputParameterDescriptionRef_,((void**)(*(void**)_nativePointer))[29]); + etInputParameterDescriptionRef = new SharpDX.Direct3D10.ShaderParameterDescription(); + etInputParameterDescriptionRef.__MarshalFrom(ref etInputParameterDescriptionRef_); + __result__.CheckError(); + return etInputParameterDescriptionRef; + } + } + + /// + ///

Get an output-signature description.

+ ///
+ ///

A zero-based shader index.

+ ///

A zero-based element index.

+ ///

A reference to a parameter description (see ).

+ /// + ///

An effect contains one or more shaders; each shader has an input and output signature; each signature contains one or more elements (or parameters). The shader index identifies the shader and the element index identifies the element (or parameter) in the shader signature.

+ ///
+ /// + /// bb173701 + /// HRESULT ID3D10EffectShaderVariable::GetOutputSignatureElementDesc([In] unsigned int ShaderIndex,[In] unsigned int Element,[Out] D3D10_SIGNATURE_PARAMETER_DESC* pDesc) + /// ID3D10EffectShaderVariable::GetOutputSignatureElementDesc + public SharpDX.Direct3D10.ShaderParameterDescription GetOutputSignatureElementDescription(int shaderIndex, int element) { + unsafe { + SharpDX.Direct3D10.ShaderParameterDescription etOutputParameterDescriptionRef; + var etOutputParameterDescriptionRef_ = new SharpDX.Direct3D10.ShaderParameterDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, shaderIndex, element, &etOutputParameterDescriptionRef_,((void**)(*(void**)_nativePointer))[30]); + etOutputParameterDescriptionRef = new SharpDX.Direct3D10.ShaderParameterDescription(); + etOutputParameterDescriptionRef.__MarshalFrom(ref etOutputParameterDescriptionRef_); + __result__.CheckError(); + return etOutputParameterDescriptionRef; + } + } + } + /// + ///

A string-variable interface accesses a string variable.

+ ///
+ /// + /// bb173705 + /// ID3D10EffectStringVariable + /// ID3D10EffectStringVariable + [Guid("71417501-8df9-4e0a-a78a-255f9756baff")] + public partial class EffectStringVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectStringVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectStringVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectStringVariable(nativePointer); + } + + + /// + ///

Get the string.

+ ///
+ ///

A reference to the string.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173706 + /// HRESULT ID3D10EffectStringVariable::GetString([Out] const void** ppString) + /// ID3D10EffectStringVariable::GetString + internal void GetString(out System.IntPtr stringOut) { + unsafe { + SharpDX.Result __result__; + fixed (void* stringOut_ = &stringOut) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, stringOut_,((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of strings.

+ ///
+ ///

A reference to the first string in the array.

+ ///

The offset (in number of strings) between the start of the array and the first string to get.

+ ///

The number of strings in the returned array.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173707 + /// HRESULT ID3D10EffectStringVariable::GetStringArray([Out, Buffer] const void** ppStrings,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectStringVariable::GetStringArray + internal void GetStringArray(System.IntPtr stringsOut, int offset, int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)stringsOut, offset, count,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + } + } + } + /// + ///

An interface is a collection of passes.

The lifetime of an object is equal to the lifetime of its parent object.

  • Methods
+ ///
+ /// + ///

An effect contains one or more techniques; each technique contains one or more passes; each pass contains state assignments (see Organizing State in an Effect (Direct3D 10)). The syntax for creating a technique is shown in Effect Technique Syntax (Direct3D 10).

To get an effect-technique interface, call a method like .

+ ///
+ /// + /// bb173708 + /// ID3D10EffectTechnique + /// ID3D10EffectTechnique + [Guid("db122ce8-d1c9-4292-b237-24ed3de8b175")] + public partial class EffectTechnique : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectTechnique(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectTechnique(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectTechnique(nativePointer); + } + + + /// + ///

Test a technique to see if it contains valid syntax.

+ ///
+ /// + /// bb173715 + /// IsValid + /// IsValid + /// BOOL ID3D10EffectTechnique::IsValid() + public SharpDX.Mathematics.Interop.RawBool IsValid { + get { return IsValid_(); } + } + + /// + ///

Get a technique description.

+ ///
+ /// + /// bb173712 + /// GetDesc + /// GetDesc + /// HRESULT ID3D10EffectTechnique::GetDesc([Out] D3D10_TECHNIQUE_DESC* pDesc) + public SharpDX.Direct3D10.EffectTechniqueDescription Description { + get { SharpDX.Direct3D10.EffectTechniqueDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Test a technique to see if it contains valid syntax.

+ ///
+ ///

TRUE if the code syntax is valid; otherwise .

+ /// + /// bb173715 + /// BOOL ID3D10EffectTechnique::IsValid() + /// ID3D10EffectTechnique::IsValid + internal SharpDX.Mathematics.Interop.RawBool IsValid_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[0]); + return __result__; + } + } + + /// + ///

Get a technique description.

+ ///
+ ///

A reference to a technique description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173712 + /// HRESULT ID3D10EffectTechnique::GetDesc([Out] D3D10_TECHNIQUE_DESC* pDesc) + /// ID3D10EffectTechnique::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.EffectTechniqueDescription descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.EffectTechniqueDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[1]); + descRef = new SharpDX.Direct3D10.EffectTechniqueDescription(); + descRef.__MarshalFrom(ref descRef_); + __result__.CheckError(); + } + } + + /// + ///

Get an annotation by index.

+ ///
+ ///

The zero-based index of the interface reference.

+ ///

A reference to an Interface.

+ /// + ///

Use an annotation to attach a piece of metadata to a technique.

+ ///
+ /// + /// bb173710 + /// ID3D10EffectVariable* ID3D10EffectTechnique::GetAnnotationByIndex([In] unsigned int Index) + /// ID3D10EffectTechnique::GetAnnotationByIndex + public SharpDX.Direct3D10.EffectVariable GetAnnotationByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[2])); + return __result__; + } + } + + /// + ///

Get an annotation by name.

+ ///
+ ///

Name of the annotation.

+ ///

A reference to an Interface.

+ /// + ///

Use an annotation to attach a piece of metadata to a technique.

+ ///
+ /// + /// bb173711 + /// ID3D10EffectVariable* ID3D10EffectTechnique::GetAnnotationByName([In] const char* Name) + /// ID3D10EffectTechnique::GetAnnotationByName + public SharpDX.Direct3D10.EffectVariable GetAnnotationByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[3])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Get a pass by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to a Interface.

+ /// + ///

A technique contains one or more passes; get a pass using a name or an index.

+ ///
+ /// + /// bb173713 + /// ID3D10EffectPass* ID3D10EffectTechnique::GetPassByIndex([In] unsigned int Index) + /// ID3D10EffectTechnique::GetPassByIndex + public SharpDX.Direct3D10.EffectPass GetPassByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectPass __result__; + __result__= + new SharpDX.Direct3D10.EffectPass((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[4])); + return __result__; + } + } + + /// + ///

Get a pass by name.

+ ///
+ ///

The name of the pass.

+ ///

A reference to an Interface.

+ /// + ///

A technique contains one or more passes; get a pass using a name or an index.

+ ///
+ /// + /// bb173714 + /// ID3D10EffectPass* ID3D10EffectTechnique::GetPassByName([In] const char* Name) + /// ID3D10EffectTechnique::GetPassByName + public SharpDX.Direct3D10.EffectPass GetPassByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectPass __result__; + __result__= + new SharpDX.Direct3D10.EffectPass((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[5])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Compute a state-block mask to allow/prevent state changes.

+ ///
+ ///

A reference to a state-block mask (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173709 + /// HRESULT ID3D10EffectTechnique::ComputeStateBlockMask([Out] D3D10_STATE_BLOCK_MASK* pStateBlockMask) + /// ID3D10EffectTechnique::ComputeStateBlockMask + public void ComputeStateBlockMask(out SharpDX.Direct3D10.StateBlockMask stateBlockMaskRef) { + unsafe { + var stateBlockMaskRef_ = new SharpDX.Direct3D10.StateBlockMask.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &stateBlockMaskRef_,((void**)(*(void**)_nativePointer))[6]); + stateBlockMaskRef = new SharpDX.Direct3D10.StateBlockMask(); + stateBlockMaskRef.__MarshalFrom(ref stateBlockMaskRef_); + __result__.CheckError(); + } + } + } + /// + ///

Get an member type by name.

+ ///
+ /// + /// bb173721 + /// ID3D10EffectType + /// ID3D10EffectType + [Guid("4e9e1ddc-cd9d-4772-a837-00180b9b88fd")] + public partial class EffectType : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectType(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectType(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectType(nativePointer); + } + + + /// + ///

Tests that the effect type is valid.

+ ///
+ /// + /// bb173723 + /// IsValid + /// IsValid + /// BOOL ID3D10EffectType::IsValid() + public SharpDX.Mathematics.Interop.RawBool IsValid { + get { return IsValid_(); } + } + + /// + ///

Get an effect-type description.

+ ///
+ /// + ///

The effect-variable description contains data about the name, annotations, semantic, flags and buffer offset of the effect type.

+ ///
+ /// + /// bb173717 + /// GetDesc + /// GetDesc + /// HRESULT ID3D10EffectType::GetDesc([Out] D3D10_EFFECT_TYPE_DESC* pDesc) + public SharpDX.Direct3D10.EffectTypeDescription Description { + get { SharpDX.Direct3D10.EffectTypeDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Tests that the effect type is valid.

+ ///
+ ///

TRUE if it is valid; otherwise .

+ /// + /// bb173723 + /// BOOL ID3D10EffectType::IsValid() + /// ID3D10EffectType::IsValid + internal SharpDX.Mathematics.Interop.RawBool IsValid_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[0]); + return __result__; + } + } + + /// + ///

Get an effect-type description.

+ ///
+ ///

A reference to an effect-type description. See .

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

The effect-variable description contains data about the name, annotations, semantic, flags and buffer offset of the effect type.

+ ///
+ /// + /// bb173717 + /// HRESULT ID3D10EffectType::GetDesc([Out] D3D10_EFFECT_TYPE_DESC* pDesc) + /// ID3D10EffectType::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.EffectTypeDescription descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.EffectTypeDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[1]); + descRef = new SharpDX.Direct3D10.EffectTypeDescription(); + descRef.__MarshalFrom(ref descRef_); + __result__.CheckError(); + } + } + + /// + ///

Get a member type by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to an Interface.

+ /// + /// bb173720 + /// ID3D10EffectType* ID3D10EffectType::GetMemberTypeByIndex([In] unsigned int Index) + /// ID3D10EffectType::GetMemberTypeByIndex + public SharpDX.Direct3D10.EffectType GetMemberTypeByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectType __result__; + __result__= + new SharpDX.Direct3D10.EffectType((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[2])); + return __result__; + } + } + + /// + ///

Get an member type by name.

+ ///
+ ///

A member's name.

+ ///

A reference to an Interface.

+ /// + /// bb173721 + /// ID3D10EffectType* ID3D10EffectType::GetMemberTypeByName([In] const char* Name) + /// ID3D10EffectType::GetMemberTypeByName + public SharpDX.Direct3D10.EffectType GetMemberTypeByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectType __result__; + __result__= + new SharpDX.Direct3D10.EffectType((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[3])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Get a member type by semantic.

+ ///
+ ///

A semantic.

+ ///

A reference to an Interface.

+ /// + /// bb173722 + /// ID3D10EffectType* ID3D10EffectType::GetMemberTypeBySemantic([In] const char* Semantic) + /// ID3D10EffectType::GetMemberTypeBySemantic + public SharpDX.Direct3D10.EffectType GetMemberTypeBySemantic(string semantic) { + unsafe { + IntPtr semantic_ = Utilities.StringToHGlobalAnsi(semantic); + SharpDX.Direct3D10.EffectType __result__; + __result__= + new SharpDX.Direct3D10.EffectType((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)semantic_,((void**)(*(void**)_nativePointer))[4])); + Marshal.FreeHGlobal(semantic_ ); + return __result__; + } + } + + /// + ///

Get the name of a member.

+ ///
+ ///

A zero-based index.

+ ///

The name of the member.

+ /// + /// bb173718 + /// const char* ID3D10EffectType::GetMemberName([In] unsigned int Index) + /// ID3D10EffectType::GetMemberName + public string GetMemberName(int index) { + unsafe { + string __result__; + __result__= + Marshal.PtrToStringAnsi(SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[5])); + return __result__; + } + } + + /// + ///

Get the semantic attached to a member.

+ ///
+ ///

A zero-based index.

+ ///

A string that contains the semantic.

+ /// + /// bb173719 + /// const char* ID3D10EffectType::GetMemberSemantic([In] unsigned int Index) + /// ID3D10EffectType::GetMemberSemantic + public string GetMemberSemantic(int index) { + unsafe { + string __result__; + __result__= + Marshal.PtrToStringAnsi(SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[6])); + return __result__; + } + } + } + /// + ///

The interface is the base class for all effect variables.

The lifetime of an object is equal to the lifetime of its parent object.

  • Methods
+ ///
+ /// + /// bb173724 + /// ID3D10EffectVariable + /// ID3D10EffectVariable + [Guid("ae897105-00e6-45bf-bb8e-281dd6db8e1b")] + public partial class EffectVariable : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectVariable(nativePointer); + } + + + /// + ///

Compare the data type with the data stored.

+ ///
+ /// + ///

This method checks that the data type matches the data stored after casting one interface to another (using any of the As methods).

+ ///
+ /// + /// bb173746 + /// IsValid + /// IsValid + /// BOOL ID3D10EffectVariable::IsValid() + public SharpDX.Mathematics.Interop.RawBool IsValid { + get { return IsValid_(); } + } + + /// + ///

Get type information.

+ ///
+ /// + /// bb173745 + /// GetType + /// GetType + /// ID3D10EffectType* ID3D10EffectVariable::GetType() + public SharpDX.Direct3D10.EffectType TypeInfo { + get { return GetTypeInfo(); } + } + + /// + ///

Get a description.

+ ///
+ /// + /// bb173738 + /// GetDesc + /// GetDesc + /// HRESULT ID3D10EffectVariable::GetDesc([Out] D3D10_EFFECT_VARIABLE_DESC* pDesc) + public SharpDX.Direct3D10.EffectVariableDescription Description { + get { SharpDX.Direct3D10.EffectVariableDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a constant buffer.

+ ///
+ /// + ///

Effect variables are read-from or written-to a constant buffer.

+ ///
+ /// + /// bb173743 + /// GetParentConstantBuffer + /// GetParentConstantBuffer + /// ID3D10EffectConstantBuffer* ID3D10EffectVariable::GetParentConstantBuffer() + public SharpDX.Direct3D10.EffectConstantBuffer ParentConstantBuffer { + get { return GetParentConstantBuffer(); } + } + + /// + ///

Compare the data type with the data stored.

+ ///
+ ///

TRUE if the syntax is valid; otherwise .

+ /// + ///

This method checks that the data type matches the data stored after casting one interface to another (using any of the As methods).

+ ///
+ /// + /// bb173746 + /// BOOL ID3D10EffectVariable::IsValid() + /// ID3D10EffectVariable::IsValid + internal SharpDX.Mathematics.Interop.RawBool IsValid_() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[0]); + return __result__; + } + } + + /// + ///

Get type information.

+ ///
+ ///

A reference to an Interface.

+ /// + /// bb173745 + /// ID3D10EffectType* ID3D10EffectVariable::GetType() + /// ID3D10EffectVariable::GetType + internal SharpDX.Direct3D10.EffectType GetTypeInfo() { + unsafe { + SharpDX.Direct3D10.EffectType __result__; + __result__= + new SharpDX.Direct3D10.EffectType((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[1])); + return __result__; + } + } + + /// + ///

Get a description.

+ ///
+ ///

A reference to an effect-variable description (see ).

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173738 + /// HRESULT ID3D10EffectVariable::GetDesc([Out] D3D10_EFFECT_VARIABLE_DESC* pDesc) + /// ID3D10EffectVariable::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.EffectVariableDescription descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.EffectVariableDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[2]); + descRef = new SharpDX.Direct3D10.EffectVariableDescription(); + descRef.__MarshalFrom(ref descRef_); + __result__.CheckError(); + } + } + + /// + ///

Get an annotation by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to an Interface.

+ /// + ///

Annonations can be attached to a technique, a pass or a gloval variable. For the syntax, see Annotation Syntax (Direct3D 10).

+ ///
+ /// + /// bb173736 + /// ID3D10EffectVariable* ID3D10EffectVariable::GetAnnotationByIndex([In] unsigned int Index) + /// ID3D10EffectVariable::GetAnnotationByIndex + public SharpDX.Direct3D10.EffectVariable GetAnnotationByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[3])); + return __result__; + } + } + + /// + ///

Get an annotation by name.

+ ///
+ ///

The annotation name.

+ ///

A reference to an Interface. Note that if the annotation is not found the Interface returned will be empty. The method should be called to determine whether the annotation was found.

+ /// + ///

Annonations can be attached to a technique, a pass or a gloval variable. For the syntax, see Annotation Syntax (Direct3D 10).

+ ///
+ /// + /// bb173737 + /// ID3D10EffectVariable* ID3D10EffectVariable::GetAnnotationByName([In] const char* Name) + /// ID3D10EffectVariable::GetAnnotationByName + public SharpDX.Direct3D10.EffectVariable GetAnnotationByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[4])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Get a structure member by index.

+ ///
+ ///

A zero-based index.

+ ///

A reference to an Interface.

+ /// + ///

If the effect variable is an structure, use this method to look up a member by index.

+ ///
+ /// + /// bb173740 + /// ID3D10EffectVariable* ID3D10EffectVariable::GetMemberByIndex([In] unsigned int Index) + /// ID3D10EffectVariable::GetMemberByIndex + public SharpDX.Direct3D10.EffectVariable GetMemberByIndex(int index) { + unsafe { + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[5])); + return __result__; + } + } + + /// + ///

Get a structure member by name.

+ ///
+ ///

Member name.

+ ///

A reference to an Interface.

+ /// + ///

If the effect variable is an structure, use this method to look up a member by name.

+ ///
+ /// + /// bb173741 + /// ID3D10EffectVariable* ID3D10EffectVariable::GetMemberByName([In] const char* Name) + /// ID3D10EffectVariable::GetMemberByName + public SharpDX.Direct3D10.EffectVariable GetMemberByName(string name) { + unsafe { + IntPtr name_ = Utilities.StringToHGlobalAnsi(name); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)name_,((void**)(*(void**)_nativePointer))[6])); + Marshal.FreeHGlobal(name_ ); + return __result__; + } + } + + /// + ///

Get a structure member by semantic.

+ ///
+ ///

The semantic.

+ ///

A reference to an Interface.

+ /// + ///

If the effect variable is an structure, use this method to look up a member by attached semantic.

+ ///
+ /// + /// bb173742 + /// ID3D10EffectVariable* ID3D10EffectVariable::GetMemberBySemantic([In] const char* Semantic) + /// ID3D10EffectVariable::GetMemberBySemantic + public SharpDX.Direct3D10.EffectVariable GetMemberBySemantic(string semantic) { + unsafe { + IntPtr semantic_ = Utilities.StringToHGlobalAnsi(semantic); + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, (void*)semantic_,((void**)(*(void**)_nativePointer))[7])); + Marshal.FreeHGlobal(semantic_ ); + return __result__; + } + } + + /// + ///

Get an array element.

+ ///
+ ///

A zero-based index; otherwise 0.

+ ///

A reference to an Interface.

+ /// + ///

If the effect variable is an array, use this method to return one of the elements.

+ ///
+ /// + /// bb173739 + /// ID3D10EffectVariable* ID3D10EffectVariable::GetElement([In] unsigned int Index) + /// ID3D10EffectVariable::GetElement + public SharpDX.Direct3D10.EffectVariable GetElement(int index) { + unsafe { + SharpDX.Direct3D10.EffectVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer, index,((void**)(*(void**)_nativePointer))[8])); + return __result__; + } + } + + /// + ///

Get a constant buffer.

+ ///
+ ///

A reference to a Interface.

+ /// + ///

Effect variables are read-from or written-to a constant buffer.

+ ///
+ /// + /// bb173743 + /// ID3D10EffectConstantBuffer* ID3D10EffectVariable::GetParentConstantBuffer() + /// ID3D10EffectVariable::GetParentConstantBuffer + internal SharpDX.Direct3D10.EffectConstantBuffer GetParentConstantBuffer() { + unsafe { + SharpDX.Direct3D10.EffectConstantBuffer __result__; + __result__= + new SharpDX.Direct3D10.EffectConstantBuffer((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[9])); + return __result__; + } + } + + /// + ///

Get a scalar variable.

+ ///
+ ///

A reference to a scalar variable. See .

+ /// + ///

AsScalar returns a version of the effect variable that has been specialized to a scalar variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain scalar data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173731 + /// ID3D10EffectScalarVariable* ID3D10EffectVariable::AsScalar() + /// ID3D10EffectVariable::AsScalar + internal SharpDX.Direct3D10.EffectScalarVariable AsScalar_() { + unsafe { + SharpDX.Direct3D10.EffectScalarVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectScalarVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[10])); + return __result__; + } + } + + /// + ///

Get a vector variable.

+ ///
+ ///

A reference to a vector variable. See .

+ /// + ///

AsVector returns a version of the effect variable that has been specialized to a vector variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain vector data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173735 + /// ID3D10EffectVectorVariable* ID3D10EffectVariable::AsVector() + /// ID3D10EffectVariable::AsVector + internal SharpDX.Direct3D10.EffectVectorVariable AsVector_() { + unsafe { + SharpDX.Direct3D10.EffectVectorVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectVectorVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[11])); + return __result__; + } + } + + /// + ///

Get a matrix variable.

+ ///
+ ///

A reference to a matrix variable. See .

+ /// + ///

AsMatrix returns a version of the effect variable that has been specialized to a matrix variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain matrix data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173728 + /// ID3D10EffectMatrixVariable* ID3D10EffectVariable::AsMatrix() + /// ID3D10EffectVariable::AsMatrix + internal SharpDX.Direct3D10.EffectMatrixVariable AsMatrix_() { + unsafe { + SharpDX.Direct3D10.EffectMatrixVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectMatrixVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[12])); + return __result__; + } + } + + /// + ///

Get a string variable.

+ ///
+ ///

A reference to a string variable. See .

+ /// + ///

AsString returns a version of the effect variable that has been specialized to a string variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain string data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173734 + /// ID3D10EffectStringVariable* ID3D10EffectVariable::AsString() + /// ID3D10EffectVariable::AsString + internal SharpDX.Direct3D10.EffectStringVariable AsString_() { + unsafe { + SharpDX.Direct3D10.EffectStringVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectStringVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[13])); + return __result__; + } + } + + /// + ///

Get a shader-resource variable.

+ ///
+ ///

A reference to a shader-resource variable. See .

+ /// + ///

AsShaderResource returns a version of the effect variable that has been specialized to a shader-resource variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader-resource data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173733 + /// ID3D10EffectShaderResourceVariable* ID3D10EffectVariable::AsShaderResource() + /// ID3D10EffectVariable::AsShaderResource + internal SharpDX.Direct3D10.EffectShaderResourceVariable AsShaderResource_() { + unsafe { + SharpDX.Direct3D10.EffectShaderResourceVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectShaderResourceVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[14])); + return __result__; + } + } + + /// + ///

Get a render-target-view variable.

+ ///
+ ///

A reference to a render-target-view variable. See Interface.

+ /// + ///

This method returns a version of the effect variable that has been specialized to a render-target-view variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain render-target-view data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb944008 + /// ID3D10EffectRenderTargetViewVariable* ID3D10EffectVariable::AsRenderTargetView() + /// ID3D10EffectVariable::AsRenderTargetView + internal SharpDX.Direct3D10.EffectRenderTargetViewVariable AsRenderTargetView_() { + unsafe { + SharpDX.Direct3D10.EffectRenderTargetViewVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectRenderTargetViewVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[15])); + return __result__; + } + } + + /// + ///

Get a depth-stencil-view variable.

+ ///
+ ///

A reference to a depth-stencil-view variable. See Interface.

+ /// + ///

This method returns a version of the effect variable that has been specialized to a depth-stencil-view variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain depth-stencil-view data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb944007 + /// ID3D10EffectDepthStencilViewVariable* ID3D10EffectVariable::AsDepthStencilView() + /// ID3D10EffectVariable::AsDepthStencilView + internal SharpDX.Direct3D10.EffectDepthStencilViewVariable AsDepthStencilView_() { + unsafe { + SharpDX.Direct3D10.EffectDepthStencilViewVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectDepthStencilViewVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[16])); + return __result__; + } + } + + /// + ///

Get a constant buffer.

+ ///
+ ///

A reference to a constant buffer. See .

+ /// + ///

AsConstantBuffer returns a version of the effect variable that has been specialized to a constant buffer. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain constant buffer data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173726 + /// ID3D10EffectConstantBuffer* ID3D10EffectVariable::AsConstantBuffer() + /// ID3D10EffectVariable::AsConstantBuffer + internal SharpDX.Direct3D10.EffectConstantBuffer AsConstantBuffer_() { + unsafe { + SharpDX.Direct3D10.EffectConstantBuffer __result__; + __result__= + new SharpDX.Direct3D10.EffectConstantBuffer((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[17])); + return __result__; + } + } + + /// + ///

Get a shader variable.

+ ///
+ ///

A reference to a shader variable. See .

+ /// + ///

AsShader returns a version of the effect variable that has been specialized to a shader variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173732 + /// ID3D10EffectShaderVariable* ID3D10EffectVariable::AsShader() + /// ID3D10EffectVariable::AsShader + internal SharpDX.Direct3D10.EffectShaderVariable AsShader_() { + unsafe { + SharpDX.Direct3D10.EffectShaderVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectShaderVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[18])); + return __result__; + } + } + + /// + ///

Get a effect-blend variable.

+ ///
+ ///

A reference to an effect blend variable. See .

+ /// + ///

AsBlend returns a version of the effect variable that has been specialized to an effect-blend variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain effect-blend data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173725 + /// ID3D10EffectBlendVariable* ID3D10EffectVariable::AsBlend() + /// ID3D10EffectVariable::AsBlend + internal SharpDX.Direct3D10.EffectBlendVariable AsBlend_() { + unsafe { + SharpDX.Direct3D10.EffectBlendVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectBlendVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[19])); + return __result__; + } + } + + /// + ///

Get a depth-stencil variable.

+ ///
+ ///

A reference to a depth-stencil variable. See .

+ /// + ///

AsDepthStencil returns a version of the effect variable that has been specialized to a depth-stencil variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain depth-stencil data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173727 + /// ID3D10EffectDepthStencilVariable* ID3D10EffectVariable::AsDepthStencil() + /// ID3D10EffectVariable::AsDepthStencil + internal SharpDX.Direct3D10.EffectDepthStencilVariable AsDepthStencil_() { + unsafe { + SharpDX.Direct3D10.EffectDepthStencilVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectDepthStencilVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[20])); + return __result__; + } + } + + /// + ///

Get a rasterizer variable.

+ ///
+ ///

A reference to a rasterizer variable. See .

+ /// + ///

AsRasterizer returns a version of the effect variable that has been specialized to a rasterizer variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain rasterizer data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173729 + /// ID3D10EffectRasterizerVariable* ID3D10EffectVariable::AsRasterizer() + /// ID3D10EffectVariable::AsRasterizer + internal SharpDX.Direct3D10.EffectRasterizerVariable AsRasterizer_() { + unsafe { + SharpDX.Direct3D10.EffectRasterizerVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectRasterizerVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[21])); + return __result__; + } + } + + /// + ///

Get a sampler variable.

+ ///
+ ///

A reference to a sampler variable. See .

+ /// + ///

AsSampler returns a version of the effect variable that has been specialized to a sampler variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain sampler data.

Applications can test the returned object for validity by calling IsValid.

+ ///
+ /// + /// bb173730 + /// ID3D10EffectSamplerVariable* ID3D10EffectVariable::AsSampler() + /// ID3D10EffectVariable::AsSampler + internal SharpDX.Direct3D10.EffectSamplerVariable AsSampler_() { + unsafe { + SharpDX.Direct3D10.EffectSamplerVariable __result__; + __result__= + new SharpDX.Direct3D10.EffectSamplerVariable((IntPtr)SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[22])); + return __result__; + } + } + + /// + ///

Set data.

+ ///
+ ///

A reference to the variable.

+ ///

The offset (in bytes) from the beginning of the reference to the data.

+ ///

The number of bytes to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This method does no conversion or type checking; it is therefore a very quick way to access array items.

+ ///
+ /// + /// bb173747 + /// HRESULT ID3D10EffectVariable::SetRawValue([In, Buffer] void* pData,[In] unsigned int Offset,[In] unsigned int ByteCount) + /// ID3D10EffectVariable::SetRawValue + public void SetRawValue(System.IntPtr dataRef, int offset, int byteCount) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)dataRef, offset, byteCount,((void**)(*(void**)_nativePointer))[23]); + __result__.CheckError(); + } + } + + /// + ///

Get data.

+ ///
+ ///

A reference to the variable.

+ ///

The offset (in bytes) from the beginning of the reference to the data.

+ ///

The number of bytes to get.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This method does no conversion or type checking; it is therefore a very quick way to access array items.

+ ///
+ /// + /// bb173744 + /// HRESULT ID3D10EffectVariable::GetRawValue([Out, Buffer] void* pData,[In] unsigned int Offset,[In] unsigned int ByteCount) + /// ID3D10EffectVariable::GetRawValue + public void GetRawValue(System.IntPtr dataRef, int offset, int byteCount) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)dataRef, offset, byteCount,((void**)(*(void**)_nativePointer))[24]); + __result__.CheckError(); + } + } + } + /// + ///

A vector-variable interface accesses a four-component vector.

+ ///
+ /// + /// bb173748 + /// ID3D10EffectVectorVariable + /// ID3D10EffectVectorVariable + [Guid("62b98c44-1f82-4c67-bcd0-72cf8f217e81")] + public partial class EffectVectorVariable : SharpDX.Direct3D10.EffectVariable { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public EffectVectorVariable(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.EffectVectorVariable(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.EffectVectorVariable(nativePointer); + } + + + /// + ///

Set a four-component vector that contains boolean data.

+ ///
+ ///

A reference to the first component.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173755 + /// HRESULT ID3D10EffectVectorVariable::SetBoolVector([In] SHARPDX_BOOL4* pData) + /// ID3D10EffectVectorVariable::SetBoolVector + public void Set(SharpDX.Mathematics.Interop.RawBool4 dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &dataRef,((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Set a four-component vector that contains integer data.

+ ///
+ ///

A reference to the first component.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173759 + /// HRESULT ID3D10EffectVectorVariable::SetIntVector([In] SHARPDX_INT4* pData) + /// ID3D10EffectVectorVariable::SetIntVector + public void Set(SharpDX.Mathematics.Interop.RawInt4 dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &dataRef,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + } + } + + /// + ///

Set a four-component vector that contains floating-point data.

+ ///
+ ///

A reference to the first component.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173757 + /// HRESULT ID3D10EffectVectorVariable::SetFloatVector([In] float* pData) + /// ID3D10EffectVectorVariable::SetFloatVector + public void Set(float dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &dataRef,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Get a four-component vector that contains boolean data.

+ ///
+ ///

A reference to the first component.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173749 + /// HRESULT ID3D10EffectVectorVariable::GetBoolVector([Out] SHARPDX_BOOL4* pData) + /// ID3D10EffectVectorVariable::GetBoolVector + internal void GetBoolVector(out SharpDX.Mathematics.Interop.RawBool4 dataRef) { + unsafe { + dataRef = new SharpDX.Mathematics.Interop.RawBool4(); + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[28]); + __result__.CheckError(); + } + } + + /// + ///

Get a four-component vector that contains integer data.

+ ///
+ ///

A reference to the first component.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173753 + /// HRESULT ID3D10EffectVectorVariable::GetIntVector([Out] SHARPDX_INT4* pData) + /// ID3D10EffectVectorVariable::GetIntVector + internal void GetIntVector(out SharpDX.Mathematics.Interop.RawInt4 dataRef) { + unsafe { + dataRef = new SharpDX.Mathematics.Interop.RawInt4(); + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[29]); + __result__.CheckError(); + } + } + + /// + ///

Get a four-component vector that contains floating-point data.

+ ///
+ ///

A reference to the first component.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173751 + /// HRESULT ID3D10EffectVectorVariable::GetFloatVector([Out] SHARPDX_VECTOR4* pData) + /// ID3D10EffectVectorVariable::GetFloatVector + internal void GetFloatVector(out SharpDX.Mathematics.Interop.RawVector4 dataRef) { + unsafe { + dataRef = new SharpDX.Mathematics.Interop.RawVector4(); + SharpDX.Result __result__; + fixed (void* dataRef_ = &dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_,((void**)(*(void**)_nativePointer))[30]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of four-component vectors that contain boolean data.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173756 + /// HRESULT ID3D10EffectVectorVariable::SetBoolVectorArray([In, Buffer] SHARPDX_BOOL4* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectVectorVariable::SetBoolVectorArray + internal void Set(SharpDX.Mathematics.Interop.RawBool4[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[31]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of four-component vectors that contain integer data.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173760 + /// HRESULT ID3D10EffectVectorVariable::SetIntVectorArray([In, Buffer] SHARPDX_INT4* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectVectorVariable::SetIntVectorArray + internal void Set(SharpDX.Mathematics.Interop.RawInt4[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[32]); + __result__.CheckError(); + } + } + + /// + ///

Set an array of four-component vectors that contain floating-point data.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173758 + /// HRESULT ID3D10EffectVectorVariable::SetFloatVectorArray([In, Buffer] SHARPDX_VECTOR4* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectVectorVariable::SetFloatVectorArray + internal void Set(SharpDX.Mathematics.Interop.RawVector4[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[33]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of four-component vectors that contain boolean data.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173750 + /// HRESULT ID3D10EffectVectorVariable::GetBoolVectorArray([Out, Buffer] SHARPDX_BOOL4* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectVectorVariable::GetBoolVectorArray + internal void GetBoolVectorArray(SharpDX.Mathematics.Interop.RawBool4[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[34]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of four-component vectors that contain integer data.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173754 + /// HRESULT ID3D10EffectVectorVariable::GetIntVectorArray([Out, Buffer] SHARPDX_INT4* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectVectorVariable::GetIntVectorArray + internal void GetIntVectorArray(SharpDX.Mathematics.Interop.RawInt4[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[35]); + __result__.CheckError(); + } + } + + /// + ///

Get an array of four-component vectors that contain floating-point data.

+ ///
+ ///

A reference to the start of the data to set.

+ ///

Must be set to 0; this is reserved for future use.

+ ///

The number of array elements to set.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173752 + /// HRESULT ID3D10EffectVectorVariable::GetFloatVectorArray([Out, Buffer] SHARPDX_VECTOR4* pData,[In] unsigned int Offset,[In] unsigned int Count) + /// ID3D10EffectVectorVariable::GetFloatVectorArray + internal void GetFloatVectorArray(SharpDX.Mathematics.Interop.RawVector4[] dataRef, int offset, int count) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataRef_ = dataRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataRef_, offset, count,((void**)(*(void**)_nativePointer))[36]); + __result__.CheckError(); + } + } + } + /// + ///

The interface encapsulates the textures and resources needed to render a specific font on a specific device.

+ ///
+ /// + ///

The interface is obtained by calling or .

The LPD3DX10FONT type is defined as a reference to the interface.

 typedef interface  ;	
+    /// typedef interface  *LPD3DX10FONT;	
+    /// 
+ ///
+ /// + /// bb173886 + /// ID3DX10Font + /// ID3DX10Font + [Guid("d79dbb70-5f21-4d36-bbc2-ff525c213cdc")] + public partial class Font : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Font(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Font(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Font(nativePointer); + } + + + /// + ///

Retrieve the Direct3D device associated with the font object.

+ ///
+ /// + ///

Note??Calling this method will increase the internal reference count on the interface. Be sure to call when you are done using this interface or you will have a memory leak.

+ ///
+ /// + /// bb173891 + /// GetDevice + /// GetDevice + /// HRESULT ID3DX10Font::GetDevice([Out] ID3D10Device** ppDevice) + public SharpDX.Direct3D10.Device Device { + get { SharpDX.Direct3D10.Device __output__; GetDevice(out __output__); return __output__; } + } + + /// + ///

Get a description of the current font object.

+ ///
+ /// + ///

This method describes Unicode font objects if UNICODE is defined. Otherwise GetDescA is called, which returns a reference to the D3DX10FONT_DESCA structure.

+ ///
+ /// + /// bb173890 + /// GetDescW + /// GetDescW + /// HRESULT ID3DX10Font::GetDescW([Out] D3DX10_FONT_DESCW* pDesc) + public SharpDX.Direct3D10.FontDescription Description { + get { SharpDX.Direct3D10.FontDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Return a handle to a display device context (DC) that has the font set onto it.

+ ///
+ /// + /// bb173889 + /// GetDC + /// GetDC + /// HDC ID3DX10Font::GetDC() + public System.IntPtr DeviceContext { + get { return GetDeviceContext(); } + } + + /// + ///

Retrieve the Direct3D device associated with the font object.

+ ///
+ ///

Address of a reference to an interface, representing the Direct3D device object associated with the font object.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + ///

Note??Calling this method will increase the internal reference count on the interface. Be sure to call when you are done using this interface or you will have a memory leak.

+ ///
+ /// + /// bb173891 + /// HRESULT ID3DX10Font::GetDevice([Out] ID3D10Device** ppDevice) + /// ID3DX10Font::GetDevice + internal void GetDevice(out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &deviceOut_,((void**)(*(void**)_nativePointer))[3]); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + + /// + ///

Get a description of the current font object.

+ ///
+ ///

Pointer to a structure that describes the font object. If UNICODE is defined, a reference to a D3DX10FONT_DESCW is returned; otherwise a reference to a D3DX10FONT_DESCA is returned.

+ ///

If the method succeeds, the return value is . If the method fails, the following value will be returned: D3DERR_INVALIDCALL.

+ /// + ///

This method describes Unicode font objects if UNICODE is defined. Otherwise GetDescA is called, which returns a reference to the D3DX10FONT_DESCA structure.

+ ///
+ /// + /// bb173890 + /// HRESULT ID3DX10Font::GetDescW([Out] D3DX10_FONT_DESCW* pDesc) + /// ID3DX10Font::GetDescW + internal void GetDescription(out SharpDX.Direct3D10.FontDescription descRef) { + unsafe { + var descRef_ = new SharpDX.Direct3D10.FontDescription.__Native(); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &descRef_,((void**)(*(void**)_nativePointer))[5]); + descRef = new SharpDX.Direct3D10.FontDescription(); + descRef.__MarshalFrom(ref descRef_); + __result__.CheckError(); + } + } + + /// + ///

Retrieve font characteristics.

+ ///
+ ///

Pointer to a structure, which contains font properties. If Unicode is defined, the function returns a structure. Otherwise, the function returns a structure.

+ ///

Nonzero if the function is successful; otherwise 0.

+ /// + /// bb173893 + /// BOOL ID3DX10Font::GetTextMetricsW([In] void* pTextMetrics) + /// ID3DX10Font::GetTextMetricsW + internal SharpDX.Mathematics.Interop.RawBool GetTextMetrics(System.IntPtr textMetricsRef) { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer, (void*)textMetricsRef,((void**)(*(void**)_nativePointer))[7]); + return __result__; + } + } + + /// + ///

Return a handle to a display device context (DC) that has the font set onto it.

+ ///
+ ///

Handle to a display DC.

+ /// + /// bb173889 + /// HDC ID3DX10Font::GetDC() + /// ID3DX10Font::GetDC + internal System.IntPtr GetDeviceContext() { + unsafe { + System.IntPtr __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSystemIntPtr(_nativePointer,((void**)(*(void**)_nativePointer))[8]); + return __result__; + } + } + + /// + ///

Return information about the placement and orientation of a glyph in a character cell.

+ ///
+ ///

Glyph identifier.

+ ///

Address of a reference to a ID3D10Texture object that contains the glyph.

+ ///

Pointer to the smallest rectangle object that completely encloses the glyph. See .

+ ///

Pointer to the two-dimensional vector that connects the origin of the current character cell to the origin of the next character cell. See .

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + /// bb173892 + /// HRESULT ID3DX10Font::GetGlyphData([In] unsigned int Glyph,[Out] ID3D10ShaderResourceView** ppTexture,[Out] RECT* pBlackBox,[Out] POINT* pCellInc) + /// ID3DX10Font::GetGlyphData + public void GetGlyphData(int glyph, out SharpDX.Direct3D10.ShaderResourceView textureOut, out SharpDX.Mathematics.Interop.RawRectangle blackBoxRef, out SharpDX.Mathematics.Interop.RawPoint cellIncRef) { + unsafe { + IntPtr textureOut_ = IntPtr.Zero; + blackBoxRef = new SharpDX.Mathematics.Interop.RawRectangle(); + cellIncRef = new SharpDX.Mathematics.Interop.RawPoint(); + SharpDX.Result __result__; + fixed (void* blackBoxRef_ = &blackBoxRef) + fixed (void* cellIncRef_ = &cellIncRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, glyph, &textureOut_, blackBoxRef_, cellIncRef_,((void**)(*(void**)_nativePointer))[9]); + textureOut= (textureOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(textureOut_); + __result__.CheckError(); + } + } + + /// + ///

Load a series of characters into video memory to improve the efficiency of rendering to the device.

+ ///
+ ///

ID of the first character to be loaded into video memory.

+ ///

ID of the last character to be loaded into video memory.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + ///

This method generates textures containing glyphs that represent the input characters. The glyphs are drawn as a series of triangles.

Characters will not be rendered to the device; must still be called to render the characters. However, by pre-loading characters into video memory, will use substantially fewer CPU resources.

This method internally converts characters to glyphs using the GDI function GetCharacterPlacement.

+ ///
+ /// + /// bb173894 + /// HRESULT ID3DX10Font::PreloadCharacters([In] unsigned int First,[In] unsigned int Last) + /// ID3DX10Font::PreloadCharacters + public void PreloadCharacters(int first, int last) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, first, last,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Load a series of glyphs into video memory to improve the efficiency of rendering to the device.

+ ///
+ ///

ID of the first glyph to be loaded into video memory.

+ ///

ID of the last glyph to be loaded into video memory.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + ///

This method generates textures that contain the input glyphs. The glyphs are drawn as a series of triangles.

Glyphs will not be rendered to the device; must still be called to render the glyphs. However, by pre-loading glyphs into video memory, will use substantially fewer CPU resources.

+ ///
+ /// + /// bb173895 + /// HRESULT ID3DX10Font::PreloadGlyphs([In] unsigned int First,[In] unsigned int Last) + /// ID3DX10Font::PreloadGlyphs + public void PreloadGlyphs(int first, int last) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, first, last,((void**)(*(void**)_nativePointer))[11]); + __result__.CheckError(); + } + } + + /// + ///

Load formatted text into video memory to improve the efficiency of rendering to the device. This method supports ANSI and Unicode strings.

+ ///
+ ///

Pointer to a string of characters to be loaded into video memory. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR; otherwise, the data type resolves to LPCSTR. See Remarks.

+ ///

Number of characters in the text string.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + ///

The compiler setting also determines the function version. If Unicode is defined, the function call resolves to PreloadTextW. Otherwise, the function call resolves to PreloadTextA because ANSI strings are being used.

This method generates textures that contain glyphs that represent the input text. The glyphs are drawn as a series of triangles.

Text will not be rendered to the device; must still be called to render the text. However, by preloading text into video memory, will use substantially fewer CPU resources.

This method internally converts characters to glyphs using the GDI function GetCharacterPlacement.

+ ///
+ /// + /// bb173896 + /// HRESULT ID3DX10Font::PreloadTextW([In] const wchar_t* pString,[In] int Count) + /// ID3DX10Font::PreloadTextW + internal void PreloadText(string stringRef, int count) { + unsafe { + SharpDX.Result __result__; + fixed (char* stringRef_ = stringRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)stringRef_, count,((void**)(*(void**)_nativePointer))[13]); + __result__.CheckError(); + } + } + + /// + ///

Draw formatted text. This method supports ANSI and Unicode strings.

+ ///
+ ///

Pointer to an object that contains the string you wish to draw. Can be null, in which case Direct3D will render the string with its own sprite object. To improve efficiency, a sprite object should be specified if is to be called more than once in a row.

+ ///

Pointer to a string to draw. If UNICODE is defined, this parameter type resolves to an LPCWSTR, otherwise, the type resolves to an LPCSTR. If the Count parameter is -1, the string must be null terminated.

+ ///

The number of characters in the string. If Count is -1, then the pString parameter is assumed to be a reference to a sprite containing a null-terminated string and computes the character count automatically.

+ ///

Pointer to a structure that contains the rectangle, in logical coordinates, in which the text is to be formatted. As with any object, the coordinate value of the rectangle's right side must be greater than that of its left side. Likewise, the coordinate value of the bottom must be greater than that of the top.

+ ///

Specify the method of formatting the text. It can be any combination of the following values:

ItemDescription

DT_BOTTOM

Justify the text to the bottom of the rectangle. This value must be combined with DT_SINGLELINE.

DT_CALCRECT

Tell DrawText to automatically calculate the width and height of the rectangle based on the length of the string you tell it to draw. If there are multiple lines of text, uses the width of the rectangle pointed to by the pRect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, modifies the right side of the rectangle so that it bounds the last character in the line. In either case, returns the height of the formatted text but does not draw the text.

DT_CENTER

Center text horizontally in the rectangle.

DT_EXPANDTABS

Expand tab characters. The default number of characters per tab is eight.

DT_LEFT

Align text to the left.

DT_NOCLIP

Draw without clipping. is somewhat faster when DT_NOCLIP is used.

DT_RIGHT

Align text to the right.

DT_RTLREADING

Display text in right-to-left reading order for bidirectional text when a Hebrew or Arabic font is selected. The default reading order for all text is left-to-right.

DT_SINGLELINE

Display text on a single line only. Carriage returns and line feeds do not break the line.

DT_TOP

Top-justify text.

DT_VCENTER

Center text vertically (single line only).

DT_WORDBREAK

Break words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the pRect parameter. A carriage return/line feed sequence also breaks the line.

?

+ ///

Color of the text. See .

+ ///

If the function succeeds, the return value is the height of the text in logical units. If DT_VCENTER or DT_BOTTOM is specified, the return value is the offset from pRect (top to the bottom) of the drawn text. If the function fails, the return value is zero.

+ /// + ///

The parameters of this method are very similar to those of the GDI DrawText function.

This method supports both ANSI and Unicode strings.

Unless the DT_NOCLIP format is used, this method clips the text so that it does not appear outside the specified rectangle. All formatting is assumed to have multiple lines unless the DT_SINGLELINE format is specified.

If the selected font is too large for the rectangle, this method does not attempt to substitute a smaller font.

This method supports only fonts whose escapement and orientation are both zero.

+ ///
+ /// + /// bb173887 + /// int ID3DX10Font::DrawTextW([In] ID3DX10Sprite* pSprite,[In] const wchar_t* pString,[In] int Count,[In] void* pRect,[In] unsigned int Format,[In] D3DXCOLOR Color) + /// ID3DX10Font::DrawTextW + internal int DrawText(SharpDX.Direct3D10.Sprite spriteRef, string stringRef, int count, System.IntPtr rectRef, int format, SharpDX.Mathematics.Interop.RawColor4 color) { + unsafe { + int __result__; + fixed (char* stringRef_ = stringRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint53(_nativePointer, (void*)((spriteRef == null)?IntPtr.Zero:spriteRef.NativePointer), (void*)stringRef_, count, (void*)rectRef, format, color,((void**)(*(void**)_nativePointer))[15]); + return __result__; + } + } + } + /// + ///

A geometry-shader interface manages an executable program (a geometry shader) that controls the geometry-shader stage.

+ ///
+ /// + ///

The geometry-shader interface has no methods; use HLSL to implement your shader functionality. All shaders in Direct3D 10 are implemented from a common set of features referred to as the common shader core.

To create a geometry shader interface, call either or . Before using a geometry shader you must bind it to the device by calling .

This interface is defined in D3D10.h.

+ ///
+ /// + /// bb173774 + /// ID3D10GeometryShader + /// ID3D10GeometryShader + [Guid("6316BE88-54CD-4040-AB44-20461BC81F68")] + public partial class GeometryShader : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public GeometryShader(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.GeometryShader(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.GeometryShader(nativePointer); + } + + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class GeometryShaderStage : CommonShaderStage { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public GeometryShaderStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.GeometryShaderStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.GeometryShaderStage(nativePointer); + } + + + /// + ///

Set the constant buffers used by the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold references to the interfaces passed in. For that reason, applications should be careful not to release interfaces currently in use by the device.

+ ///
+ /// + /// bb173580 + /// void ID3D10Device::GSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::GSSetConstantBuffers + public override void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] constantBuffersOut) { + unsafe { + IntPtr* constantBuffersOut_ = (IntPtr*)0; + if ( constantBuffersOut != null ) { + IntPtr* constantBuffersOut__ = stackalloc IntPtr[constantBuffersOut.Length]; + constantBuffersOut_ = constantBuffersOut__; + for (int i = 0; i < constantBuffersOut.Length; i++) + constantBuffersOut_[i] = (constantBuffersOut[i] == null)? IntPtr.Zero : constantBuffersOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, constantBuffersOut_,((void**)(*(void**)_nativePointer))[16]); + } + } + + /// + ///

Set the constant buffers used by the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold references to the interfaces passed in. For that reason, applications should be careful not to release interfaces currently in use by the device.

+ ///
+ /// + /// bb173580 + /// void ID3D10Device::GSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::GSSetConstantBuffers + public override void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.ComArray constantBuffersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)((constantBuffersOut == null)?IntPtr.Zero:constantBuffersOut.NativePointer),((void**)(*(void**)_nativePointer))[16]); + } + } + + /// + ///

Set the constant buffers used by the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold references to the interfaces passed in. For that reason, applications should be careful not to release interfaces currently in use by the device.

+ ///
+ /// + /// bb173580 + /// void ID3D10Device::GSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::GSSetConstantBuffers + private void SetConstantBuffers(int startSlot, int numBuffers, System.IntPtr constantBuffersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)constantBuffersOut,((void**)(*(void**)_nativePointer))[16]); + } + } + + /// + ///

Set a geometry shader to the device.

+ ///
+ ///

Pointer to a geometry shader (see ). Passing in null disables the shader for this pipeline stage.

+ /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173582 + /// void ID3D10Device::GSSetShader([In, Optional] ID3D10GeometryShader* pShader) + /// ID3D10Device::GSSetShader + public void Set(SharpDX.Direct3D10.GeometryShader shaderRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((shaderRef == null)?IntPtr.Zero:shaderRef.NativePointer),((void**)(*(void**)_nativePointer))[17]); + } + } + + /// + ///

Bind an array of shader resources to the geometry shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173583 + /// void ID3D10Device::GSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::GSSetShaderResources + public override void SetShaderResources(int startSlot, int numViews, SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsOut) { + unsafe { + IntPtr* shaderResourceViewsOut_ = (IntPtr*)0; + if ( shaderResourceViewsOut != null ) { + IntPtr* shaderResourceViewsOut__ = stackalloc IntPtr[shaderResourceViewsOut.Length]; + shaderResourceViewsOut_ = shaderResourceViewsOut__; + for (int i = 0; i < shaderResourceViewsOut.Length; i++) + shaderResourceViewsOut_[i] = (shaderResourceViewsOut[i] == null)? IntPtr.Zero : shaderResourceViewsOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, shaderResourceViewsOut_,((void**)(*(void**)_nativePointer))[22]); + } + } + + /// + ///

Bind an array of shader resources to the geometry shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173583 + /// void ID3D10Device::GSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::GSSetShaderResources + public override void SetShaderResources(int startSlot, int numViews, SharpDX.ComArray shaderResourceViewsOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, (void*)((shaderResourceViewsOut == null)?IntPtr.Zero:shaderResourceViewsOut.NativePointer),((void**)(*(void**)_nativePointer))[22]); + } + } + + /// + ///

Bind an array of shader resources to the geometry shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173583 + /// void ID3D10Device::GSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::GSSetShaderResources + private void SetShaderResources(int startSlot, int numViews, System.IntPtr shaderResourceViewsOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, (void*)shaderResourceViewsOut,((void**)(*(void**)_nativePointer))[22]); + } + } + + /// + ///

Set an array of sampler states to the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

 //Default sampler state:	
+                ///  SamplerDesc;	
+                /// SamplerDesc.Filter = ;	
+                /// SamplerDesc.AddressU = ;	
+                /// SamplerDesc.AddressV = ;	
+                /// SamplerDesc.AddressW = ;	
+                /// SamplerDesc.MipLODBias = 0;	
+                /// SamplerDesc.MaxAnisotropy = 1;	
+                /// SamplerDesc.ComparisonFunc = ;	
+                /// SamplerDesc.BorderColor[0] = 1.0f;	
+                /// SamplerDesc.BorderColor[1] = 1.0f;	
+                /// SamplerDesc.BorderColor[2] = 1.0f;	
+                /// SamplerDesc.BorderColor[3] = 1.0f;	
+                /// SamplerDesc.MinLOD = -FLT_MAX;	
+                /// SamplerDesc.MaxLOD = FLT_MAX; 

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173581 + /// void ID3D10Device::GSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::GSSetSamplers + public override void SetSamplers(int startSlot, int numSamplers, SharpDX.Direct3D10.SamplerState[] samplersOut) { + unsafe { + IntPtr* samplersOut_ = (IntPtr*)0; + if ( samplersOut != null ) { + IntPtr* samplersOut__ = stackalloc IntPtr[samplersOut.Length]; + samplersOut_ = samplersOut__; + for (int i = 0; i < samplersOut.Length; i++) + samplersOut_[i] = (samplersOut[i] == null)? IntPtr.Zero : samplersOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, samplersOut_,((void**)(*(void**)_nativePointer))[23]); + } + } + + /// + ///

Set an array of sampler states to the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

 //Default sampler state:	
+                ///  SamplerDesc;	
+                /// SamplerDesc.Filter = ;	
+                /// SamplerDesc.AddressU = ;	
+                /// SamplerDesc.AddressV = ;	
+                /// SamplerDesc.AddressW = ;	
+                /// SamplerDesc.MipLODBias = 0;	
+                /// SamplerDesc.MaxAnisotropy = 1;	
+                /// SamplerDesc.ComparisonFunc = ;	
+                /// SamplerDesc.BorderColor[0] = 1.0f;	
+                /// SamplerDesc.BorderColor[1] = 1.0f;	
+                /// SamplerDesc.BorderColor[2] = 1.0f;	
+                /// SamplerDesc.BorderColor[3] = 1.0f;	
+                /// SamplerDesc.MinLOD = -FLT_MAX;	
+                /// SamplerDesc.MaxLOD = FLT_MAX; 

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173581 + /// void ID3D10Device::GSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::GSSetSamplers + public override void SetSamplers(int startSlot, int numSamplers, SharpDX.ComArray samplersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, (void*)((samplersOut == null)?IntPtr.Zero:samplersOut.NativePointer),((void**)(*(void**)_nativePointer))[23]); + } + } + + /// + ///

Set an array of sampler states to the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

 //Default sampler state:	
+                ///  SamplerDesc;	
+                /// SamplerDesc.Filter = ;	
+                /// SamplerDesc.AddressU = ;	
+                /// SamplerDesc.AddressV = ;	
+                /// SamplerDesc.AddressW = ;	
+                /// SamplerDesc.MipLODBias = 0;	
+                /// SamplerDesc.MaxAnisotropy = 1;	
+                /// SamplerDesc.ComparisonFunc = ;	
+                /// SamplerDesc.BorderColor[0] = 1.0f;	
+                /// SamplerDesc.BorderColor[1] = 1.0f;	
+                /// SamplerDesc.BorderColor[2] = 1.0f;	
+                /// SamplerDesc.BorderColor[3] = 1.0f;	
+                /// SamplerDesc.MinLOD = -FLT_MAX;	
+                /// SamplerDesc.MaxLOD = FLT_MAX; 

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173581 + /// void ID3D10Device::GSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::GSSetSamplers + private void SetSamplers(int startSlot, int numSamplers, System.IntPtr samplersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, (void*)samplersOut,((void**)(*(void**)_nativePointer))[23]); + } + } + + /// + ///

Get the constant buffers used by the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173576 + /// void ID3D10Device::GSGetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[Out, Buffer, Optional] ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::GSGetConstantBuffers + internal override void GetConstantBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] constantBuffersOut) { + unsafe { + IntPtr* constantBuffersOut_ = stackalloc IntPtr[constantBuffersOut == null ? 0 : constantBuffersOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, constantBuffersOut==null?(void*)0:constantBuffersOut_,((void**)(*(void**)_nativePointer))[48]); + if (constantBuffersOut != null) + for (int i = 0; i < constantBuffersOut.Length; i++) + constantBuffersOut[i] = (constantBuffersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(constantBuffersOut_[i]); + } + } + + /// + ///

Get the geometry shader currently set on the device.

+ ///
+ ///

Address of a reference to a geometry shader (see ) to be returned by the method.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173578 + /// void ID3D10Device::GSGetShader([Out] ID3D10GeometryShader** ppGeometryShader) + /// ID3D10Device::GSGetShader + public void Get(out SharpDX.Direct3D10.GeometryShader geometryShaderOut) { + unsafe { + IntPtr geometryShaderOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &geometryShaderOut_,((void**)(*(void**)_nativePointer))[49]); + geometryShaderOut= (geometryShaderOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.GeometryShader(geometryShaderOut_); + } + } + + /// + ///

Get the geometry shader resources.

+ ///
+ ///

Index into the device's zero-based array to begin getting shader resources from.

+ ///

The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources.

+ ///

Array of shader resource view interfaces to be returned by the device.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173579 + /// void ID3D10Device::GSGetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[Out, Buffer, Optional] ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::GSGetShaderResources + internal override void GetShaderResources(int startSlot, int numViews, SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsOut) { + unsafe { + IntPtr* shaderResourceViewsOut_ = stackalloc IntPtr[shaderResourceViewsOut == null ? 0 : shaderResourceViewsOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, shaderResourceViewsOut==null?(void*)0:shaderResourceViewsOut_,((void**)(*(void**)_nativePointer))[54]); + if (shaderResourceViewsOut != null) + for (int i = 0; i < shaderResourceViewsOut.Length; i++) + shaderResourceViewsOut[i] = (shaderResourceViewsOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewsOut_[i]); + } + } + + /// + ///

Get an array of sampler states from the geometry shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173577 + /// void ID3D10Device::GSGetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[Out, Buffer, Optional] ID3D10SamplerState** ppSamplers) + /// ID3D10Device::GSGetSamplers + internal override void GetSamplers(int startSlot, int numSamplers, SharpDX.Direct3D10.SamplerState[] samplersOut) { + unsafe { + IntPtr* samplersOut_ = stackalloc IntPtr[samplersOut == null ? 0 : samplersOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, samplersOut==null?(void*)0:samplersOut_,((void**)(*(void**)_nativePointer))[55]); + if (samplersOut != null) + for (int i = 0; i < samplersOut.Length; i++) + samplersOut[i] = (samplersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.SamplerState(samplersOut_[i]); + } + } + } + /// + ///

An information-queue interface stores, retrieves, and filters debug messages. The queue consists of a message queue, an optional storage filter stack, and a optional retrieval filter stack.

+ ///
+ /// + ///

This interface is obtained by turning on the debug layer and querying it from the Interface using IUnknown::QueryInterface.

hr = ( null, g_driverType, null, , , &sd, &g_pSwapChain, &g_pd3dDevice );	
+            /// ...	
+            ///  * infoQueue;	
+            /// g_pd3dDevice->QueryInterface(__uuidof(),  (void **)&infoQueue); 	
+            /// 
+ ///
+ /// + /// bb173779 + /// ID3D10InfoQueue + /// ID3D10InfoQueue + [Guid("1b940b17-2642-4d1f-ab1f-b99bad0c395f")] + public partial class InfoQueue : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public InfoQueue(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.InfoQueue(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.InfoQueue(nativePointer); + } + + + /// + ///

Get or sets the maximum number of messages that can be added to the message queue.

+ ///
+ /// + ///

When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.

+ ///
+ /// + /// bb173791 + /// GetMessageCountLimit / SetMessageCountLimit + /// GetMessageCountLimit + /// unsigned longlong ID3D10InfoQueue::GetMessageCountLimit() + public long MessageCountLimit { + get { return GetMessageCountLimit(); } + set { SetMessageCountLimit(value); } + } + + /// + ///

Get the number of messages that were allowed to pass through a storage filter.

+ ///
+ /// + /// bb173793 + /// GetNumMessagesAllowedByStorageFilter + /// GetNumMessagesAllowedByStorageFilter + /// unsigned longlong ID3D10InfoQueue::GetNumMessagesAllowedByStorageFilter() + public long NumMessagesAllowedByStorageFilter { + get { return GetNumMessagesAllowedByStorageFilter(); } + } + + /// + ///

Get the number of messages that were denied passage through a storage filter.

+ ///
+ /// + /// bb173794 + /// GetNumMessagesDeniedByStorageFilter + /// GetNumMessagesDeniedByStorageFilter + /// unsigned longlong ID3D10InfoQueue::GetNumMessagesDeniedByStorageFilter() + public long NumMessagesDeniedByStorageFilter { + get { return GetNumMessagesDeniedByStorageFilter(); } + } + + /// + ///

Get the number of messages currently stored in the message queue.

+ ///
+ /// + /// bb173796 + /// GetNumStoredMessages + /// GetNumStoredMessages + /// unsigned longlong ID3D10InfoQueue::GetNumStoredMessages() + public long NumStoredMessages { + get { return GetNumStoredMessages(); } + } + + /// + ///

Get the number of messages that are able to pass through a retrieval filter.

+ ///
+ /// + /// bb173797 + /// GetNumStoredMessagesAllowedByRetrievalFilter + /// GetNumStoredMessagesAllowedByRetrievalFilter + /// unsigned longlong ID3D10InfoQueue::GetNumStoredMessagesAllowedByRetrievalFilter() + public long NumStoredMessagesAllowedByRetrievalFilter { + get { return GetNumStoredMessagesAllowedByRetrievalFilter(); } + } + + /// + ///

Get the number of messages that were discarded due to the message count limit.

+ ///
+ /// + ///

Get and set the message count limit with and , respectively.

+ ///
+ /// + /// bb173795 + /// GetNumMessagesDiscardedByMessageCountLimit + /// GetNumMessagesDiscardedByMessageCountLimit + /// unsigned longlong ID3D10InfoQueue::GetNumMessagesDiscardedByMessageCountLimit() + public long NumMessagesDiscardedByMessageCountLimit { + get { return GetNumMessagesDiscardedByMessageCountLimit(); } + } + + /// + ///

Get the size of the storage-filter stack in bytes.

+ ///
+ /// + /// bb173801 + /// GetStorageFilterStackSize + /// GetStorageFilterStackSize + /// unsigned int ID3D10InfoQueue::GetStorageFilterStackSize() + public int StorageFilterStackSize { + get { return GetStorageFilterStackSize(); } + } + + /// + ///

Get the size of the retrieval-filter stack in bytes.

+ ///
+ /// + /// bb173799 + /// GetRetrievalFilterStackSize + /// GetRetrievalFilterStackSize + /// unsigned int ID3D10InfoQueue::GetRetrievalFilterStackSize() + public int RetrievalFilterStackSize { + get { return GetRetrievalFilterStackSize(); } + } + + /// + ///

Get or sets a boolean that turns the debug output on or off.

+ ///
+ /// + /// bb173792 + /// GetMuteDebugOutput / SetMuteDebugOutput + /// GetMuteDebugOutput + /// BOOL ID3D10InfoQueue::GetMuteDebugOutput() + public SharpDX.Mathematics.Interop.RawBool MuteDebugOutput { + get { return GetMuteDebugOutput(); } + set { SetMuteDebugOutput(value); } + } + + /// + ///

Set the maximum number of messages that can be added to the message queue.

+ ///
+ ///

Maximum number of messages that can be added to the message queue. -1 means no limit.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.

+ ///
+ /// + /// bb173813 + /// HRESULT ID3D10InfoQueue::SetMessageCountLimit([In] unsigned longlong MessageCountLimit) + /// ID3D10InfoQueue::SetMessageCountLimit + internal void SetMessageCountLimit(long messageCountLimit) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, messageCountLimit,((void**)(*(void**)_nativePointer))[3]); + __result__.CheckError(); + } + } + + /// + ///

Clear all messages from the message queue.

+ ///
+ /// + /// bb173786 + /// void ID3D10InfoQueue::ClearStoredMessages() + /// ID3D10InfoQueue::ClearStoredMessages + public void ClearStoredMessages() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + } + } + + /// + ///

Get a message from the message queue.

+ ///
+ ///

Index into message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter (which can be obtained with ). 0 is the message at the front of the message queue.

+ ///

Returned message (see ).

+ ///

Size of pMessage in bytes, including the size of the message string that the pMessage points to.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This method does not remove any messages from the message queue.

This method gets messages from the message queue after an optional retrieval filter has been applied.

Applications should call this method twice to retrieve a message - first to obtain the size of the message and second to get the message. Here is a typical example:

 // Get the size of the message	
+                ///  messageLength = 0;	
+                ///  hr = pInfoQueue->GetMessage(0, null, &messageLength); // Allocate space and get the message	
+                ///  * pMessage = (*)malloc(messageLength);	
+                /// hr = pInfoQueue->GetMessage(0, pMessage, &messageLength);	
+                /// 

For an overview see Information Queue Overview.

+ ///
+ /// + /// bb173790 + /// HRESULT ID3D10InfoQueue::GetMessage([In] unsigned longlong MessageIndex,[In] void* pMessage,[InOut] SIZE_T* pMessageByteLength) + /// ID3D10InfoQueue::GetMessage + internal void GetMessage(long messageIndex, System.IntPtr messageRef, ref SharpDX.PointerSize messageByteLengthRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* messageByteLengthRef_ = &messageByteLengthRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, messageIndex, (void*)messageRef, messageByteLengthRef_,((void**)(*(void**)_nativePointer))[5]); + __result__.CheckError(); + } + } + + /// + ///

Get the number of messages that were allowed to pass through a storage filter.

+ ///
+ ///

Number of messages allowed by a storage filter.

+ /// + /// bb173793 + /// unsigned longlong ID3D10InfoQueue::GetNumMessagesAllowedByStorageFilter() + /// ID3D10InfoQueue::GetNumMessagesAllowedByStorageFilter + internal long GetNumMessagesAllowedByStorageFilter() { + unsafe { + long __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Callilong(_nativePointer,((void**)(*(void**)_nativePointer))[6]); + return __result__; + } + } + + /// + ///

Get the number of messages that were denied passage through a storage filter.

+ ///
+ ///

Number of messages denied by a storage filter.

+ /// + /// bb173794 + /// unsigned longlong ID3D10InfoQueue::GetNumMessagesDeniedByStorageFilter() + /// ID3D10InfoQueue::GetNumMessagesDeniedByStorageFilter + internal long GetNumMessagesDeniedByStorageFilter() { + unsafe { + long __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Callilong(_nativePointer,((void**)(*(void**)_nativePointer))[7]); + return __result__; + } + } + + /// + ///

Get the number of messages currently stored in the message queue.

+ ///
+ ///

Number of messages currently stored in the message queue.

+ /// + /// bb173796 + /// unsigned longlong ID3D10InfoQueue::GetNumStoredMessages() + /// ID3D10InfoQueue::GetNumStoredMessages + internal long GetNumStoredMessages() { + unsafe { + long __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Callilong(_nativePointer,((void**)(*(void**)_nativePointer))[8]); + return __result__; + } + } + + /// + ///

Get the number of messages that are able to pass through a retrieval filter.

+ ///
+ ///

Number of messages allowed by a retrieval filter.

+ /// + /// bb173797 + /// unsigned longlong ID3D10InfoQueue::GetNumStoredMessagesAllowedByRetrievalFilter() + /// ID3D10InfoQueue::GetNumStoredMessagesAllowedByRetrievalFilter + internal long GetNumStoredMessagesAllowedByRetrievalFilter() { + unsafe { + long __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Callilong(_nativePointer,((void**)(*(void**)_nativePointer))[9]); + return __result__; + } + } + + /// + ///

Get the number of messages that were discarded due to the message count limit.

+ ///
+ ///

Number of messages discarded.

+ /// + ///

Get and set the message count limit with and , respectively.

+ ///
+ /// + /// bb173795 + /// unsigned longlong ID3D10InfoQueue::GetNumMessagesDiscardedByMessageCountLimit() + /// ID3D10InfoQueue::GetNumMessagesDiscardedByMessageCountLimit + internal long GetNumMessagesDiscardedByMessageCountLimit() { + unsafe { + long __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Callilong(_nativePointer,((void**)(*(void**)_nativePointer))[10]); + return __result__; + } + } + + /// + ///

Get the maximum number of messages that can be added to the message queue.

+ ///
+ ///

Maximum number of messages that can be added to the queue. -1 means no limit.

+ /// + ///

When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.

+ ///
+ /// + /// bb173791 + /// unsigned longlong ID3D10InfoQueue::GetMessageCountLimit() + /// ID3D10InfoQueue::GetMessageCountLimit + internal long GetMessageCountLimit() { + unsafe { + long __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Callilong(_nativePointer,((void**)(*(void**)_nativePointer))[11]); + return __result__; + } + } + + /// + ///

Add storage filters to the top of the storage-filter stack.

+ ///
+ ///

Array of storage filters (see ).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A storage filter defines a grouping of debug messages that should be allowed into the info queue.

+ ///
+ /// + /// bb173783 + /// HRESULT ID3D10InfoQueue::AddStorageFilterEntries([In] D3D10_INFO_QUEUE_FILTER* pFilter) + /// ID3D10InfoQueue::AddStorageFilterEntries + public void AddStorageFilterEntries(SharpDX.Direct3D10.InfoQueueFilter filterRef) { + unsafe { + var filterRef_ = new SharpDX.Direct3D10.InfoQueueFilter.__Native(); + filterRef.__MarshalTo(ref filterRef_); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &filterRef_,((void**)(*(void**)_nativePointer))[12]); + filterRef.__MarshalFree(ref filterRef_); + __result__.CheckError(); + } + } + + /// + ///

Get the storage filter at the top of the storage-filter stack.

+ ///
+ ///

Storage filter at the top of the storage-filter stack.

+ ///

Size of the storage filter in bytes. If pFilter is null, the size of the storage filter will be output to this parameter.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173800 + /// HRESULT ID3D10InfoQueue::GetStorageFilter([In] void* pFilter,[InOut] SIZE_T* pFilterByteLength) + /// ID3D10InfoQueue::GetStorageFilter + internal void GetStorageFilter(System.IntPtr filterRef, ref SharpDX.PointerSize filterByteLengthRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* filterByteLengthRef_ = &filterByteLengthRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)filterRef, filterByteLengthRef_,((void**)(*(void**)_nativePointer))[13]); + __result__.CheckError(); + } + } + + /// + ///

Remove a storage filter from the top of the storage-filter stack.

+ ///
+ /// + /// bb173785 + /// void ID3D10InfoQueue::ClearStorageFilter() + /// ID3D10InfoQueue::ClearStorageFilter + public void ClearStorageFilter() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[14]); + } + } + + /// + ///

Push an empty storage filter onto the storage-filter stack.

+ ///
+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An empty storage filter allows all messages to pass through.

+ ///
+ /// + /// bb173807 + /// HRESULT ID3D10InfoQueue::PushEmptyStorageFilter() + /// ID3D10InfoQueue::PushEmptyStorageFilter + public void PushEmptyStorageFilter() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[15]); + __result__.CheckError(); + } + } + + /// + ///

Push a copy of storage filter currently on the top of the storage-filter stack onto the storage-filter stack.

+ ///
+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173805 + /// HRESULT ID3D10InfoQueue::PushCopyOfStorageFilter() + /// ID3D10InfoQueue::PushCopyOfStorageFilter + public void PushCopyOfStorageFilter() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[16]); + __result__.CheckError(); + } + } + + /// + ///

Push a storage filter onto the storage-filter stack.

+ ///
+ ///

Pointer to a storage filter (see ).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173809 + /// HRESULT ID3D10InfoQueue::PushStorageFilter([In] D3D10_INFO_QUEUE_FILTER* pFilter) + /// ID3D10InfoQueue::PushStorageFilter + public void PushStorageFilter(SharpDX.Direct3D10.InfoQueueFilter filterRef) { + unsafe { + var filterRef_ = new SharpDX.Direct3D10.InfoQueueFilter.__Native(); + filterRef.__MarshalTo(ref filterRef_); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &filterRef_,((void**)(*(void**)_nativePointer))[17]); + filterRef.__MarshalFree(ref filterRef_); + __result__.CheckError(); + } + } + + /// + ///

Pop a storage filter from the top of the storage-filter stack.

+ ///
+ /// + /// bb173803 + /// void ID3D10InfoQueue::PopStorageFilter() + /// ID3D10InfoQueue::PopStorageFilter + public void PopStorageFilter() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[18]); + } + } + + /// + ///

Get the size of the storage-filter stack in bytes.

+ ///
+ ///

Size of the storage-filter stack in bytes.

+ /// + /// bb173801 + /// unsigned int ID3D10InfoQueue::GetStorageFilterStackSize() + /// ID3D10InfoQueue::GetStorageFilterStackSize + internal int GetStorageFilterStackSize() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[19]); + return __result__; + } + } + + /// + ///

Add storage filters to the top of the retrieval-filter stack.

+ ///
+ ///

Array of retrieval filters (see ).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

A retrieval filter is used to define a subgroup of the messages that are already in the info queue. Retrieval filters affect the messages that will be returned by .

The number of messages already in the info queue that will be allowed through the retrieval filter can be determined by calling .

+ ///
+ /// + /// bb173782 + /// HRESULT ID3D10InfoQueue::AddRetrievalFilterEntries([In] D3D10_INFO_QUEUE_FILTER* pFilter) + /// ID3D10InfoQueue::AddRetrievalFilterEntries + public void AddRetrievalFilterEntries(SharpDX.Direct3D10.InfoQueueFilter filterRef) { + unsafe { + var filterRef_ = new SharpDX.Direct3D10.InfoQueueFilter.__Native(); + filterRef.__MarshalTo(ref filterRef_); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &filterRef_,((void**)(*(void**)_nativePointer))[20]); + filterRef.__MarshalFree(ref filterRef_); + __result__.CheckError(); + } + } + + /// + ///

Get the retrieval filter at the top of the retrieval-filter stack.

+ ///
+ ///

Retrieval filter at the top of the retrieval-filter stack.

+ ///

Size of the retrieval filter in bytes. If pFilter is null, the size of the retrieval filter will be output to this parameter.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173798 + /// HRESULT ID3D10InfoQueue::GetRetrievalFilter([In] void* pFilter,[InOut] SIZE_T* pFilterByteLength) + /// ID3D10InfoQueue::GetRetrievalFilter + internal void GetRetrievalFilter(System.IntPtr filterRef, ref SharpDX.PointerSize filterByteLengthRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* filterByteLengthRef_ = &filterByteLengthRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)filterRef, filterByteLengthRef_,((void**)(*(void**)_nativePointer))[21]); + __result__.CheckError(); + } + } + + /// + ///

Remove a retrieval filter from the top of the retrieval-filter stack.

+ ///
+ /// + /// bb173784 + /// void ID3D10InfoQueue::ClearRetrievalFilter() + /// ID3D10InfoQueue::ClearRetrievalFilter + public void ClearRetrievalFilter() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[22]); + } + } + + /// + ///

Push an empty retrieval filter onto the retrieval-filter stack.

+ ///
+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

An empty retrieval filter allows all messages to pass through.

+ ///
+ /// + /// bb173806 + /// HRESULT ID3D10InfoQueue::PushEmptyRetrievalFilter() + /// ID3D10InfoQueue::PushEmptyRetrievalFilter + public void PushEmptyRetrievalFilter() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[23]); + __result__.CheckError(); + } + } + + /// + ///

Push a copy of retrieval filter currently on the top of the retrieval-filter stack onto the retrieval-filter stack.

+ ///
+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173804 + /// HRESULT ID3D10InfoQueue::PushCopyOfRetrievalFilter() + /// ID3D10InfoQueue::PushCopyOfRetrievalFilter + public void PushCopyOfRetrievalFilter() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[24]); + __result__.CheckError(); + } + } + + /// + ///

Push a retrieval filter onto the retrieval-filter stack.

+ ///
+ ///

Pointer to a retrieval filter (see ).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173808 + /// HRESULT ID3D10InfoQueue::PushRetrievalFilter([In] D3D10_INFO_QUEUE_FILTER* pFilter) + /// ID3D10InfoQueue::PushRetrievalFilter + public void PushRetrievalFilter(SharpDX.Direct3D10.InfoQueueFilter filterRef) { + unsafe { + var filterRef_ = new SharpDX.Direct3D10.InfoQueueFilter.__Native(); + filterRef.__MarshalTo(ref filterRef_); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &filterRef_,((void**)(*(void**)_nativePointer))[25]); + filterRef.__MarshalFree(ref filterRef_); + __result__.CheckError(); + } + } + + /// + ///

Pop a retrieval filter from the top of the retrieval-filter stack.

+ ///
+ /// + /// bb173802 + /// void ID3D10InfoQueue::PopRetrievalFilter() + /// ID3D10InfoQueue::PopRetrievalFilter + public void PopRetrievalFilter() { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer,((void**)(*(void**)_nativePointer))[26]); + } + } + + /// + ///

Get the size of the retrieval-filter stack in bytes.

+ ///
+ ///

Size of the retrieval-filter stack in bytes.

+ /// + /// bb173799 + /// unsigned int ID3D10InfoQueue::GetRetrievalFilterStackSize() + /// ID3D10InfoQueue::GetRetrievalFilterStackSize + internal int GetRetrievalFilterStackSize() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[27]); + return __result__; + } + } + + /// + ///

Add a Direct3D 10 debug message to the message queue and send that message to debug output.

+ ///
+ ///

Category of a message (see ).

+ ///

Severity of a message (see ).

+ ///

Unique identifier of a message (see ).

+ ///

User-defined message.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + ///

This method is used by the runtime's internal mechanisms to add Direct3D 10 debug messages to the message queue and send them to debug output. For applications to add their own custom messages to the message queue and send them to debug output, call .

+ ///
+ /// + /// bb173781 + /// HRESULT ID3D10InfoQueue::AddMessage([In] D3D10_MESSAGE_CATEGORY Category,[In] D3D10_MESSAGE_SEVERITY Severity,[In] D3D10_MESSAGE_ID ID,[In] const char* pDescription) + /// ID3D10InfoQueue::AddMessage + public void AddMessage(SharpDX.Direct3D10.MessageCategory category, SharpDX.Direct3D10.MessageSeverity severity, SharpDX.Direct3D10.MessageId id, string descriptionRef) { + unsafe { + IntPtr descriptionRef_ = Utilities.StringToHGlobalAnsi(descriptionRef); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)category), unchecked((int)severity), unchecked((int)id), (void*)descriptionRef_,((void**)(*(void**)_nativePointer))[28]); + Marshal.FreeHGlobal(descriptionRef_ ); + __result__.CheckError(); + } + } + + /// + ///

Add a user-defined message to the message queue and send that message to debug output.

+ ///
+ ///

Severity of a message (see ).

+ ///

Message string.

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173780 + /// HRESULT ID3D10InfoQueue::AddApplicationMessage([In] D3D10_MESSAGE_SEVERITY Severity,[In] const char* pDescription) + /// ID3D10InfoQueue::AddApplicationMessage + public void AddApplicationMessage(SharpDX.Direct3D10.MessageSeverity severity, string descriptionRef) { + unsafe { + IntPtr descriptionRef_ = Utilities.StringToHGlobalAnsi(descriptionRef); + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)severity), (void*)descriptionRef_,((void**)(*(void**)_nativePointer))[29]); + Marshal.FreeHGlobal(descriptionRef_ ); + __result__.CheckError(); + } + } + + /// + ///

Set a message category to break on when a message with that category passes through the storage filter.

+ ///
+ ///

Message category to break on (see ).

+ ///

Turns this breaking condition on or off (true for on, false for off).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173810 + /// HRESULT ID3D10InfoQueue::SetBreakOnCategory([In] D3D10_MESSAGE_CATEGORY Category,[In] BOOL bEnable) + /// ID3D10InfoQueue::SetBreakOnCategory + public void SetBreakOnCategory(SharpDX.Direct3D10.MessageCategory category, SharpDX.Mathematics.Interop.RawBool bEnable) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint41(_nativePointer, unchecked((int)category), bEnable,((void**)(*(void**)_nativePointer))[30]); + __result__.CheckError(); + } + } + + /// + ///

Set a message severity level to break on when a message with that severity level passes through the storage filter.

+ ///
+ ///

Message severity level to break on (see ).

+ ///

Turns this breaking condition on or off (true for on, false for off).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173812 + /// HRESULT ID3D10InfoQueue::SetBreakOnSeverity([In] D3D10_MESSAGE_SEVERITY Severity,[In] BOOL bEnable) + /// ID3D10InfoQueue::SetBreakOnSeverity + public void SetBreakOnSeverity(SharpDX.Direct3D10.MessageSeverity severity, SharpDX.Mathematics.Interop.RawBool bEnable) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint41(_nativePointer, unchecked((int)severity), bEnable,((void**)(*(void**)_nativePointer))[31]); + __result__.CheckError(); + } + } + + /// + ///

Set a message identifier to break on when a message with that identifier passes through the storage filter.

+ ///
+ ///

Message identifier to break on (see ).

+ ///

Turns this breaking condition on or off (true for on, false for off).

+ ///

This method returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173811 + /// HRESULT ID3D10InfoQueue::SetBreakOnID([In] D3D10_MESSAGE_ID ID,[In] BOOL bEnable) + /// ID3D10InfoQueue::SetBreakOnID + public void SetBreakOnID(SharpDX.Direct3D10.MessageId id, SharpDX.Mathematics.Interop.RawBool bEnable) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint41(_nativePointer, unchecked((int)id), bEnable,((void**)(*(void**)_nativePointer))[32]); + __result__.CheckError(); + } + } + + /// + ///

Get a message category to break on when a message with that category passes through the storage filter.

+ ///
+ ///

Message category to break on (see ).

+ ///

Whether this breaking condition is turned on or off (true for on, false for off).

+ /// + /// bb173787 + /// BOOL ID3D10InfoQueue::GetBreakOnCategory([In] D3D10_MESSAGE_CATEGORY Category) + /// ID3D10InfoQueue::GetBreakOnCategory + public SharpDX.Mathematics.Interop.RawBool GetBreakOnCategory(SharpDX.Direct3D10.MessageCategory category) { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer, unchecked((int)category),((void**)(*(void**)_nativePointer))[33]); + return __result__; + } + } + + /// + ///

Get a message severity level to break on when a message with that severity level passes through the storage filter.

+ ///
+ ///

Message severity level to break on (see ).

+ ///

Whether this breaking condition is turned on or off (true for on, false for off).

+ /// + /// bb173789 + /// BOOL ID3D10InfoQueue::GetBreakOnSeverity([In] D3D10_MESSAGE_SEVERITY Severity) + /// ID3D10InfoQueue::GetBreakOnSeverity + public SharpDX.Mathematics.Interop.RawBool GetBreakOnSeverity(SharpDX.Direct3D10.MessageSeverity severity) { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer, unchecked((int)severity),((void**)(*(void**)_nativePointer))[34]); + return __result__; + } + } + + /// + ///

Get a message identifier to break on when a message with that identifier passes through the storage filter.

+ ///
+ ///

Message identifier to break on (see ).

+ ///

Whether this breaking condition is turned on or off (true for on, false for off).

+ /// + /// bb173788 + /// BOOL ID3D10InfoQueue::GetBreakOnID([In] D3D10_MESSAGE_ID ID) + /// ID3D10InfoQueue::GetBreakOnID + public SharpDX.Mathematics.Interop.RawBool GetBreakOnID(SharpDX.Direct3D10.MessageId id) { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer, unchecked((int)id),((void**)(*(void**)_nativePointer))[35]); + return __result__; + } + } + + /// + ///

Set a boolean that turns the debug output on or off.

+ ///
+ ///

Disable/Enable the debug output (TRUE to disable or mute the output, to enable the output).

+ /// + ///

This will stop messages that pass the storage filter from being printed out in the debug output, however those messages will still be added to the message queue.

+ ///
+ /// + /// bb173814 + /// void ID3D10InfoQueue::SetMuteDebugOutput([In] BOOL bMute) + /// ID3D10InfoQueue::SetMuteDebugOutput + internal void SetMuteDebugOutput(SharpDX.Mathematics.Interop.RawBool bMute) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid43(_nativePointer, bMute,((void**)(*(void**)_nativePointer))[36]); + } + } + + /// + ///

Get a boolean that turns the debug output on or off.

+ ///
+ ///

Whether the debug output is on or off (true for on, false for off).

+ /// + /// bb173792 + /// BOOL ID3D10InfoQueue::GetMuteDebugOutput() + /// ID3D10InfoQueue::GetMuteDebugOutput + internal SharpDX.Mathematics.Interop.RawBool GetMuteDebugOutput() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[37]); + return __result__; + } + } + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class InputAssemblerStage : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public InputAssemblerStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.InputAssemblerStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.InputAssemblerStage(nativePointer); + } + + + /// + ///

Get or sets a reference to the input-layout object that is bound to the input-assembler stage.

+ ///
+ /// + ///

For information about creating an input-layout object, see Creating the Input-Layout Object.

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173585 + /// IAGetInputLayout / IASetInputLayout + /// IAGetInputLayout + /// void ID3D10Device::IAGetInputLayout([Out] ID3D10InputLayout** ppInputLayout) + public SharpDX.Direct3D10.InputLayout InputLayout { + get { SharpDX.Direct3D10.InputLayout __output__; GetInputLayout(out __output__); return __output__; } + set { SetInputLayout(value); } + } + + /// + ///

Get or sets information about the primitive type, and data order that describes input data for the input assembler stage.

+ ///
+ /// + /// bb173586 + /// IAGetPrimitiveTopology / IASetPrimitiveTopology + /// IAGetPrimitiveTopology + /// void ID3D10Device::IAGetPrimitiveTopology([Out] D3D_PRIMITIVE_TOPOLOGY* pTopology) + public SharpDX.Direct3D.PrimitiveTopology PrimitiveTopology { + get { SharpDX.Direct3D.PrimitiveTopology __output__; GetPrimitiveTopology(out __output__); return __output__; } + set { SetPrimitiveTopology(value); } + } + + /// + ///

Bind an input-layout object to the input-assembler stage.

+ ///
+ /// No documentation. + /// + ///

Input-layout objects describe how vertex buffer data is streamed into the IA pipeline stage. To create an input-layout object, call .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173589 + /// void ID3D10Device::IASetInputLayout([In, Optional] ID3D10InputLayout* pInputLayout) + /// ID3D10Device::IASetInputLayout + internal void SetInputLayout(SharpDX.Direct3D10.InputLayout inputLayoutRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((inputLayoutRef == null)?IntPtr.Zero:inputLayoutRef.NativePointer),((void**)(*(void**)_nativePointer))[11]); + } + } + + /// + ///

Bind an array of vertex buffers to the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

For information about creating vertex buffers, see Create a Vertex Buffer.

Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173591 + /// void ID3D10Device::IASetVertexBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppVertexBuffers,[In, Buffer, Optional] const unsigned int* pStrides,[In, Buffer, Optional] const unsigned int* pOffsets) + /// ID3D10Device::IASetVertexBuffers + internal void SetVertexBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] vertexBuffersOut, int[] stridesRef, int[] offsetsRef) { + unsafe { + IntPtr* vertexBuffersOut_ = (IntPtr*)0; + if ( vertexBuffersOut != null ) { + IntPtr* vertexBuffersOut__ = stackalloc IntPtr[vertexBuffersOut.Length]; + vertexBuffersOut_ = vertexBuffersOut__; + for (int i = 0; i < vertexBuffersOut.Length; i++) + vertexBuffersOut_[i] = (vertexBuffersOut[i] == null)? IntPtr.Zero : vertexBuffersOut[i].NativePointer; + } + int[] stridesRef__ = stridesRef; + int[] offsetsRef__ = offsetsRef; + fixed (void* stridesRef_ = stridesRef__) + fixed (void* offsetsRef_ = offsetsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, vertexBuffersOut_, stridesRef_, offsetsRef_,((void**)(*(void**)_nativePointer))[12]); + } + } + + /// + ///

Bind an array of vertex buffers to the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

For information about creating vertex buffers, see Create a Vertex Buffer.

Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173591 + /// void ID3D10Device::IASetVertexBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppVertexBuffers,[In, Buffer, Optional] const unsigned int* pStrides,[In, Buffer, Optional] const unsigned int* pOffsets) + /// ID3D10Device::IASetVertexBuffers + internal void SetVertexBuffers(int startSlot, int numBuffers, SharpDX.ComArray vertexBuffersOut, int[] stridesRef, int[] offsetsRef) { + unsafe { + int[] stridesRef__ = stridesRef; + int[] offsetsRef__ = offsetsRef; + fixed (void* stridesRef_ = stridesRef__) + fixed (void* offsetsRef_ = offsetsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)((vertexBuffersOut == null)?IntPtr.Zero:vertexBuffersOut.NativePointer), stridesRef_, offsetsRef_,((void**)(*(void**)_nativePointer))[12]); + } + } + + /// + ///

Bind an array of vertex buffers to the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

For information about creating vertex buffers, see Create a Vertex Buffer.

Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173591 + /// void ID3D10Device::IASetVertexBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppVertexBuffers,[In, Buffer, Optional] const unsigned int* pStrides,[In, Buffer, Optional] const unsigned int* pOffsets) + /// ID3D10Device::IASetVertexBuffers + private void SetVertexBuffers(int startSlot, int numBuffers, System.IntPtr vertexBuffersOut, System.IntPtr stridesRef, System.IntPtr offsetsRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)vertexBuffersOut, (void*)stridesRef, (void*)offsetsRef,((void**)(*(void**)_nativePointer))[12]); + } + } + + /// + ///

Bind an index buffer to the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

For information about creating index buffers, see Create an Index Buffer.

Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173588 + /// void ID3D10Device::IASetIndexBuffer([In, Optional] ID3D10Buffer* pIndexBuffer,[In] DXGI_FORMAT Format,[In] unsigned int Offset) + /// ID3D10Device::IASetIndexBuffer + public void SetIndexBuffer(SharpDX.Direct3D10.Buffer indexBufferRef, SharpDX.DXGI.Format format, int offset) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((indexBufferRef == null)?IntPtr.Zero:indexBufferRef.NativePointer), unchecked((int)format), offset,((void**)(*(void**)_nativePointer))[13]); + } + } + + /// + ///

Bind information about the primitive type, and data order that describes input data for the input assembler stage.

+ ///
+ /// No documentation. + /// + /// bb173590 + /// void ID3D10Device::IASetPrimitiveTopology([In] D3D_PRIMITIVE_TOPOLOGY Topology) + /// ID3D10Device::IASetPrimitiveTopology + internal void SetPrimitiveTopology(SharpDX.Direct3D.PrimitiveTopology topology) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, unchecked((int)topology),((void**)(*(void**)_nativePointer))[18]); + } + } + + /// + ///

Get a reference to the input-layout object that is bound to the input-assembler stage.

+ ///
+ /// No documentation. + /// + ///

For information about creating an input-layout object, see Creating the Input-Layout Object.

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173585 + /// void ID3D10Device::IAGetInputLayout([Out] ID3D10InputLayout** ppInputLayout) + /// ID3D10Device::IAGetInputLayout + internal void GetInputLayout(out SharpDX.Direct3D10.InputLayout inputLayoutOut) { + unsafe { + IntPtr inputLayoutOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &inputLayoutOut_,((void**)(*(void**)_nativePointer))[45]); + inputLayoutOut= (inputLayoutOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.InputLayout(inputLayoutOut_); + } + } + + /// + ///

Get the vertex buffers bound to the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173587 + /// void ID3D10Device::IAGetVertexBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[Out, Buffer, Optional] ID3D10Buffer** ppVertexBuffers,[Out, Buffer, Optional] unsigned int* pStrides,[Out, Buffer, Optional] unsigned int* pOffsets) + /// ID3D10Device::IAGetVertexBuffers + public void GetVertexBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] vertexBuffersOut, int[] stridesRef, int[] offsetsRef) { + unsafe { + IntPtr* vertexBuffersOut_ = stackalloc IntPtr[vertexBuffersOut == null ? 0 : vertexBuffersOut.Length]; + int[] stridesRef__ = stridesRef; + int[] offsetsRef__ = offsetsRef; + fixed (void* stridesRef_ = stridesRef__) + fixed (void* offsetsRef_ = offsetsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, vertexBuffersOut==null?(void*)0:vertexBuffersOut_, stridesRef_, offsetsRef_,((void**)(*(void**)_nativePointer))[46]); + if (vertexBuffersOut != null) + for (int i = 0; i < vertexBuffersOut.Length; i++) + vertexBuffersOut[i] = (vertexBuffersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(vertexBuffersOut_[i]); + } + } + + /// + ///

Get a reference to the index buffer that is bound to the input-assembler stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173584 + /// void ID3D10Device::IAGetIndexBuffer([Out, Optional] ID3D10Buffer** pIndexBuffer,[Out, Optional] DXGI_FORMAT* Format,[Out, Optional] unsigned int* Offset) + /// ID3D10Device::IAGetIndexBuffer + public void GetIndexBuffer(out SharpDX.Direct3D10.Buffer indexBufferRef, out SharpDX.DXGI.Format format, out int offset) { + unsafe { + IntPtr indexBufferRef_ = IntPtr.Zero; + fixed (void* format_ = &format) + fixed (void* offset_ = &offset) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &indexBufferRef_, format_, offset_,((void**)(*(void**)_nativePointer))[47]); + indexBufferRef= (indexBufferRef_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(indexBufferRef_); + } + } + + /// + ///

Get information about the primitive type, and data order that describes input data for the input assembler stage.

+ ///
+ /// No documentation. + /// + /// bb173586 + /// void ID3D10Device::IAGetPrimitiveTopology([Out] D3D_PRIMITIVE_TOPOLOGY* pTopology) + /// ID3D10Device::IAGetPrimitiveTopology + internal void GetPrimitiveTopology(out SharpDX.Direct3D.PrimitiveTopology topologyRef) { + unsafe { + fixed (void* topologyRef_ = &topologyRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, topologyRef_,((void**)(*(void**)_nativePointer))[50]); + } + } + } + /// + ///

An input-layout interface accesses the input data for the input-assembler stage.

+ ///
+ /// + ///

This interface is created by calling ; use to bind it to the graphics pipeline.

+ ///
+ /// + /// bb173815 + /// ID3D10InputLayout + /// ID3D10InputLayout + [Guid("9B7E4C0B-342C-4106-A19F-4F2704F689F0")] + public partial class InputLayout : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public InputLayout(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.InputLayout(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.InputLayout(nativePointer); + } + + } + /// + ///

Applications use the methods of the interface to manipulate mesh objects.

+ ///
+ /// + ///

To obtain the interface, call .

+ ///
+ /// + /// bb173897 + /// ID3DX10Mesh + /// ID3DX10Mesh + [Guid("4020e5c2-1403-4929-883f-e2e849fac195")] + public partial class Mesh : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Mesh(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Mesh(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Mesh(nativePointer); + } + + + /// + ///

Retrieves the number of faces in the mesh.

+ ///
+ /// + /// bb173915 + /// GetFaceCount + /// GetFaceCount + /// unsigned int ID3DX10Mesh::GetFaceCount() + public int FaceCount { + get { return GetFaceCount(); } + } + + /// + ///

Get the number of vertices in the mesh. A mesh may contain multiple vertex buffers (i.e. one vertex buffer may contain all position data, another may contains all texture coordinate data, etc.), however each vertex buffer will contain the same number of elements.

+ ///
+ /// + /// bb173921 + /// GetVertexCount + /// GetVertexCount + /// unsigned int ID3DX10Mesh::GetVertexCount() + public int VertexCount { + get { return GetVertexCount(); } + } + + /// + ///

Get the number of vertex buffers in the mesh.

+ ///
+ /// + /// bb173920 + /// GetVertexBufferCount + /// GetVertexBufferCount + /// unsigned int ID3DX10Mesh::GetVertexBufferCount() + public int VertexBufferCount { + get { return GetVertexBufferCount(); } + } + + /// + ///

Retrieves the number of faces in the mesh.

+ ///
+ ///

Returns the number of faces in the mesh.

+ /// + /// bb173915 + /// unsigned int ID3DX10Mesh::GetFaceCount() + /// ID3DX10Mesh::GetFaceCount + internal int GetFaceCount() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[3]); + return __result__; + } + } + + /// + ///

Get the number of vertices in the mesh. A mesh may contain multiple vertex buffers (i.e. one vertex buffer may contain all position data, another may contains all texture coordinate data, etc.), however each vertex buffer will contain the same number of elements.

+ ///
+ ///

The number of vertices in the mesh.

+ /// + /// bb173921 + /// unsigned int ID3DX10Mesh::GetVertexCount() + /// ID3DX10Mesh::GetVertexCount + internal int GetVertexCount() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + return __result__; + } + } + + /// + ///

Get the number of vertex buffers in the mesh.

+ ///
+ ///

The number of vertex buffers in the mesh.

+ /// + /// bb173920 + /// unsigned int ID3DX10Mesh::GetVertexBufferCount() + /// ID3DX10Mesh::GetVertexBufferCount + internal int GetVertexBufferCount() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[5]); + return __result__; + } + } + + /// + ///

Access the mesh's creation flags.

+ ///
+ ///

The creation flags passed into the options parameter of when the mesh was created. See D3DX10_MESH.

+ /// + /// bb173916 + /// unsigned int ID3DX10Mesh::GetFlags() + /// ID3DX10Mesh::GetFlags + internal int GetFlags() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[6]); + return __result__; + } + } + + /// + ///

Access the vertex description passed into . The vertex description describes the layout of the mesh's vertex buffers.

+ ///
+ /// No documentation. + /// No documentation. + ///

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

+ /// + /// bb173922 + /// HRESULT ID3DX10Mesh::GetVertexDescription([Out, Buffer] const D3D10_INPUT_ELEMENT_DESC** ppDesc,[In] unsigned int* pDeclCount) + /// ID3DX10Mesh::GetVertexDescription + internal void GetVertexDescription(SharpDX.Direct3D10.InputElement[] descOut, int declCountRef) { + unsafe { + SharpDX.Direct3D10.InputElement.__Native[] descOut__ = new SharpDX.Direct3D10.InputElement.__Native[descOut.Length]; + SharpDX.Result __result__; + fixed (void* descOut_ = descOut__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, descOut_, &declCountRef,((void**)(*(void**)_nativePointer))[7]); + for (int i = 0; i < descOut.Length; i++) + descOut[i].__MarshalFrom(ref descOut__[i]); + __result__.CheckError(); + } + } + + /// + ///

Set vertex data into one of the mesh's vertex buffers.

+ ///
+ ///

The vertex buffer to be filled with pData.

+ ///

The vertex data to set.

+ ///

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

+ /// + /// bb173931 + /// HRESULT ID3DX10Mesh::SetVertexData([In] unsigned int iBuffer,[In] const void* pData) + /// ID3DX10Mesh::SetVertexData + internal void SetVertexData(int iBuffer, System.IntPtr dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, iBuffer, (void*)dataRef,((void**)(*(void**)_nativePointer))[8]); + __result__.CheckError(); + } + } + + /// + ///

Retrieves the vertex buffer associated with the mesh.

+ ///
+ ///

The vertex buffer to get. This is an index value.

+ ///

The vertex buffer. See

+ /// + /// bb173919 + /// HRESULT ID3DX10Mesh::GetVertexBuffer([In] unsigned int iBuffer,[In] ID3DX10MeshBuffer** ppVertexBuffer) + /// ID3DX10Mesh::GetVertexBuffer + public SharpDX.Direct3D10.MeshBuffer GetVertexBuffer(int iBuffer) { + unsafe { + SharpDX.Direct3D10.MeshBuffer vertexBufferOut; + IntPtr vertexBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, iBuffer, &vertexBufferOut_,((void**)(*(void**)_nativePointer))[9]); + vertexBufferOut= (vertexBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.MeshBuffer(vertexBufferOut_); + __result__.CheckError(); + return vertexBufferOut; + } + } + + /// + ///

Set the mesh's index data.

+ ///
+ ///

The index data.

+ ///

The number of indices in pData.

+ ///

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

+ /// + /// bb173929 + /// HRESULT ID3DX10Mesh::SetIndexData([In] const void* pData,[In] unsigned int cIndices) + /// ID3DX10Mesh::SetIndexData + internal void SetIndexData(System.IntPtr dataRef, int cIndices) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)dataRef, cIndices,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Retrieves the data in an index buffer.

+ ///
+ ///

Address of a reference to a interface, representing the index buffer associated with the mesh.

+ /// + /// bb173917 + /// HRESULT ID3DX10Mesh::GetIndexBuffer([In] ID3DX10MeshBuffer** ppIndexBuffer) + /// ID3DX10Mesh::GetIndexBuffer + public SharpDX.Direct3D10.MeshBuffer GetIndexBuffer() { + unsafe { + SharpDX.Direct3D10.MeshBuffer indexBufferOut; + IntPtr indexBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &indexBufferOut_,((void**)(*(void**)_nativePointer))[11]); + indexBufferOut= (indexBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.MeshBuffer(indexBufferOut_); + __result__.CheckError(); + return indexBufferOut; + } + } + + /// + ///

Set the mesh's attribute data.

+ ///
+ ///

The attribute data to set.

+ ///

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

+ /// + /// bb173927 + /// HRESULT ID3DX10Mesh::SetAttributeData([In] const void* pData) + /// ID3DX10Mesh::SetAttributeData + internal void SetAttributeData(System.IntPtr dataRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)dataRef,((void**)(*(void**)_nativePointer))[12]); + __result__.CheckError(); + } + } + + /// + ///

Access the mesh's attribute buffer.

+ ///
+ ///

The attribute buffer. See .

+ ///

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

+ /// + /// bb173911 + /// HRESULT ID3DX10Mesh::GetAttributeBuffer([In] ID3DX10MeshBuffer** ppAttributeBuffer) + /// ID3DX10Mesh::GetAttributeBuffer + public void GetAttributeBuffer(out SharpDX.Direct3D10.MeshBuffer attributeBufferOut) { + unsafe { + IntPtr attributeBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &attributeBufferOut_,((void**)(*(void**)_nativePointer))[13]); + attributeBufferOut= (attributeBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.MeshBuffer(attributeBufferOut_); + __result__.CheckError(); + } + } + + /// + ///

Sets the attribute table for a mesh and the number of entries stored in the table.

+ ///
+ ///

Pointer to an array of structures, representing the entries in the mesh attribute table.

+ ///

Number of attributes in the mesh attribute table.

+ ///

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

+ /// + ///

If an application keeps track of the information in an attribute table, and rearranges the table as a result of changes to attributes or faces, this method allows the application to update the attribute tables instead of calling again.

+ ///
+ /// + /// bb173928 + /// HRESULT ID3DX10Mesh::SetAttributeTable([In, Buffer] const D3DX10_ATTRIBUTE_RANGE* pAttribTable,[In] unsigned int cAttribTableSize) + /// ID3DX10Mesh::SetAttributeTable + internal void SetAttributeTable(SharpDX.Direct3D10.MeshAttributeRange[] attribTableRef, int cAttribTableSize) { + unsafe { + SharpDX.Result __result__; + fixed (void* attribTableRef_ = attribTableRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, attribTableRef_, cAttribTableSize,((void**)(*(void**)_nativePointer))[14]); + __result__.CheckError(); + } + } + + /// + ///

Retrieves either an attribute table for a mesh, or the number of entries stored in an attribute table for a mesh.

+ ///
+ ///

Pointer to an array of structures, representing the entries in the mesh's attribute table. Specify null to retrieve the value for pAttribTableSize.

+ ///

Pointer to either the number of entries stored in pAttribTable or a value to be filled in with the number of entries stored in the attribute table for the mesh.

+ ///

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

+ /// + ///

An attribute table is used to identify areas of the mesh that need to be drawn with different textures, render states, materials, and so on. In addition, the application can use the attribute table to hide portions of a mesh by not drawing a given attribute identifier when drawing the frame.

+ ///
+ /// + /// bb173912 + /// HRESULT ID3DX10Mesh::GetAttributeTable([Out, Buffer, Optional] D3DX10_ATTRIBUTE_RANGE* pAttribTable,[InOut] unsigned int* pAttribTableSize) + /// ID3DX10Mesh::GetAttributeTable + internal void GetAttributeTable(SharpDX.Direct3D10.MeshAttributeRange[] attribTableRef, ref int attribTableSizeRef) { + unsafe { + SharpDX.Direct3D10.MeshAttributeRange[] attribTableRef__ = attribTableRef; + SharpDX.Result __result__; + fixed (void* attribTableRef_ = attribTableRef__) + fixed (void* attribTableSizeRef_ = &attribTableSizeRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, attribTableRef_, attribTableSizeRef_,((void**)(*(void**)_nativePointer))[15]); + __result__.CheckError(); + } + } + + /// + ///

Generate a list of mesh edges, as well as a list of faces that share each edge.

+ ///
+ ///

Specifies that vertices that differ in position by less than epsilon should be treated as coincident.

+ ///

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

+ /// + ///

After an application generates adjacency information for a mesh, the mesh data can be optimized for better drawing performance.

The order of the entries in the adjacency buffer is determined by the order of the vertex indices in the index buffer. The adjacent triangle 0 always corresponds to the edge between the indices of the corners 0 and 1. The adjacent triangle 1 always corresponds to the edge between the indices of the corners 1 and 2 while the adjacent triangle 2 corresponds to the edge between the indices of the corners 2 and 0.

+ ///
+ /// + /// bb173907 + /// HRESULT ID3DX10Mesh::GenerateAdjacencyAndPointReps([In] float Epsilon) + /// ID3DX10Mesh::GenerateAdjacencyAndPointReps + public void GenerateAdjacencyAndPointRepresentation(float epsilon) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, epsilon,((void**)(*(void**)_nativePointer))[16]); + __result__.CheckError(); + } + } + + /// + ///

Adds adjacency data to the mesh's index buffer. When the mesh is to be sent to a geometry shader that takes adjacency data, it is neccessary for the mesh's index buffer to contain adjacency data.

+ ///
+ ///

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

+ /// + /// bb173909 + /// HRESULT ID3DX10Mesh::GenerateGSAdjacency() + /// ID3DX10Mesh::GenerateGSAdjacency + public void GenerateGeometryShaderAdjacency() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[17]); + __result__.CheckError(); + } + } + + /// + ///

Set the mesh's adjacency data.

+ ///
+ ///

The adjacency data to set.

+ ///

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

+ /// + /// bb173926 + /// HRESULT ID3DX10Mesh::SetAdjacencyData([In] const void* pAdjacency) + /// ID3DX10Mesh::SetAdjacencyData + internal void SetAdjacencyData(System.IntPtr adjacencyRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)adjacencyRef,((void**)(*(void**)_nativePointer))[18]); + __result__.CheckError(); + } + } + + /// + ///

Access the mesh's adjacency buffer.

+ ///
+ ///

The adjacency buffer. See .

+ /// + /// bb173910 + /// HRESULT ID3DX10Mesh::GetAdjacencyBuffer([In] ID3DX10MeshBuffer** ppAdjacency) + /// ID3DX10Mesh::GetAdjacencyBuffer + public SharpDX.Direct3D10.MeshBuffer GetAdjacencyBuffer() { + unsafe { + SharpDX.Direct3D10.MeshBuffer adjacencyOut; + IntPtr adjacencyOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &adjacencyOut_,((void**)(*(void**)_nativePointer))[19]); + adjacencyOut= (adjacencyOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.MeshBuffer(adjacencyOut_); + __result__.CheckError(); + return adjacencyOut; + } + } + + /// + ///

Set the point rep data for the mesh.

+ ///
+ ///

The point rep data to set.

+ ///

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

+ /// + /// bb173930 + /// HRESULT ID3DX10Mesh::SetPointRepData([In] const void* pPointReps) + /// ID3DX10Mesh::SetPointRepData + internal void SetPointRepData(System.IntPtr pointRepsRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, (void*)pointRepsRef,((void**)(*(void**)_nativePointer))[20]); + __result__.CheckError(); + } + } + + /// + ///

Get the mesh's point rep buffer.

+ ///
+ ///

Pointer to a mesh buffer containing the mesh's point rep data. See .

+ ///

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

+ /// + /// bb173918 + /// HRESULT ID3DX10Mesh::GetPointRepBuffer([In] ID3DX10MeshBuffer** ppPointReps) + /// ID3DX10Mesh::GetPointRepBuffer + internal void GetPointRepBuffer(out SharpDX.Direct3D10.MeshBuffer pointRepsOut) { + unsafe { + IntPtr pointRepsOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &pointRepsOut_,((void**)(*(void**)_nativePointer))[21]); + pointRepsOut= (pointRepsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.MeshBuffer(pointRepsOut_); + __result__.CheckError(); + } + } + + /// + ///

Removes mesh data from the device that has been committed to the device (with ).

+ ///
+ /// No documentation. + ///

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

+ /// + /// bb173904 + /// HRESULT ID3DX10Mesh::Discard([In] D3DX10_MESH_DISCARD_FLAGS dwDiscard) + /// ID3DX10Mesh::Discard + public void Discard(SharpDX.Direct3D10.MeshDiscardFlags dwDiscard) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)dwDiscard),((void**)(*(void**)_nativePointer))[22]); + __result__.CheckError(); + } + } + + /// + ///

Creates a new mesh and fills it with the data of a previously loaded mesh.

+ ///
+ ///

Creation flags to be applied to the new mesh. See D3DX10_MESH.

+ ///

The semantic name for the position data.

+ ///

Array of structures, describing the vertex format for the returned mesh. See .

+ ///

The number of elements in the pDesc array.

+ ///

The new mesh.

+ ///

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

+ /// + /// bb173902 + /// HRESULT ID3DX10Mesh::CloneMesh([In] unsigned int Flags,[In] const char* pPosSemantic,[In, Buffer] const D3D10_INPUT_ELEMENT_DESC* pDesc,[In] unsigned int DeclCount,[In] ID3DX10Mesh** ppCloneMesh) + /// ID3DX10Mesh::CloneMesh + internal void CloneMesh(int flags, string posSemanticRef, SharpDX.Direct3D10.InputElement[] descRef, int declCount, out SharpDX.Direct3D10.Mesh cloneMeshOut) { + unsafe { + IntPtr posSemanticRef_ = Utilities.StringToHGlobalAnsi(posSemanticRef); + SharpDX.Direct3D10.InputElement.__Native[] descRef__ = new SharpDX.Direct3D10.InputElement.__Native[descRef.Length]; + for (int i = 0; i < descRef.Length; i++) + descRef[i].__MarshalTo(ref descRef__[i]); + IntPtr cloneMeshOut_ = IntPtr.Zero; + SharpDX.Result __result__; + fixed (void* descRef_ = descRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, flags, (void*)posSemanticRef_, descRef_, declCount, &cloneMeshOut_,((void**)(*(void**)_nativePointer))[23]); + Marshal.FreeHGlobal(posSemanticRef_ ); + for (int i = 0; i < descRef.Length; i++) + descRef[i].__MarshalFree(ref descRef__[i]); + cloneMeshOut= (cloneMeshOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Mesh(cloneMeshOut_); + __result__.CheckError(); + } + } + + /// + ///

Generates a new mesh with reordered faces and vertices to optimize drawing performance.

+ ///
+ ///

Specifies the type of optimization to perform. This parameter can be set to a combination of one or more flags from D3DXMESHOPT and D3DXMESH (except D3DXMESH_32BIT, D3DXMESH_IB_WRITEONLY, and D3DXMESH_WRITEONLY).

+ ///

An array of UINTs, one per face, that identifies the original mesh face that corresponds to each face in the optimized mesh. If the value supplied for this argument is null, face remap data is not returned.

+ ///

Address of a reference to an Interface, which contains a DWORD for each vertex that specifies how the new vertices map to the old vertices. This remap is useful if you need to alter external data based on the new vertex mapping.

+ ///

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

+ /// + ///

This method generates a new mesh. Before running Optimize, an application must generate an adjacency buffer by calling . The adjacency buffer contains adjacency data, such as a list of edges and the faces that are adjacent to each other.

This method is very similar to the method, except that it can perform optimization while generating the new clone of the mesh. The output mesh inherits all of the creation parameters of the input mesh.

+ ///
+ /// + /// bb173925 + /// HRESULT ID3DX10Mesh::Optimize([In] unsigned int Flags,[Out, Buffer, Optional] unsigned int* pFaceRemap,[In] void** ppVertexRemap) + /// ID3DX10Mesh::Optimize + internal void Optimize(int flags, int[] faceRemapRef, System.IntPtr vertexRemapOut) { + unsafe { + int[] faceRemapRef__ = faceRemapRef; + SharpDX.Result __result__; + fixed (void* faceRemapRef_ = faceRemapRef__) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, flags, faceRemapRef_, (void*)vertexRemapOut,((void**)(*(void**)_nativePointer))[24]); + __result__.CheckError(); + } + } + + /// + ///

Generate an attribute buffer from the data in the mesh's attribute table. An attribute buffer is another format for storing the data in the attribute table. Both the attribute buffer and the attribute table are internal data structures in the mesh.

+ ///
+ ///

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

+ /// + /// bb173908 + /// HRESULT ID3DX10Mesh::GenerateAttributeBufferFromTable() + /// ID3DX10Mesh::GenerateAttributeBufferFromTable + public void GenerateAttributeBufferFromTable() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[25]); + __result__.CheckError(); + } + } + + /// + ///

Commit any changes made to a mesh to the device so that the changes can be rendered. This should be called after a mesh's data is altered and before it is rendered. A mesh cannot be rendered unless it is committed to the device. See remarks.

+ ///
+ ///

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

+ /// + ///

When a mesh is loaded, it's data is loaded into staging resources, meaning the data can be altered but not rendered. When CommitToDevice is called, the data from the staging resources are copied into device resources so that they can be rendered. Although the data is committed to the device, the staging resources remain and can be modified. If any modifications are made to the staging resources, the staging resources must be committed to the device again in order for those changes to be rendered on screen.

+ ///
+ /// + /// bb173903 + /// HRESULT ID3DX10Mesh::CommitToDevice() + /// ID3DX10Mesh::CommitToDevice + public void Commit() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[26]); + __result__.CheckError(); + } + } + + /// + ///

Draws a subset of a mesh.

+ ///
+ ///

Specifies which subset of the mesh to draw. This value is used to differentiate faces in a mesh as belonging to one or more attribute groups.

+ ///

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

+ /// + ///

An attribute table is used to identify areas of the mesh that need to be drawn with different textures, render states, materials, and so on. In addition, the application can use the attribute table to hide portions of a mesh by not drawing a given attribute identifier (AttribId) when drawing the frame.

+ ///
+ /// + /// bb173905 + /// HRESULT ID3DX10Mesh::DrawSubset([In] unsigned int AttribId) + /// ID3DX10Mesh::DrawSubset + public void DrawSubset(int attribId) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, attribId,((void**)(*(void**)_nativePointer))[27]); + __result__.CheckError(); + } + } + + /// + ///

Draw several instances of the same subset of a mesh.

+ ///
+ ///

Specifies which subset of the mesh to draw. This value is used to differentiate faces in a mesh as belonging to one or more attribute groups. See remarks.

+ ///

Number of instances to render.

+ ///

Which instance to start fetching from in each buffer marked as instance data.

+ ///

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

+ /// + ///

A mesh contains an attribute table. The attribute table can divide a mesh into subsets, where each subset is identified with an attribute ID. For example, a mesh with 200 faces, divided into three subsets, might have an attribute table that looks like this:

AttribID 0Faces 0 ~ 50
AttribID 1Faces 51 ~ 125
AttribID 2Faces 126 ~ 200

?

Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. Indexing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.

Drawing instances with DrawSubsetInstanced is very similar to the process used with that is outlined in Instancing Sample. The key difference when using DrawSubsetInstanced is that vertex and index buffers must be extracted from the Interface object before the instancing data can be combined.

The following code illustrates extracting the vertex and index buffers from the mesh object.

 * vertexBuffer; pDeviceObj->pMesh->GetDeviceVertexBuffer(0, &vertexBuffer); * indexBuffer; pDeviceObj->pMesh->GetDeviceIndexBuffer(&indexBuffer); 
+ ///
+ /// + /// bb173906 + /// HRESULT ID3DX10Mesh::DrawSubsetInstanced([In] unsigned int AttribId,[In] unsigned int InstanceCount,[In] unsigned int StartInstanceLocation) + /// ID3DX10Mesh::DrawSubsetInstanced + public void DrawSubsetInstanced(int attribId, int instanceCount, int startInstanceLocation) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, attribId, instanceCount, startInstanceLocation,((void**)(*(void**)_nativePointer))[28]); + __result__.CheckError(); + } + } + + /// + ///

Access the mesh's vertex buffer after it has been committed to the device with . This is different from , which returns the vertex buffer before it has been committed to the device.

+ ///
+ /// No documentation. + /// No documentation. + /// + /// bb173914 + /// HRESULT ID3DX10Mesh::GetDeviceVertexBuffer([In] unsigned int iBuffer,[In] ID3D10Buffer** ppVertexBuffer) + /// ID3DX10Mesh::GetDeviceVertexBuffer + public SharpDX.Direct3D10.Buffer GetDeviceVertexBuffer(int iBuffer) { + unsafe { + SharpDX.Direct3D10.Buffer vertexBufferOut; + IntPtr vertexBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, iBuffer, &vertexBufferOut_,((void**)(*(void**)_nativePointer))[29]); + vertexBufferOut= (vertexBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(vertexBufferOut_); + __result__.CheckError(); + return vertexBufferOut; + } + } + + /// + ///

Access the mesh's index buffer after it has been committed to the device with . This is different from , which returns the index buffer before it has been committed to the device.

+ ///
+ /// No documentation. + /// + ///

If the mesh's index buffer has not already been committed to the device, this API will automatically commit the index buffer before it returns a reference to the buffer.

+ ///
+ /// + /// bb173913 + /// HRESULT ID3DX10Mesh::GetDeviceIndexBuffer([In] ID3D10Buffer** ppIndexBuffer) + /// ID3DX10Mesh::GetDeviceIndexBuffer + public SharpDX.Direct3D10.Buffer GetDeviceIndexBuffer() { + unsafe { + SharpDX.Direct3D10.Buffer indexBufferOut; + IntPtr indexBufferOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &indexBufferOut_,((void**)(*(void**)_nativePointer))[30]); + indexBufferOut= (indexBufferOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(indexBufferOut_); + __result__.CheckError(); + return indexBufferOut; + } + } + } + /// + ///

A mesh buffer is a buffer that contains data about a mesh. It can contain one of five different types of data: vertex data, index data, adjacency data, attribute data, or point rep data. The structure is used to access these five pieces of data through the following five APIs: , , , , or .

+ ///
+ /// + /// bb173898 + /// ID3DX10MeshBuffer + /// ID3DX10MeshBuffer + [Guid("04b0d117-1041-46b1-aa8a-3952848ba22e")] + public partial class MeshBuffer : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public MeshBuffer(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.MeshBuffer(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.MeshBuffer(nativePointer); + } + + + /// + ///

Get the size of the mesh buffer, in bytes.

+ ///
+ /// + /// bb173899 + /// GetSize + /// GetSize + /// SIZE_T ID3DX10MeshBuffer::GetSize() + public SharpDX.PointerSize SizeInBytes { + get { return GetSizeInBytes(); } + } + + /// + ///

Get a reference to the mesh buffer memory to modify its contents.

+ ///
+ ///

Pointer to the buffer data.

+ ///

Size of the buffer in bytes.

+ ///

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

+ /// + ///

Differences between Direct3D 9 and Direct3D 10:

Map() in Direct3D 10 is analogous to resource Map() in Direct3D 9.

?

+ ///
+ /// + /// bb173900 + /// HRESULT ID3DX10MeshBuffer::Map([Out] void** ppData,[Out] SIZE_T* pSize) + /// ID3DX10MeshBuffer::Map + internal void Map(out System.IntPtr dataOut, out SharpDX.PointerSize sizeRef) { + unsafe { + sizeRef = new SharpDX.PointerSize(); + SharpDX.Result __result__; + fixed (void* dataOut_ = &dataOut) + fixed (void* sizeRef_ = &sizeRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, dataOut_, sizeRef_,((void**)(*(void**)_nativePointer))[3]); + __result__.CheckError(); + } + } + + /// + ///

Unmap a buffer.

+ ///
+ ///

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

+ /// + ///

Differences between Direct3D 9 and Direct3D 10:

Unmap() in Direct3D 10 is analogous to resource Unlock() in Direct3D 9.

?

+ ///
+ /// + /// bb173901 + /// HRESULT ID3DX10MeshBuffer::Unmap() + /// ID3DX10MeshBuffer::Unmap + public void Unmap() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + __result__.CheckError(); + } + } + + /// + ///

Get the size of the mesh buffer, in bytes.

+ ///
+ ///

The size of the mesh buffer, in bytes.

+ /// + /// bb173899 + /// SIZE_T ID3DX10MeshBuffer::GetSize() + /// ID3DX10MeshBuffer::GetSize + internal SharpDX.PointerSize GetSizeInBytes() { + unsafe { + SharpDX.PointerSize __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CallivoidPtr(_nativePointer,((void**)(*(void**)_nativePointer))[5]); + return __result__; + } + } + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class OutputMergerStage : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public OutputMergerStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.OutputMergerStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.OutputMergerStage(nativePointer); + } + + + /// + ///

Bind one or more render targets and the depth-stencil buffer to the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

A call to OMSetRenderTargets overrides all bounded render targets and the depth stencil target regardless of the number of render targets in ppRenderTargetViews.

The maximum number of render targets a device can have active at any given time is set by a #define in D3D10.h called D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots.

If any subresources are also currently bound for reading or writing (perhaps in a different part of the pipeline), those bind points will be null'ed out to prevent the same subresource from being read and written simultaneously in a single rendering operation.

The method will not hold references to the interfaces passed in. For that reason, applications should be careful not to release interfaces currently in use by the device.

See Binding Resources and Pipeline stages for more information on binding resources.

The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.

Any combination of the eight slots for render targets can have a render target set or not set.

The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.

+ ///
+ /// + /// bb173597 + /// void ID3D10Device::OMSetRenderTargets([In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10RenderTargetView** ppRenderTargetViews,[In, Optional] ID3D10DepthStencilView* pDepthStencilView) + /// ID3D10Device::OMSetRenderTargets + public void SetRenderTargets(int numViews, SharpDX.Direct3D10.RenderTargetView[] renderTargetViewsOut, SharpDX.Direct3D10.DepthStencilView depthStencilViewRef) { + unsafe { + IntPtr* renderTargetViewsOut_ = (IntPtr*)0; + if ( renderTargetViewsOut != null ) { + IntPtr* renderTargetViewsOut__ = stackalloc IntPtr[renderTargetViewsOut.Length]; + renderTargetViewsOut_ = renderTargetViewsOut__; + for (int i = 0; i < renderTargetViewsOut.Length; i++) + renderTargetViewsOut_[i] = (renderTargetViewsOut[i] == null)? IntPtr.Zero : renderTargetViewsOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numViews, renderTargetViewsOut_, (void*)((depthStencilViewRef == null)?IntPtr.Zero:depthStencilViewRef.NativePointer),((void**)(*(void**)_nativePointer))[24]); + } + } + + /// + ///

Bind one or more render targets and the depth-stencil buffer to the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

A call to OMSetRenderTargets overrides all bounded render targets and the depth stencil target regardless of the number of render targets in ppRenderTargetViews.

The maximum number of render targets a device can have active at any given time is set by a #define in D3D10.h called D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots.

If any subresources are also currently bound for reading or writing (perhaps in a different part of the pipeline), those bind points will be null'ed out to prevent the same subresource from being read and written simultaneously in a single rendering operation.

The method will not hold references to the interfaces passed in. For that reason, applications should be careful not to release interfaces currently in use by the device.

See Binding Resources and Pipeline stages for more information on binding resources.

The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.

Any combination of the eight slots for render targets can have a render target set or not set.

The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.

+ ///
+ /// + /// bb173597 + /// void ID3D10Device::OMSetRenderTargets([In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10RenderTargetView** ppRenderTargetViews,[In, Optional] ID3D10DepthStencilView* pDepthStencilView) + /// ID3D10Device::OMSetRenderTargets + public void SetRenderTargets(int numViews, SharpDX.ComArray renderTargetViewsOut, SharpDX.Direct3D10.DepthStencilView depthStencilViewRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numViews, (void*)((renderTargetViewsOut == null)?IntPtr.Zero:renderTargetViewsOut.NativePointer), (void*)((depthStencilViewRef == null)?IntPtr.Zero:depthStencilViewRef.NativePointer),((void**)(*(void**)_nativePointer))[24]); + } + } + + /// + ///

Bind one or more render targets and the depth-stencil buffer to the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

A call to OMSetRenderTargets overrides all bounded render targets and the depth stencil target regardless of the number of render targets in ppRenderTargetViews.

The maximum number of render targets a device can have active at any given time is set by a #define in D3D10.h called D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots.

If any subresources are also currently bound for reading or writing (perhaps in a different part of the pipeline), those bind points will be null'ed out to prevent the same subresource from being read and written simultaneously in a single rendering operation.

The method will not hold references to the interfaces passed in. For that reason, applications should be careful not to release interfaces currently in use by the device.

See Binding Resources and Pipeline stages for more information on binding resources.

The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.

Any combination of the eight slots for render targets can have a render target set or not set.

The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.

+ ///
+ /// + /// bb173597 + /// void ID3D10Device::OMSetRenderTargets([In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10RenderTargetView** ppRenderTargetViews,[In, Optional] ID3D10DepthStencilView* pDepthStencilView) + /// ID3D10Device::OMSetRenderTargets + private void SetRenderTargets(int numViews, System.IntPtr renderTargetViewsOut, System.IntPtr depthStencilViewRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numViews, (void*)renderTargetViewsOut, (void*)depthStencilViewRef,((void**)(*(void**)_nativePointer))[24]); + } + } + + /// + ///

Set the blend state of the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Blend state is used by the output-merger stage to determine how to blend together two RGB pixel values and two alpha values. The two RGB pixel values and two alpha values are the RGB pixel value and alpha value that the pixel shader outputs and the RGB pixel value and alpha value already in the output render target. The blend option controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The blend operation controls how the blending stage mathematically combines these modulated values.

To create a blend-state interface, call .

Passing in null for the blend-state interface indicates to the runtime to set a default blending state. The following table indicates the default blending parameters.

StateDefault Value
AlphaToCoverageEnable
BlendEnable[8]
SrcBlend
DstBlend
BlendOp
SrcBlendAlpha
DstBlendAlpha
BlendOpAlpha
RenderTargetWriteMask[8][8]

?

A sample mask determines which samples get updated in all the active render targets. The mapping of bits in a sample mask to samples in a multisample render target is the responsibility of an individual application. A sample mask is always applied; it is independent of whether multisampling is enabled, and does not depend on whether an application uses multisample render targets.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173595 + /// void ID3D10Device::OMSetBlendState([In, Optional] ID3D10BlendState* pBlendState,[In] const SHARPDX_COLOR4* BlendFactor,[In] unsigned int SampleMask) + /// ID3D10Device::OMSetBlendState + public void SetBlendState(SharpDX.Direct3D10.BlendState blendStateRef, SharpDX.Mathematics.Interop.RawColor4 blendFactor, int sampleMask) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((blendStateRef == null)?IntPtr.Zero:blendStateRef.NativePointer), &blendFactor, sampleMask,((void**)(*(void**)_nativePointer))[25]); + } + } + + /// + ///

Sets the depth-stencil state of the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// + ///

To create a depth-stencil state interface, call .

Depth-stencil state is used by the output-merger stage to setup depth-stencil testing. The stencil reference value is the control value used in the depth-stencil test.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173596 + /// void ID3D10Device::OMSetDepthStencilState([In, Optional] ID3D10DepthStencilState* pDepthStencilState,[In] unsigned int StencilRef) + /// ID3D10Device::OMSetDepthStencilState + public void SetDepthStencilState(SharpDX.Direct3D10.DepthStencilState depthStencilStateRef, int stencilRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((depthStencilStateRef == null)?IntPtr.Zero:depthStencilStateRef.NativePointer), stencilRef,((void**)(*(void**)_nativePointer))[26]); + } + } + + /// + ///

Get references to the render targets and the depth-stencil buffer that are available to the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173594 + /// void ID3D10Device::OMGetRenderTargets([In] unsigned int NumViews,[Out, Buffer, Optional] ID3D10RenderTargetView** ppRenderTargetViews,[Out, Optional] ID3D10DepthStencilView** ppDepthStencilView) + /// ID3D10Device::OMGetRenderTargets + internal void GetRenderTargets(int numViews, SharpDX.Direct3D10.RenderTargetView[] renderTargetViewsOut, out SharpDX.Direct3D10.DepthStencilView depthStencilViewOut) { + unsafe { + IntPtr* renderTargetViewsOut_ = stackalloc IntPtr[renderTargetViewsOut == null ? 0 : renderTargetViewsOut.Length]; + IntPtr depthStencilViewOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numViews, renderTargetViewsOut==null?(void*)0:renderTargetViewsOut_, &depthStencilViewOut_,((void**)(*(void**)_nativePointer))[56]); + if (renderTargetViewsOut != null) + for (int i = 0; i < renderTargetViewsOut.Length; i++) + renderTargetViewsOut[i] = (renderTargetViewsOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.RenderTargetView(renderTargetViewsOut_[i]); + depthStencilViewOut= (depthStencilViewOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.DepthStencilView(depthStencilViewOut_); + } + } + + /// + ///

Get the blend state of the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The reference count of the returned interface will be incremented by one when the blend state is retrieved. Applications must release returned reference(s) when they are no longer needed, or else there will be a memory leak.

+ ///
+ /// + /// bb173592 + /// void ID3D10Device::OMGetBlendState([Out, Optional] ID3D10BlendState** ppBlendState,[Out, Optional] SHARPDX_COLOR4* BlendFactor,[Out, Optional] unsigned int* pSampleMask) + /// ID3D10Device::OMGetBlendState + internal void GetBlendState(out SharpDX.Direct3D10.BlendState blendStateOut, out SharpDX.Mathematics.Interop.RawColor4 blendFactor, out int sampleMaskRef) { + unsafe { + IntPtr blendStateOut_ = IntPtr.Zero; + blendFactor = new SharpDX.Mathematics.Interop.RawColor4(); + fixed (void* blendFactor_ = &blendFactor) + fixed (void* sampleMaskRef_ = &sampleMaskRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &blendStateOut_, blendFactor_, sampleMaskRef_,((void**)(*(void**)_nativePointer))[57]); + blendStateOut= (blendStateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.BlendState(blendStateOut_); + } + } + + /// + ///

Gets the depth-stencil state of the output-merger stage.

+ ///
+ /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173593 + /// void ID3D10Device::OMGetDepthStencilState([Out, Optional] ID3D10DepthStencilState** ppDepthStencilState,[Out, Optional] unsigned int* pStencilRef) + /// ID3D10Device::OMGetDepthStencilState + internal void GetDepthStencilState(out SharpDX.Direct3D10.DepthStencilState depthStencilStateOut, out int stencilRefRef) { + unsafe { + IntPtr depthStencilStateOut_ = IntPtr.Zero; + fixed (void* stencilRefRef_ = &stencilRefRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &depthStencilStateOut_, stencilRefRef_,((void**)(*(void**)_nativePointer))[58]); + depthStencilStateOut= (depthStencilStateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.DepthStencilState(depthStencilStateOut_); + } + } + } + /// + ///

A pixel-shader interface manages an executable program (a pixel shader) that controls the pixel-shader stage.

+ ///
+ /// + ///

The pixel-shader interface has no methods; use HLSL to implement your shader functionality. All shaders in Direct3D 10 are implemented from a common set of features referred to as the common shader core.

To create a pixel shader interface, call . Before using a pixel shader you must bind it to the device by calling .

This interface is defined in D3D10.h.

+ ///
+ /// + /// bb173821 + /// ID3D10PixelShader + /// ID3D10PixelShader + [Guid("4968B601-9D00-4cde-8346-8E7F675819B6")] + public partial class PixelShader : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public PixelShader(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.PixelShader(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.PixelShader(nativePointer); + } + + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class PixelShaderStage : CommonShaderStage { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public PixelShaderStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.PixelShaderStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.PixelShaderStage(nativePointer); + } + + + /// + ///

Bind an array of shader resources to the pixel shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173606 + /// void ID3D10Device::PSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::PSSetShaderResources + public override void SetShaderResources(int startSlot, int numViews, SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsOut) { + unsafe { + IntPtr* shaderResourceViewsOut_ = (IntPtr*)0; + if ( shaderResourceViewsOut != null ) { + IntPtr* shaderResourceViewsOut__ = stackalloc IntPtr[shaderResourceViewsOut.Length]; + shaderResourceViewsOut_ = shaderResourceViewsOut__; + for (int i = 0; i < shaderResourceViewsOut.Length; i++) + shaderResourceViewsOut_[i] = (shaderResourceViewsOut[i] == null)? IntPtr.Zero : shaderResourceViewsOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, shaderResourceViewsOut_,((void**)(*(void**)_nativePointer))[4]); + } + } + + /// + ///

Bind an array of shader resources to the pixel shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173606 + /// void ID3D10Device::PSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::PSSetShaderResources + public override void SetShaderResources(int startSlot, int numViews, SharpDX.ComArray shaderResourceViewsOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, (void*)((shaderResourceViewsOut == null)?IntPtr.Zero:shaderResourceViewsOut.NativePointer),((void**)(*(void**)_nativePointer))[4]); + } + } + + /// + ///

Bind an array of shader resources to the pixel shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173606 + /// void ID3D10Device::PSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::PSSetShaderResources + private void SetShaderResources(int startSlot, int numViews, System.IntPtr shaderResourceViewsOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, (void*)shaderResourceViewsOut,((void**)(*(void**)_nativePointer))[4]); + } + } + + /// + ///

Sets a pixel shader to the device.

+ ///
+ ///

Pointer to a pixel shader (see ). Passing in null disables the shader for this pipeline stage.

+ /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173605 + /// void ID3D10Device::PSSetShader([In, Optional] ID3D10PixelShader* pPixelShader) + /// ID3D10Device::PSSetShader + public void Set(SharpDX.Direct3D10.PixelShader pixelShaderRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((pixelShaderRef == null)?IntPtr.Zero:pixelShaderRef.NativePointer),((void**)(*(void**)_nativePointer))[5]); + } + } + + /// + ///

Set an array of sampler states to the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

StateDefault Value
Filter
AddressU
AddressV
AddressW
MipLODBias0
MaxAnisotropy1
ComparisonFunc
BorderColor[0]1.0f
BorderColor[1]1.0f
BorderColor[2]1.0f
BorderColor[3]1.0f
MinLOD-FLT_MAX
MaxLODFLT_MAX

?

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173604 + /// void ID3D10Device::PSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::PSSetSamplers + public override void SetSamplers(int startSlot, int numSamplers, SharpDX.Direct3D10.SamplerState[] samplersOut) { + unsafe { + IntPtr* samplersOut_ = (IntPtr*)0; + if ( samplersOut != null ) { + IntPtr* samplersOut__ = stackalloc IntPtr[samplersOut.Length]; + samplersOut_ = samplersOut__; + for (int i = 0; i < samplersOut.Length; i++) + samplersOut_[i] = (samplersOut[i] == null)? IntPtr.Zero : samplersOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, samplersOut_,((void**)(*(void**)_nativePointer))[6]); + } + } + + /// + ///

Set an array of sampler states to the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

StateDefault Value
Filter
AddressU
AddressV
AddressW
MipLODBias0
MaxAnisotropy1
ComparisonFunc
BorderColor[0]1.0f
BorderColor[1]1.0f
BorderColor[2]1.0f
BorderColor[3]1.0f
MinLOD-FLT_MAX
MaxLODFLT_MAX

?

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173604 + /// void ID3D10Device::PSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::PSSetSamplers + public override void SetSamplers(int startSlot, int numSamplers, SharpDX.ComArray samplersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, (void*)((samplersOut == null)?IntPtr.Zero:samplersOut.NativePointer),((void**)(*(void**)_nativePointer))[6]); + } + } + + /// + ///

Set an array of sampler states to the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

StateDefault Value
Filter
AddressU
AddressV
AddressW
MipLODBias0
MaxAnisotropy1
ComparisonFunc
BorderColor[0]1.0f
BorderColor[1]1.0f
BorderColor[2]1.0f
BorderColor[3]1.0f
MinLOD-FLT_MAX
MaxLODFLT_MAX

?

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173604 + /// void ID3D10Device::PSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::PSSetSamplers + private void SetSamplers(int startSlot, int numSamplers, System.IntPtr samplersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, (void*)samplersOut,((void**)(*(void**)_nativePointer))[6]); + } + } + + /// + ///

Set the constant buffers used by the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173603 + /// void ID3D10Device::PSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::PSSetConstantBuffers + public override void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] constantBuffersOut) { + unsafe { + IntPtr* constantBuffersOut_ = (IntPtr*)0; + if ( constantBuffersOut != null ) { + IntPtr* constantBuffersOut__ = stackalloc IntPtr[constantBuffersOut.Length]; + constantBuffersOut_ = constantBuffersOut__; + for (int i = 0; i < constantBuffersOut.Length; i++) + constantBuffersOut_[i] = (constantBuffersOut[i] == null)? IntPtr.Zero : constantBuffersOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, constantBuffersOut_,((void**)(*(void**)_nativePointer))[10]); + } + } + + /// + ///

Set the constant buffers used by the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173603 + /// void ID3D10Device::PSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::PSSetConstantBuffers + public override void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.ComArray constantBuffersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)((constantBuffersOut == null)?IntPtr.Zero:constantBuffersOut.NativePointer),((void**)(*(void**)_nativePointer))[10]); + } + } + + /// + ///

Set the constant buffers used by the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173603 + /// void ID3D10Device::PSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::PSSetConstantBuffers + private void SetConstantBuffers(int startSlot, int numBuffers, System.IntPtr constantBuffersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)constantBuffersOut,((void**)(*(void**)_nativePointer))[10]); + } + } + + /// + ///

Get the pixel shader resources.

+ ///
+ ///

Index into the device's zero-based array to begin getting shader resources from.

+ ///

The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources.

+ ///

Array of shader resource view interfaces to be returned by the device.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173602 + /// void ID3D10Device::PSGetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[Out, Buffer, Optional] ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::PSGetShaderResources + internal override void GetShaderResources(int startSlot, int numViews, SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsOut) { + unsafe { + IntPtr* shaderResourceViewsOut_ = stackalloc IntPtr[shaderResourceViewsOut == null ? 0 : shaderResourceViewsOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, shaderResourceViewsOut==null?(void*)0:shaderResourceViewsOut_,((void**)(*(void**)_nativePointer))[40]); + if (shaderResourceViewsOut != null) + for (int i = 0; i < shaderResourceViewsOut.Length; i++) + shaderResourceViewsOut[i] = (shaderResourceViewsOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewsOut_[i]); + } + } + + /// + ///

Get the pixel shader currently set on the device.

+ ///
+ ///

Address of a reference to a pixel shader (see ) to be returned by the method.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173601 + /// void ID3D10Device::PSGetShader([Out] ID3D10PixelShader** ppPixelShader) + /// ID3D10Device::PSGetShader + public void Get(out SharpDX.Direct3D10.PixelShader pixelShaderOut) { + unsafe { + IntPtr pixelShaderOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &pixelShaderOut_,((void**)(*(void**)_nativePointer))[41]); + pixelShaderOut= (pixelShaderOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.PixelShader(pixelShaderOut_); + } + } + + /// + ///

Get an array of sampler states from the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173600 + /// void ID3D10Device::PSGetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[Out, Buffer, Optional] ID3D10SamplerState** ppSamplers) + /// ID3D10Device::PSGetSamplers + internal override void GetSamplers(int startSlot, int numSamplers, SharpDX.Direct3D10.SamplerState[] samplersOut) { + unsafe { + IntPtr* samplersOut_ = stackalloc IntPtr[samplersOut == null ? 0 : samplersOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, samplersOut==null?(void*)0:samplersOut_,((void**)(*(void**)_nativePointer))[42]); + if (samplersOut != null) + for (int i = 0; i < samplersOut.Length; i++) + samplersOut[i] = (samplersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.SamplerState(samplersOut_[i]); + } + } + + /// + ///

Get the constant buffers used by the pixel shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173599 + /// void ID3D10Device::PSGetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[Out, Buffer, Optional] ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::PSGetConstantBuffers + internal override void GetConstantBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] constantBuffersOut) { + unsafe { + IntPtr* constantBuffersOut_ = stackalloc IntPtr[constantBuffersOut == null ? 0 : constantBuffersOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, constantBuffersOut==null?(void*)0:constantBuffersOut_,((void**)(*(void**)_nativePointer))[44]); + if (constantBuffersOut != null) + for (int i = 0; i < constantBuffersOut.Length; i++) + constantBuffersOut[i] = (constantBuffersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(constantBuffersOut_[i]); + } + } + } + /// + ///

A predicate interface determines whether geometry should be processed depending on the results of a previous draw call.

+ ///
+ /// + ///

A predicate can be created with , and used with .

There are two types of predicates in Direct3D 10: stream-output-overflow predicates and occlusion predicates. Stream-output-overflow predicates will cause any geometry residing in stream-output buffers that were overflowed to not be processed. Occlusion predicates will cause any geometry that did not have a single sample pass the depth/stencil tests to not be processed.

For an example of occlusion-predicated rendering, see Draw Predicated Sample.

+ ///
+ /// + /// bb173822 + /// ID3D10Predicate + /// ID3D10Predicate + [Guid("9B7E4C10-342C-4106-A19F-4F2704F689F0")] + public partial class Predicate : SharpDX.Direct3D10.Query { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Predicate(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Predicate(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Predicate(nativePointer); + } + + } + /// + ///

A query interface queries information from the GPU.

+ ///
+ /// + ///

A query can be created with .

This interface inherits the functionality of an Interface.

Query data is typically gathered by issuing an command, issuing some graphics commands, issuing an command, and then calling to get data about what happened in between the Begin and End calls. The data returned by GetData will be different depending on the type of query.

There are, however, some queries that do not require calls to Begin. For a list of possible queries see .

A query is typically executed as shown in the following code:

 queryDesc; ... // Fill out queryDesc structure  * pQuery;	
+            /// pDevice->CreateQuery(&queryDesc, &pQuery); pQuery->Begin(); ... // Issue graphis commands, do whatever pQuery->End(); UINT64 queryData; // This data type is different depending on the query type while(  != pQuery->GetData(&queryData, sizeof(UINT64), 0) )	
+            /// {	
+            /// }	
+            /// 

When using a query that does not require a call to Begin, it still requires a call to End. The call to End causes the data returned by GetData to be accurate up until the last call to End.

+ ///
+ /// + /// bb173823 + /// ID3D10Query + /// ID3D10Query + [Guid("9B7E4C0E-342C-4106-A19F-4F2704F689F0")] + public partial class Query : SharpDX.Direct3D10.Asynchronous { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Query(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Query(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Query(nativePointer); + } + + + /// + ///

Get a query description.

+ ///
+ /// + /// bb173824 + /// GetDesc + /// GetDesc + /// void ID3D10Query::GetDesc([Out] D3D10_QUERY_DESC* pDesc) + public SharpDX.Direct3D10.QueryDescription Description { + get { SharpDX.Direct3D10.QueryDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a query description.

+ ///
+ ///

Pointer to a query description (see ).

+ /// + /// bb173824 + /// void ID3D10Query::GetDesc([Out] D3D10_QUERY_DESC* pDesc) + /// ID3D10Query::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.QueryDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.QueryDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[11]); + } + } + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class RasterizerStage : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public RasterizerStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.RasterizerStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.RasterizerStage(nativePointer); + } + + + /// + ///

Get or sets the rasterizer state from the rasterizer stage of the pipeline.

+ ///
+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173609 + /// RSGetState / RSSetState + /// RSGetState + /// void ID3D10Device::RSGetState([Out] ID3D10RasterizerState** ppRasterizerState) + public SharpDX.Direct3D10.RasterizerState State { + get { SharpDX.Direct3D10.RasterizerState __output__; GetState(out __output__); return __output__; } + set { SetState(value); } + } + + /// + ///

Set the rasterizer state for the rasterizer stage of the pipeline.

+ ///
+ /// No documentation. + /// + ///

To create a rasterizer state interface, call . For more details on setting up the rasterizer state, see Set Rasterizer State.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173612 + /// void ID3D10Device::RSSetState([In, Optional] ID3D10RasterizerState* pRasterizerState) + /// ID3D10Device::RSSetState + internal void SetState(SharpDX.Direct3D10.RasterizerState rasterizerStateRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((rasterizerStateRef == null)?IntPtr.Zero:rasterizerStateRef.NativePointer),((void**)(*(void**)_nativePointer))[29]); + } + } + + /// + ///

Bind an array of viewports to the rasterizer stage of the pipeline.

+ ///
+ /// No documentation. + /// No documentation. + /// + ///

All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.

Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the SV_ViewportArrayIndex semantic then Direct3D will use the first viewport in the array.

+ ///
+ /// + /// bb173613 + /// void ID3D10Device::RSSetViewports([In] unsigned int NumViewports,[In, Buffer, Optional] const D3D10_VIEWPORT* pViewports) + /// ID3D10Device::RSSetViewports + internal void SetViewports(int numViewports, SharpDX.Mathematics.Interop.RawViewport[] viewportsRef) { + unsafe { + SharpDX.Mathematics.Interop.RawViewport[] viewportsRef__ = viewportsRef; + fixed (void* viewportsRef_ = viewportsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numViewports, viewportsRef_,((void**)(*(void**)_nativePointer))[30]); + } + } + + /// + ///

Bind an array of scissor rectangles to the rasterizer stage.

+ ///
+ /// No documentation. + /// No documentation. + /// + ///

The scissor rectangles will only be used if ScissorEnable is set to true in the rasterizer state (see ).

Which scissor rectangle to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the SV_ViewportArrayIndex semantic then Direct3D will use the first scissor rectangle in the array.

Each scissor rectangle in the array corresponds to a viewport in an array of viewports (see ).

+ ///
+ /// + /// bb173611 + /// void ID3D10Device::RSSetScissorRects([In] unsigned int NumRects,[In, Buffer, Optional] const RECT* pRects) + /// ID3D10Device::RSSetScissorRects + internal void SetScissorRects(int numRects, SharpDX.Mathematics.Interop.RawRectangle[] rectsRef) { + unsafe { + SharpDX.Mathematics.Interop.RawRectangle[] rectsRef__ = rectsRef; + fixed (void* rectsRef_ = rectsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numRects, rectsRef_,((void**)(*(void**)_nativePointer))[31]); + } + } + + /// + ///

Get the rasterizer state from the rasterizer stage of the pipeline.

+ ///
+ /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173609 + /// void ID3D10Device::RSGetState([Out] ID3D10RasterizerState** ppRasterizerState) + /// ID3D10Device::RSGetState + internal void GetState(out SharpDX.Direct3D10.RasterizerState rasterizerStateOut) { + unsafe { + IntPtr rasterizerStateOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &rasterizerStateOut_,((void**)(*(void**)_nativePointer))[60]); + rasterizerStateOut= (rasterizerStateOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.RasterizerState(rasterizerStateOut_); + } + } + + /// + ///

Get the array of viewports bound to the rasterizer stage

+ ///
+ /// No documentation. + /// No documentation. + /// + /// bb173610 + /// void ID3D10Device::RSGetViewports([InOut] unsigned int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports) + /// ID3D10Device::RSGetViewports + internal void GetViewports(ref int numViewports, SharpDX.Mathematics.Interop.RawViewport[] viewportsRef) { + unsafe { + SharpDX.Mathematics.Interop.RawViewport[] viewportsRef__ = viewportsRef; + fixed (void* numViewports_ = &numViewports) + fixed (void* viewportsRef_ = viewportsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numViewports_, viewportsRef_,((void**)(*(void**)_nativePointer))[61]); + } + } + + /// + ///

Get the array of scissor rectangles bound to the rasterizer stage.

+ ///
+ /// No documentation. + /// No documentation. + /// + /// bb173608 + /// void ID3D10Device::RSGetScissorRects([InOut] unsigned int* NumRects,[Out, Buffer, Optional] RECT* pRects) + /// ID3D10Device::RSGetScissorRects + internal void GetScissorRects(ref int numRects, SharpDX.Mathematics.Interop.RawRectangle[] rectsRef) { + unsafe { + SharpDX.Mathematics.Interop.RawRectangle[] rectsRef__ = rectsRef; + fixed (void* numRects_ = &numRects) + fixed (void* rectsRef_ = rectsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numRects_, rectsRef_,((void**)(*(void**)_nativePointer))[62]); + } + } + } + /// + ///

A rasterizer-state interface accesses rasterizer state for the rasterizer stage.

+ ///
+ /// + ///

A rasterizer-state object is created with and bound to the pipeline with .

+ ///
+ /// + /// bb173825 + /// ID3D10RasterizerState + /// ID3D10RasterizerState + [Guid("A2A07292-89AF-4345-BE2E-C53D9FBB6E9F")] + public partial class RasterizerState : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public RasterizerState(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.RasterizerState(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.RasterizerState(nativePointer); + } + + + /// + ///

Get the properties of a rasterizer-state object.

+ ///
+ /// + /// bb173826 + /// GetDesc + /// GetDesc + /// void ID3D10RasterizerState::GetDesc([Out] D3D10_RASTERIZER_DESC* pDesc) + public SharpDX.Direct3D10.RasterizerStateDescription Description { + get { SharpDX.Direct3D10.RasterizerStateDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the properties of a rasterizer-state object.

+ ///
+ ///

Pointer to a rasterizer-state description (see ).

+ /// + /// bb173826 + /// void ID3D10RasterizerState::GetDesc([Out] D3D10_RASTERIZER_DESC* pDesc) + /// ID3D10RasterizerState::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.RasterizerStateDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.RasterizerStateDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[7]); + } + } + } + /// + ///

A render-target-view interface identifies the render-target subresources that can be accessed during rendering.

+ ///
+ /// + ///

To create a render-target view, call . To bind a render-target view to the pipeline, call .

A rendertarget is a resource that can be written by the output-merger stage at the end of a render pass. Each render-target should also have a corresponding depth-stencil view.

+ ///
+ /// + /// bb173827 + /// ID3D10RenderTargetView + /// ID3D10RenderTargetView + [Guid("9B7E4C08-342C-4106-A19F-4F2704F689F0")] + public partial class RenderTargetView : SharpDX.Direct3D10.ResourceView { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public RenderTargetView(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.RenderTargetView(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.RenderTargetView(nativePointer); + } + + + /// + ///

Get the properties of a render target view.

+ ///
+ /// + /// bb173828 + /// GetDesc + /// GetDesc + /// void ID3D10RenderTargetView::GetDesc([Out] D3D10_RENDER_TARGET_VIEW_DESC* pDesc) + public SharpDX.Direct3D10.RenderTargetViewDescription Description { + get { SharpDX.Direct3D10.RenderTargetViewDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the properties of a render target view.

+ ///
+ ///

Pointer to the description of a render target view (see ).

+ /// + /// bb173828 + /// void ID3D10RenderTargetView::GetDesc([Out] D3D10_RENDER_TARGET_VIEW_DESC* pDesc) + /// ID3D10RenderTargetView::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.RenderTargetViewDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.RenderTargetViewDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[8]); + } + } + } + /// + ///

A resource interface provides common actions on all resources.

+ ///
+ /// + ///

A resource interface cannot be created directly; instead, buffers and textures are created that inherit from a resource interface (see Creating Buffer Resources or Creating Texture Resources).

+ ///
+ /// + /// bb173829 + /// ID3D10Resource + /// ID3D10Resource + [Guid("9B7E4C01-342C-4106-A19F-4F2704F689F0")] + public partial class Resource : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Resource(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Resource(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Resource(nativePointer); + } + + + /// Constant MaximumMipLevels. + /// D3D10_REQ_MIP_LEVELS + public const int MaximumMipLevels = 14; + + /// Constant ResourceSizeInMegabytes. + /// D3D10_REQ_RESOURCE_SIZE_IN_MEGABYTES + public const int ResourceSizeInMegabytes = 128; + + /// Constant MaximumTexture1DArraySize. + /// D3D10_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION + public const int MaximumTexture1DArraySize = 512; + + /// Constant MaximumTexture2DArraySize. + /// D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION + public const int MaximumTexture2DArraySize = 512; + + /// Constant MaximumTexture1DSize. + /// D3D10_REQ_TEXTURE1D_U_DIMENSION + public const int MaximumTexture1DSize = 8192; + + /// Constant MaximumTexture2DSize. + /// D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION + public const int MaximumTexture2DSize = 8192; + + /// Constant MaximumTexture3DSize. + /// D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION + public const int MaximumTexture3DSize = 2048; + + /// Constant MaximumTextureCubeSize. + /// D3D10_REQ_TEXTURECUBE_DIMENSION + public const int MaximumTextureCubeSize = 8192; + + /// + ///

Get the type of the resource.

+ ///
+ /// + /// bb173831 + /// GetType + /// GetType + /// void ID3D10Resource::GetType([Out] D3D10_RESOURCE_DIMENSION* rType) + public SharpDX.Direct3D10.ResourceDimension TypeInfo { + get { SharpDX.Direct3D10.ResourceDimension __output__; GetTypeInfo(out __output__); return __output__; } + } + + /// + ///

Get or sets the eviction priority of a resource.

+ ///
+ /// + ///

This method is a wrapper for GetEvictionPriority and is provided in the Interface interface for convenience.

+ ///
+ /// + /// bb173830 + /// GetEvictionPriority / SetEvictionPriority + /// GetEvictionPriority + /// unsigned int ID3D10Resource::GetEvictionPriority() + public int EvictionPriority { + get { return GetEvictionPriority(); } + set { SetEvictionPriority(value); } + } + + /// + ///

Get the type of the resource.

+ ///
+ ///

Pointer to the resource type (see ).

+ /// + /// bb173831 + /// void ID3D10Resource::GetType([Out] D3D10_RESOURCE_DIMENSION* rType) + /// ID3D10Resource::GetType + internal void GetTypeInfo(out SharpDX.Direct3D10.ResourceDimension rType) { + unsafe { + fixed (void* rType_ = &rType) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, rType_,((void**)(*(void**)_nativePointer))[7]); + } + } + + /// + ///

Set the eviction priority of a resource.

+ ///
+ ///

Eviction priority for the resource, which is one of the following values:

+ /// + ///

Resource priorities determine which resource to evict from video memory when the system has run out of video memory. The resource will not be lost; it will be removed from video memory and placed into system memory, or possibly placed onto the hard drive. The resource will be loaded back into video memory when it is required.

A resource that is set to the maximum priority, , is only evicted if there is no other way of resolving the incoming memory request. The Windows Display Driver Model (WDDM) tries to split an incoming memory request to its minimum size and evict lower-priority resources before evicting a resource with maximum priority.

Changing the priorities of resources should be done carefully. The wrong eviction priorities could be a detriment to performance rather than an improvement. See QueryResourceResidency for additional information.

This method is a wrapper for SetEvictionPriority and is provided in the Interface interface for convenience.

+ ///
+ /// + /// bb173832 + /// void ID3D10Resource::SetEvictionPriority([In] unsigned int EvictionPriority) + /// ID3D10Resource::SetEvictionPriority + internal void SetEvictionPriority(int evictionPriority) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, evictionPriority,((void**)(*(void**)_nativePointer))[8]); + } + } + + /// + ///

Get the eviction priority of a resource.

+ ///
+ ///

One of the following values, which specifies the eviction priority for the resource:

+ /// + ///

This method is a wrapper for GetEvictionPriority and is provided in the Interface interface for convenience.

+ ///
+ /// + /// bb173830 + /// unsigned int ID3D10Resource::GetEvictionPriority() + /// ID3D10Resource::GetEvictionPriority + internal int GetEvictionPriority() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[9]); + return __result__; + } + } + } + /// + ///

A view interface specifies the parts of a resource the pipeline can access during rendering (see view).

+ ///
+ /// + ///

A view interface is the base interface for all views. There are three types of views; a depth-stencil view, a render-target view, and a shader-resource view.

  • To create a render-target view, call .
  • To create a depth-stencil view, call .
  • To create a shader-resource view, call .

All resources must be bound to the pipeline before they can be accessed.

  • To bind a render-target view or a depth-stencil view, call .
  • To bind a shader-resource view, call .

A view can also be used to access a typeless resource.

+ ///
+ /// + /// bb173876 + /// ID3D10View + /// ID3D10View + [Guid("C902B03F-60A7-49BA-9936-2A3AB37A7E33")] + public partial class ResourceView : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public ResourceView(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.ResourceView(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.ResourceView(nativePointer); + } + + + /// + ///

Get the resource that is accessed through this view.

+ ///
+ /// + ///

This function increments the reference count of the resource by one, so it is necessary to call Release on the returned reference when the application is done with it. Destroying (or losing) the returned reference before Release is called will result in a memory leak.

+ ///
+ /// + /// bb173877 + /// GetResource + /// GetResource + /// void ID3D10View::GetResource([Out] ID3D10Resource** ppResource) + public SharpDX.Direct3D10.Resource Resource { + get { SharpDX.Direct3D10.Resource __output__; GetResource(out __output__); return __output__; } + } + + /// + ///

Get the resource that is accessed through this view.

+ ///
+ ///

Address of a reference to the resource that is accessed through this view. (See .)

+ /// + ///

This function increments the reference count of the resource by one, so it is necessary to call Release on the returned reference when the application is done with it. Destroying (or losing) the returned reference before Release is called will result in a memory leak.

+ ///
+ /// + /// bb173877 + /// void ID3D10View::GetResource([Out] ID3D10Resource** ppResource) + /// ID3D10View::GetResource + internal void GetResource(out SharpDX.Direct3D10.Resource resourceOut) { + unsafe { + IntPtr resourceOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &resourceOut_,((void**)(*(void**)_nativePointer))[7]); + resourceOut= (resourceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Resource(resourceOut_); + } + } + } + /// + ///

A sampler-state interface accesses sampler state for a texture.

+ ///
+ /// + ///

Create a sampler-state object by calling .

To initialize sampler state, bind the sampler-state object to the pipeline by calling , , or .

+ ///
+ /// + /// bb173833 + /// ID3D10SamplerState + /// ID3D10SamplerState + [Guid("9B7E4C0C-342C-4106-A19F-4F2704F689F0")] + public partial class SamplerState : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public SamplerState(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.SamplerState(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.SamplerState(nativePointer); + } + + + /// + ///

Get the sampler state.

+ ///
+ /// + /// bb173834 + /// GetDesc + /// GetDesc + /// void ID3D10SamplerState::GetDesc([Out] D3D10_SAMPLER_DESC* pDesc) + public SharpDX.Direct3D10.SamplerStateDescription Description { + get { SharpDX.Direct3D10.SamplerStateDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the sampler state.

+ ///
+ ///

A reference to the sampler state (see ).

+ /// + /// bb173834 + /// void ID3D10SamplerState::GetDesc([Out] D3D10_SAMPLER_DESC* pDesc) + /// ID3D10SamplerState::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.SamplerStateDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.SamplerStateDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[7]); + } + } + } + /// + ///

A shader-resource-view interface specifies the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, a texture or a sampler.

+ ///
+ /// + ///

To create a shader-resource view, call .

A shader-resource view is required when binding a resource to a shader stage; the binding occurs by calling , or .

+ ///
+ /// + /// bb173854 + /// ID3D10ShaderResourceView + /// ID3D10ShaderResourceView + [Guid("9B7E4C07-342C-4106-A19F-4F2704F689F0")] + public partial class ShaderResourceView : SharpDX.Direct3D10.ResourceView { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public ShaderResourceView(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.ShaderResourceView(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.ShaderResourceView(nativePointer); + } + + + /// + ///

Get the shader resource view's description.

+ ///
+ /// + /// bb173855 + /// GetDesc + /// GetDesc + /// void ID3D10ShaderResourceView::GetDesc([Out] D3D10_SHADER_RESOURCE_VIEW_DESC* pDesc) + public SharpDX.Direct3D10.ShaderResourceViewDescription Description { + get { SharpDX.Direct3D10.ShaderResourceViewDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get the shader resource view's description.

+ ///
+ ///

A reference to a structure to be filled with data about the shader resource view.

+ /// + /// bb173855 + /// void ID3D10ShaderResourceView::GetDesc([Out] D3D10_SHADER_RESOURCE_VIEW_DESC* pDesc) + /// ID3D10ShaderResourceView::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.ShaderResourceViewDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.ShaderResourceViewDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[8]); + } + } + } + /// + ///

A shader-resource-view interface specifies the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, a texture or a sampler.

+ ///
+ /// + ///

To create a shader-resource view, call .

A shader-resource view is required when binding a resource to a shader stage; the binding occurs by calling , or .

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694557 + /// ID3D10ShaderResourceView1 + /// ID3D10ShaderResourceView1 + [Guid("9B7E4C87-342C-4106-A19F-4F2704F689F0")] + public partial class ShaderResourceView1 : SharpDX.Direct3D10.ShaderResourceView { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public ShaderResourceView1(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.ShaderResourceView1(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.ShaderResourceView1(nativePointer); + } + + + /// + ///

Get the shader resource view's description.

+ ///
+ /// + ///

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694558 + /// GetDesc1 + /// GetDesc1 + /// void ID3D10ShaderResourceView1::GetDesc1([Out] D3D10_SHADER_RESOURCE_VIEW_DESC1* pDesc) + public SharpDX.Direct3D10.ShaderResourceViewDescription1 Description1 { + get { SharpDX.Direct3D10.ShaderResourceViewDescription1 __output__; GetDescription1(out __output__); return __output__; } + } + + /// + ///

Get the shader resource view's description.

+ ///
+ ///

A reference to a structure to be filled with data about the shader resource view.

+ /// + ///

This method requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694558 + /// void ID3D10ShaderResourceView1::GetDesc1([Out] D3D10_SHADER_RESOURCE_VIEW_DESC1* pDesc) + /// ID3D10ShaderResourceView1::GetDesc1 + internal void GetDescription1(out SharpDX.Direct3D10.ShaderResourceViewDescription1 descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.ShaderResourceViewDescription1(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[9]); + } + } + } + /// + ///

allows you to optimize, process, and manually set the relationship between bones and vertices in your meshes (see Skeletal Animation on Wikipedia). It is most useful for making .x files exported by DCC Apps (such as 3DS Max and Maya) more hardware-friendly, and for improving the render speed of your skinned meshes in software render mode.

+ ///
+ /// + ///

Create a interface with , D3DX10CreateSkinInfoFromBlendedMesh, or D3DX10CreateSkinInfoFVF.

The LPD3DX10SKININFO type is defined as a reference to the interface.

 typedef struct  *LPD3DX10SKININFO;	
+            /// 
+ ///
+ /// + /// bb173932 + /// ID3DX10SkinInfo + /// ID3DX10SkinInfo + [Guid("420bd604-1c76-4a34-a466-e45d0658a32c")] + public partial class SkinInfo : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public SkinInfo(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.SkinInfo(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.SkinInfo(nativePointer); + } + + + /// + ///

Get the number of vertices in .

+ ///
+ /// + /// bb173945 + /// GetNumVertices + /// GetNumVertices + /// unsigned int ID3DX10SkinInfo::GetNumVertices() + public int NumVertices { + get { return GetNumVertices(); } + } + + /// + ///

Get the number of bones in .

+ ///
+ /// + /// bb173944 + /// GetNumBones + /// GetNumBones + /// unsigned int ID3DX10SkinInfo::GetNumBones() + public int NumBones { + get { return GetNumBones(); } + } + + /// + ///

Get the number of vertices a bone can maximally influence.

+ ///
+ /// + /// bb173943 + /// GetMaxBoneInfluences + /// GetMaxBoneInfluences + /// unsigned int ID3DX10SkinInfo::GetMaxBoneInfluences() + public int MaxBoneInfluences { + get { return GetMaxBoneInfluences(); } + } + + /// + ///

Get the number of vertices in .

+ ///
+ ///

The number of vertices in .

+ /// + /// bb173945 + /// unsigned int ID3DX10SkinInfo::GetNumVertices() + /// ID3DX10SkinInfo::GetNumVertices + internal int GetNumVertices() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[3]); + return __result__; + } + } + + /// + ///

Get the number of bones in .

+ ///
+ ///

The number of bones in .

+ /// + /// bb173944 + /// unsigned int ID3DX10SkinInfo::GetNumBones() + /// ID3DX10SkinInfo::GetNumBones + internal int GetNumBones() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + return __result__; + } + } + + /// + ///

Get the number of vertices a bone can maximally influence.

+ ///
+ ///

The number of vertices a bone can maximally influence.

+ /// + /// bb173943 + /// unsigned int ID3DX10SkinInfo::GetMaxBoneInfluences() + /// ID3DX10SkinInfo::GetMaxBoneInfluences + internal int GetMaxBoneInfluences() { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[5]); + return __result__; + } + } + + /// + ///

Allocate space for additional vertices.

+ ///
+ ///

The number of vertices to add.

+ ///

If this method succeeds, the return value is . If the method fails, the return value can be: E_OUTOFMEMORY.

+ /// + /// bb173935 + /// HRESULT ID3DX10SkinInfo::AddVertices([In] unsigned int Count) + /// ID3DX10SkinInfo::AddVertices + public void AddVertices(int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, count,((void**)(*(void**)_nativePointer))[6]); + __result__.CheckError(); + } + } + + /// + ///

Change which vertices are influenced by which bones.

+ ///
+ ///

The new number of vertices.

+ ///

A reference to an array of vertex indices, which describe the remapping. For example, say SkinInfo contains some vertices such that bone0 is mapped to v0, bone1 to v1, and bone2 to v2, and array with 2,1,0 is specified for pBoneRemap. This will cause bone0 to be mapped to v2, bone1 to v1, and bone2 to v0.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_OUTOFMEMORY or E_INVALIDARG.

+ /// + /// bb173947 + /// HRESULT ID3DX10SkinInfo::RemapVertices([In] unsigned int NewVertexCount,[In, Buffer] unsigned int* pVertexRemap) + /// ID3DX10SkinInfo::RemapVertices + public void RemapVertices(int newVertexCount, int[] vertexRemapRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* vertexRemapRef_ = vertexRemapRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, newVertexCount, vertexRemapRef_,((void**)(*(void**)_nativePointer))[7]); + __result__.CheckError(); + } + } + + /// + ///

Allocate space for more bones.

+ ///
+ ///

The number of bones to add.

+ ///

If this method succeeds, the return value is . If the method fails, the return value can be: E_OUTOFMEMORY.

+ /// + /// bb173934 + /// HRESULT ID3DX10SkinInfo::AddBones([In] unsigned int Count) + /// ID3DX10SkinInfo::AddBones + public void AddBones(int count) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, count,((void**)(*(void**)_nativePointer))[8]); + __result__.CheckError(); + } + } + + /// + ///

Remove a bone.

+ ///
+ ///

An index that specifies which bone to remove. Must be between 0 and the value returned by .

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG.

+ /// + /// bb173948 + /// HRESULT ID3DX10SkinInfo::RemoveBone([In] unsigned int Index) + /// ID3DX10SkinInfo::RemoveBone + public void RemoveBone(int index) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, index,((void**)(*(void**)_nativePointer))[9]); + __result__.CheckError(); + } + } + + /// + ///

Change which bones influence which vertices.

+ ///
+ ///

The new number of bones.

+ ///

A reference to an array of bone indices, which describe the remapping. For example, say SkinInfo contains some bones such that bone0 is mapped to v0, bone1 to v1, and bone2 to v2, and array with 2,1,0 is specified for pBoneRemap. This will cause bone0 to be mapped to v2, bone1 to v1, and bone2 to v0.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_OUTOFMEMORY or E_INVALIDARG.

+ /// + /// bb173946 + /// HRESULT ID3DX10SkinInfo::RemapBones([In] unsigned int NewBoneCount,[In, Buffer] unsigned int* pBoneRemap) + /// ID3DX10SkinInfo::RemapBones + public void RemapBones(int newBoneCount, int[] boneRemapRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* boneRemapRef_ = boneRemapRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, newBoneCount, boneRemapRef_,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Enable an existing bone to influence a group of vertices and define how much influence the bone has on each vertex.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

Number of vertices to add to the bone's influence.

+ ///

Pointer to an array of vertex indices. Each member of this array has a corresponding member in pWeights, such that pIndices[i] corresponds to pWeights[i]. The corresponding value in pWeights[i] determines how much influence BoneIndex will have on the vertex indexed by pIndices[i]. The size of the pIndices array must be equal to or greater than InfluenceCount.

+ ///

Pointer to an array of bone weights. Each member of this array has a corresponding member in pIndices, such that pWeights[i] corresponds to pIndices[i]. Each value in pWeights is between 0 and 1 and defines the amount of influence the bone has over each vertex. The size of pWeights must be equal to or greater than InfluenceCount.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG or E_OUTOFMEMORY.

+ /// + /// bb173933 + /// HRESULT ID3DX10SkinInfo::AddBoneInfluences([In] unsigned int BoneIndex,[In] unsigned int InfluenceCount,[In, Buffer] unsigned int* pIndices,[In, Buffer] float* pWeights) + /// ID3DX10SkinInfo::AddBoneInfluences + public void AddBoneInfluences(int boneIndex, int influenceCount, int[] indicesRef, float[] weightsRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* indicesRef_ = indicesRef) + fixed (void* weightsRef_ = weightsRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex, influenceCount, indicesRef_, weightsRef_,((void**)(*(void**)_nativePointer))[11]); + __result__.CheckError(); + } + } + + /// + ///

Clear a bone's list of vertices that it influences.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG.

+ /// + /// bb173936 + /// HRESULT ID3DX10SkinInfo::ClearBoneInfluences([In] unsigned int BoneIndex) + /// ID3DX10SkinInfo::ClearBoneInfluences + public void ClearBoneInfluences(int boneIndex) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex,((void**)(*(void**)_nativePointer))[12]); + __result__.CheckError(); + } + } + + /// + ///

Get the number of vertices that a given bone influences.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG.

+ /// + /// bb173941 + /// unsigned int ID3DX10SkinInfo::GetBoneInfluenceCount([In] unsigned int BoneIndex) + /// ID3DX10SkinInfo::GetBoneInfluenceCount + public int GetBoneInfluenceCount(int boneIndex) { + unsafe { + int __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex,((void**)(*(void**)_nativePointer))[13]); + return __result__; + } + } + + /// + ///

Get a list of vertices that a given bone influences and a list of the amount of influence that bone has on each vertex.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

An offset from the top of the bone's list of influenced vertices. This must be between 0 and the value returned by .

+ ///

The number of indices and weights to retrieve. Must be between 0 and the value returned by .

+ ///

A list of indices into the vertex buffer, each one representing a vertex influenced by the bone. These values correspond to the values in pDestWeights, such that pDestIndices[i] corresponds to pDestWeights[i].

+ ///

A list of the amount of influence the bone has on each vertex. These values correspond to the values in pDestIndices, such that pDestWeights[i] corresponds to pDestIndices[i].f

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG or E_OUTOFMEMORY.

+ /// + /// bb173942 + /// HRESULT ID3DX10SkinInfo::GetBoneInfluences([In] unsigned int BoneIndex,[In] unsigned int Offset,[In] unsigned int Count,[Out, Buffer] unsigned int* pDestIndices,[Out, Buffer] float* pDestWeights) + /// ID3DX10SkinInfo::GetBoneInfluences + internal void GetBoneInfluences(int boneIndex, int offset, int count, int[] destIndicesRef, float[] destWeightsRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* destIndicesRef_ = destIndicesRef) + fixed (void* destWeightsRef_ = destWeightsRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex, offset, count, destIndicesRef_, destWeightsRef_,((void**)(*(void**)_nativePointer))[14]); + __result__.CheckError(); + } + } + + /// + ///

Find the index that indicates where a given vertex is in a given bone's list of influenced vertices.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

The index of the vertex in the vertex buffer.

+ ///

The index of the vertex in the bone's list of influenced vertices.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG.

+ /// + /// bb173939 + /// HRESULT ID3DX10SkinInfo::FindBoneInfluenceIndex([In] unsigned int BoneIndex,[In] unsigned int VertexIndex,[In] unsigned int* pInfluenceIndex) + /// ID3DX10SkinInfo::FindBoneInfluenceIndex + public void FindBoneInfluenceIndex(int boneIndex, int vertexIndex, int influenceIndexRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex, vertexIndex, &influenceIndexRef,((void**)(*(void**)_nativePointer))[15]); + __result__.CheckError(); + } + } + + /// + ///

Set the amount of influence a given bone has over a given vertex.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

An index into the bone's list of vertices that it influences.

+ ///

The amount of influence, between 0 and 1, that the bone has over the vertex.

+ ///

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be E_INVALIDARG.

+ /// + /// bb173949 + /// HRESULT ID3DX10SkinInfo::SetBoneInfluence([In] unsigned int BoneIndex,[In] unsigned int InfluenceIndex,[In] float Weight) + /// ID3DX10SkinInfo::SetBoneInfluence + public void SetBoneInfluence(int boneIndex, int influenceIndex, float weight) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex, influenceIndex, weight,((void**)(*(void**)_nativePointer))[16]); + __result__.CheckError(); + } + } + + /// + ///

Get the amount of influence a given bone has over a given vertex.

+ ///
+ ///

An index that specifies an existing bone. Must be between 0 and the value returned by .

+ ///

An index into the bone's list of vertices that it influences.

+ ///

The amount of influence, between 0 and 1, that the bone has over the vertex.

+ ///

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be E_INVALIDARG.

+ /// + ///

Use to find out how many vertices the bone influences.

+ ///
+ /// + /// bb173940 + /// HRESULT ID3DX10SkinInfo::GetBoneInfluence([In] unsigned int BoneIndex,[In] unsigned int InfluenceIndex,[In] float* pWeight) + /// ID3DX10SkinInfo::GetBoneInfluence + public void GetBoneInfluence(int boneIndex, int influenceIndex, float weightRef) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, boneIndex, influenceIndex, &weightRef,((void**)(*(void**)_nativePointer))[17]); + __result__.CheckError(); + } + } + + /// + ///

Limit the number of bones that can influence a vertex and/or limit the amount of influence a bone can have on a vertex.

+ ///
+ ///

The maximum number of bones that can influence any given vertex. This value is ignored if it is greater than the value returned by .

+ ///

A flag describing how to scale the remaining weights on a given vertex after some have been chopped off by MinWeight. If D3DX10_SKININFO_NO_SCALING is specified, the weights will not be scaled at all. If D3DX10_SKININFO_SCALE_TO_1 is specified, the weights greater than MinWeight will be scaled up so that they add up to 1.0. If D3DX10_SKININFO_SCALE_TO_TOTAL is specified, the weights greater than MinWeight will be scaled up so that they add up to the original total.

+ ///

The minimum percentage of influence, or weight, that any bone can have on any vertex. This value must be between 0 and 1.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_OUTOFMEMORY or E_INVALIDARG.

+ /// + /// bb173937 + /// HRESULT ID3DX10SkinInfo::Compact([In] unsigned int MaxPerVertexInfluences,[In] unsigned int ScaleMode,[In] float MinWeight) + /// ID3DX10SkinInfo::Compact + public void Compact(int maxPerVertexInfluences, int scaleMode, float minWeight) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, maxPerVertexInfluences, scaleMode, minWeight,((void**)(*(void**)_nativePointer))[18]); + __result__.CheckError(); + } + } + + /// + ///

Do software skinning on an array of vertices.

+ ///
+ ///

A 0-based index into pSrcVertices.

+ ///

Number of vertices to transform.

+ ///

Pointer to an array of vertices to transform.

+ ///

The size, in bytes, of a vertex in pSrcVertices.

+ ///

Pointer to an array of vertices, which will be filled with the transformed vertices.

+ ///

The size, in bytes, of a vertex in pDestVertices.

+ ///

An array of matrices that will be used to transform the points mapped to each bone, such that the vertices mapped to bone[i] will be transformed by pBoneMatrices[i]. This array will be used to transform the matrices only if the IsNormal value in pChannelDescs is set to , otherwise pInverseTransposeBoneMatrices will be used.

+ ///

If this value is null, it will be set equal to pBoneMatrices. This array of matrices will be used to transform the vertices only if the IsNormal value in pChannelDescs is set to TRUE, otherwise pBoneMatrices will be used.

+ ///

Pointer to a structure, which determines the member of the vertex decl the software skinning will be done on.

+ ///

The number of structures in pChannelDescs.

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be: E_INVALIDARG.

+ /// + ///

Here is an example of how to use software skinning:

 //vertex definition	
+                /// struct MyVertex	
+                /// {  Position;  Weight;  TexCoord;	
+                /// }; //create vertex data	
+                /// const UINT numVertices = 16;	
+                /// MyVertex vertices[numVertices] = {...};	
+                /// MyVertex destVertices[numVertices]; //create bone matrices	
+                ///  boneMatrices[2];	
+                /// D3DXMatrixIdentity(&boneMatrices[0]);	
+                /// D3DXMatrixRotationX(&boneMatrices[1], 3.14159f / 180.0f); //create bone indices and weights	
+                /// UINT boneIndices[numVertices] = {...};	
+                /// float boneWeights[2][numVertices] = {...}; //create skin info, populate it with bones and vertices, and then map them to each other	
+                ///  *pSkinInfo = null;	
+                /// (&pSkinInfo);	
+                /// pSkinInfo->AddBones(2);	
+                /// pSkinInfo->AddVertices(numVertices);	
+                /// pSkinInfo->AddBoneInfluences(0, numVertices, boneIndices, boneWeights[0]);	
+                /// pSkinInfo->AddBoneInfluences(1, numVertices, boneIndices, boneWeights[1]); //create channel desc	
+                ///  channelDesc;	
+                /// channelDesc.SrcOffset = 0;	
+                /// channelDesc.DestOffset = 0;	
+                /// channelDesc.IsNormal = ; //do the skinning	
+                /// pSkinInfo->DoSoftwareSkinning(0, numVertices, vertices, sizeof(MyVertex),  destVertices, sizeof(MyVertex),  boneMatrices, null,  &channelDesc, 1);	
+                /// 
+ ///
+ /// + /// bb173938 + /// HRESULT ID3DX10SkinInfo::DoSoftwareSkinning([In] unsigned int StartVertex,[In] unsigned int VertexCount,[In] void* pSrcVertices,[In] unsigned int SrcStride,[In] void* pDestVertices,[In] unsigned int DestStride,[In] D3DXMATRIX* pBoneMatrices,[In, Optional] D3DXMATRIX* pInverseTransposeBoneMatrices,[In] D3DX10_SKINNING_CHANNEL* pChannelDescs,[In] unsigned int NumChannels) + /// ID3DX10SkinInfo::DoSoftwareSkinning + public void DoSoftwareSkinning(int startVertex, int vertexCount, System.IntPtr srcVerticesRef, int srcStride, System.IntPtr destVerticesRef, int destStride, ref SharpDX.Mathematics.Interop.RawMatrix boneMatricesRef, SharpDX.Mathematics.Interop.RawMatrix? inverseTransposeBoneMatricesRef, SharpDX.Direct3D10.SkinningChannel channelDescsRef, int numChannels) { + unsafe { + SharpDX.Mathematics.Interop.RawMatrix inverseTransposeBoneMatricesRef_; + if (inverseTransposeBoneMatricesRef.HasValue) + inverseTransposeBoneMatricesRef_ = inverseTransposeBoneMatricesRef.Value; + SharpDX.Result __result__; + fixed (void* boneMatricesRef_ = &boneMatricesRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, startVertex, vertexCount, (void*)srcVerticesRef, srcStride, (void*)destVerticesRef, destStride, boneMatricesRef_, (inverseTransposeBoneMatricesRef.HasValue)?&inverseTransposeBoneMatricesRef_:(void*)IntPtr.Zero, &channelDescsRef, numChannels,((void**)(*(void**)_nativePointer))[19]); + __result__.CheckError(); + } + } + } + /// + ///

The interface provides a set of methods that simplify the process of drawing sprites using Microsoft Direct3D. This interface can operate on a set of many sprites.

+ ///
+ /// + ///

The interface is obtained by calling the function.

+ ///
+ /// + /// bb205601 + /// ID3DX10Sprite + /// ID3DX10Sprite + [Guid("ba0b762d-8d28-43ec-b9dc-2f84443b0614")] + public partial class Sprite : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Sprite(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Sprite(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Sprite(nativePointer); + } + + + /// + ///

Get or sets the view transform that applies to all sprites.

+ ///
+ /// + /// bb205609 + /// GetViewTransform / SetViewTransform + /// GetViewTransform + /// HRESULT ID3DX10Sprite::GetViewTransform([Out] D3DXMATRIX* pViewTransform) + public SharpDX.Mathematics.Interop.RawMatrix ViewTransform { + get { SharpDX.Mathematics.Interop.RawMatrix __output__; GetViewTransform(out __output__); return __output__; } + set { SetViewTransform(ref value); } + } + + /// + ///

Get or sets the sprite projection matrix that is applied to all sprites.

+ ///
+ /// + /// bb205608 + /// GetProjectionTransform / SetProjectionTransform + /// GetProjectionTransform + /// HRESULT ID3DX10Sprite::GetProjectionTransform([Out] D3DXMATRIX* pProjectionTransform) + public SharpDX.Mathematics.Interop.RawMatrix ProjectionTransform { + get { SharpDX.Mathematics.Interop.RawMatrix __output__; GetProjectionTransform(out __output__); return __output__; } + set { SetProjectionTransform(ref value); } + } + + /// + ///

Retrieve the device associated with the sprite object.

+ ///
+ /// + ///

Calling this method will increase the internal reference count on the interface.

+ ///
+ /// + /// bb205607 + /// GetDevice + /// GetDevice + /// HRESULT ID3DX10Sprite::GetDevice([Out] ID3D10Device** ppDevice) + public SharpDX.Direct3D10.Device Device { + get { SharpDX.Direct3D10.Device __output__; GetDevice(out __output__); return __output__; } + } + + /// + ///

Prepare a device for drawing sprites.

+ ///
+ ///

Flags that control how the sprites will be drawn. See .

+ ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.

+ /// + ///

Every call to Begin must be matched with a call to .

+ ///
+ /// + /// bb205602 + /// HRESULT ID3DX10Sprite::Begin([In] D3DX10_SPRITE_FLAG flags) + /// ID3DX10Sprite::Begin + public void Begin(SharpDX.Direct3D10.SpriteFlags flags) { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, unchecked((int)flags),((void**)(*(void**)_nativePointer))[3]); + __result__.CheckError(); + } + } + + /// + ///

Add an array of sprites to the batch of sprites to be rendered. This must be called in between calls to and , and must be called before End to send all of the batched sprites to the device for rendering. This draw method is most useful when drawing a small number of sprites that you want buffered into a large batch, such as fonts.

+ ///
+ /// No documentation. + /// No documentation. + ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + /// bb205603 + /// HRESULT ID3DX10Sprite::DrawSpritesBuffered([In, Buffer] D3DX10_SPRITE* pSprites,[In] unsigned int cSprites) + /// ID3DX10Sprite::DrawSpritesBuffered + internal void DrawSpritesBuffered(SharpDX.Direct3D10.SpriteInstance[] spritesRef, int cSprites) { + unsafe { + SharpDX.Result __result__; + fixed (void* spritesRef_ = spritesRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, spritesRef_, cSprites,((void**)(*(void**)_nativePointer))[4]); + __result__.CheckError(); + } + } + + /// + ///

Force all batched sprites to be submitted to the device. Device states remain as they were after the last call to . The list of batched sprites is then cleared.

+ ///
+ ///

If the method succeeds, the return value is . If the method fails, the following value will be returned: D3DERR_INVALIDCALL.

+ /// + /// bb205606 + /// HRESULT ID3DX10Sprite::Flush() + /// ID3DX10Sprite::Flush + public void Flush() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[5]); + __result__.CheckError(); + } + } + + /// + ///

Draw an array of sprites. This will immediately send the sprites to the device for rendering, which is different from which only adds an array of sprites to a batch of sprites to be rendered when is called. This draw method is most useful when drawing a large number of sprites that have already been sorted on the CPU (or do not need to be sorted), such as in a particle system. This must be called in between calls to and .

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + ///

If the method succeeds, the return value is . If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

+ /// + /// bb205604 + /// HRESULT ID3DX10Sprite::DrawSpritesImmediate([In, Buffer] D3DX10_SPRITE* pSprites,[In] unsigned int cSprites,[In] unsigned int cbSprite,[In] unsigned int flags) + /// ID3DX10Sprite::DrawSpritesImmediate + internal void DrawSpritesImmediate(SharpDX.Direct3D10.SpriteInstance[] spritesRef, int cSprites, int cbSprite, int flags) { + unsafe { + SharpDX.Result __result__; + fixed (void* spritesRef_ = spritesRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, spritesRef_, cSprites, cbSprite, flags,((void**)(*(void**)_nativePointer))[6]); + __result__.CheckError(); + } + } + + /// + ///

Call this after . If was specified when was called, this API will restore the device state to how it was before was called.

+ ///
+ ///

If the method succeeds, the return value is . If the method fails, the following value will be returned: D3DERR_INVALIDCALL.

+ /// + /// bb205605 + /// HRESULT ID3DX10Sprite::End() + /// ID3DX10Sprite::End + public void End() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[7]); + __result__.CheckError(); + } + } + + /// + ///

Get the view transform that applies to all sprites.

+ ///
+ ///

Pointer to a D3DX10MATRIX that will be set to the transform of the sprite from the original world space.

+ ///

If the method succeeds, the return value is . If the method fails, the following value will be returned: D3DERR_INVALIDCALL.

+ /// + /// bb205609 + /// HRESULT ID3DX10Sprite::GetViewTransform([Out] D3DXMATRIX* pViewTransform) + /// ID3DX10Sprite::GetViewTransform + internal void GetViewTransform(out SharpDX.Mathematics.Interop.RawMatrix viewTransformRef) { + unsafe { + viewTransformRef = new SharpDX.Mathematics.Interop.RawMatrix(); + SharpDX.Result __result__; + fixed (void* viewTransformRef_ = &viewTransformRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, viewTransformRef_,((void**)(*(void**)_nativePointer))[8]); + __result__.CheckError(); + } + } + + /// + ///

Set the view transform that applies to all sprites.

+ ///
+ ///

Pointer to a that contains a transform of the sprite from the original world space. Use this transform to scale, rotate, or transform the sprite.

+ ///

If the method succeeds, the return value is . If the method fails, the following value will be returned: D3DERR_INVALIDCALL.

+ /// + /// bb205611 + /// HRESULT ID3DX10Sprite::SetViewTransform([In] D3DXMATRIX* pViewTransform) + /// ID3DX10Sprite::SetViewTransform + internal void SetViewTransform(ref SharpDX.Mathematics.Interop.RawMatrix viewTransformRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* viewTransformRef_ = &viewTransformRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, viewTransformRef_,((void**)(*(void**)_nativePointer))[9]); + __result__.CheckError(); + } + } + + /// + ///

Get the sprite projection matrix that is applied to all sprites.

+ ///
+ ///

Pointer to a D3DX10MATRIX that will be set to the sprite's projection matrix.

+ ///

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

+ /// + /// bb205608 + /// HRESULT ID3DX10Sprite::GetProjectionTransform([Out] D3DXMATRIX* pProjectionTransform) + /// ID3DX10Sprite::GetProjectionTransform + internal void GetProjectionTransform(out SharpDX.Mathematics.Interop.RawMatrix projectionTransformRef) { + unsafe { + projectionTransformRef = new SharpDX.Mathematics.Interop.RawMatrix(); + SharpDX.Result __result__; + fixed (void* projectionTransformRef_ = &projectionTransformRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, projectionTransformRef_,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Set the projection matrix for all sprites.

+ ///
+ ///

The projection matrix to be used on all sprites.

+ ///

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

+ /// + /// bb205610 + /// HRESULT ID3DX10Sprite::SetProjectionTransform([In] D3DXMATRIX* pProjectionTransform) + /// ID3DX10Sprite::SetProjectionTransform + internal void SetProjectionTransform(ref SharpDX.Mathematics.Interop.RawMatrix projectionTransformRef) { + unsafe { + SharpDX.Result __result__; + fixed (void* projectionTransformRef_ = &projectionTransformRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, projectionTransformRef_,((void**)(*(void**)_nativePointer))[11]); + __result__.CheckError(); + } + } + + /// + ///

Retrieve the device associated with the sprite object.

+ ///
+ ///

Address of a reference to an interface, representing the Direct3D device object associated with the sprite object.

+ ///

If the method succeeds, the return value is . If the method fails, the following value will be returned: D3DERR_INVALIDCALL.

+ /// + ///

Calling this method will increase the internal reference count on the interface.

+ ///
+ /// + /// bb205607 + /// HRESULT ID3DX10Sprite::GetDevice([Out] ID3D10Device** ppDevice) + /// ID3DX10Sprite::GetDevice + internal void GetDevice(out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &deviceOut_,((void**)(*(void**)_nativePointer))[12]); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + } + /// + ///

A state-block interface encapsulates render states.

+ ///
+ /// + ///

To create a state-block interface, call .

This interface can be used to save and restore pipeline state. It can also be used to capture the current state.

+ ///
+ /// + /// bb173856 + /// ID3D10StateBlock + /// ID3D10StateBlock + [Guid("0803425a-57f5-4dd6-9465-a87570834a08")] + public partial class StateBlock : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public StateBlock(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.StateBlock(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.StateBlock(nativePointer); + } + + + /// + ///

Get the device.

+ ///
+ /// + /// bb173859 + /// GetDevice + /// GetDevice + /// HRESULT ID3D10StateBlock::GetDevice([Out] ID3D10Device** ppDevice) + public SharpDX.Direct3D10.Device Device { + get { SharpDX.Direct3D10.Device __output__; GetDevice(out __output__); return __output__; } + } + + /// + ///

Capture the current value of states that are included in a stateblock.

+ ///
+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Capture captures current values for states within an existing state block. It does not capture the entire state of the device. Creating an empty stateblock and calling Capture does nothing if no states have been set.

+ ///
+ /// + /// bb173858 + /// HRESULT ID3D10StateBlock::Capture() + /// ID3D10StateBlock::Capture + public void Capture() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[3]); + __result__.CheckError(); + } + } + + /// + ///

Apply the state block to the current device state.

+ ///
+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173857 + /// HRESULT ID3D10StateBlock::Apply() + /// ID3D10StateBlock::Apply + public void Apply() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + __result__.CheckError(); + } + } + + /// + ///

Release all references to device objects.

+ ///
+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + ///

Each time you return a reference to an interface (by calling ), the internal reference count is incremented; when you are finished using a stateblock, call this method to release all references and avoid a memory leak.

+ ///
+ /// + /// cc627127 + /// HRESULT ID3D10StateBlock::ReleaseAllDeviceObjects() + /// ID3D10StateBlock::ReleaseAllDeviceObjects + public void ReleaseAllDeviceObjects() { + unsafe { + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer,((void**)(*(void**)_nativePointer))[5]); + __result__.CheckError(); + } + } + + /// + ///

Get the device.

+ ///
+ ///

Pointer to the interface that is returned.

+ ///

Returns one of the following Direct3D 10 Return Codes.

+ /// + /// bb173859 + /// HRESULT ID3D10StateBlock::GetDevice([Out] ID3D10Device** ppDevice) + /// ID3D10StateBlock::GetDevice + internal void GetDevice(out SharpDX.Direct3D10.Device deviceOut) { + unsafe { + IntPtr deviceOut_ = IntPtr.Zero; + SharpDX.Result __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, &deviceOut_,((void**)(*(void**)_nativePointer))[6]); + deviceOut= (deviceOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Device(deviceOut_); + __result__.CheckError(); + } + } + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class StreamOutputStage : SharpDX.CppObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public StreamOutputStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.StreamOutputStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.StreamOutputStage(nativePointer); + } + + + /// + ///

Set the target output buffers for the StreamOutput stage, which enables/disables the pipeline to stream-out data.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Call (before any draw calls) to stream data out; call SOSetTargets with null to stop streaming data out. For an example, see Exercise 01 from the GDC 2007 workshop, which sets the stream output rendertargets before calling draw methods in the RenderInstanceToStream function.

An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.

Calling this method using a buffer that is currently bound for writing will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173620 + /// void ID3D10Device::SOSetTargets([In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppSOTargets,[In, Buffer, Optional] const unsigned int* pOffsets) + /// ID3D10Device::SOSetTargets + internal void SetTargets(int numBuffers, SharpDX.Direct3D10.Buffer[] sOTargetsOut, int[] offsetsRef) { + unsafe { + IntPtr* sOTargetsOut_ = (IntPtr*)0; + if ( sOTargetsOut != null ) { + IntPtr* sOTargetsOut__ = stackalloc IntPtr[sOTargetsOut.Length]; + sOTargetsOut_ = sOTargetsOut__; + for (int i = 0; i < sOTargetsOut.Length; i++) + sOTargetsOut_[i] = (sOTargetsOut[i] == null)? IntPtr.Zero : sOTargetsOut[i].NativePointer; + } + int[] offsetsRef__ = offsetsRef; + fixed (void* offsetsRef_ = offsetsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numBuffers, sOTargetsOut_, offsetsRef_,((void**)(*(void**)_nativePointer))[27]); + } + } + + /// + ///

Set the target output buffers for the StreamOutput stage, which enables/disables the pipeline to stream-out data.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Call (before any draw calls) to stream data out; call SOSetTargets with null to stop streaming data out. For an example, see Exercise 01 from the GDC 2007 workshop, which sets the stream output rendertargets before calling draw methods in the RenderInstanceToStream function.

An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.

Calling this method using a buffer that is currently bound for writing will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173620 + /// void ID3D10Device::SOSetTargets([In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppSOTargets,[In, Buffer, Optional] const unsigned int* pOffsets) + /// ID3D10Device::SOSetTargets + internal void SetTargets(int numBuffers, SharpDX.ComArray sOTargetsOut, int[] offsetsRef) { + unsafe { + int[] offsetsRef__ = offsetsRef; + fixed (void* offsetsRef_ = offsetsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numBuffers, (void*)((sOTargetsOut == null)?IntPtr.Zero:sOTargetsOut.NativePointer), offsetsRef_,((void**)(*(void**)_nativePointer))[27]); + } + } + + /// + ///

Set the target output buffers for the StreamOutput stage, which enables/disables the pipeline to stream-out data.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Call (before any draw calls) to stream data out; call SOSetTargets with null to stop streaming data out. For an example, see Exercise 01 from the GDC 2007 workshop, which sets the stream output rendertargets before calling draw methods in the RenderInstanceToStream function.

An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.

Calling this method using a buffer that is currently bound for writing will effectively bind null instead because a buffer cannot be bound as both an input and an output at the same time.

The Debug Layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173620 + /// void ID3D10Device::SOSetTargets([In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppSOTargets,[In, Buffer, Optional] const unsigned int* pOffsets) + /// ID3D10Device::SOSetTargets + private void SetTargets(int numBuffers, System.IntPtr sOTargetsOut, System.IntPtr offsetsRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numBuffers, (void*)sOTargetsOut, (void*)offsetsRef,((void**)(*(void**)_nativePointer))[27]); + } + } + + /// + ///

Get the target output buffers for the StreamOutput stage of the pipeline.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173619 + /// void ID3D10Device::SOGetTargets([In] unsigned int NumBuffers,[Out, Buffer, Optional] ID3D10Buffer** ppSOTargets,[Out, Buffer, Optional] unsigned int* pOffsets) + /// ID3D10Device::SOGetTargets + internal void GetTargets(int numBuffers, SharpDX.Direct3D10.Buffer[] sOTargetsOut, int[] offsetsRef) { + unsafe { + IntPtr* sOTargetsOut_ = stackalloc IntPtr[sOTargetsOut == null ? 0 : sOTargetsOut.Length]; + int[] offsetsRef__ = offsetsRef; + fixed (void* offsetsRef_ = offsetsRef__) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, numBuffers, sOTargetsOut==null?(void*)0:sOTargetsOut_, offsetsRef_,((void**)(*(void**)_nativePointer))[59]); + if (sOTargetsOut != null) + for (int i = 0; i < sOTargetsOut.Length; i++) + sOTargetsOut[i] = (sOTargetsOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(sOTargetsOut_[i]); + } + } + } + /// + ///

A switch-to-reference interface (see the switch-to-reference layer) enables an application to switch between a hardware and software device.

+ ///
+ /// + ///

This interface is obtained by calling QueryInterface on a Interface created with the flag.

+ ///
+ /// + /// bb173860 + /// ID3D10SwitchToRef + /// ID3D10SwitchToRef + [Guid("9B7E4E02-342C-4106-A19F-4F2704F689F0")] + public partial class SwitchToRef : SharpDX.ComObject { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public SwitchToRef(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.SwitchToRef(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.SwitchToRef(nativePointer); + } + + + /// + ///

Get a boolean value that indicates the type of device being used.

+ ///
+ /// + ///

A hardware device is commonly referred to as a HAL device, which stands for a hardware accelerated device. This means that the pipeline is rendering all of the pipeline commands in hardware, using the GPU. Operating the pipeline with a HAL device gives the best performance generally, but it can be more difficult to debug since resources exist on the GPU instead of the CPU.

A software device implements rendering in software using the CPU with no hardware acceleration. A software device is commonly referred to as a reference device or REF device. Because a REF device implements rendering on the CPU, it is generally slower, but is easier to debug since it allows access to resources.

+ ///
+ /// + /// bb173861 + /// GetUseRef + /// GetUseRef + /// BOOL ID3D10SwitchToRef::GetUseRef() + public SharpDX.Mathematics.Interop.RawBool UseRef { + get { return GetUseRef(); } + } + + /// + ///

Switch between a hardware and a software device.

+ ///
+ ///

A boolean value. Set this to TRUE to change to a software device, set this to to change to a hardware device.

+ ///

The previous value of UseRef.

+ /// + ///

This API will fail if the device is not switchable; you must have created a device that is switchable by specifying the flag during device creation (when calling ).

Switching from a software device to a hardware device clears all cached objects from system memory. Switching from a hardware device to a software device causes resources to be downloaded to system memory.

+ ///
+ /// + /// bb173862 + /// BOOL ID3D10SwitchToRef::SetUseRef([In] BOOL UseRef) + /// ID3D10SwitchToRef::SetUseRef + public SharpDX.Mathematics.Interop.RawBool SetUseRef(SharpDX.Mathematics.Interop.RawBool useRef) { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool36(_nativePointer, useRef,((void**)(*(void**)_nativePointer))[3]); + return __result__; + } + } + + /// + ///

Get a boolean value that indicates the type of device being used.

+ ///
+ ///

TRUE if the device is a software device, if the device is a hardware device. See remarks.

+ /// + ///

A hardware device is commonly referred to as a HAL device, which stands for a hardware accelerated device. This means that the pipeline is rendering all of the pipeline commands in hardware, using the GPU. Operating the pipeline with a HAL device gives the best performance generally, but it can be more difficult to debug since resources exist on the GPU instead of the CPU.

A software device implements rendering in software using the CPU with no hardware acceleration. A software device is commonly referred to as a reference device or REF device. Because a REF device implements rendering on the CPU, it is generally slower, but is easier to debug since it allows access to resources.

+ ///
+ /// + /// bb173861 + /// BOOL ID3D10SwitchToRef::GetUseRef() + /// ID3D10SwitchToRef::GetUseRef + internal SharpDX.Mathematics.Interop.RawBool GetUseRef() { + unsafe { + SharpDX.Mathematics.Interop.RawBool __result__; + __result__= + SharpDX.Direct3D10.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer,((void**)(*(void**)_nativePointer))[4]); + return __result__; + } + } + } + /// + ///

A 1D texture interface accesses texel data, which is structured memory.

+ ///
+ /// + ///

To create an empty 1D texture, call . For more details on creating and loading textures, see Creating Texture Resources.

Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call , and , respectively. To use the texture as an input to a shader, create a by calling .

+ ///
+ /// + /// bb173863 + /// ID3D10Texture1D + /// ID3D10Texture1D + [Guid("9B7E4C03-342C-4106-A19F-4F2704F689F0")] + public partial class Texture1D : SharpDX.Direct3D10.Resource { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Texture1D(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Texture1D(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Texture1D(nativePointer); + } + + + /// + ///

Get the properties of the texture resource.

+ ///
+ /// + /// bb173864 + /// GetDesc + /// GetDesc + /// void ID3D10Texture1D::GetDesc([Out] D3D10_TEXTURE1D_DESC* pDesc) + public SharpDX.Direct3D10.Texture1DDescription Description { + get { SharpDX.Direct3D10.Texture1DDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a reference to the data contained in a subresource, and deny the GPU access to that subresource.

+ ///
+ ///

Index number of the subresource. See D3D10CalcSubresource for more details.

+ ///

Specifies the CPU's read and write permissions for a resource. For possible values, see .

+ ///

Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.

+ ///

Pointer to the texture resource data.

+ ///

If this function succeeds, it returns . For other restrictions, and a listing of error values that can be returned by any of the Map methods, see Remarks.

+ /// + /// bb173865 + /// HRESULT ID3D10Texture1D::Map([In] unsigned int Subresource,[In] D3D10_MAP MapType,[In] D3D10_MAP_FLAG MapFlags,[Out] void** ppData) + /// ID3D10Texture1D::Map + internal void Map(int subresource, SharpDX.Direct3D10.MapMode mapType, SharpDX.Direct3D10.MapFlags mapFlags, out System.IntPtr dataOut) { + unsafe { + SharpDX.Result __result__; + fixed (void* dataOut_ = &dataOut) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, subresource, unchecked((int)mapType), unchecked((int)mapFlags), dataOut_,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Invalidate the reference to a resource that was retrieved by , and re-enable the GPU's access to that resource.

+ ///
+ /// No documentation. + /// + ///

A subresource must be mapped before Unmap is called.

Differences between Direct3D 9 and Direct3D 10:

Unmap in Direct3D 10 is analogous to resource Unlock in Direct3D 9.

?

+ ///
+ /// + /// bb173866 + /// void ID3D10Texture1D::Unmap([In] unsigned int Subresource) + /// ID3D10Texture1D::Unmap + public void Unmap(int subresource) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, subresource,((void**)(*(void**)_nativePointer))[11]); + } + } + + /// + ///

Get the properties of the texture resource.

+ ///
+ ///

Pointer to a resource description (see ).

+ /// + /// bb173864 + /// void ID3D10Texture1D::GetDesc([Out] D3D10_TEXTURE1D_DESC* pDesc) + /// ID3D10Texture1D::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.Texture1DDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.Texture1DDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[12]); + } + } + } + /// + ///

A 2D texture interface manages texel data, which is structured memory.

+ ///
+ /// + ///

To create an empty Texture2D resource, call . For more details on creating and loading textures, see Creating Texture Resources.

Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call , and , respectively. To use the texture as an input to a shader, create a by calling .

+ ///
+ /// + /// bb173867 + /// ID3D10Texture2D + /// ID3D10Texture2D + [Guid("9B7E4C04-342C-4106-A19F-4F2704F689F0")] + public partial class Texture2D : SharpDX.Direct3D10.Resource { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Texture2D(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Texture2D(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Texture2D(nativePointer); + } + + + /// + ///

Get the properties of the texture resource.

+ ///
+ /// + /// bb173868 + /// GetDesc + /// GetDesc + /// void ID3D10Texture2D::GetDesc([Out] D3D10_TEXTURE2D_DESC* pDesc) + public SharpDX.Direct3D10.Texture2DDescription Description { + get { SharpDX.Direct3D10.Texture2DDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a reference to the data contained in a subresource, and deny GPU access to that subresource.

+ ///
+ ///

Index number of the subresource. See D3D10CalcSubresource for more details.

+ ///

Integer that specifies the CPU's read and write permissions for a resource. For possible values, see .

+ ///

Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.

+ ///

Pointer to a structure () that is filled in by the function and contains a reference to the resource data.

+ ///

If this function succeeds, it returns .

All of the Map methods have identical return values and operating restrictions. These are listed in the remarks section of .

+ /// + /// bb173869 + /// HRESULT ID3D10Texture2D::Map([In] unsigned int Subresource,[In] D3D10_MAP MapType,[In] D3D10_MAP_FLAG MapFlags,[Out] D3D10_MAPPED_TEXTURE2D* pMappedTex2D) + /// ID3D10Texture2D::Map + internal void Map(int subresource, SharpDX.Direct3D10.MapMode mapType, SharpDX.Direct3D10.MapFlags mapFlags, out SharpDX.DataRectangle mappedTex2DRef) { + unsafe { + mappedTex2DRef = new SharpDX.DataRectangle(); + SharpDX.Result __result__; + fixed (void* mappedTex2DRef_ = &mappedTex2DRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, subresource, unchecked((int)mapType), unchecked((int)mapFlags), mappedTex2DRef_,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Invalidate the reference to the resource that was retrieved by , and re-enable GPU access to the resource.

+ ///
+ /// No documentation. + /// + ///

A subresource must be mapped before Unmap is called.

Differences between Direct3D 9 and Direct3D 10:

Unmap in Direct3D 10 is analogous to resource Unlock in Direct3D 9.

?

+ ///
+ /// + /// bb173870 + /// void ID3D10Texture2D::Unmap([In] unsigned int Subresource) + /// ID3D10Texture2D::Unmap + public void Unmap(int subresource) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, subresource,((void**)(*(void**)_nativePointer))[11]); + } + } + + /// + ///

Get the properties of the texture resource.

+ ///
+ ///

Pointer to a resource description (see ).

+ /// + /// bb173868 + /// void ID3D10Texture2D::GetDesc([Out] D3D10_TEXTURE2D_DESC* pDesc) + /// ID3D10Texture2D::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.Texture2DDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.Texture2DDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[12]); + } + } + } + /// + ///

A 3D texture interface accesses texel data, which is structured memory.

+ ///
+ /// + ///

To create an empty Texture3D resource, call . For more details on creating and loading textures, see Creating Texture Resources.

Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call , and , respectively. To use the texture as an input to a shader, create a by calling .

+ ///
+ /// + /// bb173871 + /// ID3D10Texture3D + /// ID3D10Texture3D + [Guid("9B7E4C05-342C-4106-A19F-4F2704F689F0")] + public partial class Texture3D : SharpDX.Direct3D10.Resource { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public Texture3D(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.Texture3D(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.Texture3D(nativePointer); + } + + + /// + ///

Get the properties of the texture resource.

+ ///
+ /// + /// bb173872 + /// GetDesc + /// GetDesc + /// void ID3D10Texture3D::GetDesc([Out] D3D10_TEXTURE3D_DESC* pDesc) + public SharpDX.Direct3D10.Texture3DDescription Description { + get { SharpDX.Direct3D10.Texture3DDescription __output__; GetDescription(out __output__); return __output__; } + } + + /// + ///

Get a reference to the data contained in a subresource, and deny GPU access to that subresource.

+ ///
+ ///

Index number of the subresource. See D3D10CalcSubresourcefor more details.

+ ///

Specifies the CPU's read and write permissions for a resource. For possible values, see .

+ ///

Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.

+ ///

Pointer to a structure () that is filled in by the function and contains a reference to the resource data.

+ ///

If this function succeeds, it returns . All of the Map methods have identical return values and operating restrictions. These are listed in the remarks section of .

+ /// + /// bb173873 + /// HRESULT ID3D10Texture3D::Map([In] unsigned int Subresource,[In] D3D10_MAP MapType,[In] D3D10_MAP_FLAG MapFlags,[Out] D3D10_MAPPED_TEXTURE3D* pMappedTex3D) + /// ID3D10Texture3D::Map + internal void Map(int subresource, SharpDX.Direct3D10.MapMode mapType, SharpDX.Direct3D10.MapFlags mapFlags, out SharpDX.DataBox mappedTex3DRef) { + unsafe { + mappedTex3DRef = new SharpDX.DataBox(); + SharpDX.Result __result__; + fixed (void* mappedTex3DRef_ = &mappedTex3DRef) + __result__= + SharpDX.Direct3D10.LocalInterop.Calliint(_nativePointer, subresource, unchecked((int)mapType), unchecked((int)mapFlags), mappedTex3DRef_,((void**)(*(void**)_nativePointer))[10]); + __result__.CheckError(); + } + } + + /// + ///

Invalidate the reference to the resource retrieved by , and re-enable the GPU's access to the resource.

+ ///
+ /// No documentation. + /// + ///

A subresource must be mapped before Unmap is called.

Differences between Direct3D 9 and Direct3D 10:

Unmap() in Direct3D 10 is analogous to resource Unlock() in Direct3D 9.

?

+ ///
+ /// + /// bb173874 + /// void ID3D10Texture3D::Unmap([In] unsigned int Subresource) + /// ID3D10Texture3D::Unmap + public void Unmap(int subresource) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, subresource,((void**)(*(void**)_nativePointer))[11]); + } + } + + /// + ///

Get the properties of the texture resource.

+ ///
+ ///

Pointer to a resource description (see ).

+ /// + /// bb173872 + /// void ID3D10Texture3D::GetDesc([Out] D3D10_TEXTURE3D_DESC* pDesc) + /// ID3D10Texture3D::GetDesc + internal void GetDescription(out SharpDX.Direct3D10.Texture3DDescription descRef) { + unsafe { + descRef = new SharpDX.Direct3D10.Texture3DDescription(); + fixed (void* descRef_ = &descRef) + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, descRef_,((void**)(*(void**)_nativePointer))[12]); + } + } + } + /// + ///

A vertex-shader interface manages an executable program (a vertex shader) that controls the vertex-shader stage.

+ ///
+ /// + ///

The vertex-shader interface has no methods; use HLSL to implement your shader functionality. All shaders in Direct3D 10 are implemented from a common set of features referred to as the common shader core.

To create a vertex shader interface, call . Before using a vertex shader you must bind it to the device by calling .

This interface is defined in D3D10.h.

+ ///
+ /// + /// bb173875 + /// ID3D10VertexShader + /// ID3D10VertexShader + [Guid("9B7E4C0A-342C-4106-A19F-4F2704F689F0")] + public partial class VertexShader : SharpDX.Direct3D10.DeviceChild { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public VertexShader(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.VertexShader(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.VertexShader(nativePointer); + } + + } + /// + ///

The device interface represents a virtual adapter for Direct3D 10.0; it is used to perform rendering and create Direct3D resources.

+ ///
+ /// + ///

A device is created using .

+ ///
+ /// + /// bb173528 + /// ID3D10Device + /// ID3D10Device + [Guid("9B7E4C0F-342C-4106-A19F-4F2704F689F0")] + public partial class VertexShaderStage : CommonShaderStage { + /// + /// Initializes a new instance of the class. + /// + /// The native pointer. + public VertexShaderStage(IntPtr nativePtr) : base(nativePtr) { + } + + /// + /// Performs an explicit conversion from to . (This method is a shortcut to ) + /// + /// The native pointer. + /// + /// The result of the conversion. + /// + public static explicit operator SharpDX.Direct3D10.VertexShaderStage(IntPtr nativePointer) + { + return nativePointer == IntPtr.Zero ? null : new SharpDX.Direct3D10.VertexShaderStage(nativePointer); + } + + + /// + ///

Set the constant buffers used by the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173626 + /// void ID3D10Device::VSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::VSSetConstantBuffers + public override void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] constantBuffersOut) { + unsafe { + IntPtr* constantBuffersOut_ = (IntPtr*)0; + if ( constantBuffersOut != null ) { + IntPtr* constantBuffersOut__ = stackalloc IntPtr[constantBuffersOut.Length]; + constantBuffersOut_ = constantBuffersOut__; + for (int i = 0; i < constantBuffersOut.Length; i++) + constantBuffersOut_[i] = (constantBuffersOut[i] == null)? IntPtr.Zero : constantBuffersOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, constantBuffersOut_,((void**)(*(void**)_nativePointer))[3]); + } + } + + /// + ///

Set the constant buffers used by the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173626 + /// void ID3D10Device::VSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::VSSetConstantBuffers + public override void SetConstantBuffers(int startSlot, int numBuffers, SharpDX.ComArray constantBuffersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)((constantBuffersOut == null)?IntPtr.Zero:constantBuffersOut.NativePointer),((void**)(*(void**)_nativePointer))[3]); + } + } + + /// + ///

Set the constant buffers used by the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173626 + /// void ID3D10Device::VSSetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[In, Buffer, Optional] const ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::VSSetConstantBuffers + private void SetConstantBuffers(int startSlot, int numBuffers, System.IntPtr constantBuffersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, (void*)constantBuffersOut,((void**)(*(void**)_nativePointer))[3]); + } + } + + /// + ///

Set a vertex shader to the device.

+ ///
+ ///

Pointer to a vertex shader (see ). Passing in null disables the shader for this pipeline stage.

+ /// + ///

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173628 + /// void ID3D10Device::VSSetShader([In, Optional] ID3D10VertexShader* pVertexShader) + /// ID3D10Device::VSSetShader + public void Set(SharpDX.Direct3D10.VertexShader vertexShaderRef) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, (void*)((vertexShaderRef == null)?IntPtr.Zero:vertexShaderRef.NativePointer),((void**)(*(void**)_nativePointer))[7]); + } + } + + /// + ///

Bind an array of shader resources to the vertex shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173629 + /// void ID3D10Device::VSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::VSSetShaderResources + public override void SetShaderResources(int startSlot, int numViews, SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsOut) { + unsafe { + IntPtr* shaderResourceViewsOut_ = (IntPtr*)0; + if ( shaderResourceViewsOut != null ) { + IntPtr* shaderResourceViewsOut__ = stackalloc IntPtr[shaderResourceViewsOut.Length]; + shaderResourceViewsOut_ = shaderResourceViewsOut__; + for (int i = 0; i < shaderResourceViewsOut.Length; i++) + shaderResourceViewsOut_[i] = (shaderResourceViewsOut[i] == null)? IntPtr.Zero : shaderResourceViewsOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, shaderResourceViewsOut_,((void**)(*(void**)_nativePointer))[19]); + } + } + + /// + ///

Bind an array of shader resources to the vertex shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173629 + /// void ID3D10Device::VSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::VSSetShaderResources + public override void SetShaderResources(int startSlot, int numViews, SharpDX.ComArray shaderResourceViewsOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, (void*)((shaderResourceViewsOut == null)?IntPtr.Zero:shaderResourceViewsOut.NativePointer),((void**)(*(void**)_nativePointer))[19]); + } + } + + /// + ///

Bind an array of shader resources to the vertex shader stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with null. The debug layer (when active) will alert you if this is true.

For information about creating shader-resource views, see .

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173629 + /// void ID3D10Device::VSSetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[In, Buffer, Optional] const ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::VSSetShaderResources + private void SetShaderResources(int startSlot, int numViews, System.IntPtr shaderResourceViewsOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, (void*)shaderResourceViewsOut,((void**)(*(void**)_nativePointer))[19]); + } + } + + /// + ///

Set an array of sampler states to the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

 //Default sampler state:	
+                ///  SamplerDesc;	
+                /// SamplerDesc.Filter = ;	
+                /// SamplerDesc.AddressU = ;	
+                /// SamplerDesc.AddressV = ;	
+                /// SamplerDesc.AddressW = ;	
+                /// SamplerDesc.MipLODBias = 0;	
+                /// SamplerDesc.MaxAnisotropy = 1;	
+                /// SamplerDesc.ComparisonFunc = ;	
+                /// SamplerDesc.BorderColor[0] = 1.0f;	
+                /// SamplerDesc.BorderColor[1] = 1.0f;	
+                /// SamplerDesc.BorderColor[2] = 1.0f;	
+                /// SamplerDesc.BorderColor[3] = 1.0f;	
+                /// SamplerDesc.MinLOD = -FLT_MAX;	
+                /// SamplerDesc.MaxLOD = FLT_MAX; 

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173627 + /// void ID3D10Device::VSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::VSSetSamplers + public override void SetSamplers(int startSlot, int numSamplers, SharpDX.Direct3D10.SamplerState[] samplersOut) { + unsafe { + IntPtr* samplersOut_ = (IntPtr*)0; + if ( samplersOut != null ) { + IntPtr* samplersOut__ = stackalloc IntPtr[samplersOut.Length]; + samplersOut_ = samplersOut__; + for (int i = 0; i < samplersOut.Length; i++) + samplersOut_[i] = (samplersOut[i] == null)? IntPtr.Zero : samplersOut[i].NativePointer; + } + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, samplersOut_,((void**)(*(void**)_nativePointer))[20]); + } + } + + /// + ///

Set an array of sampler states to the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

 //Default sampler state:	
+                ///  SamplerDesc;	
+                /// SamplerDesc.Filter = ;	
+                /// SamplerDesc.AddressU = ;	
+                /// SamplerDesc.AddressV = ;	
+                /// SamplerDesc.AddressW = ;	
+                /// SamplerDesc.MipLODBias = 0;	
+                /// SamplerDesc.MaxAnisotropy = 1;	
+                /// SamplerDesc.ComparisonFunc = ;	
+                /// SamplerDesc.BorderColor[0] = 1.0f;	
+                /// SamplerDesc.BorderColor[1] = 1.0f;	
+                /// SamplerDesc.BorderColor[2] = 1.0f;	
+                /// SamplerDesc.BorderColor[3] = 1.0f;	
+                /// SamplerDesc.MinLOD = -FLT_MAX;	
+                /// SamplerDesc.MaxLOD = FLT_MAX; 

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173627 + /// void ID3D10Device::VSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::VSSetSamplers + public override void SetSamplers(int startSlot, int numSamplers, SharpDX.ComArray samplersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, (void*)((samplersOut == null)?IntPtr.Zero:samplersOut.NativePointer),((void**)(*(void**)_nativePointer))[20]); + } + } + + /// + ///

Set an array of sampler states to the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any sampler may be set to null; this invokes the default state, which is defined to be the following.

 //Default sampler state:	
+                ///  SamplerDesc;	
+                /// SamplerDesc.Filter = ;	
+                /// SamplerDesc.AddressU = ;	
+                /// SamplerDesc.AddressV = ;	
+                /// SamplerDesc.AddressW = ;	
+                /// SamplerDesc.MipLODBias = 0;	
+                /// SamplerDesc.MaxAnisotropy = 1;	
+                /// SamplerDesc.ComparisonFunc = ;	
+                /// SamplerDesc.BorderColor[0] = 1.0f;	
+                /// SamplerDesc.BorderColor[1] = 1.0f;	
+                /// SamplerDesc.BorderColor[2] = 1.0f;	
+                /// SamplerDesc.BorderColor[3] = 1.0f;	
+                /// SamplerDesc.MinLOD = -FLT_MAX;	
+                /// SamplerDesc.MaxLOD = FLT_MAX; 

The method will not hold a reference to the interfaces passed in. For that reason, applications should be careful not to release an interface currently in use by the device.

+ ///
+ /// + /// bb173627 + /// void ID3D10Device::VSSetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[In, Buffer, Optional] const ID3D10SamplerState** ppSamplers) + /// ID3D10Device::VSSetSamplers + private void SetSamplers(int startSlot, int numSamplers, System.IntPtr samplersOut) { + unsafe { + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, (void*)samplersOut,((void**)(*(void**)_nativePointer))[20]); + } + } + + /// + ///

Get the constant buffers used by the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173622 + /// void ID3D10Device::VSGetConstantBuffers([In] unsigned int StartSlot,[In] unsigned int NumBuffers,[Out, Buffer, Optional] ID3D10Buffer** ppConstantBuffers) + /// ID3D10Device::VSGetConstantBuffers + internal override void GetConstantBuffers(int startSlot, int numBuffers, SharpDX.Direct3D10.Buffer[] constantBuffersOut) { + unsafe { + IntPtr* constantBuffersOut_ = stackalloc IntPtr[constantBuffersOut == null ? 0 : constantBuffersOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numBuffers, constantBuffersOut==null?(void*)0:constantBuffersOut_,((void**)(*(void**)_nativePointer))[39]); + if (constantBuffersOut != null) + for (int i = 0; i < constantBuffersOut.Length; i++) + constantBuffersOut[i] = (constantBuffersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.Buffer(constantBuffersOut_[i]); + } + } + + /// + ///

Get the vertex shader currently set on the device.

+ ///
+ ///

Address of a reference to a vertex shader (see ) to be returned by the method.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173624 + /// void ID3D10Device::VSGetShader([Out] ID3D10VertexShader** ppVertexShader) + /// ID3D10Device::VSGetShader + public void Get(out SharpDX.Direct3D10.VertexShader vertexShaderOut) { + unsafe { + IntPtr vertexShaderOut_ = IntPtr.Zero; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, &vertexShaderOut_,((void**)(*(void**)_nativePointer))[43]); + vertexShaderOut= (vertexShaderOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.VertexShader(vertexShaderOut_); + } + } + + /// + ///

Get the vertex shader resources.

+ ///
+ ///

Index into the device's zero-based array to begin getting shader resources from.

+ ///

The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources.

+ ///

Array of shader resource view interfaces to be returned by the device.

+ /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173625 + /// void ID3D10Device::VSGetShaderResources([In] unsigned int StartSlot,[In] unsigned int NumViews,[Out, Buffer, Optional] ID3D10ShaderResourceView** ppShaderResourceViews) + /// ID3D10Device::VSGetShaderResources + internal override void GetShaderResources(int startSlot, int numViews, SharpDX.Direct3D10.ShaderResourceView[] shaderResourceViewsOut) { + unsafe { + IntPtr* shaderResourceViewsOut_ = stackalloc IntPtr[shaderResourceViewsOut == null ? 0 : shaderResourceViewsOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numViews, shaderResourceViewsOut==null?(void*)0:shaderResourceViewsOut_,((void**)(*(void**)_nativePointer))[51]); + if (shaderResourceViewsOut != null) + for (int i = 0; i < shaderResourceViewsOut.Length; i++) + shaderResourceViewsOut[i] = (shaderResourceViewsOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewsOut_[i]); + } + } + + /// + ///

Get an array of sampler states from the vertex shader pipeline stage.

+ ///
+ /// No documentation. + /// No documentation. + /// No documentation. + /// + ///

Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.

+ ///
+ /// + /// bb173623 + /// void ID3D10Device::VSGetSamplers([In] unsigned int StartSlot,[In] unsigned int NumSamplers,[Out, Buffer, Optional] ID3D10SamplerState** ppSamplers) + /// ID3D10Device::VSGetSamplers + internal override void GetSamplers(int startSlot, int numSamplers, SharpDX.Direct3D10.SamplerState[] samplersOut) { + unsafe { + IntPtr* samplersOut_ = stackalloc IntPtr[samplersOut == null ? 0 : samplersOut.Length]; + SharpDX.Direct3D10.LocalInterop.Callivoid(_nativePointer, startSlot, numSamplers, samplersOut==null?(void*)0:samplersOut_,((void**)(*(void**)_nativePointer))[52]); + if (samplersOut != null) + for (int i = 0; i < samplersOut.Length; i++) + samplersOut[i] = (samplersOut_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D10.SamplerState(samplersOut_[i]); + } + } + } + } diff --git a/Source/SharpDX.Direct3D10/Generated/LocalInterop.cs b/Source/SharpDX.Direct3D10/Generated/LocalInterop.cs new file mode 100644 index 000000000..f1f897fd6 --- /dev/null +++ b/Source/SharpDX.Direct3D10/Generated/LocalInterop.cs @@ -0,0 +1,139 @@ +// 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.XInput namespace. +// This code was generated by a tool. +// Date : 17.06.2016 1:24:54 +// +// 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; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Collections.Generic; +namespace SharpDX.Direct3D10 +{ +#pragma warning disable 649 +#pragma warning disable 419 +#pragma warning disable 1587 +#pragma warning disable 1574 + + internal partial class LocalInterop + { + public static unsafe void Callivoid(void* thisObject,int arg0,int arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,int arg1,int arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,int arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,int arg1,void* arg2,void* arg3,void* arg4,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,int arg1,int arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,int arg1,int arg2,int arg3,int arg4,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,int arg1,int arg2,int arg3,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid9(void* thisObject,void* arg0,SharpDX.Mathematics.Interop.RawBool arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,void* arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,void* arg1,int arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,int arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,int arg0,void* arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,int arg1,int arg2,int arg3,int arg4,void* arg5,int arg6,void* arg7,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,void* arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,int arg1,void* arg2,void* arg3,int arg4,int arg5,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,int arg1,float arg2,System.Byte arg3,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,int arg1,void* arg2,int arg3,int arg4,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid(void* thisObject,void* arg0,void* arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,void* arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,int arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,void* arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,int arg1,void* arg2,void* arg3,void* arg4,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,void* arg1,void* arg2,int arg3,int arg4,void* arg5,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,void* arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* arg6,void* arg7,void* arg8,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe SharpDX.Direct3D10.DeviceCreationFlags CalliSharpDXDirect3D10DeviceCreationFlags(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe SharpDX.Direct3D10.FeatureLevel CalliSharpDXDirect3D10FeatureLevel(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,int arg1,int arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,int arg2,void* arg3,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe SharpDX.Mathematics.Interop.RawBool CalliSharpDXMathematicsInteropRawBool36(void* thisObject,SharpDX.Mathematics.Interop.RawBool arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe SharpDX.Mathematics.Interop.RawBool CalliSharpDXMathematicsInteropRawBool(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,long arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,long arg0,void* arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe long Callilong(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint41(void* thisObject,int arg0,SharpDX.Mathematics.Interop.RawBool arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe SharpDX.Mathematics.Interop.RawBool CalliSharpDXMathematicsInteropRawBool(void* thisObject,int arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void Callivoid43(void* thisObject,SharpDX.Mathematics.Interop.RawBool arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe System.IntPtr CalliSystemIntPtr(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe System.IntPtr CalliSystemIntPtr(void* thisObject,int arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe System.IntPtr CalliSystemIntPtr(void* thisObject,void* arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,float arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint48(void* thisObject,SharpDX.Mathematics.Interop.RawBool arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe SharpDX.Mathematics.Interop.RawBool CalliSharpDXMathematicsInteropRawBool(void* thisObject,void* arg0,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,void* arg1,void* arg2,void* arg3,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,int arg1,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint53(void* thisObject,void* arg0,void* arg1,int arg2,void* arg3,int arg4,SharpDX.Mathematics.Interop.RawColor4 arg5,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,void* arg0,int arg1,int arg2,int arg3,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,void* arg2,void* arg3,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,int arg2,void* arg3,void* arg4,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,float arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,void* arg2,int arg3,void* arg4,int arg5,void* arg6,void* arg7,void* arg8,int arg9,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,void* arg1,void* arg2,int arg3,void* arg4,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,void* arg1,void* arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int Calliint(void* thisObject,int arg0,int arg1,int arg2,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe void* CallivoidPtr(void* thisObject,void* methodPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,int arg4,int arg5,void* arg6,void* arg7,void* arg8,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,int arg4,int arg5,void* arg6,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,int arg4,void* arg5,void* arg6,void* arg7,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,int arg4,void* arg5,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe System.IntPtr CalliFuncSystemIntPtr(void* arg0,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,int arg2,void* arg3,void* arg4,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,int arg2,void* arg3,void* arg4,void* arg5,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,int arg5,int arg6,void* arg7,void* arg8,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint72(void* arg0,int arg1,int arg2,int arg3,int arg4,SharpDX.Mathematics.Interop.RawBool arg5,int arg6,int arg7,int arg8,int arg9,void* arg10,void* arg11,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,void* arg4,void* arg5,void* arg6,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(int arg0,int arg1,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,void* arg4,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,void* arg2,int arg3,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,void* arg6,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(int arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,int arg2,float arg3,void* arg4,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,int arg1,int arg2,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,int arg2,void* arg3,int arg4,int arg5,int arg6,void* arg7,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,int arg6,int arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* arg12,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,int arg4,int arg5,void* arg6,void* arg7,void* arg8,void* arg9,void* arg10,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,int arg4,int arg5,void* arg6,void* arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* funcPtr) { throw new NotImplementedException(); } + public static unsafe int CalliFuncint(void* arg0,void* arg1,void* arg2,void* arg3,void* arg4,void* arg5,int arg6,int arg7,void* arg8,void* arg9,void* arg10,void* arg11,void* arg12,void* arg13,void* funcPtr) { throw new NotImplementedException(); } + } +} diff --git a/Source/SharpDX.Direct3D10/Generated/Structures.cs b/Source/SharpDX.Direct3D10/Generated/Structures.cs new file mode 100644 index 000000000..2206fcd7e --- /dev/null +++ b/Source/SharpDX.Direct3D10/Generated/Structures.cs @@ -0,0 +1,5245 @@ +// 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.Direct3D10 namespace. +// This code was generated by a tool. +// Date : 17.06.2016 1:24:40 +// +// 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.Direct3D10 { + +#pragma warning disable 282 +#pragma warning disable 649 +#pragma warning disable 419 +#pragma warning disable 1587 +#pragma warning disable 1574 + + /// + ///

Describes the blend state.

+ ///
+ /// + ///

To see how blending is done, see Output-Merger Stage (Direct3D 10).

These are the default values for blend state.

StateDefault Value
AlphaToCoverageEnable
BlendEnable[8] (for all 8)
SrcBlend
DestBlend
BlendOp
SrcBlendAlpha
DestBlendAlpha
BlendOpAlpha
RenderTargetWriteMask[8] (for all 8)

?

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_DESC + /// D3D10_BLEND_DESC + public partial struct BlendStateDescription { + + /// + ///

Determines whether or not to use alpha-to-coverage as a multisampling technique when setting a pixel to a rendertarget.

+ ///
+ /// + /// bb204893 + /// BOOL AlphaToCoverageEnable + /// BOOL AlphaToCoverageEnable + public SharpDX.Mathematics.Interop.RawBool IsAlphaToCoverageEnabled; + + /// + ///

Enable (or disable) blending. There are eight elements in this array; these correspond to the eight rendertargets that can be set to output-merger stage at one time.

+ ///
+ /// + /// bb204893 + /// BOOL BlendEnable[8] + /// BOOL BlendEnable + public SharpDX.Mathematics.Interop.RawBool[] IsBlendEnabled { + get { return _IsBlendEnabled ?? (_IsBlendEnabled = new SharpDX.Mathematics.Interop.RawBool[8]);} + } + internal SharpDX.Mathematics.Interop.RawBool[] _IsBlendEnabled; + + /// + ///

This blend option specifies the first RGB data source and includes an optional pre-blend operation.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND SrcBlend + /// D3D10_BLEND SrcBlend + public SharpDX.Direct3D10.BlendOption SourceBlend; + + /// + ///

This blend option specifies the second RGB data source and includes an optional pre-blend operation.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND DestBlend + /// D3D10_BLEND DestBlend + public SharpDX.Direct3D10.BlendOption DestinationBlend; + + /// + ///

This blend operation defines how to combine the RGB data sources.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_OP BlendOp + /// D3D10_BLEND_OP BlendOp + public SharpDX.Direct3D10.BlendOperation BlendOperation; + + /// + ///

This blend option specifies the first alpha data source and includes an optional pre-blend operation. Blend options that end in _COLOR are not allowed.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND SrcBlendAlpha + /// D3D10_BLEND SrcBlendAlpha + public SharpDX.Direct3D10.BlendOption SourceAlphaBlend; + + /// + ///

This blend option specifies the second alpha data source and includes an optional pre-blend operation. Blend options that end in _COLOR are not allowed.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND DestBlendAlpha + /// D3D10_BLEND DestBlendAlpha + public SharpDX.Direct3D10.BlendOption DestinationAlphaBlend; + + /// + ///

This blend operation defines how to combine the alpha data sources.

+ ///
+ /// + /// bb204893 + /// D3D10_BLEND_OP BlendOpAlpha + /// D3D10_BLEND_OP BlendOpAlpha + public SharpDX.Direct3D10.BlendOperation AlphaBlendOperation; + + /// + ///

A per-pixel write mask that allows control over which components can be written (see ).

+ ///
+ /// + /// bb204893 + /// D3D10_COLOR_WRITE_ENABLE RenderTargetWriteMask[8] + /// D3D10_COLOR_WRITE_ENABLE RenderTargetWriteMask + public SharpDX.Direct3D10.ColorWriteMaskFlags[] RenderTargetWriteMask { + get { return _RenderTargetWriteMask ?? (_RenderTargetWriteMask = new SharpDX.Direct3D10.ColorWriteMaskFlags[8]);} + } + internal SharpDX.Direct3D10.ColorWriteMaskFlags[] _RenderTargetWriteMask; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public SharpDX.Mathematics.Interop.RawBool IsAlphaToCoverageEnabled; + public SharpDX.Mathematics.Interop.RawBool IsBlendEnabled; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled1; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled2; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled3; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled4; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled5; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled6; + SharpDX.Mathematics.Interop.RawBool __IsBlendEnabled7; + public SharpDX.Direct3D10.BlendOption SourceBlend; + public SharpDX.Direct3D10.BlendOption DestinationBlend; + public SharpDX.Direct3D10.BlendOperation BlendOperation; + public SharpDX.Direct3D10.BlendOption SourceAlphaBlend; + public SharpDX.Direct3D10.BlendOption DestinationAlphaBlend; + public SharpDX.Direct3D10.BlendOperation AlphaBlendOperation; + public byte RenderTargetWriteMask; + byte __RenderTargetWriteMask1; + byte __RenderTargetWriteMask2; + byte __RenderTargetWriteMask3; + byte __RenderTargetWriteMask4; + byte __RenderTargetWriteMask5; + byte __RenderTargetWriteMask6; + byte __RenderTargetWriteMask7; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.IsAlphaToCoverageEnabled = @ref.IsAlphaToCoverageEnabled; + fixed (void* __to = &this.IsBlendEnabled[0]) fixed (void* __from = &@ref.IsBlendEnabled) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( SharpDX.Mathematics.Interop.RawBool)); + this.SourceBlend = @ref.SourceBlend; + this.DestinationBlend = @ref.DestinationBlend; + this.BlendOperation = @ref.BlendOperation; + this.SourceAlphaBlend = @ref.SourceAlphaBlend; + this.DestinationAlphaBlend = @ref.DestinationAlphaBlend; + this.AlphaBlendOperation = @ref.AlphaBlendOperation; + fixed (void* __to = &this.RenderTargetWriteMask[0]) fixed (void* __from = &@ref.RenderTargetWriteMask) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( byte)); + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.IsAlphaToCoverageEnabled = this.IsAlphaToCoverageEnabled; + fixed (void* __to = &@ref.IsBlendEnabled) fixed (void* __from = &this.IsBlendEnabled[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( SharpDX.Mathematics.Interop.RawBool)); + @ref.SourceBlend = this.SourceBlend; + @ref.DestinationBlend = this.DestinationBlend; + @ref.BlendOperation = this.BlendOperation; + @ref.SourceAlphaBlend = this.SourceAlphaBlend; + @ref.DestinationAlphaBlend = this.DestinationAlphaBlend; + @ref.AlphaBlendOperation = this.AlphaBlendOperation; + fixed (void* __to = &@ref.RenderTargetWriteMask) fixed (void* __from = &this.RenderTargetWriteMask[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( byte)); + + } + } + + /// + ///

Describes the blend state for a Direct3D 10.1 device.

+ ///
+ /// + ///

To see how blending is done, see Output-Merger Stage (Direct3D 10).

These are the default values for the blend description.

StateDefault Value
AlphaToCoverageEnable
IndependentBlendEnable
RenderTarget[0].BlendEnable
RenderTarget[0].SrcBlend
RenderTarget[0].DestBlend
RenderTarget[0].BlendOp
RenderTarget[0].SrcBlendAlpha
RenderTarget[0].DestBlendAlpha
RenderTarget[0].BlendOpAlpha
RenderTarget[0].RenderTargetWriteMask

?

This structure requires Windows Vista Service Pack 1.

If the driver type is set to , the feature level is set to less than or equal to , and the pixel format of the render target is set to , , or , the device performs the blend in standard RGB (sRGB) space and not in linear space. However, if the feature level is set to greater than , the device performs the blend in linear space.

+ ///
+ /// + /// bb694528 + /// D3D10_BLEND_DESC1 + /// D3D10_BLEND_DESC1 + public partial struct BlendStateDescription1 { + + /// + ///

Determines whether or not to use the alpha-to-coverage multisampling technique when setting a render-target pixel.

+ ///
+ /// + /// bb694528 + /// BOOL AlphaToCoverageEnable + /// BOOL AlphaToCoverageEnable + public SharpDX.Mathematics.Interop.RawBool IsAlphaToCoverageEnabled; + + /// + ///

Set to TRUE to enable independent blending in simultaneous render targets. If set to , only the RenderTarget[0] members are used. RenderTarget[1..7] are ignored.

+ ///
+ /// + /// bb694528 + /// BOOL IndependentBlendEnable + /// BOOL IndependentBlendEnable + public SharpDX.Mathematics.Interop.RawBool IndependentBlendEnable; + + /// + ///

An array of render-target-blend descriptions (see ); these correspond to the eight rendertargets that can be set to the output-merger stage at one time.

+ ///
+ /// + /// bb694528 + /// D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[8] + /// D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget + public SharpDX.Direct3D10.RenderTargetBlendDescription1[] RenderTarget { + get { return _RenderTarget ?? (_RenderTarget = new SharpDX.Direct3D10.RenderTargetBlendDescription1[8]);} + } + internal SharpDX.Direct3D10.RenderTargetBlendDescription1[] _RenderTarget; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public SharpDX.Mathematics.Interop.RawBool IsAlphaToCoverageEnabled; + public SharpDX.Mathematics.Interop.RawBool IndependentBlendEnable; + public SharpDX.Direct3D10.RenderTargetBlendDescription1 RenderTarget; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget1; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget2; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget3; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget4; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget5; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget6; + SharpDX.Direct3D10.RenderTargetBlendDescription1 __RenderTarget7; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.IsAlphaToCoverageEnabled = @ref.IsAlphaToCoverageEnabled; + this.IndependentBlendEnable = @ref.IndependentBlendEnable; + fixed (void* __to = &this.RenderTarget[0]) fixed (void* __from = &@ref.RenderTarget) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( SharpDX.Direct3D10.RenderTargetBlendDescription1)); + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.IsAlphaToCoverageEnabled = this.IsAlphaToCoverageEnabled; + @ref.IndependentBlendEnable = this.IndependentBlendEnable; + fixed (void* __to = &@ref.RenderTarget) fixed (void* __from = &this.RenderTarget[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( SharpDX.Direct3D10.RenderTargetBlendDescription1)); + + } + } + + /// + ///

Describes a buffer resource.

+ ///
+ /// + ///

This structure is used by to create buffer resources.

In addition to this structure, there is also a derived structure in D3D10.h (CD3D10_BUFFER_DESC) which behaves like an inherited class to help create a buffer description.

+ ///
+ /// + /// bb204896 + /// D3D10_BUFFER_DESC + /// D3D10_BUFFER_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct BufferDescription { + + /// + /// No documentation. + /// + /// + /// bb204896 + /// unsigned int ByteWidth + /// unsigned int ByteWidth + public int SizeInBytes; + + /// + /// No documentation. + /// + /// + /// bb204896 + /// D3D10_USAGE Usage + /// D3D10_USAGE Usage + public SharpDX.Direct3D10.ResourceUsage Usage; + + /// + /// No documentation. + /// + /// + /// bb204896 + /// D3D10_BIND_FLAG BindFlags + /// D3D10_BIND_FLAG BindFlags + public SharpDX.Direct3D10.BindFlags BindFlags; + + /// + /// No documentation. + /// + /// + /// bb204896 + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + public SharpDX.Direct3D10.CpuAccessFlags CpuAccessFlags; + + /// + /// No documentation. + /// + /// + /// bb204896 + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.ResourceOptionFlags OptionFlags; + } + + /// + ///

Information about the video card's performance counter capabilities.

+ ///
+ /// + ///

This structure is returned by .

+ ///
+ /// + /// bb204906 + /// D3D10_COUNTER_INFO + /// D3D10_COUNTER_INFO + [StructLayout(LayoutKind.Sequential)] + public partial struct CounterCapabilities { + + /// + ///

Largest device-dependent counter ID that the device supports. If none are supported, this value will be 0. Otherwise it will be greater than or equal to . See .

+ ///
+ /// + /// bb204906 + /// D3D10_COUNTER LastDeviceDependentCounter + /// D3D10_COUNTER LastDeviceDependentCounter + public SharpDX.Direct3D10.CounterKind LastDeviceDependentCounter; + + /// + ///

Number of counters that can be simultaneously supported.

+ ///
+ /// + /// bb204906 + /// unsigned int NumSimultaneousCounters + /// unsigned int NumSimultaneousCounters + public int SimultaneousCounterCount; + + /// + ///

Number of detectable parallel units that the counter is able to discern. Values are 1 ~ 4. Use NumDetectableParallelUnits to interpret the values of the VERTEX_PROCESSING, GEOMETRY_PROCESSING, PIXEL_PROCESSING, and OTHER_GPU_PROCESSING counters. See for an equation.

+ ///
+ /// + /// bb204906 + /// unsigned char NumDetectableParallelUnits + /// unsigned char NumDetectableParallelUnits + public byte DetectableParallelUnitCount; + } + + /// + ///

Describes a counter.

+ ///
+ /// + /// bb204905 + /// D3D10_COUNTER_DESC + /// D3D10_COUNTER_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct CounterDescription { + + /// + ///

Type of counter (see ).

+ ///
+ /// + /// bb204905 + /// D3D10_COUNTER Counter + /// D3D10_COUNTER Counter + public SharpDX.Direct3D10.CounterKind Counter; + + /// + ///

Reserved.

+ ///
+ /// + /// bb204905 + /// unsigned int MiscFlags + /// unsigned int MiscFlags + public int MiscFlags; + } + + /// + ///

Describes the stencil operations that can be performed based on the results of stencil test.

+ ///
+ /// + ///

The stencil operation can be set differently based on the outcome of the stencil test by using the StencilFunc member. This can be done for the stencil test portion of depth-stencil testing.

The structure is a member of the structure.

+ ///
+ /// + /// bb205035 + /// D3D10_DEPTH_STENCILOP_DESC + /// D3D10_DEPTH_STENCILOP_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct DepthStencilOperationDescription { + + /// + /// No documentation. + /// + /// + /// bb205035 + /// D3D10_STENCIL_OP StencilFailOp + /// D3D10_STENCIL_OP StencilFailOp + public SharpDX.Direct3D10.StencilOperation FailOperation; + + /// + /// No documentation. + /// + /// + /// bb205035 + /// D3D10_STENCIL_OP StencilDepthFailOp + /// D3D10_STENCIL_OP StencilDepthFailOp + public SharpDX.Direct3D10.StencilOperation DepthFailOperation; + + /// + /// No documentation. + /// + /// + /// bb205035 + /// D3D10_STENCIL_OP StencilPassOp + /// D3D10_STENCIL_OP StencilPassOp + public SharpDX.Direct3D10.StencilOperation PassOperation; + + /// + /// No documentation. + /// + /// + /// bb205035 + /// D3D10_COMPARISON_FUNC StencilFunc + /// D3D10_COMPARISON_FUNC StencilFunc + public SharpDX.Direct3D10.Comparison Comparison; + } + + /// + ///

Describes depth-stencil state.

+ ///
+ /// + ///

Depth-stencil state controls how depth-stencil testing is performed by the output-merger stage.

The formats that support stenciling are and .

+ ///
+ /// + /// bb205036 + /// D3D10_DEPTH_STENCIL_DESC + /// D3D10_DEPTH_STENCIL_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct DepthStencilStateDescription { + + /// + ///

A Boolean value that enables depth testing. The default value is TRUE.

+ ///
+ /// + /// bb205036 + /// BOOL DepthEnable + /// BOOL DepthEnable + public SharpDX.Mathematics.Interop.RawBool IsDepthEnabled; + + /// + ///

A member of the enumerated type that identifies a portion of the depth-stencil buffer that can be modified by depth data. The default value is .

+ ///
+ /// + /// bb205036 + /// D3D10_DEPTH_WRITE_MASK DepthWriteMask + /// D3D10_DEPTH_WRITE_MASK DepthWriteMask + public SharpDX.Direct3D10.DepthWriteMask DepthWriteMask; + + /// + ///

A member of the enumerated type that defines how depth data is compared against existing depth data. The default value is

+ ///
+ /// + /// bb205036 + /// D3D10_COMPARISON_FUNC DepthFunc + /// D3D10_COMPARISON_FUNC DepthFunc + public SharpDX.Direct3D10.Comparison DepthComparison; + + /// + ///

A Boolean value that enables stencil testing. The default value is .

+ ///
+ /// + /// bb205036 + /// BOOL StencilEnable + /// BOOL StencilEnable + public SharpDX.Mathematics.Interop.RawBool IsStencilEnabled; + + /// + ///

A value that identifies a portion of the depth-stencil buffer for reading stencil data. The default value is D3D10_DEFAULT_STENCIL_READ_MASK.

+ ///
+ /// + /// bb205036 + /// unsigned char StencilReadMask + /// unsigned char StencilReadMask + public byte StencilReadMask; + + /// + ///

A value that identifies a portion of the depth-stencil buffer for writing stencil data. The default value is D3D10_DEFAULT_STENCIL_WRITE_MASK.

+ ///
+ /// + /// bb205036 + /// unsigned char StencilWriteMask + /// unsigned char StencilWriteMask + public byte StencilWriteMask; + + /// + ///

A structure that identifies how to use the results of the depth test and the stencil test for pixels whose surface normal is facing toward the camera.

+ ///
+ /// + /// bb205036 + /// D3D10_DEPTH_STENCILOP_DESC FrontFace + /// D3D10_DEPTH_STENCILOP_DESC FrontFace + public SharpDX.Direct3D10.DepthStencilOperationDescription FrontFace; + + /// + ///

A structure that identifies how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera.

+ ///
+ /// + /// bb205036 + /// D3D10_DEPTH_STENCILOP_DESC BackFace + /// D3D10_DEPTH_STENCILOP_DESC BackFace + public SharpDX.Direct3D10.DepthStencilOperationDescription BackFace; + } + + /// + ///

Specifies the subresource(s) from a texture that are accessible using a depth-stencil view.

+ ///
+ /// + ///

These are valid formats for a depth-stencil view:

A depth-stencil view cannot use a typeless format. If the format chosen is , then the format of the parent resource is used.

A depth-stencil-view description is needed when calling .

+ ///
+ /// + /// bb205037 + /// D3D10_DEPTH_STENCIL_VIEW_DESC + /// D3D10_DEPTH_STENCIL_VIEW_DESC + [StructLayout(LayoutKind.Explicit)] + public partial struct DepthStencilViewDescription { + + /// + ///

Specifies the subresource(s) from an array 2D textures that are accessible to a depth-stencil view.

+ ///
+ /// + ///

This structure is one member of a depth-stencil-view description (see ).

+ ///
+ /// + /// bb172470 + /// D3D10_TEX2D_ARRAY_DSV + /// D3D10_TEX2D_ARRAY_DSV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172470 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + + /// + /// No documentation. + /// + /// + /// bb172470 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172470 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource(s) from an array of multisampled 2D textures for a depth-stencil view.

+ ///
+ /// + ///

This structure is one member of a depth-stencil-view description (see ).

+ ///
+ /// + /// bb172464 + /// D3D10_TEX2DMS_ARRAY_DSV + /// D3D10_TEX2DMS_ARRAY_DSV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DMultisampledArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172464 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172464 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource(s) from an array of 1D textures to use in a depth-stencil view.

+ ///
+ /// + ///

This structure is one member of a depth-stencil-view description (see ).

+ ///
+ /// + /// bb172458 + /// D3D10_TEX1D_ARRAY_DSV + /// D3D10_TEX1D_ARRAY_DSV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172458 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + + /// + /// No documentation. + /// + /// + /// bb172458 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172458 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource from a 1D texture that is accessible to a depth-stencil view.

+ ///
+ /// + ///

This structure is one member of a depth-stencil-view description (see ).

+ ///
+ /// + /// bb172461 + /// D3D10_TEX1D_DSV + /// D3D10_TEX1D_DSV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DResource { + + /// + /// No documentation. + /// + /// + /// bb172461 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + } + + /// + ///

Specifies the subresource from a 2D texture that is accessible to a depth-stencil view.

+ ///
+ /// + ///

This structure is one member of a depth-stencil-view description (see ).

+ ///
+ /// + /// bb172473 + /// D3D10_TEX2D_DSV + /// D3D10_TEX2D_DSV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DResource { + + /// + /// No documentation. + /// + /// + /// bb172473 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + } + + /// + ///

Specifies the subresource from a multisampled 2D texture that is accessible to a depth-stencil view.

+ ///
+ /// + ///

Since a multisampled 2D texture contains a single subtexture, there is nothing to specify; this unused member is included so that this structure will compile in C.

+ ///
+ /// + /// bb172467 + /// D3D10_TEX2DMS_DSV + /// D3D10_TEX2DMS_DSV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DMultisampledResource { + + /// + /// No documentation. + /// + /// + /// bb172467 + /// unsigned int UnusedField_NothingToDefine + /// unsigned int UnusedField_NothingToDefine + public int UnusedFieldNothingToDefine; + } + + /// + /// No documentation. + /// + /// + /// bb205037 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + [FieldOffset(0)] + public SharpDX.DXGI.Format Format; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_DSV_DIMENSION ViewDimension + /// D3D10_DSV_DIMENSION ViewDimension + [FieldOffset(4)] + public SharpDX.Direct3D10.DepthStencilViewDimension Dimension; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_TEX1D_DSV Texture1D + /// D3D10_TEX1D_DSV Texture1D + [FieldOffset(8)] + public SharpDX.Direct3D10.DepthStencilViewDescription.Texture1DResource Texture1D; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_TEX1D_ARRAY_DSV Texture1DArray + /// D3D10_TEX1D_ARRAY_DSV Texture1DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.DepthStencilViewDescription.Texture1DArrayResource Texture1DArray; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_TEX2D_DSV Texture2D + /// D3D10_TEX2D_DSV Texture2D + [FieldOffset(8)] + public SharpDX.Direct3D10.DepthStencilViewDescription.Texture2DResource Texture2D; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_TEX2D_ARRAY_DSV Texture2DArray + /// D3D10_TEX2D_ARRAY_DSV Texture2DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.DepthStencilViewDescription.Texture2DArrayResource Texture2DArray; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_TEX2DMS_DSV Texture2DMS + /// D3D10_TEX2DMS_DSV Texture2DMS + [FieldOffset(8)] + public SharpDX.Direct3D10.DepthStencilViewDescription.Texture2DMultisampledResource Texture2DMS; + + /// + /// No documentation. + /// + /// + /// bb205037 + /// D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray + /// D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray + [FieldOffset(8)] + public SharpDX.Direct3D10.DepthStencilViewDescription.Texture2DMultisampledArrayResource Texture2DMSArray; + } + + /// + ///

Describes an effect.

+ ///
+ /// + ///

To get an effect description, call .

+ ///
+ /// + /// bb205047 + /// D3D10_EFFECT_DESC + /// D3D10_EFFECT_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct EffectDescription { + + /// + ///

TRUE if the effect is a child effect; otherwise .

+ ///
+ /// + /// bb205047 + /// BOOL IsChildEffect + /// BOOL IsChildEffect + public SharpDX.Mathematics.Interop.RawBool IsChildEffect; + + /// + ///

The number of constant buffers.

+ ///
+ /// + /// bb205047 + /// unsigned int ConstantBuffers + /// unsigned int ConstantBuffers + public int ConstantBufferCount; + + /// + ///

The number of constant buffers shared in an effect pool.

+ ///
+ /// + /// bb205047 + /// unsigned int SharedConstantBuffers + /// unsigned int SharedConstantBuffers + public int SharedConstantBufferCount; + + /// + ///

The number of global variables.

+ ///
+ /// + /// bb205047 + /// unsigned int GlobalVariables + /// unsigned int GlobalVariables + public int GlobalVariableCount; + + /// + ///

The number of global variables shared in an effect pool.

+ ///
+ /// + /// bb205047 + /// unsigned int SharedGlobalVariables + /// unsigned int SharedGlobalVariables + public int SharedGlobalVariableCount; + + /// + ///

The number of techniques.

+ ///
+ /// + /// bb205047 + /// unsigned int Techniques + /// unsigned int Techniques + public int TechniqueCount; + } + + /// + ///

Describes an effect pass, which contains pipeline state.

+ ///
+ /// + ///

Get a pass description by calling ; an effect technique contains one or more passes.

+ ///
+ /// + /// bb205330 + /// D3D10_PASS_DESC + /// D3D10_PASS_DESC + public partial struct EffectPassDescription { + + /// + ///

A string that contains the name of the pass; otherwise null.

+ ///
+ /// + /// bb205330 + /// const char* Name + /// char Name + public string Name; + + /// + ///

The number of annotations.

+ ///
+ /// + /// bb205330 + /// unsigned int Annotations + /// unsigned int Annotations + public int AnnotationCount; + + /// + ///

A reference to the input signature or the vertex shader; otherwise null.

+ ///
+ /// + /// bb205330 + /// unsigned char* pIAInputSignature + /// unsigned char pIAInputSignature + internal System.IntPtr PIAInputSignature; + + /// + ///

The size of the input signature (in bytes).

+ ///
+ /// + /// bb205330 + /// SIZE_T IAInputSignatureSize + /// SIZE_T IAInputSignatureSize + internal SharpDX.PointerSize IAInputSignatureSize; + + /// + ///

The stencil-reference value used in the depth-stencil state (see Configuring Depth-Stencil Functionality (Direct3D 10)).

+ ///
+ /// + /// bb205330 + /// unsigned int StencilRef + /// unsigned int StencilRef + public int StencilReference; + + /// + ///

The sample mask for the blend state (see Configuring Blending Functionality (Direct3D 10)).

+ ///
+ /// + /// bb205330 + /// unsigned int SampleMask + /// unsigned int SampleMask + public int SampleMask; + + /// + ///

The per-component blend factors (RGBA) for the blend state (see Configuring Blending Functionality (Direct3D 10)).

+ ///
+ /// + /// bb205330 + /// SHARPDX_COLOR4 BlendFactor + /// SHARPDX_COLOR4 BlendFactor + public SharpDX.Mathematics.Interop.RawColor4 BlendFactor; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr Name; + public int AnnotationCount; + public System.IntPtr PIAInputSignature; + public SharpDX.PointerSize IAInputSignatureSize; + public int StencilReference; + public int SampleMask; + public SharpDX.Mathematics.Interop.RawColor4 BlendFactor; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.Name != IntPtr.Zero) + Marshal.FreeHGlobal(this.Name); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Name = ( @ref.Name == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.Name); + this.AnnotationCount = @ref.AnnotationCount; + this.PIAInputSignature = @ref.PIAInputSignature; + this.IAInputSignatureSize = @ref.IAInputSignatureSize; + this.StencilReference = @ref.StencilReference; + this.SampleMask = @ref.SampleMask; + this.BlendFactor = @ref.BlendFactor; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.Name = ( this.Name == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.Name); + @ref.AnnotationCount = this.AnnotationCount; + @ref.PIAInputSignature = this.PIAInputSignature; + @ref.IAInputSignatureSize = this.IAInputSignatureSize; + @ref.StencilReference = this.StencilReference; + @ref.SampleMask = this.SampleMask; + @ref.BlendFactor = this.BlendFactor; + + } + } + + /// + ///

Describes an effect variable that contains a shader.

+ ///
+ /// + ///

To get a shader description, call a method like .

+ ///
+ /// + /// bb205331 + /// D3D10_PASS_SHADER_DESC + /// D3D10_PASS_SHADER_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct EffectPassShaderDescription { + + /// + ///

A reference to the variable that the shader came from. If it is an inline shader assignment, the returned interface will be an anonymous shader variable, which is not retrievable any other way. Its name in the variable description will be "$Anonymous". If there is no assignment of this type in the pass block, this will point to a shader variable that returns false when IsValid is called.

+ ///
+ /// + /// bb205331 + /// ID3D10EffectShaderVariable* pShaderVariable + /// ID3D10EffectShaderVariable pShaderVariable + internal System.IntPtr VariablePointer; + + /// + ///

A zero-based array index; otherwise 0.

+ ///
+ /// + /// bb205331 + /// unsigned int ShaderIndex + /// unsigned int ShaderIndex + public int Index; + } + + /// + ///

Describes an effect shader.

+ ///
+ /// + ///

To get an effect-shader description, call .

+ ///
+ /// + /// bb205051 + /// D3D10_EFFECT_SHADER_DESC + /// D3D10_EFFECT_SHADER_DESC + public partial struct EffectShaderDescription { + + /// + ///

Passed into CreateInputLayout. Only valid on a vertex shader or geometry shader. See ID3D10Device_CreateInputLayout.

+ ///
+ /// + /// bb205051 + /// const unsigned char* pInputSignature + /// unsigned char pInputSignature + internal System.IntPtr InputSignaturePointer; + + /// + ///

TRUE is the shader is defined inline; otherwise .

+ ///
+ /// + /// bb205051 + /// BOOL IsInline + /// BOOL IsInline + public SharpDX.Mathematics.Interop.RawBool IsInline; + + /// + ///

A reference to the compiled shader.

+ ///
+ /// + /// bb205051 + /// const unsigned char* pBytecode + /// unsigned char pBytecode + internal System.IntPtr BytecodePointer; + + /// + ///

The length of pBytecode.

+ ///
+ /// + /// bb205051 + /// unsigned int BytecodeLength + /// unsigned int BytecodeLength + internal int BytecodeLength; + + /// + ///

A string that constains a declaration of the stream output from a geometry shader.

+ ///
+ /// + /// bb205051 + /// const char* SODecl + /// char SODecl + public string StreamOutputDeclaration; + + /// + ///

The number of entries in the input signature.

+ ///
+ /// + /// bb205051 + /// unsigned int NumInputSignatureEntries + /// unsigned int NumInputSignatureEntries + public int InputParameterCount; + + /// + ///

The number of entries in the output signature.

+ ///
+ /// + /// bb205051 + /// unsigned int NumOutputSignatureEntries + /// unsigned int NumOutputSignatureEntries + public int OutputParameterCount; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr InputSignaturePointer; + public SharpDX.Mathematics.Interop.RawBool IsInline; + public System.IntPtr BytecodePointer; + public int BytecodeLength; + public System.IntPtr StreamOutputDeclaration; + public int InputParameterCount; + public int OutputParameterCount; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.StreamOutputDeclaration != IntPtr.Zero) + Marshal.FreeHGlobal(this.StreamOutputDeclaration); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.InputSignaturePointer = @ref.InputSignaturePointer; + this.IsInline = @ref.IsInline; + this.BytecodePointer = @ref.BytecodePointer; + this.BytecodeLength = @ref.BytecodeLength; + this.StreamOutputDeclaration = ( @ref.StreamOutputDeclaration == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.StreamOutputDeclaration); + this.InputParameterCount = @ref.InputParameterCount; + this.OutputParameterCount = @ref.OutputParameterCount; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.InputSignaturePointer = this.InputSignaturePointer; + @ref.IsInline = this.IsInline; + @ref.BytecodePointer = this.BytecodePointer; + @ref.BytecodeLength = this.BytecodeLength; + @ref.StreamOutputDeclaration = ( this.StreamOutputDeclaration == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.StreamOutputDeclaration); + @ref.InputParameterCount = this.InputParameterCount; + @ref.OutputParameterCount = this.OutputParameterCount; + + } + } + + /// + ///

Describes an effect technique.

+ ///
+ /// + ///

To get a technique, call .

+ ///
+ /// + /// bb172457 + /// D3D10_TECHNIQUE_DESC + /// D3D10_TECHNIQUE_DESC + public partial struct EffectTechniqueDescription { + + /// + ///

A string that contains the technique name; otherwise null.

+ ///
+ /// + /// bb172457 + /// const char* Name + /// char Name + public string Name; + + /// + ///

The number of passes in the technique.

+ ///
+ /// + /// bb172457 + /// unsigned int Passes + /// unsigned int Passes + public int PassCount; + + /// + ///

The number of annotations.

+ ///
+ /// + /// bb172457 + /// unsigned int Annotations + /// unsigned int Annotations + public int AnnotationCount; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr Name; + public int PassCount; + public int AnnotationCount; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.Name != IntPtr.Zero) + Marshal.FreeHGlobal(this.Name); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Name = ( @ref.Name == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.Name); + this.PassCount = @ref.PassCount; + this.AnnotationCount = @ref.AnnotationCount; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.Name = ( this.Name == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.Name); + @ref.PassCount = this.PassCount; + @ref.AnnotationCount = this.AnnotationCount; + + } + } + + /// + ///

Describes an effect-variable type.

+ ///
+ /// + ///

To get an effect-variable type, call .

+ ///
+ /// + /// bb205054 + /// D3D10_EFFECT_TYPE_DESC + /// D3D10_EFFECT_TYPE_DESC + public partial struct EffectTypeDescription { + + /// + ///

A string that contains the variable name.

+ ///
+ /// + /// bb205054 + /// const char* TypeName + /// char TypeName + public string TypeName; + + /// + ///

The variable class (see D3D10_SHADER_VARIABLE_CLASS).

+ ///
+ /// + /// bb205054 + /// D3D_SHADER_VARIABLE_CLASS Class + /// D3D_SHADER_VARIABLE_CLASS Class + public SharpDX.D3DCompiler.ShaderVariableClass Class; + + /// + ///

The variable type (see D3D10_SHADER_VARIABLE_TYPE).

+ ///
+ /// + /// bb205054 + /// D3D_SHADER_VARIABLE_TYPE Type + /// D3D_SHADER_VARIABLE_TYPE Type + public SharpDX.D3DCompiler.ShaderVariableType Type; + + /// + ///

The number of elements if the variable is an array; otherwise 0.

+ ///
+ /// + /// bb205054 + /// unsigned int Elements + /// unsigned int Elements + public int Elements; + + /// + ///

The number of members if the variable is a structure; otherwise 0.

+ ///
+ /// + /// bb205054 + /// unsigned int Members + /// unsigned int Members + public int Members; + + /// + ///

The number of rows if the variable is a matrix; otherwise 0.

+ ///
+ /// + /// bb205054 + /// unsigned int Rows + /// unsigned int Rows + public int Rows; + + /// + ///

The number of columns if the variable is a matrix; otherwise 0.

+ ///
+ /// + /// bb205054 + /// unsigned int Columns + /// unsigned int Columns + public int Columns; + + /// + ///

The number of bytes that the variable consumes when it is packed tightly by the compiler.

+ ///
+ /// + /// bb205054 + /// unsigned int PackedSize + /// unsigned int PackedSize + public int PackedSize; + + /// + ///

The number of bytes that the variable consumes before it is packed by the compiler.

+ ///
+ /// + /// bb205054 + /// unsigned int UnpackedSize + /// unsigned int UnpackedSize + public int UnpackedSize; + + /// + ///

The number of bytes between elements.

+ ///
+ /// + /// bb205054 + /// unsigned int Stride + /// unsigned int Stride + public int Stride; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr TypeName; + public SharpDX.D3DCompiler.ShaderVariableClass Class; + public SharpDX.D3DCompiler.ShaderVariableType Type; + public int Elements; + public int Members; + public int Rows; + public int Columns; + public int PackedSize; + public int UnpackedSize; + public int Stride; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.TypeName != IntPtr.Zero) + Marshal.FreeHGlobal(this.TypeName); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.TypeName = ( @ref.TypeName == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.TypeName); + this.Class = @ref.Class; + this.Type = @ref.Type; + this.Elements = @ref.Elements; + this.Members = @ref.Members; + this.Rows = @ref.Rows; + this.Columns = @ref.Columns; + this.PackedSize = @ref.PackedSize; + this.UnpackedSize = @ref.UnpackedSize; + this.Stride = @ref.Stride; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.TypeName = ( this.TypeName == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.TypeName); + @ref.Class = this.Class; + @ref.Type = this.Type; + @ref.Elements = this.Elements; + @ref.Members = this.Members; + @ref.Rows = this.Rows; + @ref.Columns = this.Columns; + @ref.PackedSize = this.PackedSize; + @ref.UnpackedSize = this.UnpackedSize; + @ref.Stride = this.Stride; + + } + } + + /// + ///

Describes an effect variable.

+ ///
+ /// + ///

To get an effect-variable description, call .

+ ///
+ /// + /// bb205056 + /// D3D10_EFFECT_VARIABLE_DESC + /// D3D10_EFFECT_VARIABLE_DESC + public partial struct EffectVariableDescription { + + /// + ///

A string that contains the variable name.

+ ///
+ /// + /// bb205056 + /// const char* Name + /// char Name + public string Name; + + /// + ///

The semantic attached to the variable; otherwise null.

+ ///
+ /// + /// bb205056 + /// const char* Semantic + /// char Semantic + public string Semantic; + + /// + ///

Optional flags for effect variables.

+ ///
+ /// + /// bb205056 + /// D3D10_EFFECT_VARIABLE_FLAGS Flags + /// D3D10_EFFECT_VARIABLE_FLAGS Flags + public SharpDX.Direct3D10.EffectVariableFlags Flags; + + /// + ///

The number of annotations; otherwise 0.

+ ///
+ /// + /// bb205056 + /// unsigned int Annotations + /// unsigned int Annotations + public int AnnotationCount; + + /// + ///

The offset between the beginning of the constant buffer and this variable; otherwise 0.

+ ///
+ /// + /// bb205056 + /// unsigned int BufferOffset + /// unsigned int BufferOffset + public int BufferOffset; + + /// + ///

The register that this variable is bound to. To bind a variable explicitly use the flag.

+ ///
+ /// + /// bb205056 + /// unsigned int ExplicitBindPoint + /// unsigned int ExplicitBindPoint + public int ExplicitBindPoint; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr Name; + public System.IntPtr Semantic; + public SharpDX.Direct3D10.EffectVariableFlags Flags; + public int AnnotationCount; + public int BufferOffset; + public int ExplicitBindPoint; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.Name != IntPtr.Zero) + Marshal.FreeHGlobal(this.Name); + if (this.Semantic != IntPtr.Zero) + Marshal.FreeHGlobal(this.Semantic); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Name = ( @ref.Name == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.Name); + this.Semantic = ( @ref.Semantic == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.Semantic); + this.Flags = @ref.Flags; + this.AnnotationCount = @ref.AnnotationCount; + this.BufferOffset = @ref.BufferOffset; + this.ExplicitBindPoint = @ref.ExplicitBindPoint; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.Name = ( this.Name == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.Name); + @ref.Semantic = ( this.Semantic == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.Semantic); + @ref.Flags = this.Flags; + @ref.AnnotationCount = this.AnnotationCount; + @ref.BufferOffset = this.BufferOffset; + @ref.ExplicitBindPoint = this.ExplicitBindPoint; + + } + } + + /// + ///

Defines font attributes.

+ ///
+ /// + ///

The compiler setting also determines the structure type. If Unicode is defined, the structure type resolves to a ; otherwise the structure type resolves to a D3DX10_FONT_DESCA.

Possible values of the above members are given in the GDI structure.

+ ///
+ /// + /// bb172693 + /// D3DX10_FONT_DESCW + /// D3DX10_FONT_DESCW + public partial struct FontDescription { + + /// + ///

Height, in logical units, of the font's character cell or character.

+ ///
+ /// + /// bb172693 + /// int Height + /// int Height + public int Height; + + /// + ///

Width, in logical units, of characters in the font.

+ ///
+ /// + /// bb172693 + /// unsigned int Width + /// unsigned int Width + public int Width; + + /// + ///

Weight of the font in the range from 0 through 1000.

+ ///
+ /// + /// bb172693 + /// D3DX10_FONT_WEIGHT Weight + /// D3DX10_FONT_WEIGHT Weight + public SharpDX.Direct3D10.FontWeight Weight; + + /// + ///

Number of mipmap levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created. If the value is 1, the texture space is mapped identically to the screen space.

+ ///
+ /// + /// bb172693 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + ///

Set to TRUE for an Italic font.

+ ///
+ /// + /// bb172693 + /// BOOL Italic + /// BOOL Italic + public SharpDX.Mathematics.Interop.RawBool Italic; + + /// + ///

Character set.

+ ///
+ /// + /// bb172693 + /// D3DX10_FONT_CHARSET CharSet + /// D3DX10_FONT_CHARSET CharSet + public SharpDX.Direct3D10.FontCharacterSet CharacterSet; + + /// + ///

Output precision. The output precision defines how closely the output must match the requested font height, width, character orientation, escapement, pitch, and font type.

+ ///
+ /// + /// bb172693 + /// D3DX10_FONT_PRECISION OutputPrecision + /// D3DX10_FONT_PRECISION OutputPrecision + public SharpDX.Direct3D10.FontPrecision OutputPrecision; + + /// + ///

Output quality.

+ ///
+ /// + /// bb172693 + /// D3DX10_FONT_QUALITY Quality + /// D3DX10_FONT_QUALITY Quality + public SharpDX.Direct3D10.FontQuality Quality; + + /// + ///

Pitch and family of the font.

+ ///
+ /// + /// bb172693 + /// D3DX10_FONT_PITCHFAMILY PitchAndFamily + /// D3DX10_FONT_PITCHFAMILY PitchAndFamily + public SharpDX.Direct3D10.FontPitchAndFamily PitchAndFamily; + + /// + ///

A null-terminated string that specifies the typeface name of the font. The length of the string must not exceed 32 characters, including the terminating null character. If FaceName is an empty string, the first font that matches the other specified attributes will be used. If the compiler settings require Unicode, the data type TCHAR resolves to WCHAR; otherwise, the data type resolves to CHAR. See Remarks.

+ ///
+ /// + /// bb172693 + /// wchar_t FaceName[32] + /// wchar_t FaceName + public string FaceName; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public int Height; + public int Width; + public SharpDX.Direct3D10.FontWeight Weight; + public int MipLevels; + public SharpDX.Mathematics.Interop.RawBool Italic; + public SharpDX.Direct3D10.FontCharacterSet CharacterSet; + public SharpDX.Direct3D10.FontPrecision OutputPrecision; + public SharpDX.Direct3D10.FontQuality Quality; + public SharpDX.Direct3D10.FontPitchAndFamily PitchAndFamily; + public char FaceName; + char __FaceName1; + char __FaceName2; + char __FaceName3; + char __FaceName4; + char __FaceName5; + char __FaceName6; + char __FaceName7; + char __FaceName8; + char __FaceName9; + char __FaceName10; + char __FaceName11; + char __FaceName12; + char __FaceName13; + char __FaceName14; + char __FaceName15; + char __FaceName16; + char __FaceName17; + char __FaceName18; + char __FaceName19; + char __FaceName20; + char __FaceName21; + char __FaceName22; + char __FaceName23; + char __FaceName24; + char __FaceName25; + char __FaceName26; + char __FaceName27; + char __FaceName28; + char __FaceName29; + char __FaceName30; + char __FaceName31; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Height = @ref.Height; + this.Width = @ref.Width; + this.Weight = @ref.Weight; + this.MipLevels = @ref.MipLevels; + this.Italic = @ref.Italic; + this.CharacterSet = @ref.CharacterSet; + this.OutputPrecision = @ref.OutputPrecision; + this.Quality = @ref.Quality; + this.PitchAndFamily = @ref.PitchAndFamily; + fixed (char* __ptr = &@ref.FaceName) this.FaceName = SharpDX.Utilities.PtrToStringUni((IntPtr)__ptr, 32); + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.Height = this.Height; + @ref.Width = this.Width; + @ref.Weight = this.Weight; + @ref.MipLevels = this.MipLevels; + @ref.Italic = this.Italic; + @ref.CharacterSet = this.CharacterSet; + @ref.OutputPrecision = this.OutputPrecision; + @ref.Quality = this.Quality; + @ref.PitchAndFamily = this.PitchAndFamily; + fixed (char* __psrc = this.FaceName) fixed (char* __ptr = &@ref.FaceName) Utilities.CopyMemory((IntPtr)__ptr, (IntPtr)__psrc, FaceName.Length * 2); + + } + } + + /// + ///

Returns a description of the original contents of an image file.

+ ///
+ /// + /// bb172695 + /// D3DX10_IMAGE_INFO + /// D3DX10_IMAGE_INFO + [StructLayout(LayoutKind.Sequential)] + public partial struct ImageInformation { + + /// + ///

Width of original image in pixels.

+ ///
+ /// + /// bb172695 + /// unsigned int Width + /// unsigned int Width + public int Width; + + /// + ///

Height of original image in pixels.

+ ///
+ /// + /// bb172695 + /// unsigned int Height + /// unsigned int Height + public int Height; + + /// + ///

Depth of original image in pixels.

+ ///
+ /// + /// bb172695 + /// unsigned int Depth + /// unsigned int Depth + public int Depth; + + /// + ///

Size of the texture array. ArraySize will be 1 for a single image.

+ ///
+ /// + /// bb172695 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + + /// + ///

Number of mipmap levels in original image.

+ ///
+ /// + /// bb172695 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + ///

Miscellaneous resource properties (see ).

+ ///
+ /// + /// bb172695 + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.ResourceOptionFlags OptionFlags; + + /// + ///

A value from the enumerated type that most closely describes the data in the original image.

+ ///
+ /// + /// bb172695 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + public SharpDX.DXGI.Format Format; + + /// + ///

Represents the type of the texture stored in the file. See .

+ ///
+ /// + /// bb172695 + /// D3D10_RESOURCE_DIMENSION ResourceDimension + /// D3D10_RESOURCE_DIMENSION ResourceDimension + public SharpDX.Direct3D10.ResourceDimension ResourceDimension; + + /// + ///

Represents the format of the image file. See .

+ ///
+ /// + /// bb172695 + /// D3DX10_IMAGE_FILE_FORMAT ImageFileFormat + /// D3DX10_IMAGE_FILE_FORMAT ImageFileFormat + public SharpDX.Direct3D10.ImageFileFormat ImageFileFormat; + } + + /// + ///

Optionally provide information to texture loader APIs to control how textures get loaded. A value of D3DX10_DEFAULT for any of these parameters will cause D3DX to automatically use the value from the source file.

+ ///
+ /// + ///

When initializing the structure, you may set any member to D3DX10_DEFAULT and D3DX will initialize it with a default value from the source texture when the texture is loaded.

This structure can be used by APIs that:

  • Create resources, such as and .
  • Create data processors, such as D3DX10CreateAsyncTextureInfoProcessor or + /// D3DX10CreateAsyncShaderResourceViewProcessor.
+ ///
+ /// + /// bb172696 + /// D3DX10_IMAGE_LOAD_INFO + /// D3DX10_IMAGE_LOAD_INFO + [StructLayout(LayoutKind.Sequential)] + public partial struct ImageLoadInformation { + + /// + ///

The target width of the texture. If the actual width of the texture is larger or smaller than this value then the texture will be scaled up or down to fit this target width.

+ ///
+ /// + /// bb172696 + /// unsigned int Width + /// unsigned int Width + public int Width; + + /// + ///

The target height of the texture. If the actual height of the texture is larger or smaller than this value then the texture will be scaled up or down to fit this target height.

+ ///
+ /// + /// bb172696 + /// unsigned int Height + /// unsigned int Height + public int Height; + + /// + ///

The depth of the texture. This only applies to volume textures.

+ ///
+ /// + /// bb172696 + /// unsigned int Depth + /// unsigned int Depth + public int Depth; + + /// + ///

The highest resolution mipmap level of the texture. If this is greater than 0, then after the texture is loaded FirstMipLevel will be mapped to mipmap level 0.

+ ///
+ /// + /// bb172696 + /// unsigned int FirstMipLevel + /// unsigned int FirstMipLevel + public int FirstMipLevel; + + /// + ///

The maximum number of mipmap levels that the texture will have. Using 0 or D3DX10_DEFAULT will cause a full mipmap chain to be created.

+ ///
+ /// + /// bb172696 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + ///

The way the texture resource is intended to be used. See .

+ ///
+ /// + /// bb172696 + /// D3D10_USAGE Usage + /// D3D10_USAGE Usage + public SharpDX.Direct3D10.ResourceUsage Usage; + + /// + ///

The pipeline stages that the texture will be allowed to bind to. See .

+ ///
+ /// + /// bb172696 + /// D3D10_BIND_FLAG BindFlags + /// D3D10_BIND_FLAG BindFlags + public SharpDX.Direct3D10.BindFlags BindFlags; + + /// + ///

The access permissions the cpu will have for the texture resource. See .

+ ///
+ /// + /// bb172696 + /// D3D10_CPU_ACCESS_FLAG CpuAccessFlags + /// D3D10_CPU_ACCESS_FLAG CpuAccessFlags + public SharpDX.Direct3D10.CpuAccessFlags CpuAccessFlags; + + /// + ///

Miscellaneous resource properties (see ).

+ ///
+ /// + /// bb172696 + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.ResourceOptionFlags OptionFlags; + + /// + ///

The format the texture will be in after it is loaded. See .

+ ///
+ /// + /// bb172696 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + public SharpDX.DXGI.Format Format; + + /// + ///

Filter the texture using the specified filter (only when resampling). See .

+ ///
+ /// + /// bb172696 + /// D3DX10_FILTER_FLAG Filter + /// D3DX10_FILTER_FLAG Filter + public SharpDX.Direct3D10.FilterFlags Filter; + + /// + ///

Filter the texture mip levels using the specified filter (only if generating mipmaps). Valid values are , , , or . See .

+ ///
+ /// + /// bb172696 + /// D3DX10_FILTER_FLAG MipFilter + /// D3DX10_FILTER_FLAG MipFilter + public SharpDX.Direct3D10.FilterFlags MipFilter; + + /// + ///

Information about the original image. See . Can be obtained with , , or .

+ ///
+ /// + /// bb172696 + /// D3DX10_IMAGE_INFO* pSrcInfo + /// D3DX10_IMAGE_INFO pSrcInfo + public System.IntPtr PSrcInfo; + } + + /// + ///

Allow or deny certain types of messages to pass through a filter.

+ ///
+ /// + ///

is used to define the allow list and deny list in the structure.

+ ///
+ /// + /// bb205314 + /// D3D10_INFO_QUEUE_FILTER + /// D3D10_INFO_QUEUE_FILTER + public partial class InfoQueueFilter { + + /// + ///

Number of message categories to allow or deny.

+ ///
+ /// + /// bb205314 + /// D3D10_INFO_QUEUE_FILTER_DESC AllowList + /// D3D10_INFO_QUEUE_FILTER_DESC AllowList + public SharpDX.Direct3D10.InfoQueueFilterDescription AllowList; + + /// + ///

Array of message categories to allow or deny. Array must have at least NumCategories members (see ).

+ ///
+ /// + /// bb205314 + /// D3D10_INFO_QUEUE_FILTER_DESC DenyList + /// D3D10_INFO_QUEUE_FILTER_DESC DenyList + public SharpDX.Direct3D10.InfoQueueFilterDescription DenyList; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public SharpDX.Direct3D10.InfoQueueFilterDescription.__Native AllowList; + public SharpDX.Direct3D10.InfoQueueFilterDescription.__Native DenyList; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + this.AllowList.__MarshalFree(); + this.DenyList.__MarshalFree(); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.AllowList = new SharpDX.Direct3D10.InfoQueueFilterDescription(); + this.AllowList.__MarshalFrom(ref @ref.AllowList); + this.DenyList = new SharpDX.Direct3D10.InfoQueueFilterDescription(); + this.DenyList.__MarshalFrom(ref @ref.DenyList); + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.AllowList = new SharpDX.Direct3D10.InfoQueueFilterDescription.__Native(); + + if (this.AllowList != null) + this.AllowList.__MarshalTo(ref @ref.AllowList); + @ref.DenyList = new SharpDX.Direct3D10.InfoQueueFilterDescription.__Native(); + + if (this.DenyList != null) + this.DenyList.__MarshalTo(ref @ref.DenyList); + + } + } + + /// + ///

Allow or deny certain types of messages to pass through a filter.

+ ///
+ /// + ///

is used to define the allow list and deny list in the structure.

+ ///
+ /// + /// bb205314 + /// D3D10_INFO_QUEUE_FILTER_DESC + /// D3D10_INFO_QUEUE_FILTER_DESC + public partial class InfoQueueFilterDescription { + + /// + ///

Number of message categories to allow or deny.

+ ///
+ /// + /// bb205314 + /// unsigned int NumCategories + /// unsigned int NumCategories + internal int CategorieCount; + + /// + ///

Array of message categories to allow or deny. Array must have at least NumCategories members (see ).

+ ///
+ /// + /// bb205314 + /// D3D10_MESSAGE_CATEGORY* pCategoryList + /// D3D10_MESSAGE_CATEGORY pCategoryList + internal System.IntPtr PCategoryList; + + /// + ///

Number of message severity levels to allow or deny.

+ ///
+ /// + /// bb205314 + /// unsigned int NumSeverities + /// unsigned int NumSeverities + internal int SeveritieCount; + + /// + ///

Array of message severity levels to allow or deny. Array must have at least NumSeverities members (see ).

+ ///
+ /// + /// bb205314 + /// D3D10_MESSAGE_SEVERITY* pSeverityList + /// D3D10_MESSAGE_SEVERITY pSeverityList + internal System.IntPtr PSeverityList; + + /// + ///

Number of message IDs to allow or deny.

+ ///
+ /// + /// bb205314 + /// unsigned int NumIDs + /// unsigned int NumIDs + internal int IDCount; + + /// + ///

Array of message IDs to allow or deny. Array must have at least NumIDs members (see ).

+ ///
+ /// + /// bb205314 + /// D3D10_MESSAGE_ID* pIDList + /// D3D10_MESSAGE_ID pIDList + internal System.IntPtr PIDList; + } + + /// + ///

A description of a single element for the input-assembler stage.

+ ///
+ /// + ///

An input-layout object contains an array of structures, each structure defines one element being read from an input slot. Create an input-layout object by calling . For an example, see Create an input-layout object.

+ ///
+ /// + /// bb205316 + /// D3D10_INPUT_ELEMENT_DESC + /// D3D10_INPUT_ELEMENT_DESC + public partial struct InputElement { + + /// + /// No documentation. + /// + /// + /// bb205316 + /// const char* SemanticName + /// char SemanticName + public string SemanticName; + + /// + /// No documentation. + /// + /// + /// bb205316 + /// unsigned int SemanticIndex + /// unsigned int SemanticIndex + public int SemanticIndex; + + /// + /// No documentation. + /// + /// + /// bb205316 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + public SharpDX.DXGI.Format Format; + + /// + /// No documentation. + /// + /// + /// bb205316 + /// unsigned int InputSlot + /// unsigned int InputSlot + public int Slot; + + /// + /// No documentation. + /// + /// + /// bb205316 + /// unsigned int AlignedByteOffset + /// unsigned int AlignedByteOffset + public int AlignedByteOffset; + + /// + /// No documentation. + /// + /// + /// bb205316 + /// D3D10_INPUT_CLASSIFICATION InputSlotClass + /// D3D10_INPUT_CLASSIFICATION InputSlotClass + public SharpDX.Direct3D10.InputClassification Classification; + + /// + /// No documentation. + /// + /// + /// bb205316 + /// unsigned int InstanceDataStepRate + /// unsigned int InstanceDataStepRate + public int InstanceDataStepRate; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr SemanticName; + public int SemanticIndex; + public SharpDX.DXGI.Format Format; + public int Slot; + public int AlignedByteOffset; + public SharpDX.Direct3D10.InputClassification Classification; + public int InstanceDataStepRate; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.SemanticName != IntPtr.Zero) + Marshal.FreeHGlobal(this.SemanticName); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.SemanticName = ( @ref.SemanticName == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.SemanticName); + this.SemanticIndex = @ref.SemanticIndex; + this.Format = @ref.Format; + this.Slot = @ref.Slot; + this.AlignedByteOffset = @ref.AlignedByteOffset; + this.Classification = @ref.Classification; + this.InstanceDataStepRate = @ref.InstanceDataStepRate; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.SemanticName = ( this.SemanticName == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.SemanticName); + @ref.SemanticIndex = this.SemanticIndex; + @ref.Format = this.Format; + @ref.Slot = this.Slot; + @ref.AlignedByteOffset = this.AlignedByteOffset; + @ref.Classification = this.Classification; + @ref.InstanceDataStepRate = this.InstanceDataStepRate; + + } + } + + /// + ///

Stores an attribute table entry.

+ ///
+ /// + ///

An attribute table is used to identify areas of the mesh that need to be drawn with different textures, render states, materials, and so on. In addition, the application can use the attribute table to hide portions of a mesh by not drawing a given attribute identifier (AttribId) when drawing the frame.

The LPD3DX_ATTRIBUTE_RANGE type is defined as a reference to the D3DX_ATTRIBUTE_RANGE structure.

 typedef D3DX_ATTRIBUTE_RANGE* LPD3DX_ATTRIBUTE_RANGE;	
+    /// 
+ ///
+ /// + /// bb172688 + /// D3DX10_ATTRIBUTE_RANGE + /// D3DX10_ATTRIBUTE_RANGE + [StructLayout(LayoutKind.Sequential)] + public partial struct MeshAttributeRange { + + /// + ///

Attribute table identifier.

+ ///
+ /// + /// bb172688 + /// unsigned int AttribId + /// unsigned int AttribId + public int Id; + + /// + ///

Starting face.

+ ///
+ /// + /// bb172688 + /// unsigned int FaceStart + /// unsigned int FaceStart + public int FaceStart; + + /// + ///

Face count.

+ ///
+ /// + /// bb172688 + /// unsigned int FaceCount + /// unsigned int FaceCount + public int FaceCount; + + /// + ///

Starting vertex.

+ ///
+ /// + /// bb172688 + /// unsigned int VertexStart + /// unsigned int VertexStart + public int VertexStart; + + /// + ///

Vertex count.

+ ///
+ /// + /// bb172688 + /// unsigned int VertexCount + /// unsigned int VertexCount + public int VertexCount; + } + + /// + ///

Specifies mesh weight attributes.

+ ///
+ /// + ///

This structure describes how a simplification operation will consider vertex data when calculating relative costs between collapsing edges. For example, if the Normal field is 0.0, the simplification operation will ignore the vertex normal component when calculating the error for the collapse. However, if the Normal field is 1.0, the simplification operation will use the vertex normal component. If the Normal field is 2.0, double the amount of errors; if the Normal field is 4.0, then quadruple the number of errors, and so on.

The LPD3DX_ATTRIBUTE_WEIGHTS type is defined as a reference to the D3DX_ATTRIBUTE_WEIGHTS structure.

 typedef D3DX_ATTRIBUTE_WEIGHTS* LPD3DX_ATTRIBUTE_WEIGHTS;	
+    /// 
+ ///
+ /// + /// bb172689 + /// D3DX10_ATTRIBUTE_WEIGHTS + /// D3DX10_ATTRIBUTE_WEIGHTS + public partial struct MeshAttributeWeights { + + /// + ///

Position.

+ ///
+ /// + /// bb172689 + /// float Position + /// float Position + public float Position; + + /// + ///

Blend weight.

+ ///
+ /// + /// bb172689 + /// float Boundary + /// float Boundary + public float Boundary; + + /// + ///

Normal.

+ ///
+ /// + /// bb172689 + /// float Normal + /// float Normal + public float Normal; + + /// + ///

Diffuse lighting value.

+ ///
+ /// + /// bb172689 + /// float Diffuse + /// float Diffuse + public float Diffuse; + + /// + ///

Specular lighting value.

+ ///
+ /// + /// bb172689 + /// float Specular + /// float Specular + public float Specular; + + /// + ///

Eight texture coordinates.

+ ///
+ /// + /// bb172689 + /// float Texcoord[8] + /// float Texcoord + public float[] Texcoord { + get { return _Texcoord ?? (_Texcoord = new float[8]);} + } + internal float[] _Texcoord; + + /// + ///

Tangent.

+ ///
+ /// + /// bb172689 + /// float Tangent + /// float Tangent + public float Tangent; + + /// + ///

Binormal.

+ ///
+ /// + /// bb172689 + /// float Binormal + /// float Binormal + public float Binormal; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public float Position; + public float Boundary; + public float Normal; + public float Diffuse; + public float Specular; + public float Texcoord; + float __Texcoord1; + float __Texcoord2; + float __Texcoord3; + float __Texcoord4; + float __Texcoord5; + float __Texcoord6; + float __Texcoord7; + public float Tangent; + public float Binormal; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Position = @ref.Position; + this.Boundary = @ref.Boundary; + this.Normal = @ref.Normal; + this.Diffuse = @ref.Diffuse; + this.Specular = @ref.Specular; + fixed (void* __to = &this.Texcoord[0]) fixed (void* __from = &@ref.Texcoord) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 8*sizeof ( float)); + this.Tangent = @ref.Tangent; + this.Binormal = @ref.Binormal; + } + } + + /// + ///

Categories of debug messages. This will identify the category of a message when retrieving a message with and when adding a message with . When creating an info queue filter, these values can be used to allow or deny any categories of messages to pass through the storage and retrieval filters.

+ ///
+ /// + ///

This is part of the Information Queue feature. See Interface.

+ ///
+ /// + /// bb205323 + /// D3D10_MESSAGE + /// D3D10_MESSAGE + public partial struct Message { + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_CATEGORY Category + /// D3D10_MESSAGE_CATEGORY Category + public SharpDX.Direct3D10.MessageCategory Category; + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_SEVERITY Severity + /// D3D10_MESSAGE_SEVERITY Severity + public SharpDX.Direct3D10.MessageSeverity Severity; + + /// + /// No documentation. + /// + /// + /// bb205323 + /// D3D10_MESSAGE_ID ID + /// D3D10_MESSAGE_ID ID + public SharpDX.Direct3D10.MessageId Id; + + /// + /// No documentation. + /// + /// + /// bb205323 + /// const char* pDescription + /// char pDescription + public string Description; + + /// + /// No documentation. + /// + /// + /// bb205323 + /// SIZE_T DescriptionByteLength + /// SIZE_T DescriptionByteLength + internal SharpDX.PointerSize DescriptionByteLength; + } + + /// + ///

Query information about graphics-pipeline activity in between calls to and .

+ ///
+ /// + /// bb172402 + /// D3D10_QUERY_DATA_PIPELINE_STATISTICS + /// D3D10_QUERY_DATA_PIPELINE_STATISTICS + [StructLayout(LayoutKind.Sequential)] + public partial struct QueryDataPipelineStatistics { + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong IAVertices + /// unsigned longlong IAVertices + public long IAVerticeCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong IAPrimitives + /// unsigned longlong IAPrimitives + public long IAPrimitiveCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong VSInvocations + /// unsigned longlong VSInvocations + public long VSInvocationCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong GSInvocations + /// unsigned longlong GSInvocations + public long GSInvocationCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong GSPrimitives + /// unsigned longlong GSPrimitives + public long GSPrimitiveCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong CInvocations + /// unsigned longlong CInvocations + public long CInvocationCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong CPrimitives + /// unsigned longlong CPrimitives + public long CPrimitiveCount; + + /// + /// No documentation. + /// + /// + /// bb172402 + /// unsigned longlong PSInvocations + /// unsigned longlong PSInvocations + public long PSInvocationCount; + } + + /// + ///

Query information about the reliability of a timestamp query.

+ ///
+ /// + ///

For a list of query types see .

+ ///
+ /// + /// bb172404 + /// D3D10_QUERY_DATA_TIMESTAMP_DISJOINT + /// D3D10_QUERY_DATA_TIMESTAMP_DISJOINT + [StructLayout(LayoutKind.Sequential)] + public partial struct QueryDataTimestampDisjoint { + + /// + ///

How frequently the GPU counter increments in Hz.

+ ///
+ /// + /// bb172404 + /// unsigned longlong Frequency + /// unsigned longlong Frequency + public long Frequency; + + /// + ///

If this is TRUE, something occurred in between the query's and calls that caused the timestamp counter to become discontinuous or disjoint, such as unplugging the AC chord on a laptop, overheating, or throttling up/down due to laptop savings events. The timestamp returned by for a timestamp query is only reliable if Disjoint is .

+ ///
+ /// + /// bb172404 + /// BOOL Disjoint + /// BOOL Disjoint + public SharpDX.Mathematics.Interop.RawBool Disjoint; + } + + /// + ///

Describes a query.

+ ///
+ /// + /// bb172405 + /// D3D10_QUERY_DESC + /// D3D10_QUERY_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct QueryDescription { + + /// + ///

Type of query (see ).

+ ///
+ /// + /// bb172405 + /// D3D10_QUERY Query + /// D3D10_QUERY Query + public SharpDX.Direct3D10.QueryType Type; + + /// + ///

Miscellaneous flags (see ).

+ ///
+ /// + /// bb172405 + /// D3D10_QUERY_MISC_FLAG MiscFlags + /// D3D10_QUERY_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.QueryFlags Flags; + } + + /// + ///

Describes the rasterizer state.

+ ///
+ /// + ///

Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call . To set rasterizer state, call .

Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to , the runtime renders all points, lines, and triangles without anti-aliasing even for render targets with a sample count greater than 1. For feature level 10.1, the setting of MultisampleEnable has no effect on points and triangles with regard to MSAA and impacts only the selection of the line-rendering algorithm as shown in this table:

Line-rendering algorithmMultisampleEnableAntialiasedLineEnable
Aliased
Alpha antialiasedTRUE
QuadrilateralTRUE
QuadrilateralTRUETRUE

?

The settings of the MultisampleEnable and AntialiasedLineEnable members apply only to multisample antialiasing (MSAA) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set MultisampleEnable to TRUE whenever you render on MSAA render targets.

+ ///
+ /// + /// bb172408 + /// D3D10_RASTERIZER_DESC + /// D3D10_RASTERIZER_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct RasterizerStateDescription { + + /// + ///

A member of the enumerated type that determines the fill mode to use when rendering. The default value is .

+ ///
+ /// + /// bb172408 + /// D3D10_FILL_MODE FillMode + /// D3D10_FILL_MODE FillMode + public SharpDX.Direct3D10.FillMode FillMode; + + /// + ///

A member of the enumerated type that indicates whether triangles facing the specified direction are drawn. The default value is .

+ ///
+ /// + /// bb172408 + /// D3D10_CULL_MODE CullMode + /// D3D10_CULL_MODE CullMode + public SharpDX.Direct3D10.CullMode CullMode; + + /// + ///

Determines if a triangle is front-facing or back-facing. If this parameter is TRUE, then a triangle is considered front-facing if its vertices are counter-clockwise on the render target, and considered back-facing if they are clockwise. If this parameter is , then the opposite is true. The default value is .

+ ///
+ /// + /// bb172408 + /// BOOL FrontCounterClockwise + /// BOOL FrontCounterClockwise + public SharpDX.Mathematics.Interop.RawBool IsFrontCounterClockwise; + + /// + ///

Specifies the depth value added to a given pixel. The default value is 0. For info about depth bias, see Depth Bias.

+ ///
+ /// + /// bb172408 + /// int DepthBias + /// int DepthBias + public int DepthBias; + + /// + ///

Specifies the maximum depth bias of a pixel. The default value is 0.0f. For info about depth bias, see Depth Bias.

+ ///
+ /// + /// bb172408 + /// float DepthBiasClamp + /// float DepthBiasClamp + public float DepthBiasClamp; + + /// + ///

Specifies a scalar on a given pixel's slope. The default value is 0.0f. For info about depth bias, see Depth Bias.

+ ///
+ /// + /// bb172408 + /// float SlopeScaledDepthBias + /// float SlopeScaledDepthBias + public float SlopeScaledDepthBias; + + /// + ///

Enables or disables clipping based on distance. The default value is TRUE.

The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default value, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). + ///

0 < w + /// -w <= x <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) + /// -w <= y <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) + /// 0 <= z <= w + ///

When you set DepthClipEnable to , the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 < w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane. + ///

+ ///
+ /// + /// bb172408 + /// BOOL DepthClipEnable + /// BOOL DepthClipEnable + public SharpDX.Mathematics.Interop.RawBool IsDepthClipEnabled; + + /// + ///

Enable or disables scissor-rectangle culling. All pixels outside an active scissor rectangle are culled. The default value is . For more information, see Set the Scissor Rectangle.

+ ///
+ /// + /// bb172408 + /// BOOL ScissorEnable + /// BOOL ScissorEnable + public SharpDX.Mathematics.Interop.RawBool IsScissorEnabled; + + /// + ///

Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. The default value is . Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to to use the alpha line anti-aliasing algorithm. For more info about this member, see Remarks.

+ ///
+ /// + /// bb172408 + /// BOOL MultisampleEnable + /// BOOL MultisampleEnable + public SharpDX.Mathematics.Interop.RawBool IsMultisampleEnabled; + + /// + ///

Specifies whether to enable line antialiasing; only applies when alpha blending is enabled, you are drawing lines, and the MultisampleEnable member is . The default value is . For more info about this member, see Remarks.

+ ///
+ /// + /// bb172408 + /// BOOL AntialiasedLineEnable + /// BOOL AntialiasedLineEnable + public SharpDX.Mathematics.Interop.RawBool IsAntialiasedLineEnabled; + } + + /// + ///

Describes the blend state for a render target for a Direct3D 10.1 device

+ ///
+ /// + ///

To see how blending is done, see Output-Merger Stage (Direct3D 10).

These are the default values for blend state.

StateDefault Value
BlendEnable
SrcBlend
DestBlend
BlendOp
SrcBlendAlpha
DestBlendAlpha
BlendOpAlpha
RenderTargetWriteMask

?

+ ///
+ /// + /// bb694533 + /// D3D10_RENDER_TARGET_BLEND_DESC1 + /// D3D10_RENDER_TARGET_BLEND_DESC1 + [StructLayout(LayoutKind.Sequential)] + public partial struct RenderTargetBlendDescription1 { + + /// + ///

Enable (or disable) blending.

+ ///
+ /// + /// bb694533 + /// BOOL BlendEnable + /// BOOL BlendEnable + public SharpDX.Mathematics.Interop.RawBool IsBlendEnabled; + + /// + ///

This blend option specifies the first RGB data source and includes an optional pre-blend operation.

+ ///
+ /// + /// bb694533 + /// D3D10_BLEND SrcBlend + /// D3D10_BLEND SrcBlend + public SharpDX.Direct3D10.BlendOption SourceBlend; + + /// + ///

This blend option specifies the second RGB data source and includes an optional pre-blend operation.

+ ///
+ /// + /// bb694533 + /// D3D10_BLEND DestBlend + /// D3D10_BLEND DestBlend + public SharpDX.Direct3D10.BlendOption DestinationBlend; + + /// + ///

This blend operation defines how to combine the RGB data sources.

+ ///
+ /// + /// bb694533 + /// D3D10_BLEND_OP BlendOp + /// D3D10_BLEND_OP BlendOp + public SharpDX.Direct3D10.BlendOperation BlendOperation; + + /// + ///

This blend option specifies the first alpha data source and includes an optional pre-blend operation. Blend options that end in _COLOR are not allowed.

+ ///
+ /// + /// bb694533 + /// D3D10_BLEND SrcBlendAlpha + /// D3D10_BLEND SrcBlendAlpha + public SharpDX.Direct3D10.BlendOption SourceAlphaBlend; + + /// + ///

This blend option specifies the second alpha data source and includes an optional pre-blend operation. Blend options that end in _COLOR are not allowed.

+ ///
+ /// + /// bb694533 + /// D3D10_BLEND DestBlendAlpha + /// D3D10_BLEND DestBlendAlpha + public SharpDX.Direct3D10.BlendOption DestinationAlphaBlend; + + /// + ///

This blend operation defines how to combine the alpha data sources.

+ ///
+ /// + /// bb694533 + /// D3D10_BLEND_OP BlendOpAlpha + /// D3D10_BLEND_OP BlendOpAlpha + public SharpDX.Direct3D10.BlendOperation AlphaBlendOperation; + + /// + ///

A write mask.

+ ///
+ /// + /// bb694533 + /// D3D10_COLOR_WRITE_ENABLE RenderTargetWriteMask + /// D3D10_COLOR_WRITE_ENABLE RenderTargetWriteMask + public SharpDX.Direct3D10.ColorWriteMaskFlags RenderTargetWriteMask; + } + + /// + ///

Specifies the subresource(s) from a resource that are accessible using a render-target view.

+ ///
+ /// + ///

A render-target-view description is passed into to create a render target.

A render-target-view cannot use the following formats:

  • Any typeless format.
  • if the view will be used to bind a buffer (vertex, index, constant, or stream-output).

If the format is set to , then the format of the resource that the view binds to the pipeline will be used.

+ ///
+ /// + /// bb172410 + /// D3D10_RENDER_TARGET_VIEW_DESC + /// D3D10_RENDER_TARGET_VIEW_DESC + [StructLayout(LayoutKind.Explicit)] + public partial struct RenderTargetViewDescription { + + /// + ///

Specifies the subresource(s) from a 3D texture to use in a render-target view.

+ ///
+ /// + ///

This structure is one member of a render target view. See .

+ ///
+ /// + /// bb172476 + /// D3D10_TEX3D_RTV + /// D3D10_TEX3D_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture3DResource { + + /// + /// No documentation. + /// + /// + /// bb172476 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + + /// + /// No documentation. + /// + /// + /// bb172476 + /// unsigned int FirstWSlice + /// unsigned int FirstWSlice + public int FirstDepthSlice; + + /// + /// No documentation. + /// + /// + /// bb172476 + /// unsigned int WSize + /// unsigned int WSize + public int DepthSliceCount; + } + + /// + ///

Specifies the subresource(s) from an array of 2D textures to use in a render-target view.

+ ///
+ /// + ///

This structure is one member of a render-target-view description (see ).

+ ///
+ /// + /// bb172471 + /// D3D10_TEX2D_ARRAY_RTV + /// D3D10_TEX2D_ARRAY_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172471 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + + /// + /// No documentation. + /// + /// + /// bb172471 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172471 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource(s) from a an array of multisampled 2D textures to use in a render-target view.

+ ///
+ /// + ///

This structure is one member of a render-target-view description (see ).

+ ///
+ /// + /// bb172465 + /// D3D10_TEX2DMS_ARRAY_RTV + /// D3D10_TEX2DMS_ARRAY_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DMultisampledArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172465 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172465 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the elements from a buffer resource to use in a render-target view.

+ ///
+ /// + ///

A render-target view is a member of a render-target-view description (see ). Create a render-target view by calling .

+ ///
+ /// + /// bb204897 + /// D3D10_BUFFER_RTV + /// D3D10_BUFFER_RTV + [StructLayout(LayoutKind.Explicit)] + public partial struct BufferResource { + + /// + /// No documentation. + /// + /// + /// bb204897 + /// unsigned int FirstElement + /// unsigned int FirstElement + [FieldOffset(0)] + public int FirstElement; + + /// + /// No documentation. + /// + /// + /// bb204897 + /// unsigned int ElementOffset + /// unsigned int ElementOffset + [FieldOffset(0)] + public int ElementOffset; + + /// + /// No documentation. + /// + /// + /// bb204897 + /// unsigned int NumElements + /// unsigned int NumElements + [FieldOffset(4)] + public int ElementCount; + + /// + /// No documentation. + /// + /// + /// bb204897 + /// unsigned int ElementWidth + /// unsigned int ElementWidth + [FieldOffset(4)] + public int ElementWidth; + } + + /// + ///

Specifies the subresource from a 1D texture to use in a render-target view.

+ ///
+ /// + ///

This structure is one member of a render-target-view description (see ).

+ ///
+ /// + /// bb172462 + /// D3D10_TEX1D_RTV + /// D3D10_TEX1D_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DResource { + + /// + /// No documentation. + /// + /// + /// bb172462 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + } + + /// + ///

Specifies the subresource(s) from an array of 1D textures to use in a render-target view.

+ ///
+ /// + ///

This structure is one member of a render-target-view description (see ).

+ ///
+ /// + /// bb172459 + /// D3D10_TEX1D_ARRAY_RTV + /// D3D10_TEX1D_ARRAY_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172459 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + + /// + /// No documentation. + /// + /// + /// bb172459 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172459 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource from a 2D texture to use in a render-target view.

+ ///
+ /// + ///

This structure is one member of a render-target-view description (see ).

+ ///
+ /// + /// bb172474 + /// D3D10_TEX2D_RTV + /// D3D10_TEX2D_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DResource { + + /// + /// No documentation. + /// + /// + /// bb172474 + /// unsigned int MipSlice + /// unsigned int MipSlice + public int MipSlice; + } + + /// + ///

Specifies the subresource from a multisampled 2D texture to use in a render-target view.

+ ///
+ /// + ///

Since a multisampled 2D texture contains a single subresource, there is actually nothing to specify in . Consequently, UnusedField_NothingToDefine is included so that this structure will compile in C.

+ ///
+ /// + /// bb172468 + /// D3D10_TEX2DMS_RTV + /// D3D10_TEX2DMS_RTV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DMultisampledResource { + + /// + /// No documentation. + /// + /// + /// bb172468 + /// unsigned int UnusedField_NothingToDefine + /// unsigned int UnusedField_NothingToDefine + public int UnusedFieldNothingToDefine; + } + + /// + /// No documentation. + /// + /// + /// bb172410 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + [FieldOffset(0)] + public SharpDX.DXGI.Format Format; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_RTV_DIMENSION ViewDimension + /// D3D10_RTV_DIMENSION ViewDimension + [FieldOffset(4)] + public SharpDX.Direct3D10.RenderTargetViewDimension Dimension; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_BUFFER_RTV Buffer + /// D3D10_BUFFER_RTV Buffer + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.BufferResource Buffer; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX1D_RTV Texture1D + /// D3D10_TEX1D_RTV Texture1D + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture1DResource Texture1D; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX1D_ARRAY_RTV Texture1DArray + /// D3D10_TEX1D_ARRAY_RTV Texture1DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture1DArrayResource Texture1DArray; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX2D_RTV Texture2D + /// D3D10_TEX2D_RTV Texture2D + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture2DResource Texture2D; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX2D_ARRAY_RTV Texture2DArray + /// D3D10_TEX2D_ARRAY_RTV Texture2DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture2DArrayResource Texture2DArray; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX2DMS_RTV Texture2DMS + /// D3D10_TEX2DMS_RTV Texture2DMS + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture2DMultisampledResource Texture2DMS; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX2DMS_ARRAY_RTV Texture2DMSArray + /// D3D10_TEX2DMS_ARRAY_RTV Texture2DMSArray + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture2DMultisampledArrayResource Texture2DMSArray; + + /// + /// No documentation. + /// + /// + /// bb172410 + /// D3D10_TEX3D_RTV Texture3D + /// D3D10_TEX3D_RTV Texture3D + [FieldOffset(8)] + public SharpDX.Direct3D10.RenderTargetViewDescription.Texture3DResource Texture3D; + } + + /// + ///

Defines a 3D box.

+ ///
+ /// + ///

The following diagram shows a 3D box, where the origin is the left, front, top corner.

+ ///
+ /// + /// bb204895 + /// D3D10_BOX + /// D3D10_BOX + [StructLayout(LayoutKind.Sequential)] + public partial struct ResourceRegion { + + /// + ///

The x position of the left hand side of the box.

+ ///
+ /// + /// bb204895 + /// unsigned int left + /// unsigned int left + public int Left; + + /// + ///

The y position of the top of the box.

+ ///
+ /// + /// bb204895 + /// unsigned int top + /// unsigned int top + public int Top; + + /// + ///

The z position of the front of the box.

+ ///
+ /// + /// bb204895 + /// unsigned int front + /// unsigned int front + public int Front; + + /// + ///

The x position of the right hand side of the box.

+ ///
+ /// + /// bb204895 + /// unsigned int right + /// unsigned int right + public int Right; + + /// + ///

The y position of the bottom of the box.

+ ///
+ /// + /// bb204895 + /// unsigned int bottom + /// unsigned int bottom + public int Bottom; + + /// + ///

The z position of the back of the box.

+ ///
+ /// + /// bb204895 + /// unsigned int back + /// unsigned int back + public int Back; + } + + /// + ///

Describes a sampler state.

+ ///
+ /// + ///

These are the default values for sampler state.

StateDefault Value
FilterMin_Mag_Mip_Point
AddressUClamp
AddressVClamp
AddressWClamp
MinLOD0.0f
MaxLOD3.402823466e+38F (FLT_MAX)
MipMapLODBias0.0f
MaxAnisotropy16
ComparisonFuncNever
BorderColorfloat4(0.0f, 0.0f, 0.0f, 0.0f)
TextureN/A

?

+ ///
+ /// + /// bb172415 + /// D3D10_SAMPLER_DESC + /// D3D10_SAMPLER_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct SamplerStateDescription { + + /// + ///

Filtering method to use when sampling a texture (see ).

+ ///
+ /// + /// bb172415 + /// D3D10_FILTER Filter + /// D3D10_FILTER Filter + public SharpDX.Direct3D10.Filter Filter; + + /// + ///

Method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see ).

+ ///
+ /// + /// bb172415 + /// D3D10_TEXTURE_ADDRESS_MODE AddressU + /// D3D10_TEXTURE_ADDRESS_MODE AddressU + public SharpDX.Direct3D10.TextureAddressMode AddressU; + + /// + ///

Method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

+ ///
+ /// + /// bb172415 + /// D3D10_TEXTURE_ADDRESS_MODE AddressV + /// D3D10_TEXTURE_ADDRESS_MODE AddressV + public SharpDX.Direct3D10.TextureAddressMode AddressV; + + /// + ///

Method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

+ ///
+ /// + /// bb172415 + /// D3D10_TEXTURE_ADDRESS_MODE AddressW + /// D3D10_TEXTURE_ADDRESS_MODE AddressW + public SharpDX.Direct3D10.TextureAddressMode AddressW; + + /// + ///

Offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.

+ ///
+ /// + /// bb172415 + /// float MipLODBias + /// float MipLODBias + public float MipLodBias; + + /// + ///

Clamping value used if or is specified in Filter. Valid values are between 1 and 16.

+ ///
+ /// + /// bb172415 + /// unsigned int MaxAnisotropy + /// unsigned int MaxAnisotropy + public int MaximumAnisotropy; + + /// + ///

A function that compares sampled data against existing sampled data. The function options are listed in .

+ ///
+ /// + /// bb172415 + /// D3D10_COMPARISON_FUNC ComparisonFunc + /// D3D10_COMPARISON_FUNC ComparisonFunc + public SharpDX.Direct3D10.Comparison ComparisonFunction; + + /// + ///

Border color to use if is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.

+ ///
+ /// + /// bb172415 + /// SHARPDX_COLOR4 BorderColor + /// SHARPDX_COLOR4 BorderColor + public SharpDX.Mathematics.Interop.RawColor4 BorderColor; + + /// + ///

Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.

+ ///
+ /// + /// bb172415 + /// float MinLOD + /// float MinLOD + public float MinimumLod; + + /// + ///

Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. To have no upper limit on LOD set this to a large value such as D3D10_FLOAT32_MAX.

+ ///
+ /// + /// bb172415 + /// float MaxLOD + /// float MaxLOD + public float MaximumLod; + } + + /// + ///

Describes a shader constant-buffer.

+ ///
+ /// + ///

Constants are supplied to shaders in a shader-constant buffer. Get the description of a shader-constant-buffer by calling ID3D10ShaderReflectionConstantBuffer::GetDesc.

+ ///
+ /// + /// bb172417 + /// D3D10_SHADER_BUFFER_DESC + /// D3D10_SHADER_BUFFER_DESC + public partial struct ShaderBufferDescription { + + /// + ///

The name of the buffer.

+ ///
+ /// + /// bb172417 + /// const char* Name + /// char Name + public string Name; + + /// + ///

The intended use of the constant data. See D3D10_CBUFFER_TYPE.

+ ///
+ /// + /// bb172417 + /// D3D_CBUFFER_TYPE Type + /// D3D_CBUFFER_TYPE Type + public SharpDX.D3DCompiler.ConstantBufferType Type; + + /// + ///

The number of unique variables.

+ ///
+ /// + /// bb172417 + /// unsigned int Variables + /// unsigned int Variables + public int VariableCount; + + /// + ///

Buffer size (in bytes).

+ ///
+ /// + /// bb172417 + /// unsigned int Size + /// unsigned int Size + public int Size; + + /// + ///

Shader buffer properties. See D3D10_SHADER_CBUFFER_FLAGS.

+ ///
+ /// + /// bb172417 + /// D3D_SHADER_CBUFFER_FLAGS uFlags + /// D3D_SHADER_CBUFFER_FLAGS uFlags + public SharpDX.D3DCompiler.ConstantBufferFlags Flags; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr Name; + public SharpDX.D3DCompiler.ConstantBufferType Type; + public int VariableCount; + public int Size; + public SharpDX.D3DCompiler.ConstantBufferFlags Flags; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.Name != IntPtr.Zero) + Marshal.FreeHGlobal(this.Name); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.Name = ( @ref.Name == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.Name); + this.Type = @ref.Type; + this.VariableCount = @ref.VariableCount; + this.Size = @ref.Size; + this.Flags = @ref.Flags; + } + } + + /// + ///

Describes a shader signature.

+ ///
+ /// + ///

A shader can take n inputs and can produce m outputs. The order of the input (or output) parameters, their associated types, and any attached semantics make up the shader signature. Each shader has an input and an output signature.

When compiling a shader or an effect, some API calls validate shader signatures (such as D3D10CompileShader and ). That is, they compare the output signature of one shader (like a vertex shader) with the input signature of another shader (like a pixel shader). This ensures that a shader outputs data that is compatible with a downstream shader that is consuming that data. Compatible means that a shader signature is a exact-match subset of the preceding shader stage. Exact match means parameter types and semantics must exactly match. Subset means that a parameter that is not required by a downstream stage, does not need to include that parameter in its shader signature.

Get a shader-signature from a shader or an effect by calling APIs such as ID3D10ShaderReflection::GetInputParameterDesc or .

+ ///
+ /// + /// bb172446 + /// D3D10_SIGNATURE_PARAMETER_DESC + /// D3D10_SIGNATURE_PARAMETER_DESC + public partial struct ShaderParameterDescription { + + /// + ///

A per-parameter string that identifies how the data will be used. See Semantics (DirectX HLSL).

+ ///
+ /// + /// bb172446 + /// const char* SemanticName + /// char SemanticName + public string SemanticName; + + /// + ///

Semantic index that modifies the semantic. Used to differentiate different parameters that use the same semantic.

+ ///
+ /// + /// bb172446 + /// unsigned int SemanticIndex + /// unsigned int SemanticIndex + public int SemanticIndex; + + /// + ///

The register that will contain this variable's data.

+ ///
+ /// + /// bb172446 + /// unsigned int Register + /// unsigned int Register + public int Register; + + /// + ///

A predefined string that determines the functionality of certain pipeline stages. See D3D10_NAME.

+ ///
+ /// + /// bb172446 + /// D3D_NAME SystemValueType + /// D3D_NAME SystemValueType + public SharpDX.D3DCompiler.SystemValueType SystemValueType; + + /// + ///

The per-component-data type that is stored in a register. See D3D10_REGISTER_COMPONENT_TYPE. Each register can store up to four-components of data.

+ ///
+ /// + /// bb172446 + /// D3D_REGISTER_COMPONENT_TYPE ComponentType + /// D3D_REGISTER_COMPONENT_TYPE ComponentType + public SharpDX.D3DCompiler.RegisterComponentType ComponentType; + + /// + ///

Mask which indicates which components of a register are used.

+ ///
+ /// + /// bb172446 + /// unsigned char Mask + /// unsigned char Mask + public byte Mask; + + /// + ///

Mask which indicates whether a given component is never written (if the signature is an output signature) or always read (if the signature is an input signature). The mask is a combination of D3D10_REGISTER_COMPONENT_TYPE values.

+ ///
+ /// + /// bb172446 + /// unsigned char ReadWriteMask + /// unsigned char ReadWriteMask + public byte ReadWriteMask; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr SemanticName; + public int SemanticIndex; + public int Register; + public SharpDX.D3DCompiler.SystemValueType SystemValueType; + public SharpDX.D3DCompiler.RegisterComponentType ComponentType; + public byte Mask; + public byte ReadWriteMask; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.SemanticName != IntPtr.Zero) + Marshal.FreeHGlobal(this.SemanticName); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.SemanticName = ( @ref.SemanticName == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.SemanticName); + this.SemanticIndex = @ref.SemanticIndex; + this.Register = @ref.Register; + this.SystemValueType = @ref.SystemValueType; + this.ComponentType = @ref.ComponentType; + this.Mask = @ref.Mask; + this.ReadWriteMask = @ref.ReadWriteMask; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.SemanticName = ( this.SemanticName == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.SemanticName); + @ref.SemanticIndex = this.SemanticIndex; + @ref.Register = this.Register; + @ref.SystemValueType = this.SystemValueType; + @ref.ComponentType = this.ComponentType; + @ref.Mask = this.Mask; + @ref.ReadWriteMask = this.ReadWriteMask; + + } + } + + /// + ///

Describes a shader-resource view.

+ ///
+ /// + ///

A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read. For more information about how views work, see Views

When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a resource can be viewed with one of these typed formats: , , and , since these typed formats are compatible with the typeless resource.

Create a shader-resource-view description by calling . To view a shader-resource-view description, call .

+ ///
+ /// + /// bb172437 + /// D3D10_SHADER_RESOURCE_VIEW_DESC + /// D3D10_SHADER_RESOURCE_VIEW_DESC + [StructLayout(LayoutKind.Explicit)] + public partial struct ShaderResourceViewDescription { + + /// + ///

Specifies the elements in a buffer resource to use in a shader-resource view.

+ ///
+ /// + ///

The structure is a member of the structure, which represents a shader-resource view description. You can create a shader-resource view by calling the method.

+ ///
+ /// + /// bb204898 + /// D3D10_BUFFER_SRV + /// D3D10_BUFFER_SRV + [StructLayout(LayoutKind.Explicit)] + public partial struct BufferResource { + + /// + /// No documentation. + /// + /// + /// bb204898 + /// unsigned int FirstElement + /// unsigned int FirstElement + [FieldOffset(0)] + public int FirstElement; + + /// + /// No documentation. + /// + /// + /// bb204898 + /// unsigned int ElementOffset + /// unsigned int ElementOffset + [FieldOffset(0)] + public int ElementOffset; + + /// + /// No documentation. + /// + /// + /// bb204898 + /// unsigned int NumElements + /// unsigned int NumElements + [FieldOffset(4)] + public int ElementCount; + + /// + /// No documentation. + /// + /// + /// bb204898 + /// unsigned int ElementWidth + /// unsigned int ElementWidth + [FieldOffset(4)] + public int ElementWidth; + } + + /// + ///

Specifies the subresource from a 1D texture to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172463 + /// D3D10_TEX1D_SRV + /// D3D10_TEX1D_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DResource { + + /// + /// No documentation. + /// + /// + /// bb172463 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb172463 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + } + + /// + ///

Specifies the subresource(s) from an array of 1D textures to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172460 + /// D3D10_TEX1D_ARRAY_SRV + /// D3D10_TEX1D_ARRAY_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172460 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb172460 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + /// No documentation. + /// + /// + /// bb172460 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172460 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource from a 2D texture to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172475 + /// D3D10_TEX2D_SRV + /// D3D10_TEX2D_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DResource { + + /// + /// No documentation. + /// + /// + /// bb172475 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb172475 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + } + + /// + ///

Specifies the subresource(s) from an array of 2D textures to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172472 + /// D3D10_TEX2D_ARRAY_SRV + /// D3D10_TEX2D_ARRAY_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172472 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb172472 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + /// No documentation. + /// + /// + /// bb172472 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172472 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource(s) from a multisampled 2D texture to use in a shader-resource view.

+ ///
+ /// + ///

Since a multisampled 2D texture contains a single subresource, there is actually nothing to specify in . Consequently, UnusedField_NothingToDefine is included so that this structure will compile in C.

+ ///
+ /// + /// bb172469 + /// D3D10_TEX2DMS_SRV + /// D3D10_TEX2DMS_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DMultisampledResource { + + /// + /// No documentation. + /// + /// + /// bb172469 + /// unsigned int UnusedField_NothingToDefine + /// unsigned int UnusedField_NothingToDefine + public int UnusedFieldNothingToDefine; + } + + /// + ///

Specifies the subresource(s) from an array of multisampled 2D textures to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172466 + /// D3D10_TEX2DMS_ARRAY_SRV + /// D3D10_TEX2DMS_ARRAY_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DMultisampledArrayResource { + + /// + /// No documentation. + /// + /// + /// bb172466 + /// unsigned int FirstArraySlice + /// unsigned int FirstArraySlice + public int FirstArraySlice; + + /// + /// No documentation. + /// + /// + /// bb172466 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + } + + /// + ///

Specifies the subresource(s) from a 3D texture to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172477 + /// D3D10_TEX3D_SRV + /// D3D10_TEX3D_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture3DResource { + + /// + /// No documentation. + /// + /// + /// bb172477 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb172477 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + } + + /// + ///

Specifies the subresource from a cube texture to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

+ ///
+ /// + /// bb172478 + /// D3D10_TEXCUBE_SRV + /// D3D10_TEXCUBE_SRV + [StructLayout(LayoutKind.Sequential)] + public partial struct TextureCubeResource { + + /// + /// No documentation. + /// + /// + /// bb172478 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb172478 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + } + + /// + ///

The viewing format. See remarks.

+ ///
+ /// + /// bb172437 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + [FieldOffset(0)] + public SharpDX.DXGI.Format Format; + + /// + ///

The resource type of the view. See D3D10_SRV_DIMENSION. This should be the same as the resource type of the underlying resource. This parameter also determines which _SRV to use in the union below.

+ ///
+ /// + /// bb172437 + /// D3D_SRV_DIMENSION ViewDimension + /// D3D_SRV_DIMENSION ViewDimension + [FieldOffset(4)] + public SharpDX.Direct3D.ShaderResourceViewDimension Dimension; + + /// + ///

View the resource as a buffer using information from a shader-resource view (see ).

+ ///
+ /// + /// bb172437 + /// D3D10_BUFFER_SRV Buffer + /// D3D10_BUFFER_SRV Buffer + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.BufferResource Buffer; + + /// + ///

View the resource as a 1D texture using information from a shader-resource view (see ).

+ ///
+ /// + /// bb172437 + /// D3D10_TEX1D_SRV Texture1D + /// D3D10_TEX1D_SRV Texture1D + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture1DResource Texture1D; + + /// + ///

View the resource as a 1D-texture array using information from a shader-resource view (see .

+ ///
+ /// + /// bb172437 + /// D3D10_TEX1D_ARRAY_SRV Texture1DArray + /// D3D10_TEX1D_ARRAY_SRV Texture1DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture1DArrayResource Texture1DArray; + + /// + ///

View the resource as a 2D-texture using information from a shader-resource view (see .

+ ///
+ /// + /// bb172437 + /// D3D10_TEX2D_SRV Texture2D + /// D3D10_TEX2D_SRV Texture2D + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DResource Texture2D; + + /// + ///

View the resource as a 2D-texture array using information from a shader-resource view (see .

+ ///
+ /// + /// bb172437 + /// D3D10_TEX2D_ARRAY_SRV Texture2DArray + /// D3D10_TEX2D_ARRAY_SRV Texture2DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DArrayResource Texture2DArray; + + /// + ///

View the resource as a 2D-multisampled texture using information from a shader-resource view (see .

+ ///
+ /// + /// bb172437 + /// D3D10_TEX2DMS_SRV Texture2DMS + /// D3D10_TEX2DMS_SRV Texture2DMS + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DMultisampledResource Texture2DMS; + + /// + ///

View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see .

+ ///
+ /// + /// bb172437 + /// D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray + /// D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DMultisampledArrayResource Texture2DMSArray; + + /// + ///

View the resource as a 3D texture using information from a shader-resource view (see .

+ ///
+ /// + /// bb172437 + /// D3D10_TEX3D_SRV Texture3D + /// D3D10_TEX3D_SRV Texture3D + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture3DResource Texture3D; + + /// + ///

View the resource as a 3D-cube texture using information from a shader-resource view (see ).

+ ///
+ /// + /// bb172437 + /// D3D10_TEXCUBE_SRV TextureCube + /// D3D10_TEXCUBE_SRV TextureCube + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.TextureCubeResource TextureCube; + } + + /// + ///

Describes a shader-resource view.

+ ///
+ /// + ///

A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read. For more information about how views work, see Views

When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a resource can be viewed with one of these typed formats: , , and , since these typed formats are compatible with the typeless resource.

Create a shader-resource-view description by calling . To view a shader-resource-view description, call .

This structure requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694534 + /// D3D10_SHADER_RESOURCE_VIEW_DESC1 + /// D3D10_SHADER_RESOURCE_VIEW_DESC1 + [StructLayout(LayoutKind.Explicit)] + public partial struct ShaderResourceViewDescription1 { + + /// + ///

Specifies the subresource(s) from an array of cube textures to use in a shader-resource view.

+ ///
+ /// + ///

This structure is one member of a shader-resource-view description (see ).

This structure requires Windows Vista Service Pack 1.

+ ///
+ /// + /// bb694536 + /// D3D10_TEXCUBE_ARRAY_SRV1 + /// D3D10_TEXCUBE_ARRAY_SRV1 + [StructLayout(LayoutKind.Sequential)] + public partial struct TextureCubeArrayResource1 { + + /// + /// No documentation. + /// + /// + /// bb694536 + /// unsigned int MostDetailedMip + /// unsigned int MostDetailedMip + public int MostDetailedMip; + + /// + /// No documentation. + /// + /// + /// bb694536 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + /// No documentation. + /// + /// + /// bb694536 + /// unsigned int First2DArrayFace + /// unsigned int First2DArrayFace + public int First2DArrayFace; + + /// + /// No documentation. + /// + /// + /// bb694536 + /// unsigned int NumCubes + /// unsigned int NumCubes + public int CubeCount; + } + + /// + ///

The viewing format. See remarks.

+ ///
+ /// + /// bb694534 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + [FieldOffset(0)] + public SharpDX.DXGI.Format Format; + + /// + ///

The resource type of the view. See D3D10_SRV_DIMENSION1. This should be the same as the resource type of the underlying resource. This parameter also determines which _SRV to use in the union below.

+ ///
+ /// + /// bb694534 + /// D3D_SRV_DIMENSION ViewDimension + /// D3D_SRV_DIMENSION ViewDimension + [FieldOffset(4)] + public SharpDX.Direct3D.ShaderResourceViewDimension Dimension; + + /// + ///

View the resource as a buffer using information from a shader-resource view (see ).

+ ///
+ /// + /// bb694534 + /// D3D10_BUFFER_SRV Buffer + /// D3D10_BUFFER_SRV Buffer + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.BufferResource Buffer; + + /// + ///

View the resource as a 1D texture using information from a shader-resource view (see ).

+ ///
+ /// + /// bb694534 + /// D3D10_TEX1D_SRV Texture1D + /// D3D10_TEX1D_SRV Texture1D + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture1DResource Texture1D; + + /// + ///

View the resource as a 1D-texture array using information from a shader-resource view (see .

+ ///
+ /// + /// bb694534 + /// D3D10_TEX1D_ARRAY_SRV Texture1DArray + /// D3D10_TEX1D_ARRAY_SRV Texture1DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture1DArrayResource Texture1DArray; + + /// + ///

View the resource as a 2D-texture using information from a shader-resource view (see .

+ ///
+ /// + /// bb694534 + /// D3D10_TEX2D_SRV Texture2D + /// D3D10_TEX2D_SRV Texture2D + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DResource Texture2D; + + /// + ///

View the resource as a 2D-texture array using information from a shader-resource view (see .

+ ///
+ /// + /// bb694534 + /// D3D10_TEX2D_ARRAY_SRV Texture2DArray + /// D3D10_TEX2D_ARRAY_SRV Texture2DArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DArrayResource Texture2DArray; + + /// + ///

View the resource as a 2D-multisampled texture using information from a shader-resource view (see .

+ ///
+ /// + /// bb694534 + /// D3D10_TEX2DMS_SRV Texture2DMS + /// D3D10_TEX2DMS_SRV Texture2DMS + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DMultisampledResource Texture2DMS; + + /// + ///

View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see .

+ ///
+ /// + /// bb694534 + /// D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray + /// D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture2DMultisampledArrayResource Texture2DMSArray; + + /// + ///

View the resource as a 3D texture using information from a shader-resource view (see .

+ ///
+ /// + /// bb694534 + /// D3D10_TEX3D_SRV Texture3D + /// D3D10_TEX3D_SRV Texture3D + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.Texture3DResource Texture3D; + + /// + ///

View the resource as a 3D-cube texture using information from a shader-resource view (see ).

+ ///
+ /// + /// bb694534 + /// D3D10_TEXCUBE_SRV TextureCube + /// D3D10_TEXCUBE_SRV TextureCube + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription.TextureCubeResource TextureCube; + + /// + ///

View the resource as an array of cube textures using information from a shader-resource view (see ).

+ ///
+ /// + /// bb694534 + /// D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray + /// D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray + [FieldOffset(8)] + public SharpDX.Direct3D10.ShaderResourceViewDescription1.TextureCubeArrayResource1 TextureCubeArray; + } + + /// + ///

The member of the vertex decl to do the software skinning on. This is used with the API.

+ ///
+ /// + /// bb172702 + /// D3DX10_SKINNING_CHANNEL + /// D3DX10_SKINNING_CHANNEL + [StructLayout(LayoutKind.Sequential)] + public partial struct SkinningChannel { + + /// + /// No documentation. + /// + /// + /// bb172702 + /// unsigned int SrcOffset + /// unsigned int SrcOffset + public int SourceOffset; + + /// + /// No documentation. + /// + /// + /// bb172702 + /// unsigned int DestOffset + /// unsigned int DestOffset + public int DestinationOffset; + + /// + /// No documentation. + /// + /// + /// bb172702 + /// BOOL IsNormal + /// BOOL IsNormal + public SharpDX.Mathematics.Interop.RawBool IsNormal; + } + + /// + ///

Defines position, texture, and color information about a sprite.

+ ///
+ /// + /// bb172703 + /// D3DX10_SPRITE + /// D3DX10_SPRITE + [StructLayout(LayoutKind.Sequential)] + public partial struct SpriteInstance { + + /// + ///

The sprite's model-world transformation. This defines the position and orientation of the sprite in world space.

+ ///
+ /// + /// bb172703 + /// D3DXMATRIX matWorld + /// D3DXMATRIX matWorld + public SharpDX.Mathematics.Interop.RawMatrix Transform; + + /// + ///

Offset from the upper-left corner of the texture indicating where the sprite image should start in the texture. TexCoord is in texture coordinates.

+ ///
+ /// + /// bb172703 + /// D3DXVECTOR2 TexCoord + /// D3DXVECTOR2 TexCoord + public SharpDX.Mathematics.Interop.RawVector2 TextureCoordinates; + + /// + ///

A vector containing the width and height of the sprite in texture coordinates.

+ ///
+ /// + /// bb172703 + /// D3DXVECTOR2 TexSize + /// D3DXVECTOR2 TexSize + public SharpDX.Mathematics.Interop.RawVector2 TextureDimensions; + + /// + ///

A color that will be multiplied with the pixel color before rendering.

+ ///
+ /// + /// bb172703 + /// D3DXCOLOR ColorModulate + /// D3DXCOLOR ColorModulate + public SharpDX.Mathematics.Interop.RawColor4 Color; + + /// + ///

Pointer to a shader-resource view representing the sprite's texture. See Interface.

+ ///
+ /// + /// bb172703 + /// ID3D10ShaderResourceView* pTexture + /// ID3D10ShaderResourceView pTexture + internal System.IntPtr ShaderResourceViewPointer; + + /// + ///

The index of the texture. If pTexture does not represent a texture array, then this should be 0.

+ ///
+ /// + /// bb172703 + /// unsigned int TextureIndex + /// unsigned int TextureIndex + public int TextureIndex; + } + + /// + ///

Indicates the device state.

+ ///
+ /// + ///

A state-block mask indicates the device states that a pass or a technique changes. The D3D10StateBlockMaskEnableCapture function provides a convenient way of setting a range of bitmasks for the array members of .

+ ///
+ /// + /// bb172453 + /// D3D10_STATE_BLOCK_MASK + /// D3D10_STATE_BLOCK_MASK + public partial struct StateBlockMask { + + /// + ///

Boolean value indicating whether to save the vertex shader state.

+ ///
+ /// + /// bb172453 + /// bool VS + /// bool VS + public bool VertexShader; + + /// + ///

Array of vertex-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.

+ ///
+ /// + /// bb172453 + /// bool VSSamplers[2] + /// bool VSSamplers + public bool[] VSSamplers { + get { return _VSSamplers ?? (_VSSamplers = new bool[2]);} + } + internal bool[] _VSSamplers; + + /// + ///

Array of vertex-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.

+ ///
+ /// + /// bb172453 + /// bool VSShaderResources[16] + /// bool VSShaderResources + public bool[] VSShaderResources { + get { return _VSShaderResources ?? (_VSShaderResources = new bool[16]);} + } + internal bool[] _VSShaderResources; + + /// + ///

Array of vertex-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.

+ ///
+ /// + /// bb172453 + /// bool VSConstantBuffers[2] + /// bool VSConstantBuffers + public bool[] VSConstantBuffers { + get { return _VSConstantBuffers ?? (_VSConstantBuffers = new bool[2]);} + } + internal bool[] _VSConstantBuffers; + + /// + ///

Boolean value indicating whether to save the geometry shader state.

+ ///
+ /// + /// bb172453 + /// bool GS + /// bool GS + public bool GeometryShader; + + /// + ///

Array of geometry-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.

+ ///
+ /// + /// bb172453 + /// bool GSSamplers[2] + /// bool GSSamplers + public bool[] GSSamplers { + get { return _GSSamplers ?? (_GSSamplers = new bool[2]);} + } + internal bool[] _GSSamplers; + + /// + ///

Array of geometry-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.

+ ///
+ /// + /// bb172453 + /// bool GSShaderResources[16] + /// bool GSShaderResources + public bool[] GSShaderResources { + get { return _GSShaderResources ?? (_GSShaderResources = new bool[16]);} + } + internal bool[] _GSShaderResources; + + /// + ///

Array of geometry-shader constant buffers. The array is a multi-byte bitmask where each bit represents one buffer slot.

+ ///
+ /// + /// bb172453 + /// bool GSConstantBuffers[2] + /// bool GSConstantBuffers + public bool[] GSConstantBuffers { + get { return _GSConstantBuffers ?? (_GSConstantBuffers = new bool[2]);} + } + internal bool[] _GSConstantBuffers; + + /// + ///

Boolean value indicating whether to save the pixel shader state.

+ ///
+ /// + /// bb172453 + /// bool PS + /// bool PS + public bool PixelShader; + + /// + ///

Array of pixel-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.

+ ///
+ /// + /// bb172453 + /// bool PSSamplers[2] + /// bool PSSamplers + public bool[] PSSamplers { + get { return _PSSamplers ?? (_PSSamplers = new bool[2]);} + } + internal bool[] _PSSamplers; + + /// + ///

Array of pixel-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.

+ ///
+ /// + /// bb172453 + /// bool PSShaderResources[16] + /// bool PSShaderResources + public bool[] PSShaderResources { + get { return _PSShaderResources ?? (_PSShaderResources = new bool[16]);} + } + internal bool[] _PSShaderResources; + + /// + ///

Array of pixel-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.

+ ///
+ /// + /// bb172453 + /// bool PSConstantBuffers[2] + /// bool PSConstantBuffers + public bool[] PSConstantBuffers { + get { return _PSConstantBuffers ?? (_PSConstantBuffers = new bool[2]);} + } + internal bool[] _PSConstantBuffers; + + /// + ///

Array of vertex buffers. The array is a multi-byte bitmask where each bit represents one resource slot.

+ ///
+ /// + /// bb172453 + /// bool IAVertexBuffers[2] + /// bool IAVertexBuffers + public bool[] IAVertexBuffers { + get { return _IAVertexBuffers ?? (_IAVertexBuffers = new bool[2]);} + } + internal bool[] _IAVertexBuffers; + + /// + ///

Boolean value indicating whether to save the index buffer state.

+ ///
+ /// + /// bb172453 + /// bool IAIndexBuffer + /// bool IAIndexBuffer + public bool IAIndexBuffer; + + /// + ///

Boolean value indicating whether to save the input layout state.

+ ///
+ /// + /// bb172453 + /// bool IAInputLayout + /// bool IAInputLayout + public bool IAInputLayout; + + /// + ///

Boolean value indicating whether to save the primitive topology state.

+ ///
+ /// + /// bb172453 + /// bool IAPrimitiveTopology + /// bool IAPrimitiveTopology + public bool IAPrimitiveTopology; + + /// + ///

Boolean value indicating whether to save the render targets states.

+ ///
+ /// + /// bb172453 + /// bool OMRenderTargets + /// bool OMRenderTargets + public bool OMRenderTargets; + + /// + ///

Boolean value indicating whether to save the depth-stencil state.

+ ///
+ /// + /// bb172453 + /// bool OMDepthStencilState + /// bool OMDepthStencilState + public bool OMDepthStencilState; + + /// + ///

Boolean value indicating whether to save the blend state.

+ ///
+ /// + /// bb172453 + /// bool OMBlendState + /// bool OMBlendState + public bool OMBlendState; + + /// + ///

Boolean value indicating whether to save the viewports states.

+ ///
+ /// + /// bb172453 + /// bool RSViewports + /// bool RSViewports + public bool RSViewports; + + /// + ///

Boolean value indicating whether to save the scissor rectangles states.

+ ///
+ /// + /// bb172453 + /// bool RSScissorRects + /// bool RSScissorRects + public bool RSScissorRects; + + /// + ///

Boolean value indicating whether to save the rasterizer state.

+ ///
+ /// + /// bb172453 + /// bool RSRasterizerState + /// bool RSRasterizerState + public bool RSRasterizerState; + + /// + ///

Boolean value indicating whether to save the stream-out buffers states.

+ ///
+ /// + /// bb172453 + /// bool SOBuffers + /// bool SOBuffers + public bool SOBuffers; + + /// + ///

Boolean value indicating whether to save the predication state.

+ ///
+ /// + /// bb172453 + /// bool Predication + /// bool Predication + public bool Predication; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public bool VertexShader; + public bool VSSamplers; + bool __VSSamplers1; + public bool VSShaderResources; + bool __VSShaderResources1; + bool __VSShaderResources2; + bool __VSShaderResources3; + bool __VSShaderResources4; + bool __VSShaderResources5; + bool __VSShaderResources6; + bool __VSShaderResources7; + bool __VSShaderResources8; + bool __VSShaderResources9; + bool __VSShaderResources10; + bool __VSShaderResources11; + bool __VSShaderResources12; + bool __VSShaderResources13; + bool __VSShaderResources14; + bool __VSShaderResources15; + public bool VSConstantBuffers; + bool __VSConstantBuffers1; + public bool GeometryShader; + public bool GSSamplers; + bool __GSSamplers1; + public bool GSShaderResources; + bool __GSShaderResources1; + bool __GSShaderResources2; + bool __GSShaderResources3; + bool __GSShaderResources4; + bool __GSShaderResources5; + bool __GSShaderResources6; + bool __GSShaderResources7; + bool __GSShaderResources8; + bool __GSShaderResources9; + bool __GSShaderResources10; + bool __GSShaderResources11; + bool __GSShaderResources12; + bool __GSShaderResources13; + bool __GSShaderResources14; + bool __GSShaderResources15; + public bool GSConstantBuffers; + bool __GSConstantBuffers1; + public bool PixelShader; + public bool PSSamplers; + bool __PSSamplers1; + public bool PSShaderResources; + bool __PSShaderResources1; + bool __PSShaderResources2; + bool __PSShaderResources3; + bool __PSShaderResources4; + bool __PSShaderResources5; + bool __PSShaderResources6; + bool __PSShaderResources7; + bool __PSShaderResources8; + bool __PSShaderResources9; + bool __PSShaderResources10; + bool __PSShaderResources11; + bool __PSShaderResources12; + bool __PSShaderResources13; + bool __PSShaderResources14; + bool __PSShaderResources15; + public bool PSConstantBuffers; + bool __PSConstantBuffers1; + public bool IAVertexBuffers; + bool __IAVertexBuffers1; + public bool IAIndexBuffer; + public bool IAInputLayout; + public bool IAPrimitiveTopology; + public bool OMRenderTargets; + public bool OMDepthStencilState; + public bool OMBlendState; + public bool RSViewports; + public bool RSScissorRects; + public bool RSRasterizerState; + public bool SOBuffers; + public bool Predication; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.VertexShader = @ref.VertexShader; + fixed (void* __to = &this.VSSamplers[0]) fixed (void* __from = &@ref.VSSamplers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &this.VSShaderResources[0]) fixed (void* __from = &@ref.VSShaderResources) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( bool)); + fixed (void* __to = &this.VSConstantBuffers[0]) fixed (void* __from = &@ref.VSConstantBuffers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + this.GeometryShader = @ref.GeometryShader; + fixed (void* __to = &this.GSSamplers[0]) fixed (void* __from = &@ref.GSSamplers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &this.GSShaderResources[0]) fixed (void* __from = &@ref.GSShaderResources) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( bool)); + fixed (void* __to = &this.GSConstantBuffers[0]) fixed (void* __from = &@ref.GSConstantBuffers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + this.PixelShader = @ref.PixelShader; + fixed (void* __to = &this.PSSamplers[0]) fixed (void* __from = &@ref.PSSamplers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &this.PSShaderResources[0]) fixed (void* __from = &@ref.PSShaderResources) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( bool)); + fixed (void* __to = &this.PSConstantBuffers[0]) fixed (void* __from = &@ref.PSConstantBuffers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &this.IAVertexBuffers[0]) fixed (void* __from = &@ref.IAVertexBuffers) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + this.IAIndexBuffer = @ref.IAIndexBuffer; + this.IAInputLayout = @ref.IAInputLayout; + this.IAPrimitiveTopology = @ref.IAPrimitiveTopology; + this.OMRenderTargets = @ref.OMRenderTargets; + this.OMDepthStencilState = @ref.OMDepthStencilState; + this.OMBlendState = @ref.OMBlendState; + this.RSViewports = @ref.RSViewports; + this.RSScissorRects = @ref.RSScissorRects; + this.RSRasterizerState = @ref.RSRasterizerState; + this.SOBuffers = @ref.SOBuffers; + this.Predication = @ref.Predication; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.VertexShader = this.VertexShader; + fixed (void* __to = &@ref.VSSamplers) fixed (void* __from = &this.VSSamplers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &@ref.VSShaderResources) fixed (void* __from = &this.VSShaderResources[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( bool)); + fixed (void* __to = &@ref.VSConstantBuffers) fixed (void* __from = &this.VSConstantBuffers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + @ref.GeometryShader = this.GeometryShader; + fixed (void* __to = &@ref.GSSamplers) fixed (void* __from = &this.GSSamplers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &@ref.GSShaderResources) fixed (void* __from = &this.GSShaderResources[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( bool)); + fixed (void* __to = &@ref.GSConstantBuffers) fixed (void* __from = &this.GSConstantBuffers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + @ref.PixelShader = this.PixelShader; + fixed (void* __to = &@ref.PSSamplers) fixed (void* __from = &this.PSSamplers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &@ref.PSShaderResources) fixed (void* __from = &this.PSShaderResources[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( bool)); + fixed (void* __to = &@ref.PSConstantBuffers) fixed (void* __from = &this.PSConstantBuffers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + fixed (void* __to = &@ref.IAVertexBuffers) fixed (void* __from = &this.IAVertexBuffers[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 2*sizeof ( bool)); + @ref.IAIndexBuffer = this.IAIndexBuffer; + @ref.IAInputLayout = this.IAInputLayout; + @ref.IAPrimitiveTopology = this.IAPrimitiveTopology; + @ref.OMRenderTargets = this.OMRenderTargets; + @ref.OMDepthStencilState = this.OMDepthStencilState; + @ref.OMBlendState = this.OMBlendState; + @ref.RSViewports = this.RSViewports; + @ref.RSScissorRects = this.RSScissorRects; + @ref.RSRasterizerState = this.RSRasterizerState; + @ref.SOBuffers = this.SOBuffers; + @ref.Predication = this.Predication; + + } + } + + /// + ///

Description of a vertex element in a vertex buffer in an output slot.

+ ///
+ /// + /// bb172450 + /// D3D10_SO_DECLARATION_ENTRY + /// D3D10_SO_DECLARATION_ENTRY + public partial struct StreamOutputElement { + + /// + ///

Type of output element. Possible values: "POSITION", "NORMAL", or "TEXCOORD0".

+ ///
+ /// + /// bb172450 + /// const char* SemanticName + /// char SemanticName + public string SemanticName; + + /// + ///

Output element's zero-based index. Should be used if, for example, you have more than one texture coordinate stored in each vertex.

+ ///
+ /// + /// bb172450 + /// unsigned int SemanticIndex + /// unsigned int SemanticIndex + public int SemanticIndex; + + /// + ///

Which component of the entry to begin writing out to. Valid values are 0 ~ 3. For example, if you only wish to output to the y and z components of a position, then StartComponent should be 1 and ComponentCount should be 2.

+ ///
+ /// + /// bb172450 + /// unsigned char StartComponent + /// unsigned char StartComponent + public byte StartComponent; + + /// + ///

The number of components of the entry to write out to. Valid values are 1 ~ 4. For example, if you only wish to output to the y and z components of a position, then StartComponent should be 1 and ComponentCount should be 2.

+ ///
+ /// + /// bb172450 + /// unsigned char ComponentCount + /// unsigned char ComponentCount + public byte ComponentCount; + + /// + ///

The output slot that contains the vertex buffer that contains this output entry.

+ ///
+ /// + /// bb172450 + /// unsigned char OutputSlot + /// unsigned char OutputSlot + public byte OutputSlot; + + // Internal native struct used for marshalling + [StructLayout(LayoutKind.Sequential)] + internal partial struct __Native { + public System.IntPtr SemanticName; + public int SemanticIndex; + public byte StartComponent; + public byte ComponentCount; + public byte OutputSlot; + // Method to free unmanaged allocation + internal unsafe void __MarshalFree() + { + if (this.SemanticName != IntPtr.Zero) + Marshal.FreeHGlobal(this.SemanticName); + } + } + + // Method to free unmanaged allocation + internal unsafe void __MarshalFree(ref __Native @ref) + { + @ref.__MarshalFree(); + } + + // Method to marshal from native to managed struct + internal unsafe void __MarshalFrom(ref __Native @ref) + { + this.SemanticName = ( @ref.SemanticName == IntPtr.Zero )?null:Marshal.PtrToStringAnsi(@ref.SemanticName); + this.SemanticIndex = @ref.SemanticIndex; + this.StartComponent = @ref.StartComponent; + this.ComponentCount = @ref.ComponentCount; + this.OutputSlot = @ref.OutputSlot; + } + // Method to marshal from managed struct tot native + internal unsafe void __MarshalTo(ref __Native @ref) + { + @ref.SemanticName = ( this.SemanticName == null )?IntPtr.Zero : Utilities.StringToHGlobalAnsi(this.SemanticName); + @ref.SemanticIndex = this.SemanticIndex; + @ref.StartComponent = this.StartComponent; + @ref.ComponentCount = this.ComponentCount; + @ref.OutputSlot = this.OutputSlot; + + } + } + + /// + ///

Query information about the amount of data streamed out to the stream-output buffers in between and .

+ ///
+ /// + /// bb172403 + /// D3D10_QUERY_DATA_SO_STATISTICS + /// D3D10_QUERY_DATA_SO_STATISTICS + [StructLayout(LayoutKind.Sequential)] + public partial struct StreamOutputStatistics { + + /// + /// No documentation. + /// + /// + /// bb172403 + /// unsigned longlong NumPrimitivesWritten + /// unsigned longlong NumPrimitivesWritten + public long NumPrimitivesWritten; + + /// + /// No documentation. + /// + /// + /// bb172403 + /// unsigned longlong PrimitivesStorageNeeded + /// unsigned longlong PrimitivesStorageNeeded + public long PrimitivesStorageNeeded; + } + + /// + ///

Describes a 1D texture.

+ ///
+ /// + ///

This structure is used in a call to . A helpful derived structure CD3D10_TEXTURE1D_DESC is declared in D3D10.h, to help create a texture description.

+ ///
+ /// + /// bb172479 + /// D3D10_TEXTURE1D_DESC + /// D3D10_TEXTURE1D_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture1DDescription { + + /// + /// No documentation. + /// + /// + /// bb172479 + /// unsigned int Width + /// unsigned int Width + public int Width; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + public SharpDX.DXGI.Format Format; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// D3D10_USAGE Usage + /// D3D10_USAGE Usage + public SharpDX.Direct3D10.ResourceUsage Usage; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// D3D10_BIND_FLAG BindFlags + /// D3D10_BIND_FLAG BindFlags + public SharpDX.Direct3D10.BindFlags BindFlags; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + public SharpDX.Direct3D10.CpuAccessFlags CpuAccessFlags; + + /// + /// No documentation. + /// + /// + /// bb172479 + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.ResourceOptionFlags OptionFlags; + } + + /// + ///

Describes a 2D texture.

+ ///
+ /// + ///

This structure is used in a call to . A helpful derived structure CD3D10_TEXTURE2D_DESC is declared in D3D10.h, to help create a texture description.

The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.

+ ///
+ /// + /// bb172480 + /// D3D10_TEXTURE2D_DESC + /// D3D10_TEXTURE2D_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture2DDescription { + + /// + /// No documentation. + /// + /// + /// bb172480 + /// unsigned int Width + /// unsigned int Width + public int Width; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// unsigned int Height + /// unsigned int Height + public int Height; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// unsigned int ArraySize + /// unsigned int ArraySize + public int ArraySize; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + public SharpDX.DXGI.Format Format; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// DXGI_SAMPLE_DESC SampleDesc + /// DXGI_SAMPLE_DESC SampleDesc + public SharpDX.DXGI.SampleDescription SampleDescription; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// D3D10_USAGE Usage + /// D3D10_USAGE Usage + public SharpDX.Direct3D10.ResourceUsage Usage; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// D3D10_BIND_FLAG BindFlags + /// D3D10_BIND_FLAG BindFlags + public SharpDX.Direct3D10.BindFlags BindFlags; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + public SharpDX.Direct3D10.CpuAccessFlags CpuAccessFlags; + + /// + /// No documentation. + /// + /// + /// bb172480 + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.ResourceOptionFlags OptionFlags; + } + + /// + ///

Describes a 3D texture.

+ ///
+ /// + ///

This structure is used in a call to . A helpful derived structure CD3D10_TEXTURE3D_DESC is declared in D3D10.h, to help create a texture description.

The device restricts the size of subsampled, block compressed (see Block Compression (Direct3D 10)), and bit format resources to be multiples of sizes specific to each format.

+ ///
+ /// + /// bb172481 + /// D3D10_TEXTURE3D_DESC + /// D3D10_TEXTURE3D_DESC + [StructLayout(LayoutKind.Sequential)] + public partial struct Texture3DDescription { + + /// + /// No documentation. + /// + /// + /// bb172481 + /// unsigned int Width + /// unsigned int Width + public int Width; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// unsigned int Height + /// unsigned int Height + public int Height; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// unsigned int Depth + /// unsigned int Depth + public int Depth; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// unsigned int MipLevels + /// unsigned int MipLevels + public int MipLevels; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// DXGI_FORMAT Format + /// DXGI_FORMAT Format + public SharpDX.DXGI.Format Format; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// D3D10_USAGE Usage + /// D3D10_USAGE Usage + public SharpDX.Direct3D10.ResourceUsage Usage; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// D3D10_BIND_FLAG BindFlags + /// D3D10_BIND_FLAG BindFlags + public SharpDX.Direct3D10.BindFlags BindFlags; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + /// D3D10_CPU_ACCESS_FLAG CPUAccessFlags + public SharpDX.Direct3D10.CpuAccessFlags CpuAccessFlags; + + /// + /// No documentation. + /// + /// + /// bb172481 + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + /// D3D10_RESOURCE_MISC_FLAG MiscFlags + public SharpDX.Direct3D10.ResourceOptionFlags OptionFlags; + } + + /// + ///

Describes parameters used to load a texture from another texture.

+ ///
+ /// + ///

This structure is used in a call to .

+ ///
+ /// + /// bb172705 + /// D3DX10_TEXTURE_LOAD_INFO + /// D3DX10_TEXTURE_LOAD_INFO + public partial class TextureLoadInformation { + + /// + ///

Source texture box (see ).

+ ///
+ /// + /// bb172705 + /// D3D10_BOX* pSrcBox + /// D3D10_BOX pSrcBox + internal System.IntPtr SourceRegionPointer; + + /// + ///

Destination texture box (see ).

+ ///
+ /// + /// bb172705 + /// D3D10_BOX* pDstBox + /// D3D10_BOX pDstBox + internal System.IntPtr DestinationRegionPointer; + + /// + ///

Source texture mipmap level, see D3D10CalcSubresource for more detail.

+ ///
+ /// + /// bb172705 + /// unsigned int SrcFirstMip + /// unsigned int SrcFirstMip + public int FirstSourceMip; + + /// + ///

Destination texture mipmap level, see D3D10CalcSubresource for more detail.

+ ///
+ /// + /// bb172705 + /// unsigned int DstFirstMip + /// unsigned int DstFirstMip + public int FirstDestinationMip; + + /// + ///

Number of mipmap levels in the source texture.

+ ///
+ /// + /// bb172705 + /// unsigned int NumMips + /// unsigned int NumMips + public int MipCount; + + /// + ///

First element of the source texture.

+ ///
+ /// + /// bb172705 + /// unsigned int SrcFirstElement + /// unsigned int SrcFirstElement + public int FirstSourceElement; + + /// + ///

First element of the destination texture.

+ ///
+ /// + /// bb172705 + /// unsigned int DstFirstElement + /// unsigned int DstFirstElement + public int FirstDestinationElement; + + /// + ///

Number of elements to load.

+ ///
+ /// + /// bb172705 + /// unsigned int NumElements + /// unsigned int NumElements + public int ElementCount; + + /// + ///

Filtering options during resampling (see ).

+ ///
+ /// + /// bb172705 + /// D3DX10_FILTER_FLAG Filter + /// D3DX10_FILTER_FLAG Filter + public SharpDX.Direct3D10.FilterFlags Filter; + + /// + ///

Filtering options when generating mip levels (see ).

+ ///
+ /// + /// bb172705 + /// D3DX10_FILTER_FLAG MipFilter + /// D3DX10_FILTER_FLAG MipFilter + public SharpDX.Direct3D10.FilterFlags MipFilter; + } +} From 95f1a07e8805c30ab3d7a8fd022f6179814ec10f Mon Sep 17 00:00:00 2001 From: AndrewSt Date: Fri, 17 Jun 2016 01:53:25 +0300 Subject: [PATCH 4/5] [Direct3D10] remove Debug.Assert --- Source/SharpDX.Direct3D10/Resource.cs | 22 ---------------------- Source/SharpDX.Direct3D10/Texture1D.cs | 3 --- 2 files changed, 25 deletions(-) diff --git a/Source/SharpDX.Direct3D10/Resource.cs b/Source/SharpDX.Direct3D10/Resource.cs index 552287524..9bf53b99b 100644 --- a/Source/SharpDX.Direct3D10/Resource.cs +++ b/Source/SharpDX.Direct3D10/Resource.cs @@ -47,9 +47,6 @@ public partial class Resource /// The loaded texture object. public static T FromFile(Device device, string fileName) where T : Resource { - System.Diagnostics.Debug.Assert(typeof(T) == typeof(Texture1D) || typeof(T) == typeof(Texture2D) || - typeof (T) == typeof (Texture3D)); - IntPtr temp; Result resultOut; D3DX10.CreateTextureFromFile(device, fileName, null, IntPtr.Zero, out temp, out resultOut); @@ -66,9 +63,6 @@ public partial class Resource /// The loaded texture object. public static T FromFile(Device device, string fileName, ImageLoadInformation loadInfo) where T : Resource { - System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || - typeof (T) == typeof (Texture3D)); - IntPtr temp; Result resultOut; D3DX10.CreateTextureFromFile(device, fileName, loadInfo, IntPtr.Zero, out temp, out resultOut); @@ -84,13 +78,8 @@ public partial class Resource /// The loaded texture object. public static T FromMemory(Device device, byte[] memory) where T : Resource { - System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || - typeof (T) == typeof (Texture3D)); - unsafe { - System.Diagnostics.Debug.Assert(memory != null); - System.Diagnostics.Debug.Assert(memory.Length > 0); IntPtr temp; Result resultOut; fixed (void* pBuffer = &memory[0]) @@ -110,13 +99,8 @@ public partial class Resource /// The loaded texture object. public static T FromMemory(Device device, byte[] memory, ImageLoadInformation loadInfo) where T : Resource { - System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || - typeof (T) == typeof (Texture3D)); - unsafe { - System.Diagnostics.Debug.Assert(memory != null); - System.Diagnostics.Debug.Assert(memory.Length > 0); IntPtr temp; Result resultOut; fixed (void* pBuffer = &memory[0]) @@ -165,9 +149,6 @@ public static T FromStream(Device device, Stream stream, int sizeInBytes, Ima public static void ToFile(T texture, ImageFileFormat format, string fileName) where T : Resource { - System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || - typeof (T) == typeof (Texture3D)); - D3DX10.SaveTextureToFile(texture, format, fileName); } @@ -181,9 +162,6 @@ public static void ToFile(T texture, ImageFileFormat format, string fileName) public static void ToStream(T texture, ImageFileFormat format, Stream stream) where T : Resource { - System.Diagnostics.Debug.Assert(typeof (T) == typeof (Texture1D) || typeof (T) == typeof (Texture2D) || - typeof (T) == typeof (Texture3D)); - Blob blob; D3DX10.SaveTextureToMemory(texture, format, out blob, 0); diff --git a/Source/SharpDX.Direct3D10/Texture1D.cs b/Source/SharpDX.Direct3D10/Texture1D.cs index f092b2a93..e4be6248e 100644 --- a/Source/SharpDX.Direct3D10/Texture1D.cs +++ b/Source/SharpDX.Direct3D10/Texture1D.cs @@ -46,7 +46,6 @@ public Texture1D(Device device, Texture1DDescription description) public Texture1D(Device device, Texture1DDescription description, DataStream data) : this(device, description, new[] {data}) { - System.Diagnostics.Debug.Assert(data != null); } /// @@ -58,8 +57,6 @@ public Texture1D(Device device, Texture1DDescription description, DataStream dat public Texture1D(Device device, Texture1DDescription description, DataStream[] data) : base(IntPtr.Zero) { - System.Diagnostics.Debug.Assert(data != null); - var subResourceDatas = new DataBox[data.Length]; for (int i = 0; i < subResourceDatas.Length; i++) subResourceDatas[i].DataPointer = data[i].DataPointer; From 5b5db254b15cccb202dc936f256a8b4429d33842 Mon Sep 17 00:00:00 2001 From: AndrewSt Date: Fri, 17 Jun 2016 02:05:04 +0300 Subject: [PATCH 5/5] [Direct3D10] remove from StoreApp --- SharpDX-StoreApp.sln | 7 ------- Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec | 3 --- 2 files changed, 10 deletions(-) diff --git a/SharpDX-StoreApp.sln b/SharpDX-StoreApp.sln index 5187db485..4fe45c905 100644 --- a/SharpDX-StoreApp.sln +++ b/SharpDX-StoreApp.sln @@ -50,8 +50,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Mathematics", "Sour EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Direct3D12", "Source\SharpDX.Direct3D12\SharpDX.Direct3D12.csproj", "{E5BB5D1C-6C07-495B-923B-FB80B79C535E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Direct3D10", "Source\SharpDX.Direct3D10\SharpDX.Direct3D10.csproj", "{618AFA87-81A8-4B1C-8876-5457D49F2DEF}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -110,10 +108,6 @@ Global {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Debug|Any CPU.Build.0 = Debug|Any CPU {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Release|Any CPU.Build.0 = Release|Any CPU - {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -132,6 +126,5 @@ Global {BBB50A46-3291-4C62-B884-D1AB64F71EA5} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {49E4485F-3A2A-4C35-A159-12ECCFC00396} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {E5BB5D1C-6C07-495B-923B-FB80B79C535E} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} - {618AFA87-81A8-4B1C-8876-5457D49F2DEF} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} EndGlobalSection EndGlobal diff --git a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec index f489f627e..3a1709db4 100644 --- a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec +++ b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.nuspec @@ -46,9 +46,6 @@ - - -