+ // 1. Use imported Class and Interface Types
+ COMClassInfo cci1 = new COMClassInfo(typeof(CLSID_DirectInputDevice8), typeof(IID_IDirectInputDevice8W), "GetCapabilities");
+ // 2. Use Guid from class and interface types
+ COMClassInfo cci2 = new COMClassInfo(typeof(CLSID_DirectInputDevice8).GUID, typeof(IID_IDirectInputDevice8W).GUID, 3);
+ // 3. Use class and interface Guids directly (no need to have class and interface types defined)
+ COMClassInfo cci3 = new COMClassInfo(new Guid("25E609E5-B259-11CF-BFC7-444553540000"), new Guid("54D41081-DC15-4833-A41B-748F73A38179"), 3);
+
+ // Will output False if dinput8.dll is not already loaded
+ Console.WriteLine(cci1.IsModuleLoaded());
+ cci1.Query();
+ cci2.Query();
+ cci3.Query();
+ // Will output True as dinput8.dll will be loaded by .Query() if not already
+ Console.WriteLine(cci1.IsModuleLoaded());
+
+ // Output the function pointers we queried
+ Console.WriteLine(cci1.FunctionPointers[0]);
+ Console.WriteLine(cci2.FunctionPointers[0]);
+ Console.WriteLine(cci3.FunctionPointers[0]);
+
+ ...
+
+ [ComVisible(true)]
+ [Guid("25E609E5-B259-11CF-BFC7-444553540000")]
+ public class CLSID_DirectInputDevice8
+ {
+ }
+
+ [ComVisible(true)]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("54D41081-DC15-4833-A41B-748F73A38179")]
+ public interface IID_IDirectInputDevice8W
+ {
+ /*** IDirectInputDevice8W methods ***/
+ int GetCapabilities(IntPtr deviceCaps); // fourth method due to IUnknown methods QueryInterface, AddRef and Release
+ // other methods...
+ }
+
+
+ using System;
+ using System.Collections.Generic;
+ using System.Runtime.Remoting;
+ using System.Text;
+ using System.IO;
+ using EasyHook;
+
+ namespace FileMon
+ {
+ public class FileMonInterface : MarshalByRefObject
+ {
+ public void IsInstalled(Int32 InClientPID)
+ {
+ Console.WriteLine("FileMon has been installed in target {0}.\r\n", InClientPID);
+ }
+
+ public void OnCreateFile(Int32 InClientPID, String[] InFileNames)
+ {
+ for (int i = 0; i < InFileNames.Length; i++)
+ {
+ Console.WriteLine(InFileNames[i]);
+ }
+ }
+
+ public void ReportException(Exception InInfo)
+ {
+ Console.WriteLine("The target process has reported an error:\r\n" + InInfo.ToString());
+ }
+
+ public void Ping()
+ {
+ }
+ }
+
+ class Program
+ {
+ static String ChannelName = null;
+
+ static void Main(string[] args)
+ {
+ try
+ {
+ Config.Register(
+ "A FileMon like demo application.",
+ "FileMon.exe",
+ "FileMonInject.dll");
+
+ RemoteHooking.IpcCreateServer<FileMonInterface>(ref ChannelName, WellKnownObjectMode.SingleCall);
+
+ RemoteHooking.Inject(
+ Int32.Parse(args[0]),
+ "FileMonInject.dll",
+ "FileMonInject.dll",
+ ChannelName);
+
+ Console.ReadLine();
+ }
+ catch (Exception ExtInfo)
+ {
+ Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString());
+ }
+ }
+ }
+ }
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Runtime.InteropServices;
+using EasyHook;
+
+namespace FileMonInject
+{
+ public class Main : EasyHook.IEntryPoint
+ {
+ FileMon.FileMonInterface Interface;
+ LocalHook CreateFileHook;
+ Stack<String> Queue = new Stack<String> ();
+
+ public Main(
+ RemoteHooking.IContext InContext,
+ String InChannelName)
+ {
+ // connect to host...
+ Interface = RemoteHooking.IpcConnectClient<FileMon.FileMonInterface>(InChannelName);
+
+ // validate connection...
+ Interface.Ping();
+ }
+
+ public void Run(
+ RemoteHooking.IContext InContext,
+ String InChannelName)
+ {
+ // install hook...
+ try
+ {
+ CreateFileHook = LocalHook.Create(
+ LocalHook.GetProcAddress("kernel32.dll", "CreateFileW"),
+ new DCreateFile(CreateFile_Hooked),
+ this);
+
+ CreateFileHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
+ }
+ catch (Exception ExtInfo)
+ {
+ Interface.ReportException(ExtInfo);
+
+ return;
+ }
+
+ Interface.IsInstalled(RemoteHooking.GetCurrentProcessId());
+
+ RemoteHooking.WakeUpProcess();
+
+ // wait for host process termination...
+ try
+ {
+ while (true)
+ {
+ Thread.Sleep(500);
+
+ // transmit newly monitored file accesses...
+ if (Queue.Count > 0)
+ {
+ String[] Package = null;
+
+ lock (Queue)
+ {
+ Package = Queue.ToArray();
+
+ Queue.Clear();
+ }
+
+ Interface.OnCreateFile(RemoteHooking.GetCurrentProcessId(), Package);
+ }
+ else
+ Interface.Ping();
+ }
+ }
+ catch
+ {
+ // Ping() will raise an exception if host is unreachable
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall,
+ CharSet = CharSet.Unicode,
+ SetLastError = true)]
+ delegate IntPtr DCreateFile(
+ String InFileName,
+ UInt32 InDesiredAccess,
+ UInt32 InShareMode,
+ IntPtr InSecurityAttributes,
+ UInt32 InCreationDisposition,
+ UInt32 InFlagsAndAttributes,
+ IntPtr InTemplateFile);
+
+ // just use a P-Invoke implementation to get native API access from C# (this step is not necessary for C++.NET)
+ [DllImport("kernel32.dll",
+ CharSet = CharSet.Unicode,
+ SetLastError = true,
+ CallingConvention = CallingConvention.StdCall)]
+ static extern IntPtr CreateFile(
+ String InFileName,
+ UInt32 InDesiredAccess,
+ UInt32 InShareMode,
+ IntPtr InSecurityAttributes,
+ UInt32 InCreationDisposition,
+ UInt32 InFlagsAndAttributes,
+ IntPtr InTemplateFile);
+
+ // this is where we are intercepting all file accesses!
+ static IntPtr CreateFile_Hooked(
+ String InFileName,
+ UInt32 InDesiredAccess,
+ UInt32 InShareMode,
+ IntPtr InSecurityAttributes,
+ UInt32 InCreationDisposition,
+ UInt32 InFlagsAndAttributes,
+ IntPtr InTemplateFile)
+ {
+
+ try
+ {
+ Main This = (Main)HookRuntimeInfo.Callback;
+
+ lock (This.Queue)
+ {
+ This.Queue.Push("[" + RemoteHooking.GetCurrentProcessId() + ":" +
+ RemoteHooking.GetCurrentThreadId() + "]: \"" + InFileName + "\"");
+ }
+ }
+ catch
+ {
+ }
+
+ // call original API...
+ return CreateFile(
+ InFileName,
+ InDesiredAccess,
+ InShareMode,
+ InSecurityAttributes,
+ InCreationDisposition,
+ InFlagsAndAttributes,
+ InTemplateFile);
+ }
+ }
+}
+
+
+
+ if(InThreadID == 0)
+ InThreadID = GetCurrentThreadId();
+
+ if(GlobalACL.Contains(InThreadID))
+ {
+ if(LocalACL.Contains(InThreadID))
+ {
+ if(LocalACL.IsExclusive)
+ return false;
+ }
+ else
+ {
+ if(GlobalACL.IsExclusive)
+ return false;
+
+ if(!LocalACL.IsExclusive)
+ return false;
+ }
+ }
+ else
+ {
+ if(LocalACL.Contains(InThreadID))
+ {
+ if(LocalACL.IsExclusive)
+ return false;
+ }
+ else
+ {
+ if(!GlobalACL.IsExclusive)
+ return false;
+
+ if(!LocalACL.IsExclusive)
+ return false;
+ }
+ }
+
+ return true;
+
+
+ using System;
+ using System.Collections.Generic;
+ using System.Runtime.Remoting;
+ using System.Text;
+ using System.IO;
+ using EasyHook;
+
+ namespace FileMon
+ {
+ public class FileMonInterface : MarshalByRefObject
+ {
+ public void IsInstalled(Int32 InClientPID)
+ {
+ Console.WriteLine("FileMon has been installed in target {0}.\r\n", InClientPID);
+ }
+
+ public void OnCreateFile(Int32 InClientPID, String[] InFileNames)
+ {
+ for (int i = 0; i < InFileNames.Length; i++)
+ {
+ Console.WriteLine(InFileNames[i]);
+ }
+ }
+
+ public void ReportException(Exception InInfo)
+ {
+ Console.WriteLine("The target process has reported an error:\r\n" + InInfo.ToString());
+ }
+
+ public void Ping()
+ {
+ }
+ }
+
+ class Program
+ {
+ static String ChannelName = null;
+
+ static void Main(string[] args)
+ {
+ try
+ {
+ Config.Register(
+ "A FileMon like demo application.",
+ "FileMon.exe",
+ "FileMonInject.dll");
+
+ RemoteHooking.IpcCreateServer<FileMonInterface>(ref ChannelName, WellKnownObjectMode.SingleCall);
+
+ RemoteHooking.Inject(
+ Int32.Parse(args[0]),
+ "FileMonInject.dll",
+ "FileMonInject.dll",
+ ChannelName);
+
+ Console.ReadLine();
+ }
+ catch (Exception ExtInfo)
+ {
+ Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString());
+ }
+ }
+ }
+ }
+
+
+private static void OnProcessUpdate(Object InCallback)
+{
+ ProcessTimer.Change(Timeout.Infinite, Timeout.Infinite);
+
+ try
+ {
+ ProcessInfo[] Array = (ProcessInfo[])RemoteHooking.ExecuteAsService<Form1>("EnumProcesses");
+ SortedDictionary<String, ProcessInfo> Result = new SortedDictionary<string, ProcessInfo>();
+
+ // sort by name...
+ lock (ProcessList)
+ {
+ ActivePIDList.Clear();
+
+ for (int i = 0; i < Array.Length; i++)
+ {
+ Result.Add(System.IO.Path.GetFileName(Array[i].FileName) + "____" + i, Array[i]);
+
+ ActivePIDList.Add(Array[i].Id);
+ }
+
+ Result.Values.CopyTo(Array, 0);
+
+ ProcessList.Clear();
+
+ ProcessList.AddRange(Array);
+ }
+ }
+ catch (AccessViolationException)
+ {
+ MessageBox.Show("This is an administrative task!", "Permission denied...", MessageBoxButtons.OK);
+
+ Process.GetCurrentProcess().Kill();
+ }
+ finally
+ {
+ ProcessTimer.Change(5000, 5000);
+ }
+}
+
+[Serializable]
+public class ProcessInfo
+{
+ public String FileName;
+ public Int32 Id;
+ public Boolean Is64Bit;
+ public String User;
+}
+
+public static ProcessInfo[] EnumProcesses()
+{
+ List<ProcessInfo> Result = new List<ProcessInfo>();
+ Process[] ProcList = Process.GetProcesses();
+
+ for (int i = 0; i < ProcList.Length; i++)
+ {
+ Process Proc = ProcList[i];
+
+ try
+ {
+ ProcessInfo Info = new ProcessInfo();
+
+ Info.FileName = Proc.MainModule.FileName;
+ Info.Id = Proc.Id;
+ Info.Is64Bit = RemoteHooking.IsX64Process(Proc.Id);
+ Info.User = RemoteHooking.GetProcessIdentity(Proc.Id).Name;
+
+ Result.Add(Info);
+ }
+ catch
+ {
+ }
+ }
+
+ return Result.ToArray();
+}
+
+[This documentation is preliminary and is subject to change.]
A function-linking-graph interface is used for constructing shaders that consist of a sequence of precompiled function calls that pass values to each other .
+To get a function-linking-graph interface, call
You can use the function-linking-graph (FLG) interface methods to construct shaders that consist of a sequence of precompiled function calls that pass values to each other. You don't need to write HLSL and then call the HLSL compiler. Instead, the shader structure is specified programmatically via a C++ API. FLG nodes represent input and output signatures and invocations of precompiled library functions. The order of registering the function-call nodes defines the sequence of invocations. You must specify the input signature node first and the output signature node last. FLG edges define how values are passed from one node to another. The data types of passed values must be the same; there is no implicit type conversion. Shape and swizzling rules follow the HLSL behavior. Values can only be passed forward in this sequence.
+A function-linking-graph interface is used for constructing shaders that consist of a sequence of precompiled function calls that pass values to each other.
Note??This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +To get a function-linking-graph interface, call
You can use the function-linking-graph (FLG) interface methods to construct shaders that consist of a sequence of precompiled function calls that pass values to each other. You don't need to write HLSL and then call the HLSL compiler. Instead, the shader structure is specified programmatically via a C++ API. FLG nodes represent input and output signatures and invocations of precompiled library functions. The order of registering the function-call nodes defines the sequence of invocations. You must specify the input signature node first and the output signature node last. FLG edges define how values are passed from one node to another. The data types of passed values must be the same; there is no implicit type conversion. Shape and swizzling rules follow the HLSL behavior. Values can only be passed forward in this sequence.
Note??[This documentation is preliminary and is subject to change.]
Sets the input signature of the function-linking-graph.
+An array of
A reference to the
[This documentation is preliminary and is subject to change.]
Sets the output signature of the function-linking-graph.
+An array of
A reference to the
[This documentation is preliminary and is subject to change.]
Initializes a shader module from the function-linking-graph object.
+A reference to an
[This documentation is preliminary and is subject to change.]
Creates a call-function linking node to use in the function-linking-graph.
+A reference to the
The name of the function.
A reference to a variable that receives a reference to the
[This documentation is preliminary and is subject to change.]
Passes the return value from a source linking node to a destination linking node.
+A reference to the
A reference to the
The zero-based index of the destination parameter.
Returns
Gets the error from the last function call of the function-linking-graph.
+Initializes a shader module from the function-linking-graph object.
+The address of a reference to an
An optional reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages, or
Returns
Sets the input signature of the function-linking-graph.
+An array of
The number of input parameters in the pInputParameters array.
A reference to a variable that receives a reference to the
Returns
Sets the output signature of the function-linking-graph.
+An array of
The number of output parameters in the pOutputParameters array.
A reference to a variable that receives a reference to the
Returns
Creates a call-function linking node to use in the function-linking-graph.
+ The optional namespace for the function, or
A reference to the
The name of the function.
A reference to a variable that receives a reference to the
Passes a value from a source linking node to a destination linking node.
+A reference to the
The zero-based index of the source parameter.
A reference to the
The zero-based index of the destination parameter.
Returns
Passes a value with swizzle from a source linking node to a destination linking node.
+A reference to the
The zero-based index of the source parameter.
The name of the source swizzle.
A reference to the
The zero-based index of the destination parameter.
The name of the destination swizzle.
Returns
Gets the error from the last function call of the function-linking-graph.
+An reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the error.
Returns
Generates Microsoft High Level Shader Language (HLSL) shader code that represents the function-linking-graph.
+Reserved
An reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the HLSL shader source code that represents the function-linking-graph. You can compile this HLSL code, but first you must add code or include statements for the functions called in the function-linking-graph.
Returns
A function-reflection interface accesses function info.
Note??This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +To get a function-reflection interface, call
Returns all constant buffers provided by this function
+All references to
Returns all function parameters
+All references to
Gets a description of how a resource is bound to a function.
+A zero-based resource index.
A reference to a
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets info about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
+Gets a description of how a resource is bound to a function.
+Resource name.
A reference to a
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets info about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
+Fills the function descriptor structure for the function.
+Fills the function descriptor structure for the function.
+A reference to a
Returns one of the Direct3D 11 Return Codes.
Gets a constant buffer by index for a function.
+Zero-based index.
A reference to a
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
+Gets a constant buffer by name for a function.
+The constant-buffer name.
A reference to a
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
+Gets a description of how a resource is bound to a function.
+A zero-based resource index.
A reference to a
Returns one of the Direct3D 11 Return Codes.
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets info about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
+Gets a variable by name.
+A reference to a string containing the variable name.
Returns a
Gets a description of how a resource is bound to a function.
+The constant-buffer name of the resource.
A reference to a
Returns one of the Direct3D 11 Return Codes.
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDescByName gets info about how one resource in the set is bound as an input to the shader. The Name parameter specifies the name of the resource.
+Gets the function parameter reflector.
+The zero-based index of the function parameter reflector to retrieve.
A reference to a
Values that identify the indended use of a constant-data buffer.
+Bind the constant buffer to an input slot defined in HLSL code (instead of letting the compiler choose the input slot).
Values that identify the intended use of constant-buffer data.
+A buffer containing scalar constants.
A buffer containing texture data.
A buffer containing interface references.
A buffer containing binding information.
Values that indicate the location of a shader #include file.
+You pass a
The local directory.
The system directory.
Values that indicate how the pipeline interprets geometry or hull shader input primitives.
+ The
The shader has not been initialized with an input primitive type.
Interpret the input primitive as a point.
Interpret the input primitive as a line.
Interpret the input primitive as a triangle.
Interpret the input primitive as a line with adjacency data.
Interpret the input primitive as a triangle with adjacency data.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Indicates semantic flags for function parameters.
+The parameter has no semantic flags.
Indicates an input parameter.
Indicates an output parameter.
Values that identify the data types that can be stored in a register.
+A register component type is specified in the ComponentType member of the
The data type is unknown.
32-bit unsigned integer.
32-bit signed integer.
32-bit floating-point number.
Values that identify the return type of a resource.
+A resource return type is specified in the ReturnType member of the
Return type is an unsigned integer value normalized to a value between 0 and 1.
Return type is a signed integer value normalized to a value between -1 and 1.
Return type is a signed integer.
Return type is an unsigned integer.
Return type is a floating-point number.
Return type is unknown.
Return type is a double-precision value.
Return type is a multiple-dword type, such as a double or uint64, and the component is continued from the previous component that was declared. The first component represents the lower bits.
Values that identify parts of the content of an arbitrary length data buffer.
+These values are passed to the
Values that identify shader-input options.
+Assign a shader input to a register based on the register assignment in the HLSL code (instead of letting the compiler choose the register).
Use a comparison sampler, which uses the SampleCmp (DirectX HLSL Texture Object) and SampleCmpLevelZero (DirectX HLSL Texture Object) sampling functions.
A 2-bit value for encoding texture components.
A 2-bit value for encoding texture components.
A 2-bit value for encoding texture components.
This value is reserved.
Values that identify resource types that can be bound to a shader and that are reflected as part of the resource description for the shader.
+The shader resource is a constant buffer.
The shader resource is a texture buffer.
The shader resource is a texture.
The shader resource is a sampler.
The shader resource is a read-and-write buffer.
The shader resource is a structured buffer.
For more information about structured buffer, see the Remarks section.
The shader resource is a read-and-write structured buffer.
The shader resource is a byte-address buffer.
The shader resource is a read-and-write byte-address buffer.
The shader resource is an append-structured buffer.
The shader resource is a consume-structured buffer.
The shader resource is a read-and-write structured buffer that uses the built-in counter to append or consume.
Values that identify the class of a shader variable.
+The class of a shader variable is not a programming class; the class identifies the variable class such as scalar, vector, object, and so on.
The shader variable is a scalar.
The shader variable is a vector.
The shader variable is a row-major matrix.
The shader variable is a column-major matrix.
The shader variable is an object.
The shader variable is a structure.
The shader variable is a class.
The shader variable is an interface.
Values that identify information about a shader variable.
+A call to the
Indicates that the registers assigned to this shader variable were explicitly declared in shader code (instead of automatically assigned by the compiler).
Indicates that this variable is used by this shader. This value confirms that a particular shader variable (which can be common to many different shaders) is indeed used by a particular shader.
Indicates that this variable is an interface.
Indicates that this variable is a parameter of an interface.
Values that identify various data, texture, and buffer types that can be assigned to a shader variable.
+ A call to the
The types in a structured buffer describe the structure of the elements in the buffer. The layout of these types generally match their C++ struct counterparts. The following examples show structured buffers:
struct mystruct {float4 val; uint ind;}; RWStructuredBuffer<mystruct> rwbuf; RWStructuredBuffer<float3> rwbuf2;+
The variable is a void reference.
The variable is a boolean.
The variable is an integer.
The variable is a floating-point number.
The variable is a string.
The variable is a texture.
The variable is a 1D texture.
The variable is a 2D texture.
The variable is a 3D texture.
The variable is a texture cube.
The variable is a sampler.
The variable is a 1D sampler.
The variable is a 2D sampler.
The variable is a 3D sampler.
The variable is a cube sampler.
The variable is a pixel shader.
The variable is a vertex shader.
The variable is a pixel fragment.
The variable is a vertex fragment.
The variable is an unsigned integer.
The variable is an 8-bit unsigned integer.
The variable is a geometry shader.
The variable is a rasterizer-state object.
The variable is a depth-stencil-state object.
The variable is a blend-state object.
The variable is a buffer.
The variable is a constant buffer.
The variable is a texture buffer.
The variable is a 1D-texture array.
The variable is a 2D-texture array.
The variable is a render-target view.
The variable is a depth-stencil view.
The variable is a 2D-multisampled texture.
The variable is a 2D-multisampled-texture array.
The variable is a texture-cube array.
The variable holds a compiled hull-shader binary.
The variable holds a compiled domain-shader binary.
The variable is an interface.
The variable holds a compiled compute-shader binary.
The variable is a double precision (64-bit) floating-point number.
The variable is a 1D read-and-write texture.
The variable is an array of 1D read-and-write textures.
The variable is a 2D read-and-write texture.
The variable is an array of 2D read-and-write textures.
The variable is a 3D read-and-write texture.
The variable is a read-and-write buffer.
The variable is a byte-address buffer.
The variable is a read-and-write byte-address buffer.
The variable is a structured buffer.
For more information about structured buffer, see the Remarks section.
The variable is a read-and-write structured buffer.
The variable is an append structured buffer.
The variable is a consume structured buffer.
The variable is an 8-byte FLOAT.
The variable is a 10-byte FLOAT.
The variable is a 16-byte FLOAT.
The variable is a 12-byte INT.
The variable is a 16-byte INT.
The variable is a 16-byte INT.
Indicates shader type.
+Pixel shader.
Vertex shader.
Geometry shader.
Hull shader.
Domain shader.
Compute shader.
Indicates the end of the enumeration constants.
Strip flag options.
+These flags are used by
Values that identify shader parameters that use system-value semantics.
+ The
This parameter does not use a predefined system-value semantic.
This parameter contains position data.
This parameter contains clip-distance data.
This parameter contains cull-distance data.
This parameter contains a render-target-array index.
This parameter contains a viewport-array index.
This parameter contains a vertex ID.
This parameter contains a primitive ID.
This parameter contains an instance ID.
This parameter contains data that identifies whether or not the primitive faces the camera.
This parameter contains a sampler-array index.
This parameter contains one of four tessellation factors that correspond to the amount of parts that a quad patch is broken into along the given edge. This flag is used to tessellate a quad patch.
This parameter contains one of two tessellation factors that correspond to the amount of parts that a quad patch is broken into vertically and horizontally within the patch. This flag is used to tessellate a quad patch.
This parameter contains one of three tessellation factors that correspond to the amount of parts that a tri patch is broken into along the given edge. This flag is used to tessellate a tri patch.
This parameter contains the tessellation factor that corresponds to the amount of parts that a tri patch is broken into within the patch. This flag is used to tessellate a tri patch.
This parameter contains the tessellation factor that corresponds to the number of lines broken into within the patch. This flag is used to tessellate an isolines patch.
This parameter contains the tessellation factor that corresponds to the number of lines that are created within the patch. This flag is used to tessellate an isolines patch.
This parameter contains render-target data.
This parameter contains depth data.
This parameter contains alpha-coverage data.
This parameter signifies that the value is greater than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.
This parameter signifies that the value is less than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.
This parameter contains a stencil reference. See Shader Specified Stencil Reference Value.
This parameter contains inner input coverage data. See Conservative Rasterization.
Values that identify domain options for tessellator data.
+The data domain defines the type of data. This enumeration is used by
The data type is undefined.
Isoline data.
Triangle data.
Quad data.
Values that identify output primitive types.
+The output primitive type determines how the tessellator output data is organized; this enumeration is used by
The output primitive type is undefined.
The output primitive type is a point.
The output primitive type is a line.
The output primitive type is a clockwise triangle.
The output primitive type is a counter clockwise triangle.
Values that identify partitioning options.
+During tessellation, the partition option helps to determine how the algorithm chooses the next partition value; this enumeration is used by
The partitioning type is undefined.
Partition with integers only.
Partition with a power-of-two number only.
Partition with an odd, fractional number.
Partition with an even, fractional number.
Reads a file that is on disk into memory.
+A reference to a constant null-terminated string that contains the name of the file to read into memory.
A reference to a variable that receives a reference to the ID3DBlob interface that contains information that
Returns one of the Direct3D 11 return codes.
Writes a memory blob to a file on disk.
+A reference to a ID3DBlob interface that contains the memory blob to write to the file that the pFileName parameter specifies.
A reference to a constant null-terminated string that contains the name of the file to which to write.
A Boolean value that specifies whether to overwrite information in the pFileName file. TRUE specifies to overwrite information and
Returns one of the Direct3D 11 return codes.
Compile HLSL code or an effect file into bytecode for a given target.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of pSrcData.
You can use this parameter for strings that specify error messages. If not used, set to
An array of
Optional. A reference to an
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((*)( )1)
The name of the shader entry point function where shader execution begins. When you compile using a fx profile (for example, fx_4_0, fx_5_0, and so on),
A string that specifies the shader target or set of shader features to compile against. The shader target can be shader model 2, shader model 3, shader model 4, or shader model 5. The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets.
Flags defined by D3D compile constants.
Flags defined by D3D compile effect constants. When you compile a shader and not an effect file,
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the compiled code.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages, or
Returns one of the Direct3D 11 return codes.
The difference between
Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given target.
+A reference to uncompiled shader data (ASCII HLSL code).
The size, in bytes, of the block of memory that pSrcData points to.
An optional reference to a constant null-terminated string containing the name that identifies the source data to use in error messages. If not used, set to
An optional array of
A reference to an
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((*)( )1)
A reference to a constant null-terminated string that contains the name of the shader entry point function where shader execution begins. When you compile an effect,
A reference to a constant null-terminated string that specifies the shader target or set of shader features to compile against. The shader target can be a shader model (for example, shader model 2, shader model 3, shader model 4, or shader model 5). The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets.
A combination of shader D3D compile constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code.
A combination of effect D3D compile effect constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the effect. When you compile a shader and not an effect file,
A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code.
Flag | Description |
---|---|
Merge unordered access view (UAV) slots in the secondary data that the pSecondaryData parameter points to. | |
Preserve template slots in the secondary data that the pSecondaryData parameter points to. | |
Require that templates in the secondary data that the pSecondaryData parameter points to match when the compiler compiles the HLSL code. |
?
If pSecondaryData is
A reference to secondary data. If you don't pass secondary data, set to
The size, in bytes, of the block of memory that pSecondaryData points to. If pSecondaryData is
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the compiled code.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages, or
Returns one of the Direct3D 11 return codes.
The difference between
Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given target.
+Returns one of the Direct3D 11 return codes.
Preprocesses uncompiled HLSL code.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of pSrcData.
The name of the file that contains the uncompiled HLSL code.
An array of
A reference to an
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((*)( )1)
The address of a ID3DBlob that contains the compiled code.
A reference to an ID3DBlob that contains compiler error messages, or
Returns one of the Direct3D 11 return codes.
Gets shader debug information.
+A reference to source data; either uncompiled or compiled HLSL code.
Length of pSrcData.
A reference to a buffer that receives the ID3DBlob interface that contains debug information.
Returns one of the Direct3D 11 return codes.
Debug information is embedded in the body of the shader after calling
Gets a reference to a reflection interface.
+A reference to source data as compiled HLSL code.
Length of pSrcData.
The reference
A reference to a reflection interface.
Returns one of the Direct3D 11 return codes.
Shader code contains metadata that can be inspected using the reflection APIs.
The following code illustrates retrieving a
pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );+* pReflector = null ; +( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pReflector); +
Creates a library-reflection interface from source data that contains an HLSL library of functions.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +A reference to source data as an HLSL library of functions.
The size, in bytes, of the block of memory that pSrcData points to.
The reference
A reference to a variable that receives a reference to a library-reflection interface,
Returns
Disassembles compiled HLSL code.
+A reference to source data as compiled HLSL code.
Length of pSrcData.
Flags affecting the behavior of
Flag | Description |
---|---|
Enable the output of color codes. | |
Enable the output of default values. | |
Enable instruction numbering. | |
No effect. | |
Disable debug information. | |
Enable instruction offsets. | |
Disassemble instructions only. | |
| Use hex symbols in disassemblies. |
?
The comment string at the top of the shader that identifies the shader constants and variables.
A reference to a buffer that receives the ID3DBlob interface that accesses assembly text.
Returns one of the Direct3D 11 return codes.
Disassembles a specific region of compiled Microsoft High Level Shader Language (HLSL) code.
+A reference to compiled shader data.
The size, in bytes, of the block of memory that pSrcData points to.
A combination of zero or more of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how
Flag | Description |
---|---|
Enable the output of color codes. | |
Enable the output of default values. | |
Enable instruction numbering. | |
No effect. | |
Disable the output of debug information. | |
Enable the output of instruction offsets. | |
This flag has no effect in |
?
A reference to a constant null-terminated string at the top of the shader that identifies the shader constants and variables.
The number of bytes offset into the compiled shader data where
The number of instructions to disassemble.
A reference to a variable that receives the number of bytes offset into the compiled shader data where
A reference to a buffer that receives the ID3DBlob interface that accesses the disassembled HLSL code.
Returns one of the Direct3D 11 return codes.
Creates a linker interface.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +A reference to a variable that receives a reference to the
Returns
Creates a shader module interface from source data for the shader module.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +A reference to the source data for the shader module.
The size, in bytes, of the block of memory that pSrcData points to.
A reference to a variable that receives a reference to the
Returns
Creates a function-linking-graph interface.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +Reserved
A reference to a variable that receives a reference to the
Returns
Retrieves the byte offsets for instructions within a section of shader code.
+A reference to the compiled shader data.
The size, in bytes, of the block of memory that pSrcData points to.
A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how
Flag | Description |
---|---|
D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE (0x01) | Include non-executable code in the retrieved information. |
?
The index of the instruction in the compiled shader data for which
The number of instructions for which
A reference to a variable that receives the total number of instructions in the section of shader code.
A reference to a variable that receives the actual number of offsets.
A new kind of Microsoft High Level Shader Language (HLSL) debugging information from a program database (PDB) file uses instruction-byte offsets within a shader blob (arbitrary-length data buffer). You use
Gets the input signature from a compilation result.
+Returns one of the Direct3D 11 return codes.
Gets the output signature from a compilation result.
+Returns one of the Direct3D 11 return codes.
Gets the input and output signatures from a compilation result.
+Returns one of the Direct3D 11 return codes.
Removes unwanted blobs from a compilation result.
+A reference to source data as compiled HLSL code.
Length of pSrcData.
Strip flag options, represented by
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the unwanted stripped out shader code.
Returns one of the Direct3D 11 return codes.
Retrieves a specific part from a compilation result.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of uncompiled shader data that pSrcData points to.
A
Flags that indicate how to retrieve the blob part. Currently, no flags are defined.
The address of a reference to the ID3DBlob interface that is used to retrieve the specified part of the buffer.
Returns one of the Direct3D 11 return codes.
Sets information in a compilation result.
+A reference to compiled shader data.
The length of the compiled shader data that pSrcData points to.
A
Flags that indicate how to set the blob part. Currently, no flags are defined; therefore, set to zero.
A reference to data to set in the compilation result.
The length of the data that pPart points to.
A reference to a buffer that receives the ID3DBlob interface for the new shader in which the new part data is set.
Returns one of the Direct3D 11 return codes.
Creates a buffer.
+Number of bytes in the blob.
The address of a reference to the ID3DBlob interface that is used to retrieve the buffer.
Returns one of the Direct3D 11 return codes.
The latest D3dcompiler_nn.dll contains the
Compresses a set of shaders into a more compact form.
+The number of shaders to compress.
An array of
Flags that indicate how to compress the shaders. Currently, only the D3D_COMPRESS_SHADER_KEEP_ALL_PARTS (0x00000001) flag is defined.
The address of a reference to the ID3DBlob interface that is used to retrieve the compressed shader data.
Returns one of the Direct3D 11 return codes.
Decompresses one or more shaders from a compressed set.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of uncompiled shader data that pSrcData points to.
The number of shaders to decompress.
The index of the first shader to decompress.
An array of indexes that represent the shaders to decompress.
Flags that indicate how to decompress. Currently, no flags are defined.
The address of a reference to the ID3DBlob interface that is used to retrieve the decompressed shader data.
A reference to a variable that receives the total number of shaders that
Returns one of the Direct3D 11 return codes.
This shader-reflection interface provides access to a constant buffer.
+ To create a constant-buffer interface, call
Get a constant-buffer description.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a constant-buffer description.
+A reference to a
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection variable by index.
+Zero-based index.
A reference to a shader-reflection variable interface (see
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection variable by name.
+Variable name.
Returns a sentinel object (end of list marker). To determine if GetVariableByName successfully completed, call
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+A function-parameter-reflection interface accesses function-parameter info.
Note??This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +To get a function-parameter-reflection interface, call
Fills the parameter descriptor structure for the function's parameter.
+Fills the parameter descriptor structure for the function's parameter.
+A reference to a
Returns one of the Direct3D 11 Return Codes.
To use this interface, create an interface that inherits from
A library-reflection interface accesses library info.
Note?? This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? + To get a library-reflection interface, call
Fills the library descriptor structure for the library reflection.
+Fills the library descriptor structure for the library reflection.
+A reference to a
Returns one of the Direct3D 11 Return Codes.
Gets the function reflector.
+The zero-based index of the function reflector to retrieve.
A reference to a
Returns all function reflectors provided by this library
+All references to
A linker interface is used to link a shader module.
Note?? This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? + To get a linker interface, call
[This documentation is preliminary and is subject to change.]
Links the shader and produces a shader blob that the Direct3D runtime can use.
+Links the shader and produces a shader blob that the Direct3D runtime can use.
+ A reference to the
The name of the shader module instance to link from.
The name for the shader blob that is produced.
Reserved.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the compiled shader code.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages.
Returns
Adds an instance of a library module to be used for linking.
+A reference to the
Returns
Adds a clip plane with the plane coefficients taken from a cbuffer entry for 10Level9 shaders.
+Returns
[This documentation is preliminary and is subject to change.]
Links the shader and produces a shader blob that the Direct3D runtime can use.
+A reference to the
The name of the shader module instance to link from.
The name for the shader blob that is produced.
Reserved
Returns the compiled
A linking-node interface is used for shader linking.
Note?? This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? + To get a linking-node interface, call
A module interface creates an instance of a module that is used for resource rebinding.
Note?? This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? + To get a module interface, call
[This documentation is preliminary and is subject to change.]
Initializes an instance of a shader module that is used for resource rebinding.
+Initializes an instance of a shader module that is used for resource rebinding.
+The name of a shader module to initialize. This can be
The address of a reference to an
Returns
A module-instance interface is used for resource rebinding.
Note?? This interface is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? + To get a module-instance interface, call
[This documentation is preliminary and is subject to change.]
Rebinds a resource by name as an unordered access view (UAV) to destination slots.
+Rebinds a constant buffer from a source slot to a destination slot.
+The source slot number for rebinding.
The destination slot number for rebinding.
The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.
Returns:
Rebinds a constant buffer by name to a destination slot.
+The name of the constant buffer for rebinding.
The destination slot number for rebinding.
The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.
Returns:
Rebinds a texture or buffer from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a texture or buffer by name to destination slots.
+The name of the texture or buffer for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a sampler from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a sampler by name to destination slots.
+The name of the sampler for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds an unordered access view (UAV) from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds an unordered access view (UAV) by name to destination slots.
+The name of the UAV for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a resource as an unordered access view (UAV) from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a resource by name as an unordered access view (UAV) to destination slots.
+The name of the resource for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
The address of a reference to an
The name of a shader module to initialize. This can be
The address of a reference to an
A shader-reflection interface accesses shader information.
+ An
pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );+* pReflector = null ; +( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pReflector);
Get a shader description.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Mov instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Movc instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of conversion instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of bitwise instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the geometry-shader input-primitive description.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a shader is a sample frequency shader.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interface slots in a shader.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the minimum feature level.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets a group of flags that indicates the requirements of a shader.
+Here is how the D3D11Shader.h header defines the shader requirements flags:
#define+0x00000001 + #define 0x00000002 + #define 0x00000004 + #define 0x00000008 + #define 0x00000010 + #define 0x00000020 + #define 0x00000040 + #define 0x00000080 +
Get a shader description.
+A reference to a shader description. See
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a constant buffer by index.
+Zero-based index.
A reference to a constant buffer (see
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a constant buffer by name.
+The constant-buffer name.
A reference to a constant buffer (see
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a description of how a resource is bound to a shader.
+A zero-based resource index.
A reference to an input-binding description. See
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets information about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get an input-parameter description for a shader.
+A zero-based parameter index.
A reference to a shader-input-signature description. See
An input-parameter description is also called a shader signature. The shader signature contains information about the input parameters such as the order or parameters, their data type, and a parameter semantic.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get an output-parameter description for a shader.
+A zero-based parameter index.
A reference to a shader-output-parameter description. See
An output-parameter description is also called a shader signature. The shader signature contains information about the output parameters such as the order or parameters, their data type, and a parameter semantic.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a patch-constant parameter description for a shader.
+A zero-based parameter index.
A reference to a shader-input-signature description. See
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets a variable by name.
+A reference to a string containing the variable name.
Returns a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a description of how a resource is bound to a shader.
+The constant-buffer name of the resource.
A reference to an input-binding description. See
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDescByName gets information about how one resource in the set is bound as an input to the shader. The Name parameter specifies the name of the resource.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Mov instructions.
+Returns the number of Mov instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Movc instructions.
+Returns the number of Movc instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of conversion instructions.
+Returns the number of conversion instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of bitwise instructions.
+The number of bitwise instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the geometry-shader input-primitive description.
+ The input-primitive description. See
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a shader is a sample frequency shader.
+Returns true if the shader is a sample frequency shader; otherwise returns false.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interface slots in a shader.
+The number of interface slots in the shader.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the minimum feature level.
+ A reference to one of the enumerated values in
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Retrieves the sizes, in units of threads, of the X, Y, and Z dimensions of the shader's thread-group grid.
+A reference to the size, in threads, of the x-dimension of the thread-group grid. The maximum size is 1024.
A reference to the size, in threads, of the y-dimension of the thread-group grid. The maximum size is 1024.
A reference to the size, in threads, of the z-dimension of the thread-group grid. The maximum size is 64.
Returns the total size, in threads, of the thread-group grid by calculating the product of the size of each dimension.
*pSizeX * *pSizeY * *pSizeZ;
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
When a compute shader is written it defines the actions of a single thread group only. If multiple thread groups are required, it is the role of the
Gets a group of flags that indicates the requirements of a shader.
+A value that contains a combination of one or more shader requirements flags; each flag specifies a requirement of the shader. A default value of 0 means there are no requirements.
Shader requirement flag | Description |
---|---|
Shader requires that the graphics driver and hardware support double data type. For more info, see | |
Shader requires an early depth stencil. | |
Shader requires unordered access views (UAVs) at every pipeline stage. | |
Shader requires 64 UAVs. | |
Shader requires the graphics driver and hardware to support minimum precision. For more info, see Using HLSL minimum precision. | |
Shader requires that the graphics driver and hardware support extended doubles instructions. For more info, see the ExtendedDoublesShaderInstructions member of | |
Shader requires that the graphics driver and hardware support the msad4 intrinsic function in shaders. For more info, see the SAD4ShaderInstructions member of | |
Shader requires that the graphics driver and hardware support Direct3D 9 shadow support. For more info, see | |
Shader requires that the graphics driver and hardware support tiled resources. For more info, see GetResourceTiling. |
?
Here is how the D3D11Shader.h header defines the shader requirements flags:
#define+0x00000001 + #define 0x00000002 + #define 0x00000004 + #define 0x00000008 + #define 0x00000010 + #define 0x00000020 + #define 0x00000040 + #define 0x00000080 +
Get an interface by index.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get the description of a shader-reflection-variable type.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the base class of a class.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets an
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interfaces.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get the description of a shader-reflection-variable type.
+A reference to a shader-type description (see
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection-variable type by index.
+Zero-based index.
A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection-variable type by name.
+Member name.
A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection-variable type.
+Zero-based index.
The variable type.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether two
Returns
IsEqual indicates whether the sources of the
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the base class of a class.
+Returns a reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets an
Returns A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interfaces.
+Returns the number of interfaces.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get an interface by index.
+Zero-based index.
A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a variable is of the specified type.
+A reference to a
Returns
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a class type implements an interface.
+A reference to a
Returns
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the corresponding interface slot for a variable that represents an interface reference.
+GetInterfaceSlot gets the corresponding slot in an dynamic linkage array for an interface instance. The returned slot number is used to set an interface instance to a particular class instance. See the HLSL Interfaces and Classes overview for additional information.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-variable description.
+This method can be used to determine if the
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+This method returns the buffer of the current
Get a shader-variable description.
+A reference to a shader-variable description (see
Returns one of the following Direct3D 11 Return Codes.
This method can be used to determine if the
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-variable type.
+A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+This method returns the buffer of the current
Returns a reference to the
Gets the corresponding interface slot for a variable that represents an interface reference.
+Index of the array element to get the slot number for. For a non-array variable this value will be zero.
Returns the index of the interface in the interface array.
GetInterfaceSlot gets the corresponding slot in an dynamic linkage array for an interface instance. The returned slot number is used to set an interface instance to a particular class instance. See the HLSL Interfaces and Classes overview for additional information.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+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
The name of the buffer.
A
The number of unique variables.
Buffer size (in bytes).
A combination of
Describes a function.
+The shader version.
The name of the originator of the function.
A combination of D3DCOMPILE Constants that are combined by using a bitwise OR operation. The resulting value specifies shader compilation and parsing.
The number of constant buffers for the function.
The number of bound resources for the function.
The number of emitted instructions for the function.
The number of temporary registers used by the function.
The number of temporary arrays used by the function.
The number of constant defines for the function.
The number of declarations (input + output) for the function.
The number of non-categorized texture instructions for the function.
The number of texture load instructions for the function.
The number of texture comparison instructions for the function.
The number of texture bias instructions for the function.
The number of texture gradient instructions for the function.
The number of floating point arithmetic instructions used by the function.
The number of signed integer arithmetic instructions used by the function.
The number of unsigned integer arithmetic instructions used by the function.
The number of static flow control instructions used by the function.
The number of dynamic flow control instructions used by the function.
The number of macro instructions used by the function.
The number of array instructions used by the function.
The number of mov instructions used by the function.
The number of movc instructions used by the function.
The number of type conversion instructions used by the function.
The number of bitwise arithmetic instructions used by the function.
A
A value that contains a combination of one or more shader requirements flags; each flag specifies a requirement of the shader. A default value of 0 means there are no requirements. For a list of values, see
The name of the function.
The number of logical parameters in the function signature, not including the return value.
Indicates whether the function returns a value. TRUE indicates it returns a value; otherwise,
Indicates whether there is a Direct3D 10Level9 vertex shader blob. TRUE indicates there is a 10Level9 vertex shader blob; otherwise,
Indicates whether there is a Direct3D 10Level9 pixel shader blob. TRUE indicates there is a 10Level9 pixel shader blob; otherwise,
Describes how a shader resource is bound to a shader input.
+Get a shader-input-signature description by calling
Name of the shader resource.
A
Starting bind point.
Number of contiguous bind points for arrays.
A combination of
If the input is a texture, the
A
The number of samples for a multisampled texture; when a texture isn't multisampled, the value is set to -1 (0xFFFFFFFF).
Describes a library.
+The name of the originator of the library.
A combination of D3DCOMPILE Constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles.
The number of functions exported from the library.
Describes a function parameter.
+Get a function-parameter description by calling
The name of the function parameter.
The HLSL semantic that is associated with this function parameter. This name includes the index, for example, SV_Target[n].
A
A
The number of rows for a matrix parameter.
The number of columns for a matrix parameter.
A
A combination of
The first input register for this parameter.
The first input register component for this parameter.
The first output register for this parameter.
The first output register component for this parameter.
Describes shader data.
+An array of
A reference to shader data.
Length of shader data that pBytecode points to.
Describes a shader.
+A shader is written in HLSL and compiled into an intermediate language by the HLSL compiler. The shader description returns information about the compiled shader. Get a shader description by calling
Shader version.
The name of the originator of the shader.
Shader compilation/parse flags.
The number of shader-constant buffers.
The number of resource (textures and buffers) bound to a shader.
The number of parameters in the input signature.
The number of parameters in the output signature.
The number of intermediate-language instructions in the compiled shader.
The number of temporary registers in the compiled shader.
Number of temporary arrays used.
Number of constant defines.
Number of declarations (input + output).
Number of non-categorized texture instructions.
Number of texture load instructions
Number of texture comparison instructions
Number of texture bias instructions
Number of texture gradient instructions.
Number of floating point arithmetic instructions used.
Number of signed integer arithmetic instructions used.
Number of unsigned integer arithmetic instructions used.
Number of static flow control instructions used.
Number of dynamic flow control instructions used.
Number of macro instructions used.
Number of array instructions used.
Number of cut instructions used.
Number of emit instructions used.
The
Geometry shader maximum output vertex count.
The
Number of parameters in the patch-constant signature.
Number of geometry shader instances.
Number of control points in the hull shader and domain shader.
The
The
The
Number of barrier instructions in a compute shader.
Number of interlocked instructions in a compute shader.
Number of texture writes in a compute shader.
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 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
A per-parameter string that identifies how the data will be used. For more info, see Semantics.
Semantic index that modifies the semantic. Used to differentiate different parameters that use the same semantic.
The register that will contain this variable's data.
A
A
Mask which indicates which components of a register are used.
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).
Indicates which stream the geometry shader is using for the signature parameter.
A
Describes a shader-variable type.
+Get a shader-variable-type description by calling
A
A
Number of rows in a matrix. Otherwise a numeric type returns 1, any other type returns 0.
Number of columns in a matrix. Otherwise a numeric type returns 1, any other type returns 0.
Number of elements in an array; otherwise 0.
Number of members in the structure; otherwise 0.
Offset, in bytes, between the start of the parent structure and this variable. Can be 0 if not a structure member.
Name of the shader-variable type. This member can be
Describes a shader variable.
+ Get a shader-variable description using reflection by calling
As of the June 2010 update, DefaultValue emits default values for reflection.
+The variable name.
Offset from the start of the parent structure to the beginning of the variable.
Size of the variable (in bytes).
A combination of
The default value for initializing the variable.
Offset from the start of the variable to the beginning of the texture.
The size of the texture, in bytes.
Offset from the start of the variable to the beginning of the sampler.
The size of the sampler, in bytes.
The
A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard.
To enumerate the display subsystems, use
To get an interface to the adapter for a particular device, use
To create a software adapter, use
Windows?Phone?8: This API is supported.
+Gets a DXGI 1.0 description of an adapter (or video card).
+Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.
HasWDDMDriver() + { LPDIRECT3DCREATE9EX pD3D9Create9Ex =null ; HMODULE hD3D9 =null ; hD3D9 = LoadLibrary( L"d3d9.dll" ); if (null == hD3D9 ) { return false; } // /* Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver. */ // pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex !=null ; + }
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); + * pDXGIAdapter; + pDXGIDevice->GetAdapter(&pDXGIAdapter); + adapterDesc; + pDXGIAdapter->GetDesc(&adapterDesc);
Enumerate adapter (video card) outputs.
+The index of the output.
The address of a reference to an
A code that indicates success or failure (see DXGI_ERROR).
If the adapter came from a device created using
When the EnumOutputs method succeeds and fills the ppOutput parameter with the address of the reference to the output interface, EnumOutputs increments the output interface's reference count. To avoid a memory leak, when you finish using the output interface, call the Release method to decrement the reference count.
EnumOutputs first returns the output on which the desktop primary is displayed. This output corresponds with an index of zero. EnumOutputs then returns other outputs.
+Gets a DXGI 1.0 description of an adapter (or video card).
+A reference to a
Returns
Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.
HasWDDMDriver() + { LPDIRECT3DCREATE9EX pD3D9Create9Ex =null ; HMODULE hD3D9 =null ; hD3D9 = LoadLibrary( L"d3d9.dll" ); if (null == hD3D9 ) { return false; } // /* Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver. */ // pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex !=null ; + }
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); + * pDXGIAdapter; + pDXGIDevice->GetAdapter(&pDXGIAdapter); + adapterDesc; + pDXGIAdapter->GetDesc(&adapterDesc);
Checks whether the system supports a device interface for a graphics component.
+The
The user mode driver version of InterfaceName. This is returned only if the interface is supported, otherwise this parameter will be
An
The
The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); +
Windows?Phone?8: This API is supported.
+Returns the adapter for the specified device.
+If the GetAdapter method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.
+Gets or sets the GPU thread priority.
+Returns the adapter for the specified device.
+The address of an
Returns
If the GetAdapter method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.
+Returns a surface. This method is used internally and you should not call it directly in your application.
+A reference to a
The number of surfaces to create.
A DXGI_USAGE flag that specifies how the surface is expected to be used.
An optional reference to a
The address of an
Returns
The CreateSurface method creates a buffer to exchange data between one or more devices. It is used internally, and you should not directly call it.
The runtime automatically creates an
Gets the residency status of an array of resources.
+An array of
An array of
The number of resources in the ppResources argument array and pResidencyStatus argument array.
Returns
The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.
Note??The residency status will constantly change.?If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the
Gets the residency status of an array of resources.
+An array of
An array of
The number of resources in the ppResources argument array and pResidencyStatus argument array.
Returns
The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.
Note??The residency status will constantly change.?If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the
Gets the residency status of an array of resources.
+An array of
An array of
The number of resources in the ppResources argument array and pResidencyStatus argument array.
Returns
The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.
Note??The residency status will constantly change.?If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the
Sets the GPU thread priority.
+A value that specifies the required GPU thread priority. This value must be between -7 and 7, inclusive, where 0 represents normal priority.
Return
The values for the Priority parameter function as follows:
To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. You should profile your application to ensure that it behaves as intended. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience.
+Gets the GPU thread priority.
+A reference to a variable that receives a value that indicates the current GPU thread priority. The value will be between -7 and 7, inclusive, where 0 represents normal priority.
Return
Inherited from objects that are tied to the device so that they can retrieve a reference to it.
+Windows?Phone?8: This API is supported.
+Retrieves the device.
+The reference id for the device.
The address of a reference to the device.
A code that indicates success or failure (see DXGI_ERROR).
The type of interface that is returned can be any interface published by the device. For example, it could be an
An
Windows?Phone?8: This API is supported.
+Sets application-defined data to the object and associates that data with a
A
The size of the object's data.
A reference to the object's data.
Returns one of the DXGI_ERROR values.
SetPrivateData makes a copy of the specified data and stores it with the object.
Private data that SetPrivateData stores in the object occupies the same storage space as private data that is stored by associated Direct3D objects (for example, by a Microsoft Direct3D?11 device through
The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the well-known private data
static const char c_szName[] = "My name"; + hr = pContext->SetPrivateData(, sizeof( c_szName ) - 1, c_szName ); +
You can use
Set an interface in the object's private data.
+A
The interface to set.
Returns one of the following DXGI_ERROR.
This API associates an interface reference with the object.
When the interface is set its reference count is incremented. When the data are overwritten (by calling SPD or SPDI with the same
Get a reference to the object's data.
+A
The size of the data.
Pointer to the data.
Returns one of the following DXGI_ERROR.
If the data returned is a reference to an
You can pass GUID_DeviceType in the Name parameter of GetPrivateData to retrieve the device type from the display adapter object (
To get the type of device on which the display adapter was created
On Windows?7 or earlier, this type is either a value from D3D10_DRIVER_TYPE or
Gets the parent of the object.
+The ID of the requested interface.
The address of a reference to the parent object.
Returns one of the DXGI_ERROR values.
An
Create a factory by calling CreateDXGIFactory.
Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the
* pDXGIDevice = nullptr; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); * pDXGIAdapter = nullptr; + hr = pDXGIDevice->GetAdapter( &pDXGIAdapter ); * pIDXGIFactory = nullptr; + pDXGIAdapter->GetParent(__uuidof( ), (void **)&pIDXGIFactory);
Windows?Phone?8: This API is supported.
+Enumerates the adapters (video cards).
+The index of the adapter to enumerate.
The address of a reference to an
Returns
When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the
When the EnumAdapters method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.
EnumAdapters first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters next returns other adapters with outputs. EnumAdapters finally returns adapters without outputs.
+Allows DXGI to monitor an application's message queue for the alt-enter key sequence (which causes the application to switch from windowed to full screen or vice versa).
+The handle of the window that is to be monitored. This parameter can be
One or more of the following values:
The combination of WindowHandle and Flags informs DXGI to stop monitoring window messages for the previously-associated window.
If the application switches to full-screen mode, DXGI will choose a full-screen resolution to be the smallest supported resolution that is larger or the same size as the current back buffer size.
Applications can make some changes to make the transition from windowed to full screen more efficient. For example, on a WM_SIZE message, the application should release any outstanding swap-chain back buffers, call
While windowed, the application can, if it chooses, restrict the size of its window's client area to sizes to which it is comfortable rendering. A fully flexible application would make no such restriction, but UI elements or other design considerations can, of course, make this flexibility untenable. If the application further chooses to restrict its window's client area to just those that match supported full-screen resolutions, the application can field WM_SIZING, then check against
Applications that want to handle mode changes or Alt+Enter themselves should call MakeWindowAssociation with the
Get the window through which the user controls the transition to and from full screen.
+A reference to a window handle.
[Starting with Direct3D 11.1, we recommend not to use CreateSwapChain anymore to create a swap chain. Instead, use CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, or CreateSwapChainForComposition depending on how you want to create the swap chain.]
Creates a swap chain.
+
If you attempt to create a swap chain in full-screen mode, and full-screen mode is unavailable, the swap chain will be created in windowed mode and
If the buffer width or the buffer height is zero, the sizes will be inferred from the output window size in the swap-chain description.
Because the target output can't be chosen explicitly when the swap chain is created, we recommend not to create a full-screen swap chain. This can reduce presentation performance if the swap chain size and the output window size do not match. Here are two ways to ensure that the sizes match:
If the swap chain is in full-screen mode, before you release it you must use SetFullscreenState to switch it to windowed mode. For more information about releasing a swap chain, see the "Destroying a Swap Chain" section of DXGI Overview.
After the runtime renders the initial frame in full screen, the runtime might unexpectedly exit full screen during a call to
// Detect if newly created full-screen swap chain isn't actually full screen. +* pTarget; bFullscreen; + if (SUCCEEDED(pSwapChain->GetFullscreenState(&bFullscreen, &pTarget))) + { pTarget->Release(); + } + else bFullscreen = ; + // If not full screen, enable full screen again. + if (!bFullscreen) + { ShowWindow(hWnd, SW_MINIMIZE); ShowWindow(hWnd, SW_RESTORE); pSwapChain->SetFullscreenState(TRUE, null ); + } +
You can specify
However, to use stereo presentation and to change resize behavior for the flip model, applications must use the
Create an adapter interface that represents a software adapter.
+Handle to the software adapter's dll. HMODULE can be obtained with GetModuleHandle or LoadLibrary.
Address of a reference to an adapter (see
A software adapter is a DLL that implements the entirety of a device driver interface, plus emulation, if necessary, of kernel-mode graphics components for Windows. Details on implementing a software adapter can be found in the Windows Vista Driver Development Kit. This is a very complex development task, and is not recommended for general readers.
Calling this method will increment the module's reference count by one. The reference count can be decremented by calling FreeLibrary.
The typical calling scenario is to call LoadLibrary, pass the handle to CreateSoftwareAdapter, then immediately call FreeLibrary on the DLL and forget the DLL's HMODULE. Since the software adapter calls FreeLibrary when it is destroyed, the lifetime of the DLL will now be owned by the adapter, and the application is free of any further consideration of its lifetime.
+The
This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
To create a factory, call the CreateDXGIFactory1 function.
Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain.
+ You can request the
+* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); * pDXGIAdapter; + hr = pDXGIDevice->GetParent(__uuidof( ), (void **)&pDXGIAdapter); * pIDXGIFactory; + pDXGIAdapter->GetParent(__uuidof( ), (void **)&pIDXGIFactory); +
Informs an application of the possible need to re-enumerate adapters.
+This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
+Enumerates both adapters (video cards) with or without outputs.
+The index of the adapter to enumerate.
The address of a reference to an
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the
When the EnumAdapters1 method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters1 increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.
EnumAdapters1 first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters1 next returns other adapters with outputs. EnumAdapters1 finally returns adapters without outputs.
+Informs an application of the possible need to re-enumerate adapters.
+IsCurrent returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
+ The
To create a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 factory interface, pass
Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain.
+ You can request the
+* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); * pDXGIAdapter; + hr = pDXGIDevice->GetParent(__uuidof( ), (void **)&pDXGIAdapter); * pIDXGIFactory; + pDXGIAdapter->GetParent(__uuidof( ), (void **)&pIDXGIFactory); +
Determines whether to use stereo mode.
+We recommend that windowed applications call IsWindowedStereoEnabled before they attempt to use stereo. IsWindowedStereoEnabled returns TRUE if both of the following items are true:
The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.
The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.
+Determines whether to use stereo mode.
+Indicates whether to use stereo mode. TRUE indicates that you can use stereo mode; otherwise,
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsWindowedStereoEnabled always returns
We recommend that windowed applications call IsWindowedStereoEnabled before they attempt to use stereo. IsWindowedStereoEnabled returns TRUE if both of the following items are true:
The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.
The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.
+Creates a swap chain that is associated with an
CreateSwapChainForHwnd returns:
Platform Update for Windows?7:??
If you specify the width, height, or both (Width and Height members of
Because you can associate only one flip presentation model swap chain at a time with an
For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.
+Creates a swap chain that is associated with the CoreWindow object for the output window for the swap chain.
+CreateSwapChainForCoreWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, CreateSwapChainForCoreWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
If you specify the width, height, or both (Width and Height members of
Because you can associate only one flip presentation model swap chain (per layer) at a time with a CoreWindow, the Microsoft Direct3D?11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see Deferred Destruction Issues with Flip Presentation Swap Chains.
For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.
+Identifies the adapter on which a shared resource object was created.
+A handle to a shared resource object. The
A reference to a variable that receives a locally unique identifier (
GetSharedResourceAdapterLuid returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetSharedResourceAdapterLuid fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
You cannot share resources across adapters. Therefore, you cannot open a shared resource on an adapter other than the adapter on which the resource was created. Call GetSharedResourceAdapterLuid before you open a shared resource to ensure that the resource was created on the appropriate adapter. To open a shared resource, call the
Registers an application window to receive notification messages of changes of stereo status.
+The handle of the window to send a notification message to when stereo status change occurs.
Identifies the notification message to send.
A reference to a key value that an application can pass to the
RegisterStereoStatusWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterStereoStatusWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Registers to receive notification of changes in stereo status by using event signaling.
+A handle to the event object that the operating system sets when notification of stereo status change occurs. The CreateEvent or OpenEvent function returns this handle.
A reference to a key value that an application can pass to the
RegisterStereoStatusEvent returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterStereoStatusEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Unregisters a window or an event to stop it from receiving notification when stereo status changes.
+A key value for the window or event to unregister. The
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, UnregisterStereoStatus has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Registers an application window to receive notification messages of changes of occlusion status.
+The handle of the window to send a notification message to when occlusion status change occurs.
Identifies the notification message to send.
A reference to a key value that an application can pass to the
RegisterOcclusionStatusWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterOcclusionStatusWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Apps choose the Windows message that Windows sends when occlusion status changes.
+Registers to receive notification of changes in occlusion status by using event signaling.
+A handle to the event object that the operating system sets when notification of occlusion status change occurs. The CreateEvent or OpenEvent function returns this handle.
A reference to a key value that an application can pass to the
RegisterOcclusionStatusEvent returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterOcclusionStatusEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
If you call RegisterOcclusionStatusEvent multiple times with the same event handle, RegisterOcclusionStatusEvent fails with
If you call RegisterOcclusionStatusEvent multiple times with the different event handles, RegisterOcclusionStatusEvent properly registers the events.
+Unregisters a window or an event to stop it from receiving notification when occlusion status changes.
+A key value for the window or event to unregister. The
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, UnregisterOcclusionStatus has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Creates a swap chain that you can use to send Direct3D content into the DirectComposition API or the Windows.UI.Xaml framework to compose in a window.
+CreateSwapChainForComposition returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, CreateSwapChainForComposition fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
You can use composition swap chains with either DirectComposition?s
The
For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.
+Enables creating Microsoft DirectX Graphics Infrastructure (DXGI) objects.
+ Outputs the
Returns
For Direct3D 12, it's no longer possible to backtrack from a device to the
Provides an adapter which can be provided to
The globally unique identifier (
The address of an
Returns
For more information, see DXGI 1.4 Improvements.
+Identifies the type of DXGI adapter.
+The
Specifies no flags.
Value always set to 0. This flag is reserved.
Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Identifies the type of DXGI adapter.
+The
Specifies no flags.
Value always set to 0. This flag is reserved.
Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.
Identifies the alpha value, transparency behavior, of a surface.
+For more information about alpha mode, see
Indicates that the transparency behavior is not specified.
Indicates that the transparency behavior is premultiplied. Each color is first scaled by the alpha value. The alpha value itself is the same in both straight and premultiplied alpha. Typically, no color channel value is greater than the alpha channel value. If a color channel value in a premultiplied format is greater than the alpha channel, the standard source-over blending math results in an additive blend.
Indicates that the transparency behavior is not premultiplied. The alpha channel indicates the transparency of the color.
Indicates to ignore the transparency behavior.
Specifies color space types.
+This enum is used within DXGI in the CheckColorSpaceSupport, SetColorSpace1 and CheckOverlayColorSpaceSupport methods. It is also referenced in D3D11 video methods such as
The following color parameters are defined:
+Property | Value |
Colorspace | RGB |
Range | 0-255 |
Gamma | 2.2 |
Siting | Image |
Primaries | BT.709 |
?
This is the standard definition for sRGB. Note that this is often implemented with a linear segment, but in that case the exponent is corrected to stay aligned with a gamma 2.2 curve. This is usually used with 8 bit and 10 bit color channels. +
Property | Value |
Colorspace | RGB |
Range | 0-255 |
Gamma | 1.0 |
Siting | Image |
Primaries | BT.709 |
?
This is the standard definition for scRGB, and is usually used with 16 bit integer, 16 bit floating point, and 32 bit floating point channels. +
Property | Value |
Colorspace | RGB |
Range | 16-235 |
Gamma | 2.2 |
Siting | Image |
Primaries | BT.709 |
?
This is the standard definition for ITU-R Recommendation BT.709. Note that due to the inclusion of a linear segment, the transfer curve looks similar to a pure exponential gamma of 1.9. This is usually used with 8 bit and 10 bit color channels. +
Property | Value |
Colorspace | RGB |
Range | 16-235 |
Gamma | 2.2 |
Siting | Image |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels. +
Reserved.
Property | Value |
Colorspace | YCbCr |
Range | 0-255 |
Gamma | 2.2 |
Siting | Image |
Primaries | BT.709 |
Transfer | BT.601 |
?
This definition is commonly used for JPG, and is usually used with 8, 10, 12, or 16 bit color channels. +
Property | Value |
Colorspace | YCbCr |
Range | 16-235 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.601 |
?
This definition is commonly used for MPEG2, and is usually used with 8, 10, 12, or 16 bit color channels. +
Property | Value |
Colorspace | YCbCr |
Range | 0-255 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.601 |
?
This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels. +
Property | Value |
Colorspace | YCbCr |
Range | 16-235 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.709 |
?
This definition is commonly used for H.264 and HEVC, and is usually used with 8, 10, 12, or 16 bit color channels. +
Property | Value |
Colorspace | YCbCr |
Range | 0-255 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.709 |
?
This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels. +
Property | Value |
Colorspace | YCbCr |
Range | 16-235 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.2020 |
?
This definition may be used by HEVC, and is usually used with 10, 12, or 16 bit color channels. +
Property | Value |
Colorspace | YCbCr |
Range | 0-255 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
Property | Value |
Colorspace | RGB |
Range | 0-255 |
Gamma | 2084 |
Siting | Image |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
Property | Value |
Colorspace | YCbCr |
Range | 16-235 |
Gamma | 2084 |
Siting | Video |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
Property | Value |
Colorspace | RGB |
Range | 16-235 |
Gamma | 2084 |
Siting | Image |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
Property | Value |
Colorspace | YCbCr |
Range | 16-235 |
Gamma | 2.2 |
Siting | Video |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
Property | Value |
Colorspace | YCbCr |
Range | 16-235 |
Gamma | 2084 |
Siting | Video |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
Property | Value |
Colorspace | RGB |
Range | 0-255 |
Gamma | 2.2 |
Siting | Image |
Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
A custom color definition is used.
A custom color definition is used.
Identifies the granularity at which the graphics processing unit (GPU) can be preempted from performing its current compute task.
+You call the
Indicates the preemption granularity as a compute packet.
Indicates the preemption granularity as a dispatch (for example, a call to the
Indicates the preemption granularity as a thread group. A thread group is a part of a dispatch.
Indicates the preemption granularity as a thread in a thread group. A thread is a part of a thread group.
Indicates the preemption granularity as a compute instruction in a thread.
Flags that indicate how the back buffers should be rotated to fit the physical rotation of a monitor.
+Unspecified rotation.
Specifies no rotation.
Specifies 90 degrees of rotation.
Specifies 180 degrees of rotation.
Specifies 270 degrees of rotation.
Flags indicating how an image is stretched to fit a given monitor's resolution.
+Selecting the CENTERED or STRETCHED modes can result in a mode change even if you specify the native resolution of the display in the
This enum is used by the
Unspecified scaling.
Specifies no scaling. The image is centered on the display. This flag is typically used for a fixed-dot-pitch display (such as an LED display).
Specifies stretched scaling.
Flags indicating the method the raster uses to create an image on a surface.
+This enum is used by the
Scanline order is unspecified.
The image is created from the first scanline to the last without skipping any.
The image is created beginning with the upper field.
The image is created beginning with the lower field.
Status codes that can be returned by DXGI functions.
+The
#define _FACDXGI 0x87a + #define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) +
For example,
#define+MAKE_DXGI_STATUS(1) +
Specifies a range of hardware features, to be used when checking for feature support.
+This enum is used by the CheckFeatureSupport method.
+The display supports tearing, a requirement of variable refresh rate displays.
Resource data formats, including fully-typed and typeless formats. A list of modifiers at the bottom of the page more fully describes each format type.
+The format is not known.
A four-component, 128-bit typeless format that supports 32 bits per channel including alpha. ?
A four-component, 128-bit floating-point format that supports 32 bits per channel including alpha. 1,5,8
A four-component, 128-bit unsigned-integer format that supports 32 bits per channel including alpha. ?
A four-component, 128-bit signed-integer format that supports 32 bits per channel including alpha. ?
A three-component, 96-bit typeless format that supports 32 bits per color channel.
A three-component, 96-bit floating-point format that supports 32 bits per color channel.5,8
A three-component, 96-bit unsigned-integer format that supports 32 bits per color channel.
A three-component, 96-bit signed-integer format that supports 32 bits per color channel.
A four-component, 64-bit typeless format that supports 16 bits per channel including alpha.
A four-component, 64-bit floating-point format that supports 16 bits per channel including alpha.5,7
A four-component, 64-bit unsigned-normalized-integer format that supports 16 bits per channel including alpha.
A four-component, 64-bit unsigned-integer format that supports 16 bits per channel including alpha.
A four-component, 64-bit signed-normalized-integer format that supports 16 bits per channel including alpha.
A four-component, 64-bit signed-integer format that supports 16 bits per channel including alpha.
A two-component, 64-bit typeless format that supports 32 bits for the red channel and 32 bits for the green channel.
A two-component, 64-bit floating-point format that supports 32 bits for the red channel and 32 bits for the green channel.5,8
A two-component, 64-bit unsigned-integer format that supports 32 bits for the red channel and 32 bits for the green channel.
A two-component, 64-bit signed-integer format that supports 32 bits for the red channel and 32 bits for the green channel.
A two-component, 64-bit typeless format that supports 32 bits for the red channel, 8 bits for the green channel, and 24 bits are unused.
A 32-bit floating-point component, and two unsigned-integer components (with an additional 32 bits). This format supports 32-bit depth, 8-bit stencil, and 24 bits are unused.?
A 32-bit floating-point component, and two typeless components (with an additional 32 bits). This format supports 32-bit red channel, 8 bits are unused, and 24 bits are unused.?
A 32-bit typeless component, and two unsigned-integer components (with an additional 32 bits). This format has 32 bits unused, 8 bits for green channel, and 24 bits are unused.
A four-component, 32-bit typeless format that supports 10 bits for each color and 2 bits for alpha.
A four-component, 32-bit unsigned-normalized-integer format that supports 10 bits for each color and 2 bits for alpha.
A four-component, 32-bit unsigned-integer format that supports 10 bits for each color and 2 bits for alpha.
Three partial-precision floating-point numbers encoded into a single 32-bit value (a variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There are no sign bits, and there is a 5-bit biased (15) exponent for each channel, 6-bit mantissa for R and G, and a 5-bit mantissa for B, as shown in the following illustration.5,7
A four-component, 32-bit typeless format that supports 8 bits per channel including alpha.
A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits per channel including alpha.
A four-component, 32-bit unsigned-normalized integer sRGB format that supports 8 bits per channel including alpha.
A four-component, 32-bit unsigned-integer format that supports 8 bits per channel including alpha.
A four-component, 32-bit signed-normalized-integer format that supports 8 bits per channel including alpha.
A four-component, 32-bit signed-integer format that supports 8 bits per channel including alpha.
A two-component, 32-bit typeless format that supports 16 bits for the red channel and 16 bits for the green channel.
A two-component, 32-bit floating-point format that supports 16 bits for the red channel and 16 bits for the green channel.5,7
A two-component, 32-bit unsigned-normalized-integer format that supports 16 bits each for the green and red channels.
A two-component, 32-bit unsigned-integer format that supports 16 bits for the red channel and 16 bits for the green channel.
A two-component, 32-bit signed-normalized-integer format that supports 16 bits for the red channel and 16 bits for the green channel.
A two-component, 32-bit signed-integer format that supports 16 bits for the red channel and 16 bits for the green channel.
A single-component, 32-bit typeless format that supports 32 bits for the red channel.
A single-component, 32-bit floating-point format that supports 32 bits for depth.5,8
A single-component, 32-bit floating-point format that supports 32 bits for the red channel.5,8
A single-component, 32-bit unsigned-integer format that supports 32 bits for the red channel.
A single-component, 32-bit signed-integer format that supports 32 bits for the red channel.
A two-component, 32-bit typeless format that supports 24 bits for the red channel and 8 bits for the green channel.
A 32-bit z-buffer format that supports 24 bits for depth and 8 bits for stencil.
A 32-bit format, that contains a 24 bit, single-component, unsigned-normalized integer, with an additional typeless 8 bits. This format has 24 bits red channel and 8 bits unused.
A 32-bit format, that contains a 24 bit, single-component, typeless format, with an additional 8 bit unsigned integer component. This format has 24 bits unused and 8 bits green channel.
A two-component, 16-bit typeless format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit unsigned-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit unsigned-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit signed-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit signed-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A single-component, 16-bit typeless format that supports 16 bits for the red channel.
A single-component, 16-bit floating-point format that supports 16 bits for the red channel.5,7
A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for depth.
A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for the red channel.
A single-component, 16-bit unsigned-integer format that supports 16 bits for the red channel.
A single-component, 16-bit signed-normalized-integer format that supports 16 bits for the red channel.
A single-component, 16-bit signed-integer format that supports 16 bits for the red channel.
A single-component, 8-bit typeless format that supports 8 bits for the red channel.
A single-component, 8-bit unsigned-normalized-integer format that supports 8 bits for the red channel.
A single-component, 8-bit unsigned-integer format that supports 8 bits for the red channel.
A single-component, 8-bit signed-normalized-integer format that supports 8 bits for the red channel.
A single-component, 8-bit signed-integer format that supports 8 bits for the red channel.
A single-component, 8-bit unsigned-normalized-integer format for alpha only.
A single-component, 1-bit unsigned-normalized integer format that supports 1 bit for the red channel. ?.
Three partial-precision floating-point numbers encoded into a single 32-bit value all sharing the same 5-bit exponent (variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There is no sign bit, and there is a shared 5-bit biased (15) exponent and a 9-bit mantissa for each channel, as shown in the following illustration. 2,6,7.
A four-component, 32-bit unsigned-normalized-integer format. This packed RGB format is analogous to the UYVY format. Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are repeated, and the G8 values are unique to each pixel. ?
Width must be even.
A four-component, 32-bit unsigned-normalized-integer format. This packed RGB format is analogous to the YUY2 format. Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are repeated, and the G8 values are unique to each pixel. ?
Width must be even.
Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
One-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Two-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A three-component, 16-bit unsigned-normalized-integer format that supports 5 bits for blue, 6 bits for green, and 5 bits for red.
Direct3D 10 through Direct3D 11:??This value is defined for DXGI. However, Direct3D 10, 10.1, or 11 devices do not support this format.
Direct3D 11.1:??This value is not supported until Windows?8.
A four-component, 16-bit unsigned-normalized-integer format that supports 5 bits for each color channel and 1-bit alpha.
Direct3D 10 through Direct3D 11:??This value is defined for DXGI. However, Direct3D 10, 10.1, or 11 devices do not support this format.
Direct3D 11.1:??This value is not supported until Windows?8.
A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8-bit alpha.
A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8 bits unused.
A four-component, 32-bit 2.8-biased fixed-point format that supports 10 bits for each color channel and 2-bit alpha.
A four-component, 32-bit typeless format that supports 8 bits for each channel including alpha. ?
A four-component, 32-bit unsigned-normalized standard RGB format that supports 8 bits for each channel including alpha. ?
A four-component, 32-bit typeless format that supports 8 bits for each color channel, and 8 bits are unused. ?
A four-component, 32-bit unsigned-normalized standard RGB format that supports 8 bits for each color channel, and 8 bits are unused. ?
A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?
A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Most common YUV 4:4:4 video resource format. Valid view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
10-bit per channel packed YUV 4:4:4 video resource format. Valid view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
16-bit per channel packed YUV 4:4:4 video resource format. Valid view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
Most common YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling
Direct3D 11.1:??This value is not supported until Windows?8.
10-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling
Direct3D 11.1:??This value is not supported until Windows?8.
16-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling
Direct3D 11.1:??This value is not supported until Windows?8.
8-bit per channel planar YUV 4:2:0 video resource format. This format is subsampled where each pixel has its own Y value, but each 2x2 pixel block shares a single U and V value. The runtime requires that the width and height of all resources that are created with this format are multiples of 2. The runtime also requires that the left, right, top, and bottom members of any
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling
Direct3D 11.1:??This value is not supported until Windows?8.
Most common YUV 4:2:2 video resource format. Valid view formats for this video resource format are
A unique valid view format for this video resource format is
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be even.
Direct3D 11.1:??This value is not supported until Windows?8.
10-bit per channel packed YUV 4:2:2 video resource format. Valid view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be even.
Direct3D 11.1:??This value is not supported until Windows?8.
16-bit per channel packed YUV 4:2:2 video resource format. Valid view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be even.
Direct3D 11.1:??This value is not supported until Windows?8.
Most common planar YUV 4:1:1 video resource format. Valid luminance data view formats for this video resource format are
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be a multiple of 4. Direct3D11 staging resources and initData parameters for this format use (rowPitch * height * 2) bytes. The first (SysMemPitch * height) bytes are the Y plane, the next ((SysMemPitch / 2) * height) bytes are the UV plane, and the remainder is padding.
Direct3D 11.1:??This value is not supported until Windows?8.
4-bit palletized YUV format that is commonly used for DVD subpicture.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
4-bit palletized YUV format that is commonly used for DVD subpicture.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
8-bit palletized format that is used for palletized RGB data when the processor processes ISDB-T data and for palletized YUV data when the processor processes BluRay data.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
8-bit palletized format with 8 bits of alpha that is used for palletized YUV data when the processor processes BluRay data.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
A four-component, 16-bit unsigned-normalized integer format that supports 4 bits for each channel including alpha.
Direct3D 11.1:??This value is not supported until Windows?8.
A video format; an 8-bit version of a hybrid planar 4:2:2 format.
An 8 bit YCbCrA 4:4 rendering format.
An 8 bit YCbCrA 4:4:4:4 rendering format.
Indicates options for presenting frames to the swap chain.
+This enum is used by the
Specifies that the presentation mode is a composition surface, meaning that the conversion from YUV to RGB is happening once per output refresh (for example, 60 Hz). When this value is returned, the media app should discontinue use of the decode swap chain and perform YUV to RGB conversion itself, reducing the frequency of YUV to RGB conversion to once per video frame.
Specifies that the presentation mode is an overlay surface, meaning that the YUV to RGB conversion is happening efficiently in hardware (once per video frame). When this value is returned, the media app can continue to use the decode swap chain. See
No presentation is specified.
An issue occurred that caused content protection to be invalidated in a swap-chain with hardware content protection, and is usually because the system ran out of hardware protected memory. The app will need to do one of the following:
Note that simply re-creating the swap chain or the device will usually have no impact as the DWM will continue to run out of memory and will return the same failure.
Identifies the granularity at which the graphics processing unit (GPU) can be preempted from performing its current graphics rendering task.
+You call the
The following figure shows granularity of graphics rendering tasks.
+Indicates the preemption granularity as a DMA buffer.
Indicates the preemption granularity as a graphics primitive. A primitive is a section in a DMA buffer and can be a group of triangles.
Indicates the preemption granularity as a triangle. A triangle is a part of a primitive.
Indicates the preemption granularity as a pixel. A pixel is a part of a triangle.
Indicates the preemption granularity as a graphics instruction. A graphics instruction operates on a pixel.
Specifies the header metadata type.
+This enum is used by the SetHDRMetaData method.
+Indicates there is no header metadata.
Indicates the header metadata is held by a
Get a reference to the data contained in the surface, and deny GPU access to the surface.
+Use
A reference to the surface data (see
CPU read-write flags. These flags can be combined with a logical OR.
Specifies the memory segment group to use.
+This enum is used by QueryVideoMemoryInfo and SetVideoMemoryReservation.
Refer to the remarks for
The grouping of segments which is considered local to the video adapter, and represents the fastest available memory to the GPU. Applications should target the local segment group as the target size for their working set.
The grouping of segments which is considered non-local to the video adapter, and may have slower performance than the local segment group.
Options for swap-chain color space.
+This enum is used by SetColorSpace.
+Specifies nominal range YCbCr, which isn't an absolute color space, but a way of encoding RGB info.
Specifies BT.709, which standardizes the format of high-definition television and has 16:9 (widescreen) aspect ratio.
Specifies xvYCC or extended-gamut YCC (also x.v.Color) color space that can be used in the video electronics of television sets to support a gamut 1.8 times as large as that of the sRGB color space.
Specifies flags for the OfferResources1 method.
+ Identifies the importance of a resource?s content when you call the
Priority determines how likely the operating system is to discard an offered resource. Resources offered with lower priority are discarded first.
+Identifies the type of reference shape.
+The reference type is a monochrome mouse reference, which is a monochrome bitmap. The bitmap's size is specified by width and height in a 1 bits per pixel (bpp) device independent bitmap (DIB) format AND mask that is followed by another 1 bpp DIB format XOR mask of the same size.
The reference type is a color mouse reference, which is a color bitmap. The bitmap's size is specified by width and height in a 32 bpp ARGB DIB format.
The reference type is a masked color mouse reference. A masked color mouse reference is a 32 bpp ARGB format bitmap with the mask value in the alpha bits. The only allowed mask values are 0 and 0xFF. When the mask value is 0, the RGB value should replace the screen pixel. When the mask value is 0xFF, an XOR operation is performed on the RGB value and the screen pixel; the result replaces the screen pixel.
Specifies support for overlay color space.
+Overlay color space support is present.
Specifies overlay support to check for in a call to
Presents a rendered image to the user.
+Starting with Direct3D 11.1, consider using
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
Differences between Direct3D 9 and Direct3D 10: Specifying |
?
For flip presentation model swap chains that you create with the
For info about how data values change when you present content to the screen, see Converting data for the color space.
+An integer that specifies how to synchronize presentation of a frame with the vertical blank. +
For the bit-block transfer (bitblt) model (
For the flip model (
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
Specifies result flags for the ReclaimResources1 method.
+Flags indicating the memory location of a resource.
+This enum is used by QueryResourceResidency.
+The resource is located in video memory.
At least some of the resource is located in CPU memory.
At least some of the resource has been paged out to the hard drive.
Set the priority for evicting the resource from memory.
+The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.
You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.
+The priority is one of the following values:
Value | Meaning |
---|---|
| The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies. |
| The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory. |
| The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. |
| The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource. |
| The resource is evicted from memory only if there is no other way of resolving the memory requirement. |
?
Identifies resize behavior when the back-buffer size does not match the size of the target output.
+The
float aspectRatio = backBufferWidth / float(backBufferHeight); // Horizontal fill float scaledWidth = outputWidth; float scaledHeight = outputWidth / aspectRatio; if (scaledHeight >= outputHeight) { // Do vertical fill scaledWidth = outputHeight * aspectRatio; scaledHeight = outputHeight; } float offsetX = (outputWidth - scaledWidth) * 0.5f; float offsetY = (outputHeight - scaledHeight) * 0.5f; rect.left = static_cast<LONG>(offsetX); rect.top = static_cast<LONG>(offsetY); rect.right = static_cast<LONG>(offsetX + scaledWidth); rect.bottom = static_cast<LONG>(offsetY + scaledHeight); rect.left = std::max<LONG>(0, rect.left); rect.top = std::max<LONG>(0, rect.top); rect.right = std::min<LONG>(static_cast<LONG>(outputWidth), rect.right); rect.bottom = std::min<LONG>(static_cast<LONG>(outputHeight), rect.bottom);
+
Note that outputWidth and outputHeight are the pixel sizes of the presentation target size. In the case of CoreWindow, this requires converting the logicalWidth and logicalHeight values from DIPS to pixels using the window's DPI property.
+Directs DXGI to make the back-buffer contents scale to fit the presentation target size. This is the implicit behavior of DXGI when you call the
Directs DXGI to make the back-buffer contents appear without any scaling when the presentation target size is not equal to the back-buffer size. The top edges of the back buffer and presentation target are aligned together. If the WS_EX_LAYOUTRTL style is associated with the
This value specifies that all target areas outside the back buffer of a swap chain are filled with the background color that you specify in a call to
Directs DXGI to make the back-buffer contents scale to fit the presentation target size, while preserving the aspect ratio of the back-buffer. If the scaled back-buffer does not fill the presentation area, it will be centered with black borders.
This constant is supported on Windows Phone 8 and Windows 10.
Note that with legacy Win32 window swapchains, this works the same as
Specifies color space support for the swap chain.
+Color space support is present.
Overlay color space support is present.
Options for swap-chain behavior.
+This enumeration is used by the
This enumeration is also used by the
You don't need to set
Swap chains that you create with the
When you call
Set this flag to turn off automatic image rotation; that is, do not perform a rotation when transferring the contents of the front buffer to the monitor. Use this flag to avoid a bandwidth penalty when an application expects to handle rotation. This option is valid only during full-screen mode.
Set this flag to enable an application to switch modes by calling
Set this flag to enable an application to render using GDI on a swap chain or a surface. This will allow the application to call
Set this flag to indicate that the swap chain might contain protected content; therefore, the operating system supports the creation of the swap chain only when driver and hardware protection is used. If the driver and hardware do not support content protection, the call to create a resource for the swap chain fails.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Set this flag to indicate that shared resources that are created within the swap chain must be protected by using the driver?s mechanism for restricting access to shared surfaces.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Set this flag to restrict presented content to the local displays. Therefore, the presented content is not accessible via remote accessing or through the desktop duplication APIs.
This flag supports the window content protection features of Windows. Applications can use this flag to protect their own onscreen window content from being captured or copied through a specific set of public operating system features and APIs.
If you use this flag with windowed (
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Set this flag to create a waitable object you can use to ensure rendering does not begin while a frame is still being presented. When this flag is used, the swapchain's latency must be set with the
Note??This enumeration value is supported starting with Windows?8.1.
Set this flag to create a swap chain in the foreground layer for multi-plane rendering. This flag can only be used with CoreWindow swap chains, which are created with CreateSwapChainForCoreWindow. Apps should not create foreground swap chains if
Note that
Note??This enumeration value is supported starting with Windows?8.1.
Set this flag to create a swap chain for full-screen video.
Note??This enumeration value is supported starting with Windows?8.1.
Set this flag to create a swap chain for YUV video.
Note??This enumeration value is supported starting with Windows?8.1.
Indicates that the swap chain should be created such that all underlying resources can be protected by the hardware. Resource creation will fail if hardware content protection is not supported.
This flag has the following restrictions:
Note??This enumeration value is supported starting with Windows?10.
Tearing support is a requirement to enable displays that support variable refresh rates to function properly when the application presents a swap chain tied to a full screen borderless window. Win32 apps can already achieve tearing in fullscreen exclusive mode by calling SetFullscreenState(TRUE), but the recommended approach for Win32 developers is to use this tearing flag instead.
To check for hardware support of this feature, refer to
Options for handling pixels in a display surface after calling
This enumeration is used by the
To use multisampling with
The primary difference between presentation models is how back-buffer contents get to the Desktop Window Manager (DWM) for composition. In the bitblt model, which is used with the
When you call
Regardless of whether the flip model is more efficient, an application still might choose the bitblt model because the bitblt model is the only way to mix GDI and DirectX presentation. In the flip model, the application must create the swap chain with
For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.
+Creates a DXGI 1.1 factory that you can use to generate other DXGI objects.
+The globally unique identifier (
Address of a reference to an
Returns
Use a DXGI 1.1 factory to generate objects that enumerate adapters, create swap chains, and associate a window with the alt+enter key sequence for toggling to and from the full-screen display mode.
If the CreateDXGIFactory1 function succeeds, the reference count on the
This entry point is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Note??Do not mix the use of DXGI 1.0 (Creates a DXGI 1.3 factory that you can use to generate other DXGI objects.
In Windows?8, any DXGI factory created while DXGIDebug.dll was present on the system would load and use it. Starting in Windows?8.1, apps explicitly request that DXGIDebug.dll be loaded instead. Use CreateDXGIFactory2 and specify the
Valid values include the
The globally unique identifier (
Address of a reference to an
Returns
This function accepts a flag indicating whether DXGIDebug.dll is loaded. The function otherwise behaves identically to CreateDXGIFactory1.
+ The
This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
A display sub-system is often referred to as a video card, however, on some machines the display sub-system is part of the mother board.
To enumerate the display sub-systems, use
Windows?Phone?8: This API is supported.
+Gets a DXGI 1.1 description of an adapter (or video card).
+This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Use the GetDesc1 method to get a DXGI 1.1 description of an adapter. To get a DXGI 1.0 description, use the
Gets a DXGI 1.1 description of an adapter (or video card).
+A reference to a
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Use the GetDesc1 method to get a DXGI 1.1 description of an adapter. To get a DXGI 1.0 description, use the
The
A display subsystem is often referred to as a video card; however, on some computers, the display subsystem is part of the motherboard.
To enumerate the display subsystems, use
To get an interface to the adapter for a particular device, use
To create a software adapter, use
Gets a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit (GPU) can be preempted from performing its current task.
+Use the GetDesc2 method to get a DXGI 1.2 description of an adapter. To get a DXGI 1.1 description, use the
The Windows Display Driver Model (WDDM) scheduler can preempt the GPU's execution of application tasks. The granularity at which the GPU can be preempted from performing its current task in the WDDM 1.1 or earlier driver model is a direct memory access (DMA) buffer for graphics tasks or a compute packet for compute tasks. The GPU can switch between tasks only after it completes the currently executing unit of work, a DMA buffer or a compute packet.
A DMA buffer is the largest independent unit of graphics work that the WDDM scheduler can submit to the GPU. This buffer contains a set of GPU instructions that the WDDM driver and GPU use. A compute packet is the largest independent unit of compute work that the WDDM scheduler can submit to the GPU. A compute packet contains dispatches (for example, calls to the
Gets a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit (GPU) can be preempted from performing its current task.
+A reference to a
Returns
Use the GetDesc2 method to get a DXGI 1.2 description of an adapter. To get a DXGI 1.1 description, use the
The Windows Display Driver Model (WDDM) scheduler can preempt the GPU's execution of application tasks. The granularity at which the GPU can be preempted from performing its current task in the WDDM 1.1 or earlier driver model is a direct memory access (DMA) buffer for graphics tasks or a compute packet for compute tasks. The GPU can switch between tasks only after it completes the currently executing unit of work, a DMA buffer or a compute packet.
A DMA buffer is the largest independent unit of graphics work that the WDDM scheduler can submit to the GPU. This buffer contains a set of GPU instructions that the WDDM driver and GPU use. A compute packet is the largest independent unit of compute work that the WDDM scheduler can submit to the GPU. A compute packet contains dispatches (for example, calls to the
This interface adds some memory residency methods, for budgeting and reserving physical memory.
+For more details, refer to the Residency section of the D3D12 documentation.
+Registers to receive notification of hardware content protection teardown events.
+A handle to the event object that the operating system sets when hardware content protection teardown occurs. The CreateEvent or OpenEvent function returns this handle.
A reference to a key value that an application can pass to the
Call
Unregisters an event to stop it from receiving notification of hardware content protection teardown events.
+A key value for the window or event to unregister. The
This method informs the process of the current budget and process usage.
+Specifies the device's physical adapter for which the video memory information is queried. For single-GPU operation, set this to zero. If there are multiple GPU nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is queried. See Multi-Adapter.
Specifies a
Fills in a
Applications must explicitly manage their usage of physical memory explicitly and keep usage within the budget assigned to the application process. Processes that cannot kept their usage within their assigned budgets will likely experience stuttering, as they are intermittently frozen and paged-out to allow other processes to run.
+This method sends the minimum required physical memory for an application, to the OS.
+Specifies the device's physical adapter for which the video memory information is being set. For single-GPU operation, set this to zero. If there are multiple GPU nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is being set. See Multi-Adapter.
Specifies a
Specifies a UINT64 that sets the minimum required physical memory, in bytes.
Returns
Applications are encouraged to set a video reservation to denote the amount of physical memory they cannot go without. This value helps the OS quickly minimize the impact of large memory pressure situations.
+This method establishes a correlation between a CPU synchronization object and the budget change event.
+Specifies a HANDLE for the event.
A key value for the window or event to unregister. The
Instead of calling QueryVideoMemoryInfo regularly, applications can use CPU synchronization objects to efficiently wake threads when budget changes occur.
+This method stops notifying a CPU synchronization object whenever a budget change occurs. An application may switch back to polling the information regularly.
+A key value for the window or event to unregister. The
An application may switch back to polling for the information regularly.
+ The
A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard.
To enumerate the display subsystems, use
To get an interface to the adapter for a particular device, use
To create a software adapter, use
Windows?Phone?8: This API is supported.
+Represents a swap chain that is used by desktop media apps to decode video data and show it on a DirectComposition surface.
+Decode swap chains are intended for use primarily with YUV surface formats. When using decode buffers created with an RGB surface format, the TargetRect and DestSize must be set equal to the buffer dimensions. SourceRect cannot exceed the buffer dimensions.
In clone mode, the decode swap chain is only guaranteed to be shown on the primary output.
Decode swap chains cannot be used with dirty rects.
+Gets or sets the source region that is used for the swap chain.
+Gets or sets the rectangle that defines the target region for the video processing blit operation.
+Gets or sets the color space used by the swap chain.
+Presents a frame on the output adapter. The frame is a subresource of the
This method returns
Sets the rectangle that defines the source region for the video processing blit operation.
The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.
+A reference to a
This method returns
Sets the rectangle that defines the target region for the video processing blit operation.
The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.
+A reference to a
This method returns
Sets the size of the destination surface to use for the video processing blit operation.
The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.
+The width of the destination size, in pixels.
The height of the destination size, in pixels.
This method returns
Gets the source region that is used for the swap chain.
+A reference to a
This method returns
Gets the rectangle that defines the target region for the video processing blit operation.
+A reference to a
This method returns
Gets the size of the destination surface to use for the video processing blit operation.
+A reference to a variable that receives the width in pixels.
A reference to a variable that receives the height in pixels.
This method returns
Sets the color space used by the swap chain.
+A reference to a combination of
This method returns
Gets the color space used by the swap chain.
+A combination of
An
This interface is not supported by Direct3D 12 devices. Direct3D 12 applications have direct control over their swapchain management, so better latency control should be handled by the application. You can make use of Waitable objects (refer to
This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
The
The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); +
Windows?Phone?8: This API is supported.
+Gets or sets the number of frames that the system is allowed to queue for rendering.
+This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Sets the number of frames that the system is allowed to queue for rendering.
+The maximum number of back buffer frames that a driver can queue. The value defaults to 3, but can range from 1 to 16. A value of 0 will reset latency to the default. For multi-head devices, this value is specified per-head.
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Gets the number of frames that the system is allowed to queue for rendering.
+This value is set to the number of frames that can be queued for render. This value defaults to 3, but can range from 1 to 16.
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+ The
The
The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); +
Windows?Phone?8: This API is supported.
+Allows the operating system to free the video memory of resources by discarding their content.
+The number of resources in the ppResources argument array.
An array of references to
A
OfferResources returns:
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.
To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Allows the operating system to free the video memory of resources by discarding their content.
+The number of resources in the ppResources argument array.
An array of references to
A
OfferResources returns:
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.
To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Allows the operating system to free the video memory of resources by discarding their content.
+The number of resources in the ppResources argument array.
An array of references to
A
OfferResources returns:
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.
To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Restores access to resources that were previously offered by calling
ReclaimResources returns:
After you call
To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Restores access to resources that were previously offered by calling
ReclaimResources returns:
After you call
To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Restores access to resources that were previously offered by calling
ReclaimResources returns:
After you call
To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Flushes any outstanding rendering commands and sets the specified event object to the signaled state after all previously submitted rendering commands complete.
+A handle to the event object. The CreateEvent or OpenEvent function returns this handle. All types of event objects (manual-reset, auto-reset, and so on) are supported.
The handle must have the EVENT_MODIFY_STATE access right. For more information about access rights, see Synchronization Object Security and Access Rights.
Returns
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, EnqueueSetEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
EnqueueSetEvent calls the SetEvent function on the event object after all previously submitted rendering commands complete or the device is removed.
After an application calls EnqueueSetEvent, it can immediately call the WaitForSingleObject function to put itself to sleep until rendering commands complete.
You cannot use EnqueueSetEvent to determine work completion that is associated with presentation (
The
The
The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice);
Windows?Phone?8: This API is supported.
+Trims the graphics memory allocated by the
For apps that render with DirectX, graphics drivers periodically allocate internal memory buffers in order to speed up subsequent rendering requests. These memory allocations count against the app's memory usage for PLM and in general lead to increased memory usage by the overall system.
Starting in Windows?8.1, apps that render with Direct2D and/or Direct3D (including CoreWindow and XAML interop) must call Trim in response to the PLM suspend callback. The Direct3D runtime and the graphics driver will discard internal memory buffers allocated for the app, reducing its memory footprint.
Calling this method does not change the rendering state of the graphics device and it has no effect on rendering operations. There is a brief performance hit when internal buffers are reallocated during the first rendering operations after the Trim call, therefore apps should only call Trim when going idle for a period of time (in response to PLM suspend, for example).
Apps should ensure that they call Trim as one of the last D3D operations done before going idle. Direct3D will normally defer the destruction of D3D objects. Calling Trim, however, forces Direct3D to destroy objects immediately. For this reason, it is not guaranteed that releasing the final reference on Direct3D objects after calling Trim will cause the object to be destroyed and memory to be deallocated before the app suspends.
Similar to
It is also prudent to release references on middleware before calling Trim, as that middleware may also need to release references + to Direct3D objects.
+ An
The
The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the
* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); +
Windows?Phone?8: This API is supported.
+Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.
+The number of resources in the ppResources argument array.
An array of references to
A
Specifies the
This method returns an
OfferResources1 (an extension of the original
OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources. +
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.
To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to
Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.
+The number of resources in the ppResources argument array.
An array of references to
A
Specifies the
This method returns an
OfferResources1 (an extension of the original
OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources. +
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.
To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to
Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.
+The number of resources in the ppResources argument array.
An array of references to
A
Specifies the
This method returns an
OfferResources1 (an extension of the original
OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources. +
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.
To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to
Restores access to resources that were previously offered by calling
This method returns an
After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.
To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Restores access to resources that were previously offered by calling
This method returns an
After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.
To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Restores access to resources that were previously offered by calling
This method returns an
After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.
To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
The
We recommend that you not use
Call QueryInterface from a factory object (
* pDXGIDisplayControl; + hr = g_pDXGIFactory->QueryInterface(__uuidof( ), (void **)&pDXGIDisplayControl);
The operating system processes changes to stereo-enabled configuration asynchronously. Therefore, these changes might not be immediately visible in every process that calls
Platform Update for Windows?7:?? Stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.
+You pass a Boolean value to the
Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.
+Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetStereoEnabled doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.
+IsStereoEnabled returns TRUE when the operating system's stereoscopic 3D display behavior is enabled and
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsStereoEnabled always returns
You pass a Boolean value to the
Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.
+A Boolean value that either enables or disables the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetStereoEnabled doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Enables creating Microsoft DirectX Graphics Infrastructure (DXGI) objects.
+Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure (DXGI) object was created.
+The GetCreationFlags method returns flags that were passed to the CreateDXGIFactory2 function, or were implicitly constructed by CreateDXGIFactory, CreateDXGIFactory1,
Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure (DXGI) object was created.
+The creation flags.
The GetCreationFlags method returns flags that were passed to the CreateDXGIFactory2 function, or were implicitly constructed by CreateDXGIFactory, CreateDXGIFactory1,
This interface enables a single method to support variable refresh rate displays.
+Used to check for hardware feature support.
+Specifies one member of
Specifies a reference to a buffer that will be filled with data that describes the feature support.
The size, in bytes, of pFeatureSupportData.
This method returns an
Refer to the description of
Creates swap chains for desktop media apps that use DirectComposition surfaces to decode and display video.
+ To create a Microsoft DirectX Graphics Infrastructure (DXGI) media factory interface, pass
Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the
+* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); * pDXGIAdapter; + hr = pDXGIDevice->GetParent(__uuidof( ), (void **)&pDXGIAdapter); * pIDXGIFactory; + pDXGIAdapter->GetParent(__uuidof( ), (void **)&pIDXGIFactory);
Creates a YUV swap chain for an existing DirectComposition surface handle.
+CreateSwapChainForCompositionSurfaceHandle returns:
Creates a YUV swap chain for an existing DirectComposition surface handle. The swap chain is created with pre-existing buffers and very few descriptive elements are required. Instead, this method requires a DirectComposition surface handle and an
CreateDecodeSwapChainForCompositionSurfaceHandle returns:
The
Enables performing bulk operations across all SurfaceImageSource objects created in the same process.
+Flushes all current GPU work for all SurfaceImageSource or VirtualSurfaceImageSource objects associated with the given device.
+If this method succeeds, it returns
The FlushAllSurfacesWithDevice method flushes current GPU work for all SurfaceImageSource objects that were created with device. This GPU work includes Direct2D rendering work and internal GPU work done by the framework associated with rendering. This is useful if an application has created multiple SurfaceImageSource objects and needs to flush the GPU work for all of these surfaces from the background rendering thread. By flushing this work from the background thread the work can be better parallelized, with work being done on the UI thread to improve performance.
You can call the FlushAllSurfacesWithDevice method from a non-UI thread.
+Provides the implementation of a shared fixed-size surface for Direct2D drawing.
Note??If the surface is larger than the screen size, useThis interface provides the native implementation of the SurfaceImageSource Windows runtime type. To obtain a reference to
Microsoft::WRL::ComPtr<+> m_sisNative; + // ... + IInspectable* sisInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(surfaceImageSource); + sisInspectable->QueryInterface(__uuidof( ), (void **)&m_sisNative)
Sets the DXGI device, created with
Sets the DXGI device, created with
Pointer to the DXGI device interface.
If this method succeeds, it returns
Opens the supplied DXGI surface for drawing.
+The region of the surface that will be drawn into.
Receives the point (x,y) offset of the surface that will be drawn into.
Receives a reference to the surface for drawing.
If the app window that contains the SurfaceImageSource isn't active, like when it's suspended, calling the BeginDraw method returns an error.
+Closes the surface draw operation.
+If this method succeeds, it returns
Provides the implementation of a shared Microsoft DirectX surface which is displayed in a SurfaceImageSource or VirtualSurfaceImageSource.
+The
Microsoft::WRL::ComPtr<> m_sisD2DNative; + // ... + IInspectable* sisInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(surfaceImageSource); + sisInspectable->QueryInterface(__uuidof( ), (void **)&m_sisD2DNative)
The
The
Only call the SetDevice, BeginDraw, and EndDraw methods on
In order to support batching updates to multiple surfaces to improve performance, you can pass an
To draw to the surface from a background thread, you must set any DirectX resources, including the Microsoft Direct3D device, Direct3D device context, Direct2D device, and Direct2D device context, to enable multithreading support.
You can call the BeginDraw, SuspendDraw, and ResumeDraw methods from any background thread to enable high-performance multithreaded drawing.
Always call the EndDraw method on the UI thread in order to synchronize updating the DirectX content with the current XAML UI thread frame. You can call BeginDraw on a background thread, call SuspendDraw when you're done drawing on the background thread, and call EndDraw on the UI thread.
Use SuspendDraw and ResumeDraw to suspend and resume drawing on any background or UI thread.
Handle the SurfaceContentsLost event to determine when you need to recreate content which may be lost if the system resets the GPU.
+Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with
Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with
Pointer to the DXGI device interface. You can pass an
This method fails when the SurfaceImageSource is larger than the maximum texture size supported by the Direct3D device. Apps should use VirtualSurfaceImageSource for surfaces larger than the maximum texture size supported by the Direct3D device.
Initiates an update to the associated SurfaceImageSource or VirtualSurfaceImageSource.
+If this method succeeds, it returns
Closes the surface draw operation.
+If this method succeeds, it returns
Always call the EndDraw method on the UI thread in order to synchronize updating the Microsoft DirectX content with the current XAML UI thread frame.
+Suspends the drawing operation.
+If this method succeeds, it returns
Resume the drawing operation.
+If this method succeeds, it returns
Sets the DirectX swap chain for SwapChainBackgroundPanel.
+Sets the DirectX swap chain for SwapChainBackgroundPanel.
+If this method succeeds, it returns
Provides interoperation between XAML and a DirectX swap chain. Unlike SwapChainBackgroundPanel, a SwapChainPanel can appear at any level in the XAML display tree, and more than 1 can be present in any given tree.
+This interface provides the native implementation of the Windows::UI::XAML::Control::SwapChainPanel Windows Runtime type. To obtain a reference to
Microsoft::WRL::ComPtr<+> m_swapChainNative; + // ... + IInspectable* panelInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(swapChainPanel); + panelInspectable->QueryInterface(__uuidof( ), (void **)&m_swapChainNative);
Sets the DirectX swap chain for SwapChainPanel.
+Sets the DirectX swap chain for SwapChainPanel.
+If this method succeeds, it returns
Provides interoperation between XAML and a DirectX swap chain. Unlike SwapChainBackgroundPanel, a SwapChainPanel can appear at any level in the XAML display tree, and more than 1 can be present in any given tree.
+This interface provides the native implementation of the Windows::UI::XAML::Control::SwapChainPanel Windows Runtime type. To obtain a reference to
Microsoft::WRL::ComPtr<+> m_swapChainNative2; + // ... + IInspectable* panelInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(swapChainPanel); + panelInspectable->QueryInterface(__uuidof( ), (void **)&m_swapChainNative2);
Sets the DirectX swap chain for SwapChainPanel using a handle to the swap chain.
+SetSwapChain(HANDLE swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.
XAML supports setting a DXGI swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the
This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a XAML SwapChainPanel in the foreground app.
<!-- XAML markup --> + <Page> <SwapChainPanel x:Name=?captureStreamDisplayPanel? /> + </Page> // Definitions + ComPtr<+> m_swapChain; + HANDLE m_swapChainHandle; + ComPtr< > m_d3dDevice; + ComPtr< > dxgiAdapter; + ComPtr< > dxgiFactory; + ComPtr< > dxgiFactoryMedia; + ComPtr< > dxgiDevice; + swapChainDesc = {0}; // Get DXGI factory (assume standard boilerplate has created D3D11Device) + m_d3dDevice.As(&dxgiDevice); + dxgiDevice->GetAdapter(&dxgiAdapter); + dxgiAdapter->GetParent(__uuidof( ), &dxgiFactory); // Create swap chain and get handle + (GENERIC_ALL, nullptr, &m_swapChainHandle); + dxgiFactory.As(&dxgiFactoryMedia); + dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle( m_d3dDevice.Get(), m_swapChainHandle, &swapChainDesc, nullptr, &m_swapChain + ); // Set swap chain to display in a SwapChainPanel + ComPtr< > panelNative; + reinterpret_cast< *>(captureStreamDisplayPanel)->QueryInterface(IID_PPV_ARGS(&panelNative))); + panelNative->SetSwapChainHandle(m_swapChainHandle);
Sets the DirectX swap chain for SwapChainPanel using a handle to the swap chain.
+If this method succeeds, it returns
SetSwapChain(HANDLE swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.
XAML supports setting a DXGI swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the
This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a XAML SwapChainPanel in the foreground app.
<!-- XAML markup --> + <Page> <SwapChainPanel x:Name=?captureStreamDisplayPanel? /> + </Page> // Definitions + ComPtr<+> m_swapChain; + HANDLE m_swapChainHandle; + ComPtr< > m_d3dDevice; + ComPtr< > dxgiAdapter; + ComPtr< > dxgiFactory; + ComPtr< > dxgiFactoryMedia; + ComPtr< > dxgiDevice; + swapChainDesc = {0}; // Get DXGI factory (assume standard boilerplate has created D3D11Device) + m_d3dDevice.As(&dxgiDevice); + dxgiDevice->GetAdapter(&dxgiAdapter); + dxgiAdapter->GetParent(__uuidof( ), &dxgiFactory); // Create swap chain and get handle + (GENERIC_ALL, nullptr, &m_swapChainHandle); + dxgiFactory.As(&dxgiFactoryMedia); + dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle( m_d3dDevice.Get(), m_swapChainHandle, &swapChainDesc, nullptr, &m_swapChain + ); // Set swap chain to display in a SwapChainPanel + ComPtr< > panelNative; + reinterpret_cast< *>(captureStreamDisplayPanel)->QueryInterface(IID_PPV_ARGS(&panelNative))); + panelNative->SetSwapChainHandle(m_swapChainHandle);
Provides an interface for the implementation of drawing behaviors when a VirtualSurfaceImageSource requests an update.
+This interface is implemented by the developer to provide specific drawing behaviors for updates to a VirtualSurfaceImageSource. Classes that implement this interface are provided to the
Gets the boundaries of the visible region of the shared surface.
+Invalidates a specific region of the shared surface for drawing.
+The region of the surface to invalidate.
If this method succeeds, it returns
Gets the total number of regions of the surface that must be updated.
+Receives the number of regions to update.
Gets the set of regions that must be updated on the shared surface.
+The number of regions that must be updated. You obtain this by calling GetUpdateRectCount.
Receives a list of regions that must be updated.
If this method succeeds, it returns
Gets the boundaries of the visible region of the shared surface.
+Receives a rectangle that specifies the visible region of the shared surface.
If this method succeeds, it returns
Registers for the callback that will perform the drawing when an update to the shared surface is requested.
+Pointer to an implementation of
If this method succeeds, it returns
Resizes the surface.
+The updated width of the surface.
The updated height of the surface.
If this method succeeds, it returns
Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.
+This method is implemented by the developer.
+Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.
+This method is implemented by the developer.
+Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.
+If this method succeeds, it returns
This method is implemented by the developer.
+Represents a keyed mutex, which allows exclusive access to a shared resource that is used by multiple devices.
+The
An
For information about creating a keyed mutex, see the
Using a key, acquires exclusive rendering access to a shared resource.
+A value that indicates which device to give access to. This method will succeed when the device that currently owns the surface calls the
The time-out interval, in milliseconds. This method will return if the interval elapses, and the keyed mutex has not been released using the specified Key. If this value is set to zero, the AcquireSync method will test to see if the keyed mutex has been released and returns immediately. If this value is set to INFINITE, the time-out interval will never elapse.
Return
If the owning device attempted to create another keyed mutex on the same shared resource, AcquireSync returns E_FAIL.
AcquireSync can also return the following DWORD constants. Therefore, you should explicitly check for these constants. If you only use the SUCCEEDED macro on the return value to determine if AcquireSync succeeded, you will not catch these constants.
The AcquireSync method creates a lock to a surface that is shared between multiple devices, allowing only one device to render to a surface at a time. This method uses a key to determine which device currently has exclusive access to the surface.
When a surface is created using the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX value of the D3D10_RESOURCE_MISC_FLAG enumeration, you must call the AcquireSync method before rendering to the surface. You must call the ReleaseSync method when you are done rendering to a surface.
To acquire a reference to the keyed mutex object of a shared resource, call the QueryInterface method of the resource and pass in the UUID of the
The AcquireSync method uses the key as follows, depending on the state of the surface:
Using a key, releases exclusive rendering access to a shared resource.
+A value that indicates which device to give access to. This method succeeds when the device that currently owns the surface calls the ReleaseSync method using the same value. This value can be any UINT64 value.
Returns
If the device attempted to release a keyed mutex that is not valid or owned by the device, ReleaseSync returns E_FAIL.
The ReleaseSync method releases a lock to a surface that is shared between multiple devices. This method uses a key to determine which device currently has exclusive access to the surface.
When a surface is created using the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX value of the D3D10_RESOURCE_MISC_FLAG enumeration, you must call the
After you call the ReleaseSync method, the shared resource is unset from the rendering pipeline.
To acquire a reference to the keyed mutex object of a shared resource, call the QueryInterface method of the resource and pass in the UUID of the
An
To see the outputs available, use
Get a description of the output.
+On a high DPI desktop, GetDesc returns the visualized screen size unless the app is marked high DPI aware. For info about writing DPI-aware Win32 apps, see High DPI.
+Gets a description of the gamma-control capabilities.
+Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Gets or sets the gamma control settings.
+Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Gets statistics about recently rendered frames.
+This API is similar to
Note??Calling this method is only supported while in full-screen mode.? +
Get a description of the output.
+A reference to the output description (see
Returns a code that indicates success or failure.
On a high DPI desktop, GetDesc returns the visualized screen size unless the app is marked high DPI aware. For info about writing DPI-aware Win32 apps, see High DPI.
+[Starting with Direct3D 11.1, we recommend not to use GetDisplayModeList anymore to retrieve the matching display mode. Instead, use
Gets the display modes that match the requested format and other input options.
+Returns one of the following DXGI_ERROR. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case
In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).
As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.
UINT num = 0; ++format = ; + UINT flags = ; pOutput->GetDisplayModeList( format, flags, &num, 0); ... * pDescs = new [num]; + pOutput->GetDisplayModeList( format, flags, &num, pDescs);
[Starting with Direct3D 11.1, we recommend not to use FindClosestMatchingMode anymore to find the display mode that most closely matches the requested display mode. Instead, use
Finds the display mode that most closely matches the requested display mode.
+Returns one of the following DXGI_ERROR.
FindClosestMatchingMode behaves similarly to the
Halt a thread until the next vertical blank occurs.
+Returns one of the following DXGI_ERROR.
A vertical blank occurs when the raster moves from the lower right corner to the upper left corner to begin drawing the next frame.
+Takes ownership of an output.
+A reference to the
Set to TRUE to enable other threads or applications to take ownership of the device; otherwise, set to
Returns one of the DXGI_ERROR values.
When you are finished with the output, call
TakeOwnership should not be called directly by applications, since results will be unpredictable. It is called implicitly by the DXGI swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.
+Releases ownership of the output.
+If you are not using a swap chain, get access to an output by calling
Gets a description of the gamma-control capabilities.
+A reference to a description of the gamma-control capabilities (see
Returns one of the DXGI_ERROR values.
Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Sets the gamma controls.
+A reference to a
Returns one of the DXGI_ERROR values.
Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Gets the gamma control settings.
+An array of gamma control settings (see
Returns one of the DXGI_ERROR values.
Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Changes the display mode.
+A reference to a surface (see
Returns one of the DXGI_ERROR values.
This method should only be called between
[Starting with Direct3D 11.1, we recommend not to use GetDisplaySurfaceData anymore to retrieve the current display surface. Instead, use
Gets a copy of the current display surface.
+Returns one of the DXGI_ERROR values.
Use
Gets statistics about recently rendered frames.
+A reference to frame statistics (see
If this function succeeds, it returns
This API is similar to
Note??Calling this method is only supported while in full-screen mode.? +
UINT num = 0;
+ DXGI_FORMAT format = DXGI_FORMAT_R32G32B32A32_FLOAT;
+ UINT flags = DXGI_ENUM_MODES_INTERLACED; pOutput->GetDisplayModeList( format, flags, &num, 0); ... DXGI_MODE_DESC * pDescs = new DXGI_MODE_DESC[num];
+ pOutput->GetDisplayModeList( format, flags, &num, pDescs);
+
+
+ An
To determine the outputs that are available from the adapter, use
[Starting with Direct3D 11.1, we recommend not to use GetDisplayModeList anymore to retrieve the matching display mode. Instead, use
Gets the display modes that match the requested format and other input options.
+Returns one of the following DXGI_ERROR. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case
In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).
As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.
UINT num = 0; ++format = ; + UINT flags = ; pOutput->GetDisplayModeList( format, flags, &num, 0); ... * pDescs = new [num]; + pOutput->GetDisplayModeList( format, flags, &num, pDescs);
Finds the display mode that most closely matches the requested display mode.
+A reference to the
A reference to the
A reference to the Direct3D device interface. If this parameter is
Returns one of the error codes described in the DXGI_ERROR topic.
Direct3D devices require UNORM formats.
FindClosestMatchingMode1 finds the closest matching available display mode to the mode that you specify in pModeToMatch.
If you set the Stereo member in the
FindClosestMatchingMode1 resolves similarly ranked members of display modes (that is, all specified, or all unspecified, and so on) in the following order:
When FindClosestMatchingMode1 determines the closest value for a particular member, it uses previously matched members to filter the display mode list choices, and ignores other members. For example, when FindClosestMatchingMode1 matches Resolution, it already filtered the display mode list by a certain ScanlineOrdering, Scaling, and Format, while it ignores RefreshRate. This ordering doesn't define the absolute ordering for every usage scenario of FindClosestMatchingMode1, because the application can choose some values initially, which effectively changes the order of resolving members.
FindClosestMatchingMode1 matches members of the display mode one at a time, generally in a specified order.
If a member is unspecified, FindClosestMatchingMode1 gravitates toward the values for the desktop related to this output. If this output is not part of the desktop, FindClosestMatchingMode1 uses the default desktop output to find values. If an application uses a fully unspecified display mode, FindClosestMatchingMode1 typically returns a display mode that matches the desktop settings for this output. Because unspecified members are lower priority than specified members, FindClosestMatchingMode1 resolves unspecified members later than specified members.
+Copies the display surface (front buffer) to a user-provided resource.
+A reference to a resource interface that represents the resource to which GetDisplaySurfaceData1 copies the display surface.
Returns one of the error codes described in the DXGI_ERROR topic.
GetDisplaySurfaceData1 is similar to
GetDisplaySurfaceData1 returns an error if the input resource is not a 2D texture (represented by the
The original
You can call GetDisplaySurfaceData1 only when an output is in full-screen mode. If GetDisplaySurfaceData1 succeeds, it fills the destination resource.
Use
Creates a desktop duplication interface from the
If an application wants to duplicate the entire desktop, it must create a desktop duplication interface on each active output on the desktop. This interface does not provide an explicit way to synchronize the timing of each output image. Instead, the application must use the time stamp of each output, and then determine how to combine the images.
For DuplicateOutput to succeed, you must create pDevice from
If the current mode is a stereo mode, the desktop duplication interface provides the image for the left stereo image only.
By default, only four processes can use a
For improved performance, consider using DuplicateOutput1.
+[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Gets the display modes that match the requested format and other input options.
+A
A combination of DXGI_ENUM_MODES-typed values that are combined by using a bitwise OR operation. The resulting value specifies options for display modes to include. You must specify
GetDisplayModeList1 is updated from GetDisplayModeList to return a list of
The GetDisplayModeList1 method does not enumerate stereo modes unless you specify the
In general, when you switch from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth, and refresh rate of the swap chain. To exercise more control over the display mode, use GetDisplayModeList1 to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).
The following example code shows that you need to call GetDisplayModeList1 twice. First call GetDisplayModeList1 to get the number of modes available, and second call GetDisplayModeList1 to return a description of the modes.
UINT num = 0;
+ format = ;
+ UINT flags = ; pOutput->GetDisplayModeList1( format, flags, &num, 0); ... * pDescs = new [num];
+ pOutput->GetDisplayModeList1( format, flags, &num, pDescs);
+ An
To see the outputs available, use
Queries an adapter output for multiplane overlay support. If this API returns ?TRUE?, multiple swap chain composition takes place in a performant manner using overlay hardware. If this API returns false, apps should avoid using foreground swap chains (that is, avoid using swap chains created with the
TRUE if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns
See CreateSwapChainForCoreWindow for info on creating a foreground swap chain.
+[This documentation is preliminary and is subject to change.]
Queries an adapter output for multiplane overlay support.
+TRUE if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns
Represents an adapter output (such as a monitor). The
Checks for overlay support.
+A
A reference to the Direct3D device interface. CheckOverlaySupport returns only support info about this scan-out device.
A reference to a variable that receives a combination of
Represents an adapter output (such as a monitor). The
Checks for overlay color space support.
+A
A
A reference to the Direct3D device interface. CheckOverlayColorSpaceSupport returns only support info about this scan-out device.
A reference to a variable that receives a combination of
An
To see the outputs available, use
Allows specifying a list of supported formats for fullscreen surfaces that can be returned by the
This method allows directly receiving the original back buffer format used by a running fullscreen application. For comparison, using the original DuplicateOutput function always converts the fullscreen surface to a 32-bit BGRA format. In cases where the current fullscreen application is using a different buffer format, a conversion to 32-bit BGRA incurs a performance penalty. Besides the performance benefit of being able to skip format conversion, using DuplicateOutput1 also allows receiving the full gamut of colors in cases where a high-color format (such as R10G10B10A2) is being presented.
The pSupportedFormats array should only contain display scan-out formats. See Format Support for Direct3D Feature Level 11.0 Hardware for required scan-out formats at each feature level. If the current fullscreen buffer format is not contained in the pSupportedFormats array, DXGI will pick one of the supplied formats and convert the fullscreen buffer to that format before returning from
An
To see the outputs available, use
The
A collaboration application can use
An application can use
The following components of the operating system can generate the desktop image:
All current
Examples of situations in which
In these situations, the application must release the
While the application processes each desktop image, the operating system accumulates all the desktop image updates into a single update. For more information about desktop updates, see Updating the desktop image data.
The desktop image is always in the
The
Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.
+After an application creates an
Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.
+A reference to a
After an application creates an
Indicates that the application is ready to process the next desktop image.
+The time-out interval, in milliseconds. This interval specifies the amount of time that this method waits for a new frame before it returns to the caller. This method returns if the interval elapses, and a new desktop image is not available.
For more information about the time-out interval, see Remarks.
A reference to a memory location that receives the
A reference to a variable that receives the
AcquireNextFrame returns:
When AcquireNextFrame returns successfully, the calling application can access the desktop image that AcquireNextFrame returns in the variable at ppDesktopResource. + If the caller specifies a zero time-out interval in the TimeoutInMilliseconds parameter, AcquireNextFrame verifies whether there is a new desktop image available, returns immediately, and indicates its outcome with the return value. If the caller specifies an INFINITE time-out interval in the TimeoutInMilliseconds parameter, the time-out interval never elapses.
Note??You cannot cancel the wait that you specified in the TimeoutInMilliseconds parameter. Therefore, if you must periodically check for other conditions (for example, a terminate signal), you should specify a non-INFINITE time-out interval. After the time-out interval elapses, you can check for these other conditions and then call AcquireNextFrame again to wait for the next frame.?AcquireNextFrame acquires a new desktop frame when the operating system either updates the desktop bitmap image or changes the shape or position of a hardware reference. The new frame that AcquireNextFrame acquires might have only the desktop image updated, only the reference shape or position updated, or both.
+Gets information about dirty rectangles for the current desktop frame.
+The size in bytes of the buffer that the caller passed to the pDirtyRectsBuffer parameter.
A reference to an array of
Pointer to a variable that receives the number of bytes that GetFrameDirtyRects needs to store information about dirty regions in the buffer at pDirtyRectsBuffer.
For more information about returning the required buffer size, see Remarks.
GetFrameDirtyRects returns:
GetFrameDirtyRects stores a size value in the variable at pDirtyRectsBufferSizeRequired. This value specifies the number of bytes that GetFrameDirtyRects needs to store information about dirty regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pDirtyRectsBuffer:
The caller can also use the value returned at pDirtyRectsBufferSizeRequired to determine the number of
The buffer contains the list of dirty
Gets information about the moved rectangles for the current desktop frame.
+The size in bytes of the buffer that the caller passed to the pMoveRectBuffer parameter.
A reference to an array of
Pointer to a variable that receives the number of bytes that GetFrameMoveRects needs to store information about moved regions in the buffer at pMoveRectBuffer.
For more information about returning the required buffer size, see Remarks.
GetFrameMoveRects returns:
GetFrameMoveRects stores a size value in the variable at pMoveRectsBufferSizeRequired. This value specifies the number of bytes that GetFrameMoveRects needs to store information about moved regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pMoveRectBuffer:
The caller can also use the value returned at pMoveRectsBufferSizeRequired to determine the number of
The buffer contains the list of move RECTs for the current frame.
Note??To produce a visually accurate copy of the desktop, an application must first process all move RECTs before it processes dirty RECTs.? +Gets information about the new reference shape for the current desktop frame.
+The size in bytes of the buffer that the caller passed to the pPointerShapeBuffer parameter.
A reference to a buffer to which GetFramePointerShape copies and returns pixel data for the new reference shape.
Pointer to a variable that receives the number of bytes that GetFramePointerShape needs to store the new reference shape pixel data in the buffer at pPointerShapeBuffer.
For more information about returning the required buffer size, see Remarks.
Pointer to a
GetFramePointerShape returns:
GetFramePointerShape stores a size value in the variable at pPointerShapeBufferSizeRequired. This value specifies the number of bytes that pPointerShapeBufferSizeRequired needs to store the new reference shape pixel data. You can use the value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pPointerShapeBuffer:
The pPointerShapeInfo parameter describes the new reference shape.
+Provides the CPU with efficient access to a desktop image if that desktop image is already in system memory.
+A reference to a
MapDesktopSurface returns:
You can successfully call MapDesktopSurface if the DesktopImageInSystemMemory member of the
Invalidates the reference to the desktop image that was retrieved by using
UnMapDesktopSurface returns:
Indicates that the application finished processing the frame.
+ReleaseFrame returns:
The application must release the frame before it acquires the next frame. After the frame is released, the surface that contains the desktop bitmap becomes invalid; you will not be able to use the surface in a DirectX graphics operation.
For performance reasons, we recommend that you release the frame just before you call the
Set the priority for evicting the resource from memory.
+The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.
You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.
+[Starting with Direct3D 11.1, we recommend not to use GetSharedHandle anymore to retrieve the handle to a shared resource. Instead, use
Gets the handle to a shared resource.
+GetSharedHandle returns a handle for the resource that you created as shared (that is, you set the
The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.
GetSharedHandle can also return handles for resources that were passed into
GetSharedHandle fails if the resource to which it wants to get a handle is not shared.
+Get or sets the eviction priority.
+The eviction priority is a memory-management variable that is used by DXGI to determine how to manage overcommitted memory.
Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.
+[Starting with Direct3D 11.1, we recommend not to use GetSharedHandle anymore to retrieve the handle to a shared resource. Instead, use
Gets the handle to a shared resource.
+Returns one of the DXGI_ERROR values.
GetSharedHandle returns a handle for the resource that you created as shared (that is, you set the
The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.
GetSharedHandle can also return handles for resources that were passed into
GetSharedHandle fails if the resource to which it wants to get a handle is not shared.
+Get the expected resource usage.
+A reference to a usage flag (see DXGI_USAGE). For Direct3D 10, a surface can be used as a shader input or a render-target output.
Returns one of the following DXGI_ERROR.
Set the priority for evicting the resource from memory.
+The priority is one of the following values:
Value | Meaning |
---|---|
| The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies. |
| The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory. |
| The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. |
| The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource. |
| The resource is evicted from memory only if there is no other way of resolving the memory requirement. |
?
Returns one of the following DXGI_ERROR.
The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.
You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.
+Get the eviction priority.
+A reference to the eviction priority, which determines when a resource can be evicted from memory.
The following defined values are possible.
Value | Meaning |
---|---|
| The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies. |
| The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory. |
| The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. |
| The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource. |
| The resource is evicted from memory only if there is no other way of resolving the memory requirement. |
?
Returns one of the following DXGI_ERROR.
The eviction priority is a memory-management variable that is used by DXGI to determine how to manage overcommitted memory.
Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.
+ An
To determine the type of memory a resource is currently located in, use
You can retrieve the
* pDXGIResource; + hr = g_pd3dTexture2D->QueryInterface(__uuidof( ), (void **)&pDXGIResource);
Windows?Phone?8: This API is supported.
+Creates a subresource surface object.
+The index of the subresource surface object to enumerate.
The address of a reference to a
Returns
A subresource is a valid surface if the original resource would have been a valid surface had its array size been equal to 1.
Subresource surface objects implement the
CreateSubresourceSurface creates a subresource surface that is based on the resource interface on which CreateSubresourceSurface is called. For example, if the original resource interface object is a 2D texture, the created subresource surface is also a 2D texture.
You can use CreateSubresourceSurface to create parts of a stereo resource so you can use Direct2D on either the left or right part of the stereo resource.
+Creates a handle to a shared resource. You can then use the returned handle with multiple Direct3D devices.
+A reference to a
Set this parameter to
The lpSecurityDescriptor member of the structure specifies a SECURITY_DESCRIPTOR for the resource. Set this member to
The requested access rights to the resource. In addition to the generic access rights, DXGI defines the following values:
You can combine these values by using a bitwise OR operation.
The name of the resource to share. The name is limited to MAX_PATH characters. Name comparison is case sensitive. You will need the resource name if you call the
If lpName matches the name of an existing resource, CreateSharedHandle fails with
The name can have a "Global\" or "Local\" prefix to explicitly create the object in the global or session namespace. The remainder of the name can contain any character except the backslash character (\). For more information, see Kernel Object Namespaces. Fast user switching is implemented using Terminal Services sessions. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users.
The object can be created in a private namespace. For more information, see Object Namespaces.
A reference to a variable that receives the NT HANDLE value to the resource to share. You can use this handle in calls to access the resource.
CreateSharedHandle only returns the NT handle when you created the resource as shared and specified that it uses NT handles (that is, you set the
You can pass the handle that CreateSharedHandle returns in a call to the
Because the handle that CreateSharedHandle returns is an NT handle, you can use the handle with CloseHandle, DuplicateHandle, and so on. You can call CreateSharedHandle only once for a shared resource; later calls fail. If you need more handles to the same shared resource, call DuplicateHandle. When you no longer need the shared resource handle, call CloseHandle to close the handle, in order to avoid memory leaks.
If you pass a name for the resource to lpName when you call CreateSharedHandle to share the resource, you can subsequently pass this name in a call to the
If you created the resource as shared and did not specify that it uses NT handles, you cannot use CreateSharedHandle to get a handle for sharing because CreateSharedHandle will fail.
+The
An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call
The runtime automatically creates an
Get a description of the surface.
+Get a description of the surface.
+A reference to the surface description (see
Returns
Get a reference to the data contained in the surface, and deny GPU access to the surface.
+A reference to the surface data (see
CPU read-write flags. These flags can be combined with a logical OR.
Returns
Use
Get a reference to the data contained in the surface, and deny GPU access to the surface.
+Returns
Use
The
This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call
Any object that supports
The runtime automatically creates an
Returns a device context (DC) that allows you to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface using Windows Graphics Device Interface (GDI).
+A Boolean value that specifies whether to preserve Direct3D contents in the GDI DC. TRUE directs the runtime not to preserve Direct3D contents in the GDI DC; that is, the runtime discards the Direct3D contents.
A reference to an
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
After you use the GetDC method to retrieve a DC, you can render to the DXGI surface by using GDI. The GetDC method readies the surface for GDI rendering and allows inter-operation between DXGI and GDI technologies.
Keep the following in mind when using this method:
You can also call GetDC on the back buffer at index 0 of a swap chain by obtaining an
+* g_pSwapChain = null ; +* g_pSurface1 = null ; + ... + //Setup the device and and swapchain + g_pSwapChain->GetBuffer(0, __uuidof(), (void**) &g_pSurface1); + g_pSurface1->GetDC( , &g_hDC ); + ... + //Draw on the DC using GDI + ... + //When finish drawing release the DC + g_pSurface1->ReleaseDC( null );
Releases the GDI device context (DC) that is associated with the current surface and allows you to use Direct3D to render.
+A reference to a
You can pass a reference to an empty
If this method succeeds, it returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Use the ReleaseDC method to release the DC and indicate that your application finished all GDI rendering to this surface. You must call the ReleaseDC method before you can use Direct3D to perform additional rendering.
Prior to resizing buffers you must release all outstanding DCs.
+The
An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call
Any object that supports
The runtime automatically creates an
You can call the
Gets the parent resource and subresource index that support a subresource surface.
+The globally unique identifier (
A reference to a buffer that receives a reference to the parent resource object for the subresource surface.
A reference to a variable that receives the index of the subresource surface.
Returns
For subresource surface objects that the
Current objects that implement
An
You can create a swap chain by
+ calling
[Starting with Direct3D 11.1, we recommend not to use GetDesc anymore to get a description of the swap chain. Instead, use
Get a description of the swap chain.
+Get the output (the display monitor) that contains the majority of the client area of the target window.
+If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
You cannot call GetContainingOutput on a swap chain that you created with
Gets the number of times that
For info about presentation statistics for a frame, see
Presents a rendered image to the user.
+An integer that specifies how to synchronize presentation of a frame with the vertical blank.
For the bit-block transfer (bitblt) model (
For the flip model (
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
Possible return values include:
Starting with Direct3D 11.1, consider using
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
Differences between Direct3D 9 and Direct3D 10: Specifying |
?
For flip presentation model swap chains that you create with the
For info about how data values change when you present content to the screen, see Converting data for the color space.
+Accesses one of the swap-chain's back buffers.
+A zero-based buffer index.
If the swap chain's swap effect is
If the swap chain's swap effect is either
The type of interface used to manipulate the buffer.
A reference to a back-buffer interface.
Returns one of the following DXGI_ERROR.
Sets the display state to windowed or full screen.
+A Boolean value that specifies whether to set the display state to windowed or full screen. TRUE for full screen, and
If you pass TRUE to the Fullscreen parameter to set the display state to full screen, you can optionally set this parameter to a reference to an
This methods returns:
When this error is returned, an application can continue to run in windowed mode and try to switch to full-screen mode later.
DXGI may change the display state of a swap chain in response to end user or system requests.
We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through SetFullscreenState; that is, do not set the Windowed member of
Get the state associated with full-screen mode.
+A reference to a boolean whose value is either:
A reference to the output target (see
Returns one of the following DXGI_ERROR.
When the swap chain is in full-screen mode, a reference to the target output will be returned and its reference count will be incremented.
+[Starting with Direct3D 11.1, we recommend not to use GetDesc anymore to get a description of the swap chain. Instead, use
Get a description of the swap chain.
+Returns one of the following DXGI_ERROR.
Changes the swap chain's back buffer size, format, and number of buffers. This should be called when the application window is resized.
+The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.
The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the
The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the
A
A combination of
Returns
You can't resize a swap chain unless you release all outstanding references to its back buffers. You must release all of its direct and indirect references on the back buffers in order for ResizeBuffers to succeed.
Direct references are held by the application after it calls AddRef on a resource.
Indirect references are held by views to a resource, binding a view of the resource to a device context, a command list that used the resource, a command list that used a view to that resource, a command list that executed another command list that used the resource, and so on.
Before you call ResizeBuffers, ensure that the application releases all references (by calling the appropriate number of Release invocations) on the resources, any views to the resource, and any command lists that use either the resources or views, and ensure that neither the resource nor a view is still bound to a device context. You can use
For swap chains that you created with
We recommend that you call ResizeBuffers when a client window is resized (that is, when an application receives a WM_SIZE message).
The only difference between
Resizes the output target.
+A reference to a
Returns a code that indicates success or failure.
ResizeTarget resizes the target window when the swap chain is in windowed mode, and changes the display mode on the target output when the swap chain is in full-screen mode. Therefore, apps can call ResizeTarget to resize the target window (rather than a Microsoft Win32API such as SetWindowPos) without knowledge of the swap chain display mode.
If a Windows Store app calls ResizeTarget, it fails with
You cannot call ResizeTarget on a swap chain that you created with
Apps must still call
Get the output (the display monitor) that contains the majority of the client area of the target window.
+A reference to the output interface (see
Returns one of the following DXGI_ERROR.
If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
You cannot call GetContainingOutput on a swap chain that you created with
Gets performance statistics about the last render frame.
+A reference to a
Returns one of the DXGI_ERROR values.
You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.
You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the
Gets the number of times that
Returns one of the DXGI_ERROR values.
For info about presentation statistics for a frame, see
Gets performance statistics about the last render frame.
+You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.
You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the
[Starting with Direct3D 11.1, we recommend not to use Present anymore to present a rendered image. Instead, use
Presents a rendered image to the user.
+Possible return values include:
Note??The Present method can return either
Starting with Direct3D 11.1, we recommend to instead use
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
Differences between Direct3D 9 and Direct3D 10: Specifying |
?
For flip presentation model swap chains that you create with the
For info about how data values change when you present content to the screen, see Converting data for the color space.
+Provides presentation capabilities that are enhanced from
You can create a swap chain by
+ calling
Gets a description of the swap chain.
+Gets a description of a full-screen swap chain.
+The semantics of GetFullscreenDesc are identical to that of the IDXGISwapchain::GetDesc method for
Retrieves the underlying
Applications call the
Determines whether a swap chain supports ?temporary mono.?
+Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the
Gets the output (the display monitor) to which you can restrict the contents of a present operation.
+If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
+Retrieves or sets the background color of the swap chain.
+Gets or sets the rotation of the back buffers for the swap chain.
+Gets a description of the swap chain.
+A reference to a
Returns
Gets a description of a full-screen swap chain.
+A reference to a
GetFullscreenDesc returns:
The semantics of GetFullscreenDesc are identical to that of the IDXGISwapchain::GetDesc method for
Retrieves the underlying
Returns
If pHwnd receives
Applications call the
Retrieves the underlying CoreWindow object for this swap-chain object.
+GetCoreWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetCoreWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Applications call the
Presents a frame on the display screen.
+An integer that specifies how to synchronize presentation of a frame with the vertical blank.
For the bit-block transfer (bitblt) model (
For the flip model (
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
A reference to a
Possible return values include:
An app can use Present1 to optimize presentation by specifying scroll and dirty rectangles. When the runtime has information about these rectangles, the runtime can then perform necessary bitblts during presentation more efficiently and pass this metadata to the Desktop Window Manager (DWM). The DWM can then use the metadata to optimize presentation and pass the metadata to indirect displays and terminal servers to optimize traffic over the wire. An app must confine its modifications to only the dirty regions that it passes to Present1, as well as modify the entire dirty region to avoid undefined resource contents from being exposed.
For flip presentation model swap chains that you create with the
For info about how data values change when you present content to the screen, see Converting data for the color space.
For info about calling Present1 when your app uses multiple threads, see Multithread Considerations and Multithreading and DXGI.
+Determines whether a swap chain supports ?temporary mono.?
+Indicates whether to use the swap chain in temporary mono mode. TRUE indicates that you can use temporary-mono mode; otherwise,
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsTemporaryMonoSupported always returns
Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the
Gets the output (the display monitor) to which you can restrict the contents of a present operation.
+ A reference to a buffer that receives a reference to the
Returns
If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
+Changes the background color of the swap chain.
+A reference to a DXGI_RGBA structure that specifies the background color to set.
SetBackgroundColor returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetBackgroundColor fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
The background color affects only swap chains that you create with
When you set the background color, it is not immediately realized. It takes effect in conjunction with your next call to the
When you call the
Retrieves the background color of the swap chain.
+A reference to a DXGI_RGBA structure that receives the background color of the swap chain.
GetBackgroundColor returns:
Sets the rotation of the back buffers for the swap chain.
+A
SetRotation returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetRotation fails with
You can only use SetRotation to rotate the back buffers for flip-model swap chains that you present in windowed mode.
SetRotation isn't supported for rotating the back buffers for flip-model swap chains that you present in full-screen mode. In this situation, SetRotation doesn't fail, but you must ensure that you specify no rotation (
Gets the rotation of the back buffers for the swap chain.
+A reference to a variable that receives a
Returns
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetRotation fails with
Extends
You can create a swap chain by
+ calling
Gets or sets the number of frames that the swap chain is allowed to queue for rendering.
+Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.
Windows?8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the
Gets or sets the transform matrix that will be applied to a composition swap chain upon the next present.
Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.
+Sets the source region to be used for the swap chain.
Use SetSourceSize to specify the portion of the swap chain from which the operating system presents. This allows an effective resize without calling the more-expensive
This method can return:
Gets the source region used for the swap chain.
Use GetSourceSize to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use SetSourceSize to set this portion of the swap chain.
+This method can return error codes that are described in the DXGI_ERROR topic.
Sets the number of frames that the swap chain is allowed to queue for rendering.
+The maximum number of back buffer frames that will be queued for the swap chain. This value is 3 by default.
Returns
This method is only valid for use on swap chains created with
Gets the number of frames that the swap chain is allowed to queue for rendering.
+The maximum number of back buffer frames that will be queued for the swap chain. This value is 1 by default, but should be set to 2 if the scene takes longer than it takes for one vertical refresh (typically about 16ms) to draw.
Returns
Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.
Windows?8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the
A handle to the waitable object, or
Sets the transform matrix that will be applied to a composition swap chain upon the next present.
Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.
+SetMatrixTransform returns:
Gets the transform matrix that will be applied to a composition swap chain upon the next present.
Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.
+GetMatrixTransform returns:
[This documentation is preliminary and is subject to change.]
Gets the source region used for the swap chain.
Use GetSourceSize to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use SetSourceSize to set this portion of the swap chain.
+This method can return error codes that are described in the DXGI_ERROR topic.
Extends
Gets the index of the swap chain's current back buffer.
+Sets the color space used by the swap chain.
+Gets the index of the swap chain's current back buffer.
+Returns the index of the current back buffer.
Checks the swap chain's support for color space.
+A
A reference to a variable that receives a combination of
Sets the color space used by the swap chain.
+A
This method returns
Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.
+The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.
The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the
The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the
A
A combination of
An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.
An array of command queues (
Returns
This method is only valid to call when the swapchain was created using a D3D12 command queue (
When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.
The only difference between
Also see the Remarks section in
Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.
+The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.
The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the
The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the
A
A combination of
An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.
An array of command queues (
Returns
This method is only valid to call when the swapchain was created using a D3D12 command queue (
When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.
The only difference between
Also see the Remarks section in
Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.
+The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.
The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the
The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the
A
A combination of
An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.
An array of command queues (
Returns
This method is only valid to call when the swapchain was created using a D3D12 command queue (
When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.
The only difference between
Also see the Remarks section in
An
You can create a swap chain by
+ calling
This method sets High Dynamic Range (HDR) and Wide Color Gamut (WCG) header metadata.
+Specifies one member of the
Specifies the size of pMetaData, in bytes.
Specifies a void reference that references the metadata, if it exists. Refer to the
This method returns an
This method sets metadata to enable a monitor's output to be adjusted depending on its capabilities.
+This swap chain interface allows desktop media applications to request a seamless change to a specific refresh rate.
For example, a media application presenting video at a typical framerate of 23.997 frames per second can request a custom refresh rate of 24 or 48 Hz to eliminate jitter. If the request is approved, the app starts presenting frames at the custom refresh rate immediately - without the typical 'mode switch' a user would experience when changing the refresh rate themselves by using the control panel.
+Seamless changes to custom framerates can only be done on integrated panels. Custom frame rates cannot be applied to external displays. If the DXGI output adapter is attached to an external display then CheckPresentDurationSupport will return (0, 0) for upper and lower bounds, indicating that the device does not support seamless refresh rate changes.
Custom refresh rates can be used when displaying video with a dynamic framerate. However, the refresh rate change should be kept imperceptible to the user. A best practice for keeping the refresh rate transition imperceptible is to only set the custom framerate if the app determines it can present at that rate for least 5 seconds.
+Queries the system for a
Requests a custom presentation duration (custom refresh rate).
+Queries the system for a
This method returns
Requests a custom presentation duration (custom refresh rate).
+The custom presentation duration, specified in hundreds of nanoseconds.
This method returns
Queries the graphics driver for a supported frame present duration corresponding to a custom refresh rate.
+Indicates the frame duration to check. This value is the duration of one frame at the desired refresh rate, specified in hundreds of nanoseconds. For example, set this field to 167777 to check for 60 Hz refresh rate support.
A variable that will be set to the closest supported frame present duration that's smaller than the requested value, or zero if the device does not support any lower duration.
A variable that will be set to the closest supported frame present duration that's larger than the requested value, or zero if the device does not support any higher duration.
This method returns
If the DXGI output adapter does not support custom refresh rates (for example, an external display) then the display driver will set upper and lower bounds to (0, 0).
+Describes an adapter (or video card) by using DXGI 1.0.
+The
A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc returns ?Software Adapter? for the description string.
The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware vendor.
The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware device.
The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the sub system.
The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
Describes an adapter (or video card) using DXGI 1.1.
+The
A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc1 returns ?Software Adapter? for the description string.
The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the hardware vendor.
The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the hardware device.
The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the sub system.
The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
A value of the
Describes an adapter (or video card) that uses Microsoft DirectX Graphics Infrastructure (DXGI) 1.2.
+The
A string that contains the adapter description.
The PCI ID of the hardware vendor.
The PCI ID of the hardware device.
The PCI ID of the sub system.
The PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
A value of the
A value of the
A value of the
Describes an adapter (or video card) by using DXGI 1.0.
+The
A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc returns ?Software Adapter? for the description string.
The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware vendor.
The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware device.
The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the sub system.
The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
Used with
Describes timing and presentation statistics for a frame.
+You initialize the
You can only use
The values in the PresentCount and PresentRefreshCount members indicate information about when a frame was presented on the display screen. You can use these values to determine whether a glitch occurred. The values in the SyncRefreshCount and SyncQPCTime members indicate timing information that you can use for audio and video synchronization or very precise animation. If the swap chain draws in full-screen mode, these values are based on when the computer booted. + If the swap chain draws in windowed mode, these values are based on when the swap chain is created.
+A value that represents the running total count of times that an image was presented to the monitor since the computer booted.
Note??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you calledA value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling QueryPerformanceCounter and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the QueryPerformanceCounter function.
Reserved. Always returns 0.
Used to verify system approval for the app's custom present duration (custom refresh rate). Approval should be continuously verified on a frame-by-frame basis.
+This structure is used with the GetFrameStatisticsMedia method.
+A value that represents the running total count of times that an image was presented to the monitor since the computer booted.
Note??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you calledA value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling QueryPerformanceCounter and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the QueryPerformanceCounter function.
Reserved. Always returns 0.
A value indicating the composition presentation mode. This value is used to determine whether the app should continue to use the decode swap chain. See
If the system approves an app's custom present duration request, this field is set to the approved custom present duration.
If the app's custom present duration request is not approved, this field is set to zero.
Controls the settings of a gamma curve.
+The
For info about using gamma correction, see Using gamma correction.
+A
A
An array of
Controls the gamma capabilities of an adapter.
+To get a list of the capabilities for controlling gamma correction, call
For info about using gamma correction, see Using gamma correction.
+True if scaling and offset operations are supported during gamma correction; otherwise, false.
A value describing the maximum range of the control-point positions.
A value describing the minimum range of the control-point positions.
A value describing the number of control points in the array.
An array of values describing control points; the maximum length of control points is 1025.
Describes the 10 bit display metadata, and is usually used for video. This is used to adjust the output to best match a display's capabilities.
+The X and Y coordinates of the parameters mean the xy chromacity coordinate in the CIE1931 color space. The values are normalized to 50000, so to get a value between 0.0 and 1.0, divide by 50000.
This structure is used in conjunction with the SetHDRMetaData method.
+The chromaticity coordinates of the 1.0 red value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The chromaticity coordinates of the 1.0 green value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The chromaticity coordinates of the 1.0 blue value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The chromaticity coordinates of the white point. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The maximum number of nits of the display used to master the content. Units are 0.0001 nit, so if the value is 1 nit, the value should be 10,000.
The minimum number of nits (in units of 0.00001 nit) of the display used to master the content.
The maximum nit value (in units of 0.00001 nit) used anywhere in the content.
The per-frame average of the maximum nit values (in units of 0.00001 nit).
Describes a JPEG AC huffman table.
+The number of codes for each code length.
The Huffman code values, in order of increasing code length.
Describes a JPEG DC huffman table.
+The number of codes for each code length.
The Huffman code values, in order of increasing code length.
Describes a JPEG quantization table.
+An array of bytes containing the elements of the quantization table.
Describes a mapped rectangle that is used to access a surface.
+The
A value that describes the width, in bytes, of the surface.
A reference to the image buffer of the surface.
Describes a display mode.
+This structure is used by the GetDisplayModeList and FindClosestMatchingMode methods.
The following format values are valid for display modes and when you create a bit-block transfer (bitblt) model swap chain. The valid values depend on the feature level that you are working with.
Feature level >= 9.1
Feature level >= 10.0
Feature level >= 11.0
You can pass one of these format values to
Starting with Windows?8 for a flip model swap chain (that is, a swap chain that has the
Because of the relaxed render target creation rules that Direct3D 11 has for back buffers, applications can create a
A value that describes the resolution width. If you specify the width as zero when you call the
A value describing the resolution height. If you specify the height as zero when you call the
A
A
A member of the
A member of the
Describes a display mode and whether the display mode supports stereo.
+This structure is used by the GetDisplayModeList1 and FindClosestMatchingMode1 methods.
+A value that describes the resolution width.
A value that describes the resolution height.
A
A
A
A
Specifies whether the full-screen display mode is stereo. TRUE if stereo; otherwise,
Describes an output or physical connection between the adapter (video card) and a device.
+The
A string that contains the name of the output device.
A
True if the output is attached to the desktop; otherwise, false.
A member of the
An
Describes an output or physical connection between the adapter (video card) and a device.
+The
A string that contains the name of the output device.
A
True if the output is attached to the desktop; otherwise, false.
A member of the
An
The
This structure is used by GetDesc.
+The
A non-zero LastMouseUpdateTime indicates an update to either a mouse reference position or a mouse reference position and shape. That is, the mouse reference position is always valid for a non-zero LastMouseUpdateTime; however, the application must check the value of the PointerShapeBufferSize member to determine whether the shape was updated too.
If only the reference was updated (that is, the desktop image was not updated), the AccumulatedFrames, TotalMetadataBufferSize, and LastPresentTime members are set to zero.
An AccumulatedFrames value of one indicates that the application completed processing the last frame before a new desktop image was presented. If the AccumulatedFrames value is greater than one, more desktop image updates have occurred while the application processed the last desktop update. In this situation, the operating system accumulated the update regions. For more information about desktop updates, see Desktop Update Data.
A non-zero TotalMetadataBufferSize indicates the total size of the buffers that are required to store all the desktop update metadata. An application cannot determine the size of each type of metadata. The application must call the
The time stamp of the last update of the desktop image. The operating system calls the QueryPerformanceCounter function to obtain the value. A zero value indicates that the desktop image was not updated since an application last called the
The time stamp of the last update to the mouse. The operating system calls the QueryPerformanceCounter function to obtain the value. A zero value indicates that the position or shape of the mouse was not updated since an application last called the
The number of frames that the operating system accumulated in the desktop image surface since the calling application processed the last desktop image. For more information about this number, see Remarks.
Specifies whether the operating system accumulated updates by coalescing dirty regions. Therefore, the dirty regions might contain unmodified pixels. TRUE if dirty regions were accumulated; otherwise,
Specifies whether the desktop image might contain protected content that was already blacked out in the desktop image. TRUE if protected content was already blacked; otherwise,
A
Size in bytes of the buffers to store all the desktop update metadata for this frame. For more information about this size, see Remarks.
Size in bytes of the buffer to hold the new pixel data for the mouse shape. For more information about this size, see Remarks.
The
This structure is used by GetFrameMoveRects.
+The starting position of a rectangle.
The target region to which to move a rectangle.
The
The Position member is valid only if the Visible member?s value is set to TRUE.
+The position of the hardware cursor relative to the top-left of the adapter output.
Specifies whether the hardware cursor is visible. TRUE if visible; otherwise,
The
An application draws the cursor shape with the top-left-hand corner drawn at the position that the Position member of the
An application calls the
A
The width in pixels of the mouse cursor.
The height in scan lines of the mouse cursor.
The width in bytes of the mouse cursor.
The position of the cursor's hot spot relative to its upper-left pixel. An application does not use the hot spot when it determines where to draw the cursor shape.
Describes information about present that helps the operating system optimize presentation.
+This structure is used by the Present1 method.
The scroll rectangle and the list of dirty rectangles could overlap. In this situation, the dirty rectangles take priority. Applications can then have pieces of dynamic content on top of a scrolled area. For example, an application could scroll a page and play video at the same time.
The following diagram and coordinates illustrate this example.
DirtyRectsCount = 2
+ pDirtyRects[ 0 ] = { 10, 30, 40, 50 } // Video
+ pDirtyRects[ 1 ] = { 0, 70, 50, 80 } // New line
+ *pScrollRect = { 0, 0, 50, 70 }
+ *pScrollOffset = { 0, -10 }
+
Parts of the previous frame and content that the application renders are combined to produce the final frame that the operating system presents on the display screen. Most of the window is scrolled from the previous frame. The application must update the video frame with the new chunk of content that appears due to scrolling.
The dashed rectangle shows the scroll rectangle in the current frame. The scroll rectangle is specified by the pScrollRect member. + The arrow shows the scroll offset. The scroll offset is specified by the pScrollOffset member. + Filled rectangles show dirty rectangles that the application updated with new content. The filled rectangles are specified by the DirtyRectsCount and pDirtyRects members.
The scroll rectangle and offset are not supported for the
The actual implementation of composition and necessary bitblts is different for the bitblt model and the flip model. For more info about these models, see DXGI Flip Model.
For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.
+The number of updated rectangles that you update in the back buffer for the presented frame. The operating system uses this information to optimize presentation. You can set this member to 0 to indicate that you update the whole frame.
A list of updated rectangles that you update in the back buffer for the presented frame. An application must update every single pixel in each rectangle that it reports to the runtime; the application cannot assume that the pixels are saved from the previous frame. For more information about updating dirty rectangles, see Remarks. You can set this member to
A reference to the scrolled rectangle. The scrolled rectangle is the rectangle of the previous frame from which the runtime bit-block transfers (bitblts) content. The runtime also uses the scrolled rectangle to optimize presentation in terminal server and indirect display scenarios.
The scrolled rectangle also describes the destination rectangle, that is, the region on the current frame that is filled with scrolled content. You can set this member to
A reference to the offset of the scrolled area that goes from the source rectangle (of previous frame) to the destination rectangle (of current frame). You can set this member to
Describes the current video memory budgeting parameters.
+Use this structure with QueryVideoMemoryInfo.
Refer to the remarks for
Specifies the OS-provided video memory budget, in bytes, that the application should target. If CurrentUsage is greater than Budget, the application may incur stuttering or performance penalties due to background activity by the OS to provide other applications with a fair usage of video memory.
Specifies the application?s current video memory usage, in bytes.
The amount of video memory, in bytes, that the application has available for reservation. To reserve this video memory, the application should call
The amount of video memory, in bytes, that is reserved by the application. The OS uses the reservation as a hint to determine the application?s minimum working set. Applications should attempt to ensure that their video memory usage can be trimmed to meet this requirement.
Represents a rational number.
+This structure is a member of the
The
An unsigned integer value representing the top of the rational number.
An unsigned integer value representing the bottom of the rational number.
Describes multi-sampling parameters for a resource.
+This structure is a member of the
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: D3D10_STANDARD_MULTISAMPLE_PATTERN and D3D10_CENTER_MULTISAMPLE_PATTERN in the D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS enumeration in D3D10_1.h. Direct3D 11 has defined two standard quality levels: |
?
+The number of multisamples per pixel.
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 ID3D10Device::CheckMultisampleQualityLevels for Direct3D 10 or
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.
Represents a handle to a shared resource.
+To create a shared surface, pass a shared-resource handle into the
A handle to a shared resource.
Describes a surface.
+This structure is used by the GetDesc and CreateSurface methods.
+A value describing the surface width.
A value describing the surface height.
A member of the
A member of the
Describes a swap chain.
+This structure is used by the GetDesc and CreateSwapChain methods.
In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.
If you create a swap chain with one buffer, specifying
For performance information about flipping swap-chain buffers in full-screen application, see Full-Screen Application Performance Hints.
+A
A
A member of the DXGI_USAGE enumerated type that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.
A value that describes the number of buffers in the swap chain. When you call
An
A Boolean value that specifies whether the output is in windowed mode. TRUE if the output is in windowed mode; otherwise,
We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through
For more information about choosing windowed verses full screen, see
A member of the
A member of the
Describes a swap chain.
+This structure is used by the CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, CreateSwapChainForComposition, CreateSwapChainForCompositionSurfaceHandle, and GetDesc1 methods.
Note??You cannot cast aIn full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.
For a flip-model swap chain (that is, a swap chain that has the
A value that describes the resolution width. If you specify the width as zero when you call the
A value that describes the resolution height. If you specify the height as zero when you call the
A
Specifies whether the full-screen display mode or the swap-chain back buffer is stereo. TRUE if stereo; otherwise,
A
A DXGI_USAGE-typed value that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.
A value that describes the number of buffers in the swap chain. When you create a full-screen swap chain, you typically include the front buffer in this value.
A
A
A
A combination of
Describes full-screen mode for a swap chain.
+This structure is used by the CreateSwapChainForHwnd and GetFullscreenDesc methods.
+A
A member of the
A member of the
A Boolean value that specifies whether the swap chain is in windowed mode. TRUE if the swap chain is in windowed mode; otherwise,
+ control.Show();
+ using (var loop = new RenderLoop(control))
+ {
+ while (loop.NextFrame())
+ {
+ // Perform draw operations here.
+ }
+ }
+
+ Note that the main control can be changed at anytime inside the loop.
+ Supplies data to an analysis effect.
+ This interface can be implemented by either an
Supplies the analysis data to an analysis transform.
+The data that the transform will analyze.
The size of the analysis data.
If the method succeeds, it returns
The output of the transform will be copied to CPU-accessible memory by the imaging effects system before being passed to the implementation.
If this call fails, the corresponding
Represents a bitmap that has been bound to an
Returns the size, in device-independent pixels (DIPs), of the bitmap.
+A DIP is 1/96?of an inch. To retrieve the size in device pixels, use the
Returns the size, in device-dependent units (pixels), of the bitmap.
+Retrieves the pixel format and alpha mode of the bitmap.
+Returns the size, in device-independent pixels (DIPs), of the bitmap.
+The size, in DIPs, of the bitmap.
A DIP is 1/96?of an inch. To retrieve the size in device pixels, use the
Returns the size, in device-dependent units (pixels), of the bitmap.
+The size, in pixels, of the bitmap.
Retrieves the pixel format and alpha mode of the bitmap.
+The pixel format and alpha mode of the bitmap.
Return the dots per inch (DPI) of the bitmap.
+The horizontal DPI of the image. You must allocate storage for this parameter.
The vertical DPI of the image. You must allocate storage for this parameter.
Copies the specified region from the specified bitmap into the current bitmap.
+In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.
The bitmap to copy from.
The area of bitmap to copy.
If this method succeeds, it returns
This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion, and will fail if the bitmap formats do not match.
Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing
Starting with Windows?8.1, this method supports block compressed bitmaps. If you are using a block compressed format, the end coordinates of the srcRect parameter must be multiples of 4 or the method returns E_INVALIDARG.
+Copies the specified region from the specified render target into the current bitmap.
+In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.
The render target that contains the region to copy.
The area of renderTarget to copy.
If this method succeeds, it returns
This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion, and will fail if the bitmap formats do not match.
Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing
All clips and layers must be popped off of the render target before calling this method. The method returns
Copies the specified region from memory into the current bitmap.
+In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.
The data to copy.
The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.
If this method succeeds, it returns
This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion; the two bitmap formats should match.
If this method is passed invalid input (such as an invalid destination rectangle), can produce unpredictable results, such as a distorted image or device failure.
Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing
Starting with Windows?8.1, this method supports block compressed bitmaps. If you are using a block compressed format, the end coordinates of the srcRect parameter must be multiples of 4 or the method returns E_INVALIDARG.
+ Represents a bitmap that can be used as a surface for an
Gets the color context information associated with the bitmap.
+If the bitmap was created without specifying a color context, the returned context is
Gets the options used in creating the bitmap.
+Gets either the surface that was specified when the bitmap was created, or the default surface created when the bitmap was created.
+The bitmap used must have been created from a DXGI surface render target, a derived render target, or a device context created from an
The returned surface can be used with Microsoft Direct3D or any other API that interoperates with shared surfaces. The application must transitively ensure that the surface is usable on the Direct3D device that is used in this context. For example, if using the surface with Direct2D then the Direct2D render target must have been created through
Gets the color context information associated with the bitmap.
+When this method returns, contains the address of a reference to the color context interface associated with the bitmap.
If the bitmap was created without specifying a color context, the returned context is
Gets the options used in creating the bitmap.
+This method returns the options used.
Gets either the surface that was specified when the bitmap was created, or the default surface created when the bitmap was created.
+The underlying DXGI surface for the bitmap.
The method returns an
Description | |
---|---|
No error occurred. | |
Cannot draw with a bitmap that is currently bound as the target bitmap. |
?
The bitmap used must have been created from a DXGI surface render target, a derived render target, or a device context created from an
The returned surface can be used with Microsoft Direct3D or any other API that interoperates with shared surfaces. The application must transitively ensure that the surface is usable on the Direct3D device that is used in this context. For example, if using the surface with Direct2D then the Direct2D render target must have been created through
Maps the given bitmap into memory.
+The options used in mapping the bitmap into memory.
When this method returns, contains a reference to the rectangle that is mapped into memory.
The method returns an
Description | |
---|---|
No error occurred. | |
E_INVALIDARG | One or more arguments are not valid |
D3DERR_DEVICELOST | The device has been lost but cannot be reset at this time. |
?
The bitmap must have been created with the
Unmaps the bitmap from memory.
+The method returns an
Description | |
---|---|
No error occurred. | |
E_INVALIDARG | One or more arguments are not valid. |
E_POINTER | Pointer is not valid. |
?
Any memory returned from the Map call is now invalid and may be reclaimed by the operating system or used for other purposes.
The bitmap must have been previously mapped.
+Paints an area with a bitmap.
+A bitmap brush is used to fill a geometry with a bitmap. Like all brushes, it defines an infinite plane of content. Because bitmaps are finite, the brush relies on an "extend mode" to determine how the plane is filled horizontally and vertically.
+Gets or sets the method by which the brush horizontally tiles those areas that extend past its bitmap.
+Like all brushes,
Gets or sets the method by which the brush vertically tiles those areas that extend past its bitmap.
+Like all brushes,
Gets or sets the interpolation method used when the brush bitmap is scaled or rotated.
+This method gets the interpolation mode of a bitmap, which is specified by the
The interpolation mode of a bitmap also affects subpixel translations. In a subpixel translation, linear interpolation positions the bitmap more precisely to the application request, but blurs the bitmap in the process.
+Gets or sets the bitmap source that this brush uses to paint.
+Specifies how the brush horizontally tiles those areas that extend past its bitmap.
+A value that specifies how the brush horizontally tiles those areas that extend past its bitmap.
Sometimes, the bitmap for a bitmap brush doesn't completely fill the area being painted. When this happens, Direct2D uses the brush's horizontal (SetExtendModeX) and vertical (SetExtendModeY) extend mode settings to determine how to fill the remaining area.
The following illustration shows the results from every possible combination of the extend modes for an
Specifies how the brush vertically tiles those areas that extend past its bitmap.
+A value that specifies how the brush vertically tiles those areas that extend past its bitmap.
Sometimes, the bitmap for a bitmap brush doesn't completely fill the area being painted. When this happens, Direct2D uses the brush's horizontal (SetExtendModeX) and vertical (SetExtendModeY) extend mode settings to determine how to fill the remaining area.
The following illustration shows the results from every possible combination of the extend modes for an
Specifies the interpolation mode used when the brush bitmap is scaled or rotated.
+The interpolation mode used when the brush bitmap is scaled or rotated.
This method sets the interpolation mode for a bitmap, which is an enum value that is specified in the
The interpolation mode of a bitmap also affects subpixel translations. In a subpixel translation, bilinear interpolation positions the bitmap more precisely to the application requests, but blurs the bitmap in the process.
+Specifies the bitmap source that this brush uses to paint.
+The bitmap source used by the brush.
This method specifies the bitmap source that this brush uses to paint. The bitmap is not resized or rescaled automatically to fit the geometry that it fills. The bitmap stays at its native size. To resize or translate the bitmap, use the SetTransform method to apply a transform to the brush.
The native size of a bitmap is the width and height in bitmap pixels, divided by the bitmap DPI. This native size forms the base tile of the brush. To tile a subregion of the bitmap, you must generate a new bitmap containing this subregion and use SetBitmap to apply it to the brush. +
+Gets the method by which the brush horizontally tiles those areas that extend past its bitmap.
+A value that specifies how the brush horizontally tiles those areas that extend past its bitmap.
Like all brushes,
Gets the method by which the brush vertically tiles those areas that extend past its bitmap.
+A value that specifies how the brush vertically tiles those areas that extend past its bitmap.
Like all brushes,
Gets the interpolation method used when the brush bitmap is scaled or rotated.
+The interpolation method used when the brush bitmap is scaled or rotated.
This method gets the interpolation mode of a bitmap, which is specified by the
The interpolation mode of a bitmap also affects subpixel translations. In a subpixel translation, linear interpolation positions the bitmap more precisely to the application request, but blurs the bitmap in the process.
+Gets the bitmap source that this brush uses to paint.
+When this method returns, contains the address to a reference to the bitmap with which this brush paints.
Paints an area with a bitmap.
+Returns or sets the current interpolation mode of the brush.
+Sets the interpolation mode for the brush.
+The mode to use.
Returns the current interpolation mode of the brush.
+The current interpolation mode.
Describes the pixel format and dpi of a bitmap.
+The bitmap's pixel format and alpha mode.
The horizontal dpi of the bitmap.
The vertical dpi of the bitmap.
This structure allows a
If both dpiX and dpiY are 0, the dpi of the bitmap will be set to the desktop dpi if the device context is a windowed context, or 96 dpi for any other device context.
+Renders to an intermediate texture created by the CreateCompatibleRenderTarget method.
+An
To write directly to a WIC bitmap instead, use the
Retrieves the bitmap for this render target. The returned bitmap can be used for drawing operations.
+The DPI for the
Retrieves the bitmap for this render target. The returned bitmap can be used for drawing operations.
+When this method returns, contains the address of a reference to the bitmap for this render target. This bitmap can be used for drawing operations.
If this method succeeds, it returns
The DPI for the
Provides methods to allow a blend operation to be inserted into a transform graph.
The image output of the blend transform is the same as rendering an image effect graph with these steps:
Gets or sets the blend description of the corresponding blend transform object.
+Changes the blend description of the corresponding blend transform object.
+The new blend description specified for the blend transform.
Gets the blend description of the corresponding blend transform object.
+When this method returns, contains the blend description specified for the blend transform.
Extends the input rectangle to infinity using the specified extend modes.
+Gets or sets the extend mode in the x direction.
+Gets or sets the extend mode in the y direction.
+Sets the extend mode in the x direction.
+The extend mode in the x direction.
If the extend mode enumeration is invalid, this operation is ignored.
+Sets the extend mode in the y direction.
+The extend mode in the y direction.
If the extend mode enumeration is invalid, this operation is ignored.
+Gets the extend mode in the x direction.
+This method returns the extend mode in the x direction.
Gets the extend mode in the y direction.
+This method returns the extend mode in the y direction.
A support transform for effects to modify the output rectangle of the previous effect or bitmap.
+The support transform can be used for two different reasons.
To indicate that a region of its input image is already transparent black. The expanded area will be treated as transparent black.
This can increase efficiency for rendering bitmaps.
To increase the size of the input image.
?
?
+This sets the output bounds for the support transform.
+The output bounds.
Returns the output rectangle of the support transform.
+The output bounds.
Represents a color context that can be used with an
Gets the color space of the color context.
+Gets the size of the color profile associated with the bitmap.
+This can be used to allocate a buffer to receive the color profile bytes associated with the context.
+Gets the color space of the color context.
+This method returns the color space of the contained ICC profile.
Gets the size of the color profile associated with the bitmap.
+This method returns the size of the profile in bytes.
This can be used to allocate a buffer to receive the color profile bytes associated with the context.
+Gets the color profile bytes for an
The method returns an
Description | |
---|---|
No error occurred. | |
The supplied buffer was too small to accomodate the data. |
?
If profileSize is insufficient to store the entire profile, profile is zero-initialized before this method fails.
+This interface performs all the same functions as the
Represents a color context to be used with the Color Management Effect.
+Represents a color context to be used with the Color Management Effect.
+Represents a sequence of commands that can be recorded and played back.
+The command list does not include static copies of resources with the recorded set of commands. All bitmaps, effects, and geometries are stored as references to the actual resource and all the brushes are stored by value. All the resource creation and destruction happens outside of the command list. The following table lists resources and how they are treated inside of a command list.
Resource | How it is treated by the command list |
---|---|
Solid-color brush | Passed by value. |
Bitmap brush | The brush is passed by value but the bitmap that is used to create the brush is in fact referenced. |
Gradient brushes ? both linear and radial gradient | The brush is passed by value but the gradient stop collection itself is referenced. The gradient stop collection object is immutable. |
Bitmaps | Passed by reference. |
Drawing state block | The actual state on the device context is converted into set functions like set transform and is passed by value. |
Geometry | Immutable object passed by value. |
Stroke style | Immutable object passed by value. |
Mesh | Immutable object passed by value. |
?
+Streams the contents of the command list to the specified command sink.
+The sink into which the command list will be streamed.
If the method succeeds, it returns
The return value indicates any failures the command sink implementation returns through its EndDraw method.
The command sink can be implemented by any caller of the API.
If the caller makes any design-time failure calls while a command list is selected as a target, the command list is placed in an error state. The stream call fails without making any calls to the passed in sink.
Sample use:
Class MyCommandSink : public++ { + public: // All of the methods implemented here. + }; + StreamToMyCommandSink( __in *pCommandList ) + { hr = ; MyCommandSink *pCommandSink = new MyCommandSink(); hr = pCommandSink ? : E_OUTOFMEMORY; if (SUCCEEDED(hr)) { // Receive the contents of the command sink streamed to the sink. hr = pCommandList->Stream(pCommandSink); } SafeRelease(&pCommandSink); return hr; }
Instructs the command list to stop accepting commands so that you can use it as an input to an effect or in a call to
The method returns an
Description | |
---|---|
No error occurred. | |
Close has already been called on the command list. |
?
Note??If the device context associated with the command list has an error, the command list returns the same error.?
This method returns
If the Close method returns an error, any future use of the command list results in the same error.
+
The command sink is implemented by you for an application when you want to receive a playback of the commands recorded in a command list. A typical usage will be for transforming the command list into another format such as XPS when some degree of conversion between the Direct2D primitives and the target format is required.
The command sink interface doesn't have any resource creation methods on it. The resources are still logically bound to the Direct2D device on which the command list was created and will be passed in to the command sink implementation.
+The
The
Not all methods implemented by
This interface performs all the same functions as the existing
Enables access to the new primitive blend modes, MIN and ADD.
+This interface performs all the same functions as the existing
Enables access to the new primitive blend modes, MIN and ADD.
+Sets a new primitive blend mode.
+The primitive blend that will apply to subsequent primitives.
If the method succeeds, it returns
This interface performs all the same functions as the existing
This interface performs all the same functions as the existing
Renders the given ink object using the given brush and ink style.
+The ink object to be rendered.
The brush with which to render the ink object.
The ink style to use when rendering the ink object.
This method does not return a value.
Renders a given gradient mesh to the target.
+The gradient mesh to be rendered.
This method does not return a value.
Draws a metafile to the command sink using the given source and destination rectangles.
+The metafile to draw.
The rectangle in the target where the metafile will be drawn, relative to the upper left corner (defined in DIPs). If
The rectangle of the source metafile that will be drawn, relative to the upper left corner (defined in DIPs). If
This method does not return a value.
This interface performs all the same functions as the existing
Renders part or all of the given sprite batch to the device context using the specified drawing options.
+The sprite batch to draw.
The index of the first sprite in the sprite batch to draw.
The number of sprites to draw.
The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.
The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.
The additional drawing options, if any, to be used for this sprite batch.
If this method succeeds, it returns
This interface performs all the same functions as the existing
Renders part or all of the given sprite batch to the device context using the specified drawing options.
+The sprite batch to draw.
The index of the first sprite in the sprite batch to draw.
The number of sprites to draw.
The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.
The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.
The additional drawing options, if any, to be used for this sprite batch.
If this method succeeds, it returns
Renders part or all of the given sprite batch to the device context using the specified drawing options.
+The sprite batch to draw.
The index of the first sprite in the sprite batch to draw.
The number of sprites to draw.
The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.
The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.
The additional drawing options, if any, to be used for this sprite batch.
If this method succeeds, it returns
This interface performs all the same functions as the existing
Sets a new primitive blend mode. Allows access to the MAX primitive blend mode.
+If this method succeeds, it returns
This interface performs all the same functions as the existing
Sets a new primitive blend mode. Allows access to the MAX primitive blend mode.
+If this method succeeds, it returns
The command sink is implemented by you for an application when you want to receive a playback of the commands recorded in a command list. A typical usage will be for transforming the command list into another format such as XPS when some degree of conversion between the Direct2D primitives and the target format is required.
The command sink interface doesn't have any resource creation methods on it. The resources are still logically bound to the Direct2D device on which the command list was created and will be passed in to the command sink implementation.
+The
The
Not all methods implemented by
Notifies the implementation of the command sink that drawing is about to commence.
+ This method always returns
Indicates when
If the method/function succeeds, it returns
The
It allows the calling function or method to indicate a failure back to the stream implementation.
+Sets the antialiasing mode that will be used to render any subsequent geometry.
+The antialiasing mode selected for the command list.
If the method succeeds, it returns
Sets the tags that correspond to the tags in the command sink.
+The first tag to associate with the primitive.
The second tag to associate with the primitive.
If the method succeeds, it returns
Indicates the new default antialiasing mode for text.
+The antialiasing mode for the text.
If the method succeeds, it returns
Indicates more detailed text rendering parameters.
+The parameters to use for text rendering.
If the method succeeds, it returns
Sets a new transform.
+The transform to be set.
If the method succeeds, it returns
The transform will be applied to the corresponding device context.
+Sets a new primitive blend mode.
+The primitive blend that will apply to subsequent primitives.
If the method succeeds, it returns
The unit mode changes the meaning of subsequent units from device-independent pixels (DIPs) to pixels or the other way. The command sink does not record a DPI, this is implied by the playback context or other playback interface such as
If the method succeeds, it returns
The unit mode changes the interpretation of units from DIPs to pixels or vice versa.
+Clears the drawing area to the specified color.
+The color to which the command sink should be cleared.
If the method succeeds, it returns
The clear color is restricted by the currently selected clip and layer bounds.
If no color is specified, the color should be interpreted by context. Examples include but are not limited to:
Indicates the glyphs to be drawn.
+The upper left corner of the baseline.
The glyphs to render.
Additional non-rendering information about the glyphs.
The brush used to fill the glyphs.
The measuring mode to apply to the glyphs.
If the method succeeds, it returns
DrawText and DrawTextLayout are broken down into glyph runs and rectangles by the time the command sink is processed. So, these methods aren't available on the command sink. Since the application may require additional callback processing when calling DrawTextLayout, this semantic can't be easily preserved in the command list.
+Draws a line drawn between two points.
+The start point of the line.
The end point of the line.
The brush used to fill the line.
The width of the stroke to fill the line.
The style of the stroke. If not specified, the stroke is solid.
If the method succeeds, it returns
Indicates the geometry to be drawn to the command sink.
+The geometry to be stroked.
The brush that will be used to fill the stroked geometry.
The width of the stroke.
The style of the stroke.
An
Ellipses and rounded rectangles are converted to the corresponding ellipse and rounded rectangle geometries before calling into the DrawGeometry method. +
+Draws a rectangle.
+The rectangle to be drawn to the command sink.
The brush used to stroke the geometry.
The width of the stroke.
The style of the stroke.
If the method succeeds, it returns
Draws a bitmap to the render target.
+The bitmap to draw.
The destination rectangle. The default is the size of the bitmap and the location is the upper left corner of the render target.
The opacity of the bitmap.
The interpolation mode to use.
An optional source rectangle.
An optional perspective transform.
This method does not return a value.
The destinationRectangle parameter defines the rectangle in the target where the bitmap will appear (in device-independent pixels (DIPs)). This is affected by the currently set transform and the perspective transform, if set. If you specify
The sourceRectangle defines the sub-rectangle of the source bitmap (in DIPs). DrawBitmap clips this rectangle to the size of the source bitmap, so it's impossible to sample outside of the bitmap. If you specify
The perspectiveTransform is specified in addition to the transform on device context. +
+Draws the provided image to the command sink.
+The image to be drawn to the command sink.
This defines the offset in the destination space that the image will be rendered to. The entire logical extent of the image will be rendered to the corresponding destination. If not specified, the destination origin will be (0, 0). The top-left corner of the image will be mapped to the target offset. This will not necessarily be the origin.
The corresponding rectangle in the image space will be mapped to the provided origins when processing the image.
The interpolation mode to use to scale the image if necessary.
If specified, the composite mode that will be applied to the limits of the currently selected clip.
If the method succeeds, it returns
Because the image can itself be a command list or contain an effect graph that in turn contains a command list, this method can result in recursive processing.
+Draw a metafile to the device context.
+The metafile to draw.
The offset from the upper left corner of the render target.
This method does not return a value.
The targetOffset defines the offset in the destination space that the image will be rendered to. The entire logical extent of the image is rendered to the corresponding destination. If you don't specify the offset, the destination origin will be (0, 0). The top, left corner of the image will be mapped to the target offset. This will not necessarily be the origin. +
+Indicates a mesh to be filled by the command sink.
+The mesh object to be filled.
The brush with which to fill the mesh.
If the method succeeds, it returns
Fills an opacity mask on the command sink.
+The bitmap whose alpha channel will be sampled to define the opacity mask.
The brush with which to fill the mask.
The destination rectangle in which to fill the mask. If not specified, this is the origin.
The source rectangle within the opacity mask. If not specified, this is the entire mask.
If the method succeeds, it returns
The opacity mask bitmap must be considered to be clamped on each axis.
+Indicates to the command sink a geometry to be filled.
+The geometry that should be filled.
The primary brush used to fill the geometry.
A brush whose alpha channel is used to modify the opacity of the primary fill brush.
If the method succeeds, it returns
If the opacity brush is specified, the primary brush will be a bitmap brush fixed on both the x-axis and the y-axis.
Ellipses and rounded rectangles are converted to the corresponding geometry before being passed to FillGeometry.
+Indicates to the command sink a rectangle to be filled.
+The rectangle to fill.
The brush with which to fill the rectangle.
If the method succeeds, it returns
Pushes a clipping rectangle onto the clip and layer stack.
+The rectangle that defines the clip.
The antialias mode for the clip.
If the method succeeds, it returns
If the current world transform is not preserving the axis, clipRectangle is transformed and the bounds of the transformed rectangle are used instead.
+Pushes a layer onto the clip and layer stack.
+The parameters that define the layer.
The layer resource that receives subsequent drawing operations.
If the method succeeds, it returns
Removes an axis-aligned clip from the layer and clip stack.
+If the method succeeds, it returns
Removes a layer from the layer and clip stack.
+If the method succeeds, it returns
Enables specification of information for a compute-shader rendering pass.
+The transform changes the state on this render information to specify the compute shader and its dependent resources.
+Establishes or changes the constant buffer data for this transform.
+The data applied to the constant buffer.
The number of bytes of data in the constant buffer.
If this method succeeds, it returns
Sets the compute shader to the given shader resource. The resource must be loaded before this call is made.
+The
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Sets the resource texture corresponding to the given shader texture index to the given texture resource. The texture resource must already have been loaded with
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
This method allows a compute-shader?based transform to select the number of thread groups to execute based on the number of output pixels it needs to fill.
+If this call fails, the corresponding
This method allows a compute-shader?based transform to select the number of thread groups to execute based on the number of output pixels it needs to fill.
+If this call fails, the corresponding
Sets the render information used to specify the compute shader pass.
+The render information object to set.
If the method succeeds, it returns
If this method fails,
This method allows a compute-shader?based transform to select the number of thread groups to execute based on the number of output pixels it needs to fill.
+The output rectangle that will be filled by the compute transform.
The number of threads in the x dimension.
The number of threads in the y dimension.
The number of threads in the z dimension.
If the method succeeds, it returns
If this call fails, the corresponding
Allows a custom effect's interface and behavior to be specified by the effect author.
+This interface is created by the effect author from a static factory registered through the ID2D1Factory::RegisterEffect method.
+Allows a custom effect's interface and behavior to be specified by the effect author.
+This interface is created by the effect author from a static factory registered through the ID2D1Factory::RegisterEffect method.
+The effect can use this method to do one time initialization tasks. If this method is not needed, the method can just return
An internal context interface that creates and returns effect author?centric types.
The effect can populate the transform graph with a topology and can update it later.
If the method succeeds, it returns
This moves resource creation cost to the CreateEffect call, rather than during rendering.
If the implementation fails this call, the corresponding
The following example shows an effect implementing an initialize method.
+Prepares an effect for the rendering process.
+Indicates the type of change the effect should expect.
If the method succeeds, it returns
This method is called by the renderer when the effect is within an effect graph that is drawn.
The method will be called:
The method will not otherwise be called. The transforms created by the effect will be called to handle their input and output rectangles for every draw call.
Most effects defer creating any resources or specifying a topology until this call is made. They store their properties and map them to a concrete set of rendering techniques when first drawn.
+The renderer calls this method to provide the effect implementation with a way to specify its transform graph and transform graph changes.
The renderer calls this method when:
The graph to which the effect describes its transform topology through the SetDescription call.
An error that prevents the effect from being initialized if called as part of the CreateEffect call. If the effect fails a subsequent SetGraph call:
Defines a vertex shader and the input element description to define the input layout. The combination is used to allow a custom vertex effect to create a custom vertex shader and pass it a custom layout.
+The vertex shader will be loaded by the CreateVertexBuffer call that accepts the vertex buffer properties.
This structure does not need to be specified if one of the standard vertex shaders is used.
+The unique ID of the vertex shader.
An array of input assembler stage data types.
An array of input assembler stage data types.
The number of input elements in the vertex shader.
The vertex stride.
Creates a factory object that can be used to create Direct2D resources.
+The threading model of the factory and the resources it creates.
A reference to the IID of
The level of detail provided to the debugging layer.
When this method returns, contains the address to a reference to the new factory.
If this function succeeds, it returns
The
Creates a rotation transformation that rotates by the specified angle about the specified point.
+The clockwise rotation angle, in degrees.
The point about which to rotate.
When this method returns, contains the new rotation transformation. You must allocate storage for this parameter.
Rotation occurs in the plane of the 2-D surface.
+Creates a skew transformation that has the specified x-axis angle, y-axis angle, and center point.
+The x-axis skew angle, which is measured in degrees counterclockwise from the y-axis.
The y-axis skew angle, which is measured in degrees counterclockwise from the x-axis.
The center point of the skew operation.
When this method returns, contains the rotation transformation. You must allocate storate for this parameter.
Indicates whether the specified matrix is invertible.
+The matrix to test.
true if the matrix was inverted; otherwise, false.
Tries to invert the specified matrix.
+The matrix to invert.
true if the matrix was inverted; otherwise, false.
Creates a new Direct2D device associated with the provided DXGI device.
+The DXGI device the Direct2D device is associated with.
The properties to apply to the Direct2D device.
When this function returns, contains the address of a reference to a Direct2D device.
The function returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This function will also create a new
If the creation properties are not specified, then d2dDevice will inherit its threading mode from dxgiDevice and debug tracing will not be enabled.
+Creates a new Direct2D device context associated with a DXGI surface.
+The DXGI surface the Direct2D device context is associated with.
The properties to apply to the Direct2D device context.
When this function returns, contains the address of a reference to a Direct2D device context.
The function returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This function will also create a new
This function will also create a new
The DXGI device will be specified implicitly through dxgiSurface.
If creationProperties are not specified, the Direct2D device will inherit its threading mode from the DXGI device implied by dxgiSurface and debug tracing will not be enabled.
+Converts the given color from one colorspace to another.
+The source color space.
The destination color space.
The source color.
The converted color.
Returns the sine and cosine of an angle.
+The angle to calculate.
The sine of the angle.
The cosine of the angle.
Returns the tangent of an angle.
+The angle to calculate the tangent for.
The tangent of the angle.
Returns the length of a 3 dimensional vector.
+The x value of the vector.
The y value of the vector.
The z value of the vector.
The length of the vector.
Computes the maximum factor by which a given transform can stretch any vector.
+The input transform matrix.
The scale factor.
Formally, if M is the input matrix, this method will return the maximum value of |V * M| / |V| for all vectors V, where |.| denotes length.
Note??Since this describes how M affects vectors (rather than points), the translation components (_31 and _32) of M are ignored.? +Returns the interior points for a gradient mesh patch based on the points defining a Coons patch.
Note??This function is called by the GradientMeshPatchFromCoonsPatch function and is not intended to be used directly.
? +This function is called by the GradientMeshPatchFromCoonsPatch function and is not intended to be used directly.
+Represents a resource domain whose objects and device contexts can be used together.
+Sets the maximum amount of texture memory Direct2D accumulates before it purges the image caches and cached texture allocations.
+Creates a new device context from a Direct2D device.
+The options to be applied to the created device context.
When this method returns, contains the address of a reference to the new device context.
If the method succeeds, it returns
The new device context will not have a selected target bitmap. The caller must create and select a bitmap as the target surface of the context.
+Creates an
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_FAIL | Generic failure code. |
The print format is not supported by the document target. |
?
Sets the maximum amount of texture memory Direct2D accumulates before it purges the image caches and cached texture allocations.
+The new maximum texture memory in bytes.
Sets the maximum amount of texture memory Direct2D accumulates before it purges the image caches and cached texture allocations.
+The maximum amount of texture memory in bytes.
Clears all of the rendering resources used by Direct2D.
+Discards only resources that haven't been used for greater than the specified time in milliseconds. The default is 0 milliseconds.
Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the existing
Retrieves or sets the current rendering priority of the device.
+Retrieves the current rendering priority of the device.
+The current rendering priority of the device.
Sets the priority of Direct2D rendering operations performed on any device context associated with the device.
+The desired rendering priority for the device and associated contexts.
Calling this method affects the rendering priority of all device contexts associated with the device. This method can be called at any time, but is not guaranteed to take effect until the beginning of the next frame. The recommended usage is to call this method outside of BeginDraw and EndDraw blocks. Cycling this property frequently within drawing blocks will effectively reduce the benefits of any throttling that is applied.
+Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the existing
Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the existing
Returns the DXGI device associated with this Direct2D device.
+Creates a new
If this method succeeds, it returns
Flush all device contexts that reference a given bitmap.
+The bitmap, created on this device, for which all referencing device contexts will be flushed.
Returns the DXGI device associated with this Direct2D device.
+The DXGI device associated with this Direct2D device.
If this method succeeds, it returns
Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the
Creates a new
If this method succeeds, it returns
Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the
Gets or sets the maximum capacity of the color glyph cache.
+Creates a new device context from a Direct2D device.
+The options to be applied to the created device context.
When this method returns, contains the address of a reference to the new device context.
If the method succeeds, it returns
The new device context will not have a selected target bitmap. The caller must create and select a bitmap as the target surface of the context.
+Sets the maximum capacity of the color glyph cache.
+The maximum capacity of the color glyph cache.
The color glyph cache is used to store color bitmap glyphs and SVG glyphs, enabling faster performance if the same glyphs are needed again. The capacity determines the amount of memory that D2D may use to store glyphs that the application does not already reference. If the application references a glyph using GetColorBitmapGlyphImage or GetSvgGlyphImage, after it has been evicted, this glyph does not count toward the cache capacity.
+Gets the maximum capacity of the color glyph cache.
+Returns the maximum capacity of the color glyph cache in bytes.
Represents a resource domain whose objects and device contexts can be used together.
+Represents a set of state and command buffers that are used to render to a target.
The device context can render to a target bitmap or a command list. +
+Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device.
+Gets the device associated with a device context.
+The application can retrieve the device even if it is created from an earlier render target code-path. The application must use an
Gets or sets the target currently associated with the device context.
+If a target is not associated with the device context, target will contain
If the currently selected target is a bitmap rather than a command list, the application can gain access to the initial bitmaps created by using one of the following methods:
It is not possible for an application to destroy these bitmaps. All of these bitmaps are bindable as bitmap targets. However not all of these bitmaps can be used as bitmap sources for
CreateDxgiSurfaceRenderTarget will create a bitmap that is usable as a bitmap source if the DXGI surface is bindable as a shader resource view.
CreateCompatibleRenderTarget will always create bitmaps that are usable as a bitmap source.
Direct2D will only lock bitmaps that are not currently locked.
Calling QueryInterface for
Although the target can be a command list, it cannot be any other type of image. It cannot be the output image of an effect.
+Gets or sets the rendering controls that have been applied to the context.
+Returns or sets the currently set primitive blend used by the device context.
+Gets or sets the mode that is being used to interpret values by the device context.
+Creates a bitmap that can be used as a target surface, for reading back to the CPU, or as a source for the DrawBitmap and
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
?
The new bitmap can be used as a target for SetTarget if it is created with
Creates a Direct2D bitmap by copying a WIC bitmap.
+The WIC bitmap source to copy from.
A bitmap properties structure that specifies bitmap creation options.
The address of the newly created bitmap object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Starting with Windows?8.1, the bitmapProperties parameter is optional. When it is not specified, the created bitmap inherits the pixel format and alpha mode from wicBitmapSource. For a list of supported pixel formats and alpha modes, see Supported Pixel Formats and Alpha Modes.
When the bitmapProperties parameter is specified, the value in bitmapProperties->pixelFormat must either be
When bitmapProperties->pixelFormat.alphaMode is set to
Creates a color context.
+The space of color context to create.
A buffer containing the ICC profile bytes used to initialize the color context when space is
The size in bytes of Profile.
When this method returns, contains the address of a reference to a new color context object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
The new color context can be used in
When space is
Creates a color context by loading it from the specified filename. The profile bytes are the contents of the file specified by Filename.
+The path to the file containing the profile bytes to initialize the color context with.
When this method returns, contains the address of a reference to a new color context.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
The new color context can be used in
Creates a color context from an
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
The new color context can be used in
Creates a bitmap from a DXGI surface that can be set as a target surface or have additional color context information specified.
+The DXGI surface from which the bitmap can be created.
Note??The DXGI surface must have been created from the same Direct3D device that the Direct2D device context is associated with. ?The bitmap properties specified in addition to the surface.
When this method returns, contains the address of a reference to a new bitmap object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
?
If the bitmap properties are not specified, the following information is assumed:
If the bitmap properties are specified, the bitmap properties will be used as follows:
Creates an effect for the specified class ID.
+The class ID of the effect to create. See Built-in Effects for a list of effect IDs.
When this method returns, contains the address of a reference to a new effect.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
The specified effect is not registered by the system. | |
The effect requires capabilities not supported by the D2D device. |
?
If the created effect is a custom effect that is implemented in a DLL, this doesn't increment the reference count for that DLL. If the application deletes an effect while that effect is loaded, the resulting behavior is unpredictable.
+Creates a gradient stop collection, enabling the gradient to contain color channels with values outside of [0,1] and also enabling rendering to a high-color render target with interpolation in sRGB space.
+An array of color values and offsets.
The number of elements in the gradientStops array.
Specifies both the input color space and the space in which the color interpolation occurs.
The color space that colors will be converted to after interpolation occurs.
The precision of the texture used to hold interpolated values.
Note??This method will fail if the underlying Direct3D device does not support the requested buffer precision. UseDefines how colors outside of the range defined by the stop collection are determined.
Defines how colors are interpolated.
The new gradient stop collection.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This method linearly interpolates between the color stops. An optional color space conversion is applied post-interpolation. Whether and how this gamma conversion is applied is determined by the pre- and post-interpolation. This method will fail if the device context does not support the requested buffer precision.
In order to get the desired result, you need to ensure that the inputs are specified in the correct color space. +
You must always specify colors in straight alpha, regardless of interpolation mode being premultiplied or straight. The interpolation mode only affects the interpolated values. Likewise, the stops returned by
If you specify
Starting with Windows?8, the interpolation behavior of this method has changed.
The table here shows the behavior in Windows?7 and earlier.
Gamma | Before Interpolation Behavior | After Interpolation Behavior | GetColorInteroplationGamma + (output color space) + |
---|---|---|---|
1.0 | Clamps the inputs and then converts from sRGB to scRGB. | Converts from scRGB to sRGB post-interpolation. | 1.0 |
2.2 | Clamps the inputs. | No Operation | 2.2 |
?
The table here shows the behavior in Windows?8 and later.
Gamma | Before Interpolation Behavior | After Interpolation Behavior | GetColorInteroplationGamma + (output color space) + |
---|---|---|---|
sRGB to scRGB | No Operation | Clamps the outputs and then converts from sRGB to scRGB. | 1.0 |
scRGB to sRGB | No Operation | Clamps the outputs and then converts from sRGB to scRGB. | 2.2 |
sRGB to sRGB | No Operation | No Operation | 2.2 |
scRGB to scRGB | No Operation | No Operation | 1.0 |
?
+Creates an image brush. The input image can be any type of image, including a bitmap, effect, or a command list. +
+The image to be used as a source for the image brush.
The properties specific to an image brush.
Properties common to all brushes.
When this method returns, contains the address of a reference to the input rectangles.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
The image brush can be used to fill an arbitrary geometry, an opacity mask or text.
This sample illustrates drawing a rectangle with an image brush.
++ CreatePatternBrush( __in *pDeviceContext, __deref_out **ppImageBrush ) + { hr = ; *pOldTarget = null ; pDeviceContext->GetTarget(&pOldTarget);*pCommandList = null ; hr = pDeviceContext->CreateCommandList(&pCommandList); if (SUCCEEDED(hr)) { pDeviceContext->SetTarget(pCommandList); hr = RenderPatternToCommandList(pDeviceContext); } pDeviceContext->SetTarget(pOldTarget);*pImageBrush = null ; if (SUCCEEDED(hr)) { hr = pDeviceContext->CreateImageBrush( pCommandList, D2D1::ImageBrushProperties( D2D1::RectF(198, 298, 370, 470),, , ), &pImageBrush ); } // Fill a rectangle with the image brush. if (SUCCEEDED(hr)) { pDeviceContext->FillRectangle( D2D1::RectF(0, 0, 100, 100), pImageBrush); } SafeRelease(&pImageBrush); SafeRelease(&pCommandList); SafeRelease(&pOldTarget); return hr; + }
Creates a bitmap brush, the input image is a Direct2D bitmap object.
+The bitmap to use as the brush.
A bitmap brush properties structure.
A brush properties structure.
The address of the newly created bitmap brush object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Creates a
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
?
A
Indicates whether the format is supported by the device context. The formats supported are usually determined by the underlying hardware.
+The DXGI format to check.
Returns TRUE if the format is supported. Returns
You can use supported formats in the
Indicates whether the buffer precision is supported by the underlying Direct3D device.
+Returns TRUE if the buffer precision is supported. Returns
Gets the bounds of an image without the world transform of the context applied.
+The image whose bounds will be calculated.
When this method returns, contains a reference to the bounds of the image in device independent pixels (DIPs) and in local space.
The image bounds don't include multiplication by the world transform. They do reflect the current DPI, unit mode, and interpolation mode of the context. To get the bounds that include the world transform, use
The returned bounds reflect which pixels would be impacted by calling DrawImage with a target offset of (0,0) and an identity world transform matrix. They do not reflect the current clip rectangle set on the device context or the extent of the context's current target image.
+Gets the bounds of an image with the world transform of the context applied.
+The image whose bounds will be calculated.
When this method returns, contains a reference to the bounds of the image in device independent pixels (DIPs).
The image bounds reflect the current DPI, unit mode, and world transform of the context. To get bounds which don't include the world transform, use
The returned bounds reflect which pixels would be impacted by calling DrawImage with the same image and a target offset of (0,0). They do not reflect the current clip rectangle set on the device context or the extent of the context?s current target image. +
+Gets the world-space bounds in DIPs of the glyph run using the device context DPI.
+The origin of the baseline for the glyph run.
The glyph run to render.
The DirectWrite measuring mode that indicates how glyph metrics are used to measure text when it is formatted.
The bounds of the glyph run in DIPs and in world space.
The image bounds reflect the current DPI, unit mode, and world transform of the context.
+Gets the device associated with a device context.
+When this method returns, contains the address of a reference to a Direct2D device associated with this device context.
The application can retrieve the device even if it is created from an earlier render target code-path. The application must use an
The bitmap or command list to which the Direct2D device context will now render.
+The target can be changed at any time, including while the context is drawing.
The target can be either a bitmap created with the
You cannot use SetTarget to render to a bitmap/command list from multiple device contexts simultaneously. An image is considered ?being rendered to? if it has ever been set on a device context within a BeginDraw/EndDraw timespan. If an attempt is made to render to an image through multiple device contexts, all subsequent device contexts after the first will enter an error state.
Callers wishing to attach an image to a second device context should first call EndDraw on the first device context. +
Here is an example of the correct calling order.
pDC1->BeginDraw(); + pDC1->SetTarget(pImage); + // ? + pDC1->EndDraw(); pDC2->BeginDraw(); + pDC2->SetTarget(pImage); + // ? + pDC2->EndDraw(); +
Here is an example of the incorrect calling order.
pDC1->BeginDraw(); + pDC2->BeginDraw(); pDC1->SetTarget(pImage); // ... pDC1->SetTarget(Note??Changing the target does not change the bitmap that annull ); pDC2->SetTarget(pImage); // This call is invalid, even though pImage is no longer set on pDC1. // ... pDC1->EndDraw(); // This EndDraw SUCCEEDs. + pDC2->EndDraw(); // This EndDraw FAILs
This API makes it easy for an application to use a bitmap as a source (like in DrawBitmap) and as a destination at the same time. Attempting to use a bitmap as a source on the same device context to which it is bound as a target will put the device context into the
It is acceptable to have a bitmap bound as a target bitmap on multiple render targets at once. Applications that do this must properly synchronize rendering with Flush or EndDraw.
You can change the target at any time, including while the context is drawing.
You can set the target to
If the device context has an outstanding
If the bitmap and the device context are not in the same resource domain, the context will enter \ error state. The target will not be changed.
Gets the target currently associated with the device context.
+When this method returns, contains the address of a reference to the target currently associated with the device context.
If a target is not associated with the device context, target will contain
If the currently selected target is a bitmap rather than a command list, the application can gain access to the initial bitmaps created by using one of the following methods:
It is not possible for an application to destroy these bitmaps. All of these bitmaps are bindable as bitmap targets. However not all of these bitmaps can be used as bitmap sources for
CreateDxgiSurfaceRenderTarget will create a bitmap that is usable as a bitmap source if the DXGI surface is bindable as a shader resource view.
CreateCompatibleRenderTarget will always create bitmaps that are usable as a bitmap source.
Direct2D will only lock bitmaps that are not currently locked.
Calling QueryInterface for
Although the target can be a command list, it cannot be any other type of image. It cannot be the output image of an effect.
+Sets the rendering controls for the given device context.
+The rendering controls to be applied.
The rendering controls allow the application to tune the precision, performance, and resource usage of rendering operations.
+Gets the rendering controls that have been applied to the context.
+When this method returns, contains a reference to the rendering controls for this context.
Changes the primitive blend mode that is used for all rendering operations in the device context.
+The primitive blend to use.
The primitive blend will apply to all of the primitive drawn on the context, unless this is overridden with the compositeMode parameter on the DrawImage API.
The primitive blend applies to the interior of any primitives drawn on the context. In the case of DrawImage, this will be implied by the image rectangle, offset and world transform.
If the primitive blend is anything other than
Returns the currently set primitive blend used by the device context.
+The current primitive blend. The default value is
Sets what units will be used to interpret values passed into the device context.
+An enumeration defining how passed-in units will be interpreted by the device context.
This method will affect all properties and parameters affected by SetDpi and GetDpi. This affects all coordinates, lengths, and other properties that are not explicitly defined as being in another unit. For example:
Gets the mode that is being used to interpret values by the device context.
+The unit mode.
Draws a series of glyphs to the device context.
+Origin of first glyph in the series.
The glyphs to render.
Supplementary glyph series information.
The brush that defines the text color.
The measuring mode of the glyph series, used to determine the advances and offsets. The default value is
The glyphRunDescription is ignored when rendering, but can be useful for printing and serialization of rendering commands, such as to an XPS or SVG file. This extends
A command list cannot reference effects which are part of effect graphs that consume the command list.
+Draw a metafile to the device context.
+The metafile to draw.
The offset from the upper left corner of the render target.
Draws a bitmap to the render target.
+The bitmap to draw.
The destination rectangle. The default is the size of the bitmap and the location is the upper left corner of the render target.
The opacity of the bitmap.
The interpolation mode to use.
An optional source rectangle.
An optional perspective transform.
The destinationRectangle parameter defines the rectangle in the target where the bitmap will appear (in device-independent pixels (DIPs)). This is affected by the currently set transform and the perspective transform, if set. If
The sourceRectangle parameter defines the sub-rectangle of the source bitmap (in DIPs). DrawBitmap will clip this rectangle to the size of the source bitmap, thus making it impossible to sample outside of the bitmap. If
If you specify perspectiveTransform it is applied to the rect in addition to the transform set on the render target.
+Push a layer onto the clip and layer stack of the device context.
+The parameters that defines the layer.
The layer resource to push on the device context that receives subsequent drawing operations.
Note??If a layer is not specified, Direct2D manages the layer resource automatically. ?This indicates that a portion of an effect's input is invalid. This method can be called many times.
You can use this method to propagate invalid rectangles through an effect graph. You can query Direct2D using the GetEffectInvalidRectangles method.
Note??Direct2D does not automatically use these invalid rectangles to reduce the region of an effect that is rendered.?You can also use this method to invalidate caches that have accumulated while rendering effects that have the
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Gets the number of invalid output rectangles that have accumulated on the effect.
+The effect to count the invalid rectangles on.
The returned rectangle count.
Gets the invalid rectangles that have accumulated since the last time the effect was drawn and EndDraw was then called on the device context.
+The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Note??Direct2D does not automatically use these invalid rectangles to reduce the region of an effect that is rendered.?
You can use the InvalidateEffectInputRectangle method to specify invalidated rectangles for Direct2D to propagate through an effect graph.
If multiple invalid rectangles are requested, the rectangles that this method returns may overlap. When this is the case, the rectangle count might be lower than the count that GetEffectInvalidRectangleCount.
+Returns the input rectangles that are required to be supplied by the caller to produce the given output rectangle.
+The image whose output is being rendered.
The portion of the output image whose inputs are being inspected.
A list of the inputs whos rectangles are being queried.
The input rectangles returned to the caller.
The number of inputs.
A failure code, this will typically only be because an effect in the chain returned some error.
The caller should be very careful not to place a reliance on the required input rectangles returned. Small changes for correctness to an effect's behavior can result in different rectangles being returned. In addition, different kinds of optimization applied inside the render can also influence the result.
+Fill using the alpha channel of the supplied opacity mask bitmap. The brush opacity will be modulated by the mask. The render target antialiasing mode must be set to aliased.
+The bitmap that acts as the opacity mask
The brush to use for filling the primitive.
The destination rectangle to output to in the render target
The source rectangle from the opacity mask bitmap.
Enables creation and drawing of geometry realization objects.
+Creates a device-dependent representation of the fill of the geometry that can be subsequently rendered.
+The geometry to realize.
The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.
When this method returns, contains the address of a reference to a new geometry realization object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This method is used in conjunction with
If the provided stroke style specifies a stroke transform type other than
Creates a device-dependent representation of the stroke of a geometry that can be subsequently rendered.
+The geometry to realize.
The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.
The width of the stroke. This parameter shares the same units as the coordinates of the geometry.
The stroke style (optional).
When this method returns, contains the address of a reference to a new geometry realization object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This method is used in conjunction with
If the provided stroke style specifies a stroke transform type other than
Renders a given geometry realization to the target with the specified brush.
+The geometry realization to be rendered.
The brush to render the realization with.
This method respects all currently set state (transform, DPI, unit mode, target image, clips, layers); however, artifacts such as faceting may appear when rendering the realizations with a large effective scale (either via the transform or the DPI). Callers should create their realizations with an appropriate flattening tolerance using either D2D1_DEFAULT_FLATTENING_TOLERANCE or ComputeFlatteningTolerance to compensate for this.
Additionally, callers should be aware of the safe render bounds when creating geometry realizations. If a geometry extends outside of [-524,287, 524,287] DIPs in either the X- or the Y- direction in its original (pre-transform) coordinate space, then it may be clipped to those bounds when it is realized. This clipping will be visible even if the realization is subsequently transformed to fit within the safe render bounds.
+This interface performs all the same functions as the
Creates a new
Creates a new
Creates a new
Creates an image source object from a WIC bitmap source, while populating all pixel memory within the image source. The image is loaded and stored while using a minimal amount of memory.
+The WIC bitmap source to create the image source from.
Options for creating the image source. Default options are used if
Receives the new image source instance.
Receives the new image source instance.
This method creates an image source which can be used to draw the image.
This method supports images that exceed the maximum texture size. Large images are internally stored within a sparse tile cache.
This API supports the same set of pixel formats and alpha modes supported by CreateBitmapFromWicBitmap. If the GPU does not support a given pixel format, this method will return
This method automatically selects an appropriate storage format to minimize GPU memory usage., such as using separate luminance and chrominance textures for JPEG images.
If the loadingOptions argument is
Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. The table data must be provided in 4-channel format.
+Precision of the input lookup table data.
Number of lookup table elements per dimension (X, Y, Z).
Buffer holding the lookup table data.
Size of the lookup table data buffer.
An array containing two values. The first value is the size in bytes from one row (X dimension) of LUT data to the next. The second value is the size in bytes from one LUT data plane (X and Y dimensions) to the next.
Receives the new lookup table instance.
Creates an image source from a set of DXGI surface(s). The YCbCr surface(s) are converted to RGBA automatically during subsequent drawing.
+The DXGI surfaces to create the image source from.
The number of surfaces provided; must be between one and three.
The color space of the input.
Options controlling color space conversions.
Receives the new image source instance.
This method creates an image source which can be used to draw the image. This method supports surfaces that use a limited set of DXGI formats and DXGI color space types. Only the below set of combinations of color space types, surface formats, and surface counts are supported:
Color Space Type | Surface Count(s) | Surface Format(s) |
---|---|---|
1 | Standard D2D-supported pixel formats: | |
1, 2, 3 | When Surface count is 1: When Surface Count is 2:
When Surface Count is 3:
| |
| 1,2,3 | When Surface count is 1: When Surface Count is 2:
When Surface Count is 3:
|
?
The GPU must also have sufficient support for a pixel format to be supported by D2D. To determine whether D2D supports a format, call IsDxgiFormatSupported.
This API converts YCbCr formats to sRGB using the provided color space type and options. RGBA data is assumed to be in the desired space, and D2D does not apply any conversion.
If multiple surfaces are provided, this method infers whether chroma planes are subsampled (by 2x) from the relative sizes of each corresponding source rectangle (or if the source rectangles parameter is
If provided, the source rectangles must be within the bounds of the corresponding surface. The source rectangles may have different origins. In this case, this method shifts the data from each plane to align with one another.
+Creates an image source from a set of DXGI surface(s). The YCbCr surface(s) are converted to RGBA automatically during subsequent drawing.
+The DXGI surfaces to create the image source from.
The number of surfaces provided; must be between one and three.
The color space of the input.
Options controlling color space conversions.
Receives the new image source instance.
This method creates an image source which can be used to draw the image. This method supports surfaces that use a limited set of DXGI formats and DXGI color space types. Only the below set of combinations of color space types, surface formats, and surface counts are supported:
Color Space Type | Surface Count(s) | Surface Format(s) |
---|---|---|
1 | Standard D2D-supported pixel formats: | |
1, 2, 3 | When Surface count is 1: When Surface Count is 2:
When Surface Count is 3:
| |
| 1,2,3 | When Surface count is 1: When Surface Count is 2:
When Surface Count is 3:
|
?
The GPU must also have sufficient support for a pixel format to be supported by D2D. To determine whether D2D supports a format, call IsDxgiFormatSupported.
This API converts YCbCr formats to sRGB using the provided color space type and options. RGBA data is assumed to be in the desired space, and D2D does not apply any conversion.
If multiple surfaces are provided, this method infers whether chroma planes are subsampled (by 2x) from the relative sizes of each corresponding source rectangle (or if the source rectangles parameter is
If provided, the source rectangles must be within the bounds of the corresponding surface. The source rectangles may have different origins. In this case, this method shifts the data from each plane to align with one another.
+Creates an image source from a set of DXGI surface(s). The YCbCr surface(s) are converted to RGBA automatically during subsequent drawing.
+The DXGI surfaces to create the image source from.
The number of surfaces provided; must be between one and three.
The color space of the input.
Options controlling color space conversions.
Receives the new image source instance.
This method creates an image source which can be used to draw the image. This method supports surfaces that use a limited set of DXGI formats and DXGI color space types. Only the below set of combinations of color space types, surface formats, and surface counts are supported:
Color Space Type | Surface Count(s) | Surface Format(s) |
---|---|---|
1 | Standard D2D-supported pixel formats: | |
1, 2, 3 | When Surface count is 1: When Surface Count is 2:
When Surface Count is 3:
| |
| 1,2,3 | When Surface count is 1: When Surface Count is 2:
When Surface Count is 3:
|
?
The GPU must also have sufficient support for a pixel format to be supported by D2D. To determine whether D2D supports a format, call IsDxgiFormatSupported.
This API converts YCbCr formats to sRGB using the provided color space type and options. RGBA data is assumed to be in the desired space, and D2D does not apply any conversion.
If multiple surfaces are provided, this method infers whether chroma planes are subsampled (by 2x) from the relative sizes of each corresponding source rectangle (or if the source rectangles parameter is
If provided, the source rectangles must be within the bounds of the corresponding surface. The source rectangles may have different origins. In this case, this method shifts the data from each plane to align with one another.
+Returns the world bounds of a given gradient mesh.
+The gradient mesh whose world bounds will be calculated.
When this method returns, contains a reference to the bounds of the gradient mesh, in device independent pixels (DIPs).
The world bounds reflect the current DPI, unit mode, and world transform of the context. They indicate which pixels would be impacted by calling DrawGradientMesh with the given gradient mesh. + They do not reflect the current clip rectangle set on the device context or the extent of the context?s current target.
+Renders the given ink object using the given brush and ink style.
+The ink object to be rendered.
The brush with which to render the ink object.
The ink style to use when rendering the ink object.
Renders a given gradient mesh to the target.
+The gradient mesh to be rendered.
Draws a metafile to the device context using the given source and destination rectangles.
+The metafile to draw.
The rectangle in the target where the metafile will be drawn, relative to the upper left corner (defined in DIPs) of the render target. If
The rectangle of the source metafile that will be drawn, relative to the upper left corner (defined in DIPs) of the metafile. If
Creates an image source which shares resources with an original.
+The original image.
Properties for the source image.
Receives the new image source.
If this method succeeds, it returns
This interface performs all the same functions as the
Creates a new, empty sprite batch. After creating a sprite batch, use
If this method succeeds, it returns
Renders all sprites in the given sprite batch to the device context using the specified drawing options.
+The sprite batch to draw.
The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.
The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.
The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.
The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.
The additional drawing options, if any, to be used for this sprite batch.
This interface performs all the same functions as the
Creates an SVG glyph style object.
+On completion points to the created
This method returns an
Represents a set of state and command buffers that are used to render to a target.
The device context can render to a target bitmap or a command list. +
+Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device.
+Draws a text layout object. If the layout is not subsequently changed, this can be more efficient than DrawText when drawing the same layout repeatedly.
+The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.
The formatted text to draw. Any drawing effects that do not inherit from
The brush used to paint the text.
The values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
The index used to select a color palette within a color font.
A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is
Draws a color bitmap glyph run using one of the bitmap formats.
+Specifies the format of the glyph image. Supported formats are
Only one format can be specified at a time, combinations of flags are not valid input.
The origin of the baseline for the glyph run.
The glyphs to render.
Indicates the measuring method.
Specifies the pixel snapping policy when rendering color bitmap glyphs.
Draws a color glyph run that has the format of
The origin of the baseline for the glyph run.
The glyphs to render.
The brush used to paint the specified glyphs.
Values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
The index used to select a color palette within a color font. Note that this not the same as the paletteIndex in the
Indicates the measuring method used for text layout.
Retrieves an image of the color bitmap glyph from the color glyph cache. If the cache does not already contain the requested resource, it will be created. This method may be used to extend the lifetime of a glyph image even after it is evicted from the color glyph cache.
+The format for the glyph image. If there is no image data in the requested format for the requested glyph, this method will return an error.
The origin for the glyph.
Reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
The specified font size affects the choice of which bitmap to use from the font. It also affects the output glyphTransform, causing it to properly scale the glyph.
Index of the glyph.
If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways as true and rotating the entire run 90 degrees to the right via a rotate transform.
The transform to apply to the image. This input transform affects the choice of which bitmap to use from the font. It is also factored into the output glyphTransform.
Dots per inch along the x-axis.
Dots per inch along the y-axis.
Output transform, which transforms from the glyph's space to the same output space as the worldTransform. This includes the input glyphOrigin, the glyph's offset from the glyphOrigin, and any other required transformations.
On completion contains the retrieved glyph image.
This method returns an
Retrieves an image of the SVG glyph from the color glyph cache. If the cache does not already contain the requested resource, it will be created. This method may be used to extend the lifetime of a glyph image even after it is evicted from the color glyph cache.
+Origin of the glyph.
Reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
The specified font size affects the output glyphTransform, causing it to properly scale the glyph.
Index of the glyph to retrieve.
If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways as true and rotating the entire run 90 degrees to the right via a rotate transform.
The transform to apply to the image.
Describes how the area is painted.
The values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
The index used to select a color palette within a color font. Note that this not the same as the paletteIndex in the
Output transform, which transforms from the glyph's space to the same output space as the worldTransform. This includes the input glyphOrigin, the glyph's offset from the glyphOrigin, and any other required transformations.
On completion, contains the retrieved glyph image.
This method returns an
Represents a set of state and command buffers that are used to render to a target.
The device context can render to a target bitmap or a command list. +
+Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device.
+Creates a color context from a DXGI color space type. It is only valid to use this with the Color Management Effect in 'Best' mode.
+The color space to create the color context from.
The created color context.
This method returns an
Issues drawing commands to a GDI device context.
+Binds the render target to the device context to which it issues drawing commands.
+The device context to which the render target issues drawing commands.
The dimensions of the handle to a device context (
If this method succeeds, it returns
Before you can render with the DC render target, you must use its BindDC method to associate it with a GDI DC. You do this each time you use a different DC, or the size of the area you want to draw to changes.
+This interface is used to describe a GPU rendering pass on a vertex or pixel shader. It is passed to
Sets the constant buffer for this transform's pixel shader.
+The data applied to the constant buffer.
The number of bytes of data in the constant buffer
If this method succeeds, it returns
Sets the resource texture corresponding to the given shader texture index.
+The index of the texture to be bound to the pixel shader.
The created resource texture.
If the method succeeds, it returns
Sets the constant buffer for this transform's vertex shader.
+The data applied to the constant buffer
The number of bytes of data in the constant buffer.
If the method succeeds, it returns
Set the shader instructions for this transform.
+The resource id for the shader.
Additional information provided to the renderer to indicate the operations the pixel shader does.
If the method succeeds, it returns
If this call fails, the corresponding
Specifying pixelOptions other than
Sets a vertex buffer, a corresponding vertex shader, and options to control how the vertices are to be handled by the Direct2D context.
+The vertex buffer, if this is cleared, the default vertex shader and mapping to the transform rectangles will be used.
Options that influence how the renderer will interact with the vertex shader.
How the vertices will be blended with the output texture.
The set of vertices to use from the buffer.
The
If the method succeeds, it returns
The vertex shaders associated with the vertex buffer through the vertex shader
If you pass the vertex option
blendDesc = { , , , , , , { 1.0f, 1.0f, 1.0f, 1.0f } };
If this call fails, the corresponding
If blendDescription is
Represents the drawing state of a render target: the antialiasing mode, transform, tags, and text-rendering options.
+Retrieves or sets the antialiasing mode, transform, and tags portion of the drawing state.
+Retrieves or sets the text-rendering configuration of the drawing state.
+Retrieves the antialiasing mode, transform, and tags portion of the drawing state.
+When this method returns, contains the antialiasing mode, transform, and tags portion of the drawing state. You must allocate storage for this parameter.
Specifies the antialiasing mode, transform, and tags portion of the drawing state.
+The antialiasing mode, transform, and tags portion of the drawing state.
Specifies the text-rendering configuration of the drawing state.
+The text-rendering configuration of the drawing state, or
Retrieves the text-rendering configuration of the drawing state.
+When this method returns, contains the address of a reference to an
Implementation of a drawing state block that adds the functionality of primitive blend in addition to already existing antialias mode, transform, tags and text rendering mode.
Note??You can get anGets or sets the antialiasing mode, transform, tags, primitive blend, and unit mode portion of the drawing state.
+Gets the antialiasing mode, transform, tags, primitive blend, and unit mode portion of the drawing state.
+When this method returns, contains the antialiasing mode, transform, tags, primitive blend, and unit mode portion of the drawing state. You must allocate storage for this parameter.
Sets the
A specialized implementation of the Shantzis calculations to a transform implemented on the GPU. These calculations are described in the paper A model for efficient and flexible image computing.
The information required to specify a ?Pass? in the rendering algorithm on a Pixel Shader is passed to the implementation through the SetDrawInfo method.
+A specialized implementation of the Shantzis calculations to a transform implemented on the GPU. These calculations are described in the paper A model for efficient and flexible image computing.
The information required to specify a ?Pass? in the rendering algorithm on a Pixel Shader is passed to the implementation through the SetDrawInfo method.
+Provides the GPU render info interface to the transform implementation.
+The interface supplied back to the calling method to allow it to specify the GPU based transform pass.
Any
The transform can maintain a reference to this interface for its lifetime. If any properties change on the transform, it can apply these changes to the corresponding drawInfo interface.
This is also used to determine that the corresponding nodes in the graph are dirty.
+Represents a basic image-processing construct in Direct2D.
+An effect takes zero or more input images, and has an output image. The images that are input into and output from an effect are lazily evaluated. This definition is sufficient to allow an arbitrary graph of effects to be created from the application by feeding output images into the input image of the next effect in the chain.
+Gets or sets the number of inputs to the effect.
+Gets the output image from the effect.
+The output image can be set as an input to another effect, or can be directly passed into the
It is also possible to use QueryInterface to retrieve the same output image.
+Sets the given input image by index.
+The index of the image to set.
The input image to set.
Whether to invalidate the graph at the location of the effect input
If the input index is out of range, the input image is ignored.
+Allows the application to change the number of inputs to an effect.
+The number of inputs to the effect.
The method returns an
Description | |
---|---|
No error occurred. | |
E_INVALIDARG | One or more arguments are invalid. |
E_OUTOFMEMORY | Failed to allocate necessary memory. |
?
Most effects do not support a variable number of inputs. Use
If the input count is less than the minimum or more than the maximum supported inputs, the call will fail.
If the input count is unchanged, the call will succeed with
Any inputs currently selected on the effect will be unaltered by this call unless the number of inputs is made smaller. If the number of inputs is made smaller, inputs beyond the selected range will be released.
If the method fails, the existing input and input count will remain unchanged.
+Represents a basic image-processing construct in Direct2D.
+An effect takes zero or more input images, and has an output image. The images that are input into and output from an effect are lazily evaluated. This definition is sufficient to allow an arbitrary graph of effects to be created from the application by feeding output images into the input image of the next effect in the chain.
+Gets the number of inputs to the effect.
+This method returns the number of inputs to the effect.
Gets the output image from the effect.
+When this method returns, contains the address of a reference to the output image for the effect.
The output image can be set as an input to another effect, or can be directly passed into the
It is also possible to use QueryInterface to retrieve the same output image.
+Provides factory methods and other state management for effect and transform authors.
+This interface is passed to an effect implementation through the
Each call to ID2D1Effect::Initialize will be provided a different
Gets the unit mapping that an effect will use for properties that could be in either dots per inch (dpi) or pixels.
+The dpi on the x-axis.
The dpi on the y-axis.
If the
Creates a Direct2D effect for the specified class ID. This is the same as
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
The specified effect is not registered by the system. |
?
The created effect does not reference count the DLL from which the effect was created. If the caller unregisters an effect while this effect is loaded, the resulting behavior is unpredictable.
+This indicates the maximum feature level from the provided list which is supported by the device. If none of the provided levels are supported, then this API fails with
The feature levels provided by the application.
The count of feature levels provided by the application
The maximum feature level from the featureLevels list which is supported by the D2D device.
Wraps an effect graph into a single transform node and then inserted into a transform graph. This allows an effect to aggregate other effects. This will typically be done in order to allow the effect properties to be re-expressed with a different contract, or to allow different components to integrate each-other?s effects.
+The effect to be wrapped in a transform node.
The returned transform node that encapsulates the effect graph.
This creates a blend transform that can be inserted into a transform graph.
+The number of inputs to the blend transform.
Describes the blend transform that is to be created.
The returned blend transform.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Creates a transform that extends its input infinitely in every direction based on the passed in extend mode.
+The extend mode in the X-axis direction.
The extend mode in the Y-axis direction.
The returned transform.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Creates and returns an offset transform.
+The offset amount.
When this method returns, contains the address of a reference to an offset transform object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
An offset transform is used to offset an input bitmap without having to insert a rendering pass. An offset transform is automatically inserted by an Affine transform if the transform evaluates to a pixel-aligned transform.
+Creates and returns a bounds adjustment transform.
+The initial output rectangle for the bounds adjustment transform.
The returned bounds adjustment transform.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
A support transform can be used for two different reasons.
Loads the given shader by its unique ID. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to JIT, if it hasn?t been already.
+The unique id that identifies the shader.
The buffer that contains the shader to register.
The size of the shader buffer in bytes.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
The shader you specify must be compiled, not in raw HLSL code.
+Loads the given shader by its unique ID. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to JIT, if it hasn?t been already.
+The unique id that identifies the shader.
The buffer that contains the shader to register.
The size of the shader buffer in bytes.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
The shader you specify must be compiled, not in raw HLSL code.
+Loads the given shader by its unique ID. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to JIT, if it hasn?t been already.
+The unique id that identifies the shader.
The buffer that contains the shader to register.
The size of the shader buffer in bytes.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
The shader you specify must be compiled, not in raw HLSL code.
+This tests to see if the given shader is loaded.
+The unique id that identifies the shader.
Whether the shader is loaded.
Creates or finds the given resource texture, depending on whether a resource id is specified. It also optionally initializes the texture with the specified data.
+An optional reference to the unique id that identifies the lookup table.
The properties used to create the resource texture.
The optional data to be loaded into the resource texture.
An optional reference to the stride to advance through the resource texture, according to dimension.
The size, in bytes, of the data.
The returned texture that can be used as a resource in a Direct2D effect.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Finds the given resource texture if it has already been created with
Creates a vertex buffer or finds a standard vertex buffer and optionally initializes it with vertices. The returned buffer can be specified in the render info to specify both a vertex shader and or to pass custom vertices to the standard vertex shader used by Direct2D.
+The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
This finds the given vertex buffer if it has already been created with
Creates a color context from a color space.
If the color space is Custom, the context is initialized from the profile and profileSize parameters.
If the color space is not Custom, the context is initialized with the profile bytes associated with the color space. The profile and profileSize parameters are ignored.
+The space of color context to create.
A buffer containing the ICC profile bytes used to initialize the color context when space is
The size in bytes of Profile.
When this method returns, contains the address of a reference to a new color context object.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
Creates a color context by loading it from the specified filename. The profile bytes are the contents of the file specified by filename.
+The path to the file containing the profile bytes to initialize the color context with.
When this method returns, contains the address of a reference to a new color context.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
Creates a color context from an
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
The new color context can be used in
This indicates whether an optional capability is supported by the D3D device.
+The feature to query support for.
A structure indicating information about how or if the feature is supported.
The size of the featureSupportData parameter.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Indicates whether the buffer precision is supported by the underlying Direct2D device.
+Returns TRUE if the buffer precision is supported. Returns
Describes features of an effect.
+The effect whose input connection is being specified.
The input index of the effect that is being considered.
The amount of data that would be available on the input. This can be used to query this information when the data is not yet available.
Contains the center point, x-radius, and y-radius of an ellipse.
+The center point of the ellipse.
The X-radius of the ellipse.
The Y-radius of the ellipse.
Represents an ellipse.
+Gets the
Gets the
Creates Direct2D resources.
+The
A factory defines a set of CreateResource methods that can produce the following drawing resources:
To create an
Forces the factory to refresh any system defaults that it might have changed since factory creation.
+If this method succeeds, it returns
You should call this method before calling the GetDesktopDpi method, to ensure that the system DPI is current.
+Retrieves the current desktop dots per inch (DPI). To refresh this value, call ReloadSystemMetrics.
+Use this method to obtain the system DPI when setting physical pixel values, such as when you specify the size of a window.
+ Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Geometry groups are a convenient way to group several geometries simultaneously so all figures of several distinct geometries are concatenated into one. To create a
Creates an
If this method succeeds, it returns
Geometry groups are a convenient way to group several geometries simultaneously so all figures of several distinct geometries are concatenated into one. To create a
Creates an
If this method succeeds, it returns
Geometry groups are a convenient way to group several geometries simultaneously so all figures of several distinct geometries are concatenated into one. To create a
Transforms the specified geometry and stores the result as an
If this method succeeds, it returns
Like other resources, a transformed geometry inherits the resource space and threading policy of the factory that created it. This object is immutable.
When stroking a transformed geometry with the DrawGeometry method, the stroke width is not affected by the transform applied to the geometry. The stroke width is only affected by the world transform.
+Creates an empty
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates a render target that renders to a Microsoft Windows Imaging Component (WIC) bitmap.
+The bitmap that receives the rendering output of the render target.
The rendering mode, pixel format, remoting options, DPI information, and the minimum DirectX support required for hardware rendering. For information about supported pixel formats, see Supported Pixel Formats and Alpha Modes.
When this method returns, contains the address of the reference to the
If this method succeeds, it returns
You must use
Your application should create render targets once and hold onto them for the life of the application or until the
Note?? This method isn't supported on Windows Phone and will fail when called on a device with error code 0x8899000b (?There is no hardware rendering device available for this operation?). Because the Windows Phone Emulator supports WARP rendering, this method will fail when called on the emulator with a different error code, 0x88982f80 (wincodec_err_unsupportedpixelformat).
+Creates an
If this method succeeds, it returns
When you create a render target and hardware acceleration is available, you allocate resources on the computer's GPU. By creating a render target once and retaining it as long as possible, you gain performance benefits. Your application should create render targets once and hold onto them for the life of the application or until the
Creates a render target that draws to a DirectX Graphics Infrastructure (DXGI) surface.
+The
The rendering mode, pixel format, remoting options, DPI information, and the minimum DirectX support required for hardware rendering. For information about supported pixel formats, see Supported Pixel Formats and Alpha Modes.
When this method returns, contains the address of the reference to the
If this method succeeds, it returns
To write to a Direct3D surface, you obtain an
A DXGI surface render target is a type of
The DXGI surface render target and the DXGI surface must use the same DXGI format. If you specify the DXGI_FORMAT_UNKOWN format when you create the render target, it will automatically use the surface's format.
The DXGI surface render target does not perform DXGI surface synchronization.
For more information about creating and using DXGI surface render targets, see the Direct2D and Direct3D Interoperability Overview.
To work with Direct2D, the Direct3D device that provides the
When you create a render target and hardware acceleration is available, you allocate resources on the computer's GPU. By creating a render target once and retaining it as long as possible, you gain performance benefits. Your application should create render targets once and hold onto them for the life of the application or until the render target's EndDraw method returns the
Creates a render target that draws to a Windows Graphics Device Interface (GDI) device context.
+The rendering mode, pixel format, remoting options, DPI information, and the minimum DirectX support required for hardware rendering. To enable the device context (DC) render target to work with GDI, set the DXGI format to
When this method returns, dcRenderTarget contains the address of the reference to the
If this method succeeds, it returns
Before you can render with a DC render target, you must use the render target's BindDC method to associate it with a GDI DC. Do this for each different DC and whenever there is a change in the size of the area you want to draw to.
To enable the DC render target to work with GDI, set the render target's DXGI format to
Your application should create render targets once and hold on to them for the life of the application or until the render target's EndDraw method returns the
Creates Direct2D resources.
+ The
Creates a
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
?
The Direct2D device defines a resource domain in which a set of Direct2D objects and Direct2D device contexts can be used together. Each call to CreateDevice returns a unique
Creates a
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
It is valid to specify a dash array only if
Creates an
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
?
Creates a new drawing state block, this can be used in subsequent SaveDrawingState and RestoreDrawingState operations on the render target.
+The drawing state description structure.
The address of the newly created drawing state block.
The address of the newly created drawing state block.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
Creates a new
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
Registers an effect within the factory instance with the property XML specified as a stream.
+The identifier of the effect to be registered.
A list of the effect properties, types, and metadata.
An array of properties and methods.
This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding propertyXml.
The number of bindings in the binding array.
The static factory that is used to create the corresponding effect.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Direct2D effects must define their properties at registration time via registration XML. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the propertyXml parameter.
RegisterEffect is both atomic and reference counted. To unregister an effect, call UnregisterEffect with the classId of the effect.
Important??RegisterEffect does not hold a reference to the DLL or executable file in which the effect is contained. The application must independently make sure that the lifetime of the DLL or executable file completely contains all instances of each registered and created effect.?Aside from the built-in effects that are globally registered, this API registers effects only for this factory, derived device, and device context interfaces.
+Registers an effect within the factory instance with the property XML specified as a string.
+The identifier of the effect to be registered.
A list of the effect properties, types, and metadata.
An array of properties and methods.
This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding propertyXml.
The number of bindings in the binding array.
The static factory that is used to create the corresponding effect.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
Direct2D effects must define their properties at registration time via registration XML. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the propertyXml parameter.
RegisterEffect is both atomic and reference counted. To unregister an effect, call UnregisterEffect with the classId of the effect.
Important??RegisterEffect does not hold a reference to the DLL or executable file in which the effect is contained. The application must independently make sure that the lifetime of the DLL or executable file completely contains all instances of each registered and created effect.?Aside from the built-in effects that are globally registered, this API registers effects only for this factory and derived device and device context interfaces.
+Unregisters an effect within the factory instance that corresponds to the classId provided.
+The identifier of the effect to be unregistered.
In order for the effect to be fully unloaded, you must call UnregisterEffect the same number of times that you have registered the effect.
The UnregisterEffect method unregisters only those effects that are registered on the same factory. It cannot be used to unregister a built-in effect.
+Returns the class IDs of the currently registered effects and global effects on this factory.
+When this method returns, contains an array of effects.
The capacity of the effects array.
When this method returns, contains the number of effects copied into effects.
When this method returns, contains the number of effects currently registered in the system.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
HRESULT_FROM_WIN32( | effectsRegistered is larger than effectCount. |
?
The set of class IDs will be atomically returned by the API. The set will not be interrupted by other threads registering or unregistering effects.
If effectsRegistered is larger than effectCount, the supplied array will still be filled to capacity with the current set of registered effects. This method returns the CLSIDs for all global effects and all effects registered to this factory.
+Retrieves the properties of an effect.
+The ID of the effect to retrieve properties from.
When this method returns, contains the address of a reference to the property interface that can be used to query the metadata of the effect.
The returned effect properties will have all the mutable properties for the effect set to a default of
This method cannot be used to return the properties for any effect not visible to
Creates Direct2D resources.
This interface also enables the creation of
Creates an
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
?
The Direct2D device defines a resource domain in which a set of Direct2D objects and Direct2D device contexts can be used together. Each call to CreateDevice returns a unique
Provides access to an device context that can accept GDI drawing commands.
+You don't create an
Not all render targets support the
Note that the QueryInterface method always succeeds; if the render target doesn't support the
To test whether a given render target supports the
Retrieves the device context associated with this render target.
+A value that specifies whether the device context should be cleared.
When this method returns, contains the device context associated with this render target. You must allocate storage for this parameter.
Calling this method flushes the render target.
This command can be called only after BeginDraw and before EndDraw.
Note??In Windows?7 and earlier, you should not call GetDC between PushAxisAlignedClip/PopAxisAlignedClip commands or between PushLayer/PopLayer. However, this restriction does not apply to Windows?8 and later.?ReleaseDC must be called once for each call to GetDC.
+Indicates that drawing with the device context retrieved using the GetDC method is finished.
+If this method succeeds, it returns
ReleaseDC must be called once for each call to GetDC.
+The interpolation mode to be used with the 2D affine transform effect to scale the image. There are 6 scale modes that range in quality and speed.
+Samples the nearest single point and uses that. This mode uses less processing time, but outputs the lowest quality image.
Uses a four point sample and linear interpolation. This mode uses more processing time than the nearest neighbor mode, but outputs a higher quality image.
Uses a 16 sample cubic kernel for interpolation. This mode uses the most processing time, but outputs a higher quality image.
Uses 4 linear samples within a single pixel for good edge anti-aliasing. This mode is good for scaling down by small amounts on images with few pixels.
Uses anisotropic filtering to sample a pattern according to the transformed shape of the bitmap.
Uses a variable size high quality cubic kernel to perform a pre-downscale the image if downscaling is involved in the transform matrix. Then uses the cubic interpolation mode for the final output.
Identifiers for properties of the 2D affine transform effect.
+Specifies how the alpha value of a bitmap or render target should be treated.
+The
The alpha value might not be meaningful.
The alpha value has been premultiplied. Each color is first scaled by the alpha value. The alpha value itself is the same in both straight and premultiplied alpha. Typically, no color channel value is greater than the alpha channel value. If a color channel value in a premultiplied format is greater than the alpha channel, the standard source-over blending math results in an additive blend.
The alpha value has not been premultiplied. The alpha channel indicates the transparency of the color.
The alpha value is ignored.
Specifies how the edges of nontext primitives are rendered.
+Edges are antialiased using the Direct2D per-primitive method of high-quality antialiasing.
Objects are aliased in most cases. Objects are antialiased only when they are drawn to a render target created by the CreateDxgiSurfaceRenderTarget method and Direct3D multisampling has been enabled on the backing DirectX Graphics Infrastructure (DXGI) surface.
Specifies whether an arc should be greater than 180 degrees.
+An arc's sweep should be 180 degrees or less.
An arc's sweep should be 180 degrees or greater.
Identifiers for the properties of the Arithmetic composite effect.
+Identifiers for properties of the Atlas effect.
+Specifies the algorithm that is used when images are scaled or rotated.
Note??Starting in Windows?8, more interpolations modes are available. See To stretch an image, each pixel in the original image must be mapped to a group of pixels in the larger image. To shrink an image, groups of pixels in the original image must be mapped to single pixels in the smaller image. The effectiveness of the algorithms that perform these mappings determines the quality of a scaled image. Algorithms that produce higher-quality scaled images tend to require more processing time.
Specifies how a bitmap can be used.
+The bitmap is created with default properties.
The bitmap can be used as a device context target.
The bitmap cannot be used as an input.
The bitmap can be read from the CPU.
The bitmap works with
Specifies the alpha mode of the output of the Bitmap source effect.
+The interpolation mode used to scale the image in the Bitmap source effect. If the mode disables the mipmap, then BitmapSouce will cache the image at the resolution determined by the Scale and EnableDPICorrection properties.
+Speficies whether a flip and/or rotation operation should be performed by the Bitmap source effect
+Identifiers for properties of the Bitmap source effect.
+Specifies how one of the color sources is to be derived and optionally specifies a preblend operation on the color source.
+This enumeration has the same numeric values as D3D10_BLEND.
+The data source is black (0, 0, 0, 0). There is no preblend operation.
The data source is white (1, 1, 1, 1). There is no preblend operation.
The data source is color data (RGB) from the second input of the blend transform. There is not a preblend operation.
The data source is color data (RGB) from second input of the blend transform. The preblend operation inverts the data, generating 1 - RGB.
The data source is alpha data (A) from second input of the blend transform. There is no preblend operation.
The data source is alpha data (A) from the second input of the blend transform. The preblend operation inverts the data, generating 1 - A.
The data source is alpha data (A) from the first input of the blend transform. There is no preblend operation.
The data source is alpha data (A) from the first input of the blend transform. The preblend operation inverts the data, generating 1 - A.
The data source is color data from the first input of the blend transform. There is no preblend operation.
The data source is color data from the first input of the blend transform. The preblend operation inverts the data, generating 1 - RGB.
The data source is alpha data from the second input of the blend transform. The preblend operation clamps the data to 1 or less.
The data source is the blend factor. There is no preblend operation.
The data source is the blend factor. The preblend operation inverts the blend factor, generating 1 - blend_factor.
The blend mode used for the Blend effect.
+Specifies the blend operation on two color sources.
+This enumeration has the same numeric values as D3D10_BLEND_OP.
+Add source 1 and source 2.
Subtract source 1 from source 2.
Subtract source 2 from source 1.
Find the minimum of source 1 and source 2.
Find the maximum of source 1 and source 2.
Identifiers for properties of the Blend effect.
+The edge mode for the Border effect.
+Specifies how the Crop effect handles the crop rectangle falling on fractional pixel coordinates.
+Identifiers for properties of the Border effect.
+Identifiers for the properties of the Brightness effect.
+Represents the bit depth of the imaging pipeline in Direct2D.
+The buffer precision is not specified.
Use 8-bit normalized integer per channel.
Use 8-bit normalized integer standard RGB data per channel.
Use 16-bit normalized integer per channel.
Use 16-bit floats per channel.
Use 32-bit floats per channel.
Describes the shape at the end of a line or segment.
+The following illustration shows the available cap styles for lines or segments. The red portion of the line shows the extra area added by the line cap setting.
+A cap that does not extend past the last point of the line. Comparable to cap used for objects other than lines.
Half of a square that has a length equal to the line thickness.
A semicircle that has a diameter equal to the line thickness.
An isosceles right triangle whose hypotenuse is equal in length to the thickness of the line.
Describes flags that influence how the renderer interacts with a custom vertex shader.
+There were no changes.
The properties of the effect changed.
The context state changed.
The effect?s transform graph has changed. This happens only when an effect supports a variable input count.
Allows a caller to control the channel depth of a stage in the rendering pipeline.
+The channel depth is the default. It is inherited from the inputs.
The channel depth is 1.
The channel depth is 4.
Specifies the color channel the Displacement map effect extracts the intensity from and uses it to spatially displace the image in the X or Y direction.
+Identifiers for properties of the Chroma-key effect.
+Specifies the pixel snapping policy when rendering color bitmap glyphs.
+Color bitmap glyph positions are snapped to the nearest pixel if the bitmap resolution matches that of the device context.
Color bitmap glyph positions are not snapped.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
The render target uses hardware rendering only.
Defines how to interpolate between colors.
+Colors are interpolated with straight alpha.
Colors are interpolated with premultiplied alpha.
Indicates how the Color management effect should interpret alpha data that is contained in the input image.
+Identifiers for the properties of the Color management effect.
+The quality level of the transform for the Color management effect.
+Specifies which ICC rendering intent the Color management effect should use.
+The alpha mode of the output of the Color matrix effect.
+Identifiers for the properties of the Color matrix effect.
+Defines options that should be applied to the color space.
+The color space is otherwise described, such as with a color profile.
The color space is sRGB.
The color space is scRGB.
Specifies the different methods by which two geometries can be combined.
+The following illustration shows the different geometry combine modes. +
+The two regions are combined by taking the union of both. Given two geometries, A and B, the resulting geometry is geometry A + geometry B.
The two regions are combined by taking their intersection. The new area consists of the overlapping region between the two geometries.
The two regions are combined by taking the area that exists in the first region but not the second and the area that exists in the second region but not the first. Given two geometries, A and B, the new region consists of (A-B) + (B-A).
The second region is excluded from the first. Given two geometries, A and B, the area of geometry B is removed from the area of geometry A, producing a region that is A-B.
Specifies additional features supportable by a compatible render target when it is created. This enumeration allows a bitwise combination of its member values.
+Use this enumeration when creating a compatible render target with the CreateCompatibleRenderTarget method. For more information about compatible render targets, see the Render Targets Overview.
The
The render target supports no additional features.
The render target supports interoperability with the Windows Graphics Device Interface (GDI).
Used to specify the blend mode for all of the Direct2D blending operations.
+The figure here shows an example of each of the modes with images that have an opacity of 1.0 or 0.5.
There can be slightly different interpretations of these enumeration values depending on where the value is used.
With a composite effect: +
D2D1_COMPOSITE_MODE_DESTINATION_COPY is equivalent to As a parameter to
The standard source-over-destination blend mode.
The destination is rendered over the source.
Performs a logical clip of the source pixels against the destination pixels.
The inverse of the
This is the logical inverse to
The is the logical inverse to
Writes the source pixels over the destination where there are destination pixels.
The logical inverse of
The source is inverted with the destination.
The channel components are summed.
The source is copied to the destination; the destination pixels are ignored.
Equivalent to
Destination colors are inverted according to a source mask. +
Identifiers for properties of the Composite effect.
+Identifiers for properties of the Contrast effect.
+Identifiers for properties of the Convolve matrix effect.
+The interpolation mode the Convolve matrix effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.
+Identifiers for properties of the Crop effect.
+This effect combines two images by adding weighted pixels from input images. It has two inputs, named Destination and Source.
The cross fade formula is output = weight * Destination + (1 - weight) * Source.
The CLSID for this effect is
Describes the sequence of dashes and gaps in a stroke.
+The following illustration shows several available dash styles.
+A solid line with no breaks.
A dash followed by a gap of equal length. The dash and the gap are each twice as long as the stroke thickness.
The equivalent dash array for
A dot followed by a longer gap.
The equivalent dash array for
A dash, followed by a gap, followed by a dot, followed by another gap.
The equivalent dash array for
A dash, followed by a gap, followed by a dot, followed by another gap, followed by another dot, followed by another gap.
The equivalent dash array for
The dash pattern is specified by an array of floating-point values.
Indicates the type of information provided by the Direct2D Debug Layer.
+To receive debugging messages, you must install the Direct2D Debug Layer.
+Specifies how a device context is initialized for GDI rendering when it is retrieved from the render target.
+Use this enumeration with the
The current contents of the render target are copied to the device context when it is initialized.
The device context is cleared to transparent black when it is initialized.
This specifies options that apply to the device context for its lifetime.
+The device context is created with default options.
Distribute rendering work across multiple threads. Refer to Improving the performance of Direct2D apps for additional notes on the use of this flag.
Specifies the optimization mode for the Directional blur effect.
+Identifiers for properties of the Directional blur effect.
+Identifiers for properties of the Discrete transfer effect.
+Identifiers for properties of the Displacement map effect.
+Identifiers for properties of the Distant-diffuse lighting effect.
+The interpolation mode the effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.
+Samples the nearest single point and uses that. This mode uses less processing time, but outputs the lowest quality image.
Uses a four point sample and linear interpolation. This mode outputs a higher quality image than nearest neighbor.
Uses a 16 sample cubic kernel for interpolation. This mode uses the most processing time, but outputs a higher quality image.
Uses 4 linear samples within a single pixel for good edge anti-aliasing. This mode is good for scaling down by small amounts on images with few pixels.
Uses anisotropic filtering to sample a pattern according to the transformed shape of the bitmap.
Uses a variable size high quality cubic kernel to perform a pre-downscale the image if downscaling is involved in the transform matrix. Then uses the cubic interpolation mode for the final output.
Identifiers for properties of the Distant-specular lighting effect.
+The interpolation mode the Distant-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.
+The interpolation mode the DPI compensation effect uses to scale the image.
+Identifiers for properties of the DPI compensation effect.
+Specifies whether text snapping is suppressed or clipping to the layout rectangle is enabled. This enumeration allows a bitwise combination of its member values.
+Text is not vertically snapped to pixel boundaries. This setting is recommended for text that is being animated.
Text is clipped to the layout rectangle.
In Windows?8.1 and later, text is rendered using color versions of glyphs, if defined by the font.
Bitmap origins of color glyph bitmaps are not snapped.
Text is vertically snapped to pixel boundaries and is not clipped to the layout rectangle.
Values for the
Identifiers for properties of the Edge Detection effect.
+The
The
The
The
The
Identifiers for properties of the Emboss effect.
+Identifiers for properties of the Exposure effect.
+Specifies how a brush paints areas outside of its normal content area.
+For an
Repeat the edge pixels of the brush's content for all regions outside the normal content area.
Repeat the brush's content.
The same as
Specifies whether Direct2D provides synchronization for an
When you create a factory, you can specify whether it is multithreaded or singlethreaded. A singlethreaded factory provides no serialization against any other single threaded instance within Direct2D, so this mechanism provides a very large degree of scaling on the CPU.
You can also create a multithreaded factory instance. In this case, the factory and all derived objects can be used from any thread, and each render target can be rendered to independently. Direct2D serializes calls to these objects, so a single multithreaded Direct2D instance won't scale as well on the CPU as many single threaded instances. However, the resources can be shared within the multithreaded instance.
Note the qualifier "On the CPU": GPUs generally take advantage of fine-grained parallelism more so than CPUs. For example, multithreaded calls from the CPU might still end up being serialized when being sent to the GPU; however, a whole bank of pixel and vertex shaders will run in parallel to perform the rendering.
+Defines capabilities of the underlying Direct3D device which may be queried using
Describes the minimum DirectX support required for hardware rendering by a render target.
+Direct2D determines whether the video card provides adequate hardware rendering support.
The video card must support DirectX 9.
The video card must support DirectX 10.
Indicates whether a specific
Indicates whether a specific
Specifies how the intersecting areas of geometries or figures are combined to form the area of the composite geometry.
+Use the
Direct2D fills the interior of a path by using one of the two fill modes specified by this enumeration:
To see the difference between the winding and alternate fill modes, assume that you have four circles with the same center and a different radius, as shown in the following illustration. The first one has the radius of 25, the second 50, the third 75, and the fourth 100.
The following illustration shows the shape filled by using the alternate fill mode. Notice that the center and third ring are not filled. This is because a ray drawn from any point in either of those two rings passes through an even number of segments.
The following illustration explains this process.
The following illustration shows how the same shape is filled when the winding fill mode is specified.
Notice that all the rings are filled. This is because all the segments run in the same direction, so a ray drawn from any point will cross one or more segments, and the sum of the crossings will not equal zero.
The following illustration explains this process. The red arrows represent the direction in which the segments are drawn and the black arrow represents an arbitrary ray that runs from a point in the innermost ring. Starting with a value of zero, for each segment that the ray crosses, a value of one is added for every clockwise intersection. All points lie in the fill region in this illustration, because the count does not equal zero.
+Determines whether a point is in the fill region by drawing a ray from that point to infinity in any direction, and then counting the number of path segments within the given shape that the ray crosses. If this number is odd, the point is in the fill region; if even, the point is outside the fill region.
Determines whether a point is in the fill region of the path by drawing a ray from that point to infinity in any direction, and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left, as long as left and right are seen from the perspective of the ray. After counting the crossings, if the result is zero, then the point is outside the path. Otherwise, it is inside the path.
Represents filtering modes that a transform may select to use on input textures.
+This enumeration has the same numeric values as
Use point sampling for minification, magnification, and mip-level sampling.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.
Use linear interpolation for minification, magnification, and mip-level sampling.
Use anisotropic interpolation for minification, magnification, and mip-level sampling.
Identifiers for properties of the Flood effect.
+Specifies which gamma is used for interpolation.
+Interpolating in a linear gamma space (
The first gradient is interpolated linearly in the space of the render target (sRGB in this case), and one can see the dark bands between each color. The second gradient uses a gamma-correct linear interpolation, and thus does not exhibit the same variations in brightness.
+Interpolation is performed in the standard RGB (sRGB) gamma.
Interpolation is performed in the linear-gamma color space.
Specifies which gamma is used for interpolation.
+Interpolating in a linear gamma space (
The first gradient is interpolated linearly in the space of the render target (sRGB in this case), and one can see the dark bands between each color. The second gradient uses a gamma-correct linear interpolation, and thus does not exhibit the same variations in brightness.
+Interpolation is performed in the standard RGB (sRGB) gamma.
Interpolation is performed in the linear-gamma color space.
Identifiers for properties of the Gamma transfer effect.
+The optimization mode for the Gaussian blur effect.
+Identifiers for properties of the Gaussian blur effect.
+Describes how one geometry object is spatially related to another geometry object.
+The relationship between the two geometries cannot be determined. This value is never returned by any D2D method.
The two geometries do not intersect at all.
The instance geometry is entirely contained by the passed-in geometry.
The instance geometry entirely contains the passed-in geometry.
The two geometries overlap but neither completely contains the other.
Specifies how a geometry is simplified to an
Specifies which formats are supported in the font, either at a font-wide level or per glyph.
+Indicates no data is available for this glyph.
The glyph has TrueType outlines.
The glyph has CFF outlines.
The glyph has multilayered COLR data.
The glyph has SVG outlines as standard XML. Fonts may store the content gzip'd rather than plain text, indicated by the first two bytes as gzip header {0x1F 0x8B}.
The glyph has PNG image data, with standard PNG IHDR.
The glyph has JPEG image data, with standard JIFF SOI header.
The glyph has TIFF image data.
The glyph has raw 32-bit premultiplied BGRA data.
Values for the
Identifiers for properties of the Highlights and Shadows effect.
+Identifiers for properties of the Histogram effect.
+Identifiers for properties of the Hue rotate effect.
+Values for the
Identifiers for properties of the Hue to RGB effect.
+Option flags controlling primary conversion performed by CreateImageSourceFromDxgi, if any.
+Controls option flags for a new
?
D2D1_IMAGE_SOURCE_CREATION_OPTIONS_RELEASE_SOURCE causes the image source to not retain a reference to the source object used to create it. It can decrease the quality and efficiency of printing.
+No options are used.
Indicates the image source should release its reference to the WIC bitmap source after it has initialized. By default, the image source retains a reference to the WIC bitmap source for the lifetime of the object to enable quality and speed optimizations for printing. This option disables that optimization. +
Indicates the image source should only populate subregions of the image cache on-demand. You can control this behavior using the EnsureCached and TrimCache methods. This options provides the ability to improve memory usage by only keeping needed portions of the image in memory. This option requires that the image source has a reference to the WIC bitmap source, and is incompatible with
Specifies the appearance of the ink nib (pen tip) as part of an
This is used to specify the quality of image scaling with
Specifies options that can be applied when a layer resource is applied to create a layer.
Note??Starting in Windows?8, theClearType antialiasing must use the current contents of the render target to blend properly. When a pushed layer requests initializing for ClearType, Direct2D copies the current contents of the render target into the layer so that ClearType antialiasing can be performed. Rendering ClearType text into a transparent layer does not produce the desired results.
A small performance hit from re-copying content occurs when
Specifies how the layer contents should be prepared. +
+Default layer behavior. A premultiplied layer target is pushed and its contents are cleared to transparent black. +
The layer is not cleared to transparent black.
The layer is always created as ignore alpha. All content rendered into the layer will be treated as opaque.
Identifiers for properties of the Linear transfer effect.
+Describes the shape that joins two lines or segments.
+ A miter limit affects how sharp miter joins are allowed to be. If the line join style is
The following illustration shows different line join settings for the same stroked path geometry.
+Regular angular vertices.
Beveled vertices.
Rounded vertices.
Regular angular vertices unless the join would extend beyond the miter limit; otherwise, beveled vertices.
Identifiers for the properties of the 3D Lookup Table effect.
+The
The
Specifies how the memory to be mapped from the corresponding
The
These flags will be not be able to be used on bitmaps created by the
Indicates the measuring method used for text layout.
+Specifies that text is measured using glyph ideal metrics whose values are independent to the current display resolution.
Specifies that text is measured using glyph display-compatible metrics whose values tuned for the current display resolution.
Specifies that text is measured using the same glyph display metrics as text measured by GDI using a font created with CLEARTYPE_NATURAL_QUALITY.
The mode for the Morphology effect.
+Identifiers for properties of the Morphology effect.
+Describes whether an opacity mask contains graphics or text. Direct2D uses this information to determine which gamma space to use when blending the opacity mask.
+The opacity mask contains graphics. The opacity mask is blended in the gamma 2.2 color space.
The opacity mask contains non-GDI text. The gamma space used for blending is obtained from the render target's text rendering parameters. (
The opacity mask contains text rendered using the GDI-compatible rendering mode. The opacity mask is blended using the gamma for GDI rendering.
Identifiers for properties of the Opacity metadata effect.
+This effect adjusts the opacity of an image by multiplying the alpha channel of the input by the specified opacity value. It has a single input.
The CLSID for this effect is
Specifies the flip and rotation at which an image appears.
+The orientation is unchanged.
The image is flipped horizontally.
The image is rotated clockwise 180 degrees.
The image is rotated clockwise 180 degrees, then flipped horizontally.
The image is rotated clockwise 90 degrees, then flipped horizontally.
The image is rotated clockwise 270 degrees.
The image is rotated clockwise 270 degrees, then flipped horizontally.
The image is rotated clockwise 90 degrees.
Specifies how to render gradient mesh edges.
+Render this patch edge aliased. Use this value for the internal edges of your gradient mesh.
Render this patch edge antialiased. Use this value for the external (boundary) edges of your mesh.
Render this patch edge aliased and also slightly inflated. Use this for the internal edges of your gradient mesh when there could be t-junctions among patches. Inflating the internal edges mitigates seams that can appear along those junctions.
Indicates whether a segment should be stroked and whether the join between this segment and the previous one should be smooth. This enumeration allows a bitwise combination of its member values.
+The segment is joined as specified by the
The segment is not stroked.
The segment is always joined with the one preceding it using a round line join, regardless of which
The interpolation mode the 3D perspective transform effect uses on the image. There are 5 scale modes that range in quality and speed.
+Identifiers for the properties of the 3D perspective transform effect.
+Indicates how pixel shader sampling will be restricted. This indicates whether the vertex buffer is large and tends to change infrequently or smaller and changes frequently (typically frame over frame).
+ If the shader specifies
The pixel shader is not restricted in its sampling.
The pixel shader samples inputs only at the same scene coordinate as the output pixel and returns transparent black whenever the input pixels are also transparent black.
Identifiers for properties of the Point-diffuse lighting effect.
+The interpolation mode the Point-diffuse lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed
+Identifiers for properties of the Point-specular lighting effect.
+The interpolation mode the Point-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.
+Identifiers for properties of the Posterize effect.
+Describes how a render target behaves when it presents its content. This enumeration allows a bitwise combination of its member values.
+The render target waits until the display refreshes to present and discards the frame upon presenting.
The render target does not discard the frame upon presenting.
The render target does not wait until the display refreshes to present.
Used to specify the geometric blend mode for all Direct2D primitives.
+The standard source-over-destination blend mode.
The source is copied to the destination; the destination pixels are ignored.
The resulting pixel values use the minimum of the source and destination pixel values. Available in Windows?8 and later.
The resulting pixel values are the sum of the source and destination pixel values. Available in Windows?8 and later.
Defines when font resources should be subset during printing.
+Uses a heuristic strategy to decide when to subset fonts.
Note??If the print driver has requested archive-optimized content, then Direct2D will subset fonts once, for the entire document. ?Subsets and embeds font resources in each page, then discards that font subset after the page is printed out.
Sends out the original font resources without subsetting along with the page that first uses the font, and re-uses the font resources for later pages without resending them.
Specifies the indices of the system properties present on the
Under normal circumstances the minimum and maximum number of inputs to the effect are the same. If the effect supports a variable number of inputs, the ID2D1Effect::SetNumberOfInputs method can be used to choose the number that the application will enable.
+Specifies the types of properties supported by the Direct2D property interface.
+An unknown property.
An arbitrary-length string.
A 32-bit integer value constrained to be either 0 or 1.
An unsigned 32-bit integer.
A signed 32-bit integer.
A 32-bit float.
Two 32-bit float values.
Three 32-bit float values.
Four 32-bit float values.
An arbitrary number of bytes.
A returned COM or nano-COM interface.
An enumeration. The value should be treated as a UINT32 with a defined array of fields to specify the bindings to human-readable strings.
An enumeration. The value is the count of sub-properties in the array. The set of array elements will be contained in the sub-property.
A CLSID.
A 3x2 matrix of float values.
A 4x2 matrix of float values.
A 4x4 matrix of float values.
A 5x4 matrix of float values.
A nano-COM color context interface reference.
The rendering priority affects the extent to which Direct2D will throttle its rendering workload.
+Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
The render target uses hardware rendering only.
Describes how a render target is remoted and whether it should be GDI-compatible. This enumeration allows a bitwise combination of its member values.
+The render target attempts to use Direct3D command-stream remoting and uses bitmap remoting if stream remoting fails. The render target is not GDI-compatible.
The render target renders content locally and sends it to the terminal services client as a bitmap.
The render target can be used efficiently with GDI.
Values for the
Indentifiers for properties of the RGB to Hue effect.
+Identifiers for properties of the Saturation effect.
+The interpolation mode the Scale effect uses to scale the image. There are 6 scale modes that range in quality and speed.
+Identifiers for properties of the Scale effect.
+Identifiers for properties of the Sepia effect.
+The level of performance optimization for the Shadow effect.
+Identifiers for properties of the Shadow effect.
+Identifiers for properties of the Sharpen effect.
+Identifiers for properties of the Spot-diffuse lighting effect.
+The interpolation mode the Spot-diffuse lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.
+Identifiers for properties of the Spot-specular lighting effect.
+The interpolation mode the Spot-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.
+Specifies additional aspects of how a sprite batch is to be drawn, as part of a call to
Identifiers for properties of the Straighten effect.
+Values for the
Defines how the world transform, dots per inch (dpi), and stroke width affect the shape of the pen used to stroke a primitive.
+If you specify
If you specify
If you specify
Apart from the stroke, any value derived from the stroke width is not affected when the transformType is either fixed or hairline. This includes miters, line caps and so on.
It is important to distinguish between the geometry being stroked and the shape of the stroke pen. When
Here is an illustration of a stroke with dashing and a skew and stretch transform.
And here is an illustration of a fixed width stroke which does not get transformed.
+The stroke respects the currently set world transform, the dpi, and the stroke width.
The stroke does not respect the world transform but it does respect the dpi and stroke width.
The stroke is forced to 1 pixel wide (in device space) and does not respect the world transform, the dpi, or the stroke width.
Specifies the indices of the system sub-properties that may be present in any property.
+The name for the parent property.
A Boolean indicating whether the parent property is writeable.
The minimum value that can be set to the parent property.
The maximum value that can be set to the parent property.
The default value of the parent property.
An array of name/index pairs that indicate the possible values that can be set to the parent property.
An index sub-property used by the elements of the
Describes how a render target behaves when it presents its content. This enumeration allows a bitwise combination of its member values.
+The render target waits until the display refreshes to present and discards the frame upon presenting.
The render target does not discard the frame upon presenting.
The render target does not wait until the display refreshes to present.
Indicates how pixel shader sampling will be restricted. This indicates whether the vertex buffer is large and tends to change infrequently or smaller and changes frequently (typically frame over frame).
+ If the shader specifies
The pixel shader is not restricted in its sampling.
The pixel shader samples inputs only at the same scene coordinate as the output pixel and returns transparent black whenever the input pixels are also transparent black.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
The render target uses hardware rendering only.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
The render target uses hardware rendering only.
Indicates how pixel shader sampling will be restricted. This indicates whether the vertex buffer is large and tends to change infrequently or smaller and changes frequently (typically frame over frame).
+ If the shader specifies
The pixel shader is not restricted in its sampling.
The pixel shader samples inputs only at the same scene coordinate as the output pixel and returns transparent black whenever the input pixels are also transparent black.
Describes the shape at the end of a line or segment.
+The following illustration shows the available cap styles for lines or segments. The red portion of the line shows the extra area added by the line cap setting.
+A cap that does not extend past the last point of the line. Comparable to cap used for objects other than lines.
Half of a square that has a length equal to the line thickness.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
The render target uses hardware rendering only.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
The render target uses hardware rendering only.
Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.
+Not every render target supports hardware rendering. For more information, see the Render Targets Overview.
+The render target uses hardware rendering, if available; otherwise, it uses software rendering.
The render target uses software rendering only.
Defines options that should be applied to the color space.
+The color space is otherwise described, such as with a color profile.
The color space is sRGB.
Defines the direction that an elliptical arc is drawn.
+Arcs are drawn in a counterclockwise (negative-angle) direction.
Arcs are drawn in a clockwise (positive-angle) direction.
Identifiers for properties of the Table transfer effect.
+Identifiers for properties of the Temperature and Tint effect.
+Describes the antialiasing mode used for drawing text.
+This enumeration is used with the SetTextAntialiasMode of an
By default, Direct2D renders text in ClearType mode. Factors that can downgrade the default quality to grayscale or aliased:
Use the system default. See Remarks.
Use ClearType antialiasing.
Use grayscale antialiasing.
Do not use antialiasing.
Specifies the threading mode used while simultaneously creating the device, factory, and device context. +
+Resources may only be invoked serially. Device context state is not protected from multi-threaded access.
Resources may be invoked from multiple threads. Resources use interlocked reference counting and their state is protected. +
Identifiers for properties of the Tile effect.
+This effect tints the source image by multiplying the source image by the specified color. It has a single input.
The CLSID for this effect is
The interpolation mode the 3D transform effect uses on the image. There are 5 scale modes that range in quality and speed.
+Identifiers for properties of the 3D transform effect.
+Option flags for transformed image sources.
+No option flags.
Prevents the image source from being automatically scaled (by a ratio of the context DPI divided by 96) while drawn.
The turbulence noise mode for the Turbulence effect. Indicates whether to generate a bitmap based on Fractal Noise or the Turbulence function.
+Identifiers for properties of the Turbulence effect.
+Specifies how units in Direct2D will be interpreted.
+Setting the unit mode to
Units will be interpreted as device-independent pixels (1/96").
Units will be interpreted as pixels.
Describes flags that influence how the renderer interacts with a custom vertex shader.
+The logical equivalent of having no flags set.
If this flag is set, the renderer assumes that the vertex shader will cover the entire region of interest with vertices and need not clear the destination render target. If this flag is not set, the renderer assumes that the vertices do not cover the entire region interest and must clear the render target to transparent black first.
The renderer will use a depth buffer when rendering custom vertices. The depth buffer will be used for calculating occlusion information. This can result in the renderer output being draw-order dependent if it contains transparency.
Indicates that custom vertices do not overlap each other.
Indicates whether the vertex buffer changes infrequently or frequently.
+If a dynamic vertex buffer is created, Direct2D will not necessarily map the buffer directly to a Direct3D vertex buffer. Instead, a system memory copy can be copied to the rendering engine vertex buffer as the effects are rendered.
+The created vertex buffer is updated infrequently.
The created vertex buffer is changed frequently.
Identifiers for properties of the Vignette effect.
+Describes whether a window is occluded.
+If the window was occluded the last time EndDraw was called, the next time the render target calls CheckWindowState, it returns
The window is not occluded.
The window is occluded.
Specifies the chroma subsampling of the input chroma image used by the YCbCr effect.
+Specifies the interpolation mode for the YCbCr effect.
+Identifiers for properties of the YCbCr effect.
+Defines an object that paints an area. Interfaces that derive from
An
Brush space in Direct2D is specified differently than in XPS and Windows Presentation Foundation (WPF). In Direct2D, brush space is not relative to the object being drawn, but rather is the current coordinate system of the render target, transformed by the brush transform, if present. To paint an object as it would be painted by a WPF brush, you must translate the brush space origin to the upper-left corner of the object's bounding box, and then scale the brush space so that the base tile fills the bounding box of the object.
For more information about brushes, see the Brushes Overview.
+Gets or sets the degree of opacity of this brush.
+Gets or sets the transform applied to this brush.
+When the brush transform is the identity matrix, the brush appears in the same coordinate space as the render target in which it is drawn.
+Sets the degree of opacity of this brush.
+A value between zero and 1 that indicates the opacity of the brush. This value is a constant multiplier that linearly scales the alpha value of all pixels filled by the brush. The opacity values are clamped in the range 0?1 before they are multipled together.
Sets the transformation applied to the brush.
+The transformation to apply to this brush.
When you paint with a brush, it paints in the coordinate space of the render target. Brushes do not automatically position themselves to align with the object being painted; by default, they begin painting at the origin (0, 0) of the render target.
You can "move" the gradient defined by an
To align the content of an
The following illustrations show the effect of using an
The illustration on the right shows the result of transforming the
Gets the degree of opacity of this brush.
+A value between zero and 1 that indicates the opacity of the brush. This value is a constant multiplier that linearly scales the alpha value of all pixels filled by the brush. The opacity values are clamped in the range 0?1 before they are multipled together.
Gets the transform applied to this brush.
+The transform applied to this brush.
When the brush transform is the identity matrix, the brush appears in the same coordinate space as the render target in which it is drawn.
+Represents the set of transforms implemented by the effect-rendering system, which provides fixed-functionality.
+Sets the properties of the output buffer of the specified transform node.
+The number of bits and the type of the output buffer.
The number of channels in the output buffer (1 or 4).
The method returns an
Description | |
---|---|
No error occurred. | |
E_INVALIDARG | One or more arguments are not valid |
?
You can use the
The available channel depth and precision depend on the capabilities of the underlying Microsoft Direct3D device.
+Sets whether the output of the specified transform is cached.
+TRUE if the output should be cached; otherwise,
Provides factory methods and other state management for effect and transform authors.
+Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. The table data must be provided in 4-channel format.
+Precision of the input lookup table data.
Number of lookup table elements per dimension (X, Y, Z).
Buffer holding the lookup table data.
Size of the lookup table data buffer.
An array containing two values. The first value is the size in bytes from one row (X dimension) of LUT data to the next. The second value is the size in bytes from one LUT data plane (X and Y dimensions) to the next.
Receives the new lookup table instance.
If this method succeeds, it returns
Creates Direct2D resources. This interface also enables the creation of
Creates an
If this method succeeds, it returns
Creates Direct2D resources. This interface also enables the creation of
Creates an
If this method succeeds, it returns
Creates Direct2D resources. This interface also enables the creation of
Creates an
This method returns an
Creates Direct2D resources.
+The
A factory defines a set of CreateResource methods that can produce the following drawing resources:
To create an
Creates Direct2D resources.
+The
A factory defines a set of CreateResource methods that can produce the following drawing resources:
To create an
A Direct2D resource that wraps a WMF, EMF, or EMF+ metafile.
+Gets the bounds of the metafile, in device-independent pixels (DIPs), as reported in the metafile?s header.
+This method streams the contents of the command to the given metafile sink.
+The sink into which Direct2D will call back.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
Gets the bounds of the metafile, in device-independent pixels (DIPs), as reported in the metafile?s header.
+The bounds, in DIPs, of the metafile.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This interface performs all the same functions as the existing
Gets the bounds of the metafile in source space in DIPs. This corresponds to the frame rect in an EMF/EMF+.
+Gets the DPI reported by the metafile.
+Receives the horizontal DPI reported by the metafile.
Receives the vertical DPI reported by the metafile.
If this method succeeds, it returns
Gets the bounds of the metafile in source space in DIPs. This corresponds to the frame rect in an EMF/EMF+.
+The bounds, in DIPs, of the metafile.
A developer implemented interface that allows a metafile to be replayed.
+This interface performs all the same functions as the existing
This interface performs all the same functions as the existing
Provides access to metafile records, including their type, data, and flags.
+The type of metafile record being processed. Please see MS-EMF and MS-EMFPLUS for a list of record types.
The data contained in this record. Please see MS-EMF and MS-EMFPLUS for information on record data layouts.
TThe size of the data pointed to by recordData.
The set of flags set for this record. Please see MS-EMF and MS-EMFPLUS for information on record flags.
For details on the EMF and EMF+ formats, please see Microsoft technical documents MS-EMF and MS-EMFPLUS.
+A developer implemented interface that allows a metafile to be replayed.
+This method is called once for each record stored in a metafile.
+The type of the record.
The data for the record.
The byte size of the record data.
Return true if the record is successfully.
Represents a geometry resource and defines a set of helper methods for manipulating and measuring geometric shapes. Interfaces that inherit from
There are several types of Direct2D geometry objects: a simple geometry (
Direct2D geometries enable you to describe two-dimensional figures and also offer many uses, such as defining hit-test regions, clip regions, and even animation paths.
Direct2D geometries are immutable and device-independent resources created by
Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
+The amount by which to widen the geometry by stroking its outline.
The style of the stroke that widens the geometry.
A transform to apply to the geometry after the geometry is transformed and after the geometry has been stroked.
When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
+The point to test for containment.
The thickness of the stroke to apply.
The style of stroke to apply.
The transform to apply to the stroked geometry.
The numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the stroke by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
+The point to test.
The transform to apply to the geometry prior to testing for containment, or
The numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the fill by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
When this method returns, contains a
Describes the intersection between this geometry and the specified geometry. The comparison is performed by using the specified flattening tolerance.
+The geometry to test.
The transform to apply to inputGeometry, or
The maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.
When this method returns, contains a reference to a value that describes how this geometry is related to inputGeometry. You must allocate storage for this parameter.
When interpreting the returned relation value, it is important to remember that the member
For more information about how to interpret other possible return values, see
Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an
If this method succeeds, it returns
Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the default tolerance.
+The transform to apply to this geometry.
The
The
If this method succeeds, it returns
Combines this geometry with the specified geometry and stores the result in an
If this method succeeds, it returns
Computes the outline of the geometry and writes the result to an
If this method succeeds, it returns
Computes the area of the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
+The transform to apply to this geometry before computing its area.
The maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.
When this method returns, contains a reference to the area of the transformed, flattened version of this geometry. You must allocate storage for this parameter.
Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the default tolerance.
+The distance along the geometry of the point and tangent to find. If this distance is less then 0, this method calculates the first point in the geometry. If this distance is greater than the length of the geometry, this method calculates the last point in the geometry.
The transform to apply to the geometry before calculating the specified point and tangent.
The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.
When this method returns, contains a reference to the tangent vector at the specified distance along the geometry. If the geometry is empty, this vector contains NaN as its x and y values. You must allocate storage for this parameter.
The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.
Widens the geometry by the specified stroke and writes the result to an
If this method succeeds, it returns
Represents a composite geometry, composed of other
Geometry groups are a convenient way to group several geometries simultaneously so all figures of several distinct geometries are concatenated into one.
+Indicates how the intersecting areas of the geometries contained in this geometry group are combined.
+Indicates the number of geometry objects in the geometry group.
+Indicates how the intersecting areas of the geometries contained in this geometry group are combined.
+A value that indicates how the intersecting areas of the geometries contained in this geometry group are combined.
Indicates the number of geometry objects in the geometry group.
+The number of geometries in the
Retrieves the geometries in the geometry group.
+When this method returns, contains the address of a reference to an array of geometries to be filled by this method. The length of the array is specified by the geometryCount parameter. If the array is
A value indicating the number of geometries to return in the geometries array. If this value is less than the number of geometries in the geometry group, the remaining geometries are omitted. If this value is larger than the number of geometries in the geometry group, the extra geometries are set to
The returned geometries are referenced and counted, and the caller must release them.
+Encapsulates a device- and transform-dependent representation of a filled or stroked geometry. Callers should consider creating a geometry realization when they wish to accelerate repeated rendering of a given geometry. This interface exposes no methods.
+Encapsulates a device- and transform-dependent representation of a filled or stroked geometry. Callers should consider creating a geometry realization when they wish to accelerate repeated rendering of a given geometry. This interface exposes no methods.
+Creates a device-dependent representation of the fill of the geometry that can be subsequently rendered.
+The geometry to realize.
The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This method is used in conjunction with
If the provided stroke style specifies a stroke transform type other than
Creates a device-dependent representation of the stroke of a geometry that can be subsequently rendered.
+The geometry to realize.
The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.
The width of the stroke. This parameter shares the same units as the coordinates of the geometry.
The stroke style (optional).
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
?
This method is used in conjunction with
If the provided stroke style specifies a stroke transform type other than
Describes a geometric path that can contain lines, arcs, cubic Bezier curves, and quadratic Bezier curves.
+The
A geometry sink consists of one or more figures. Each figure is made up of one or more line, curve, or arc segments. To create a figure, call the BeginFigure method, specify the figure's start point, and then use its Add methods (such as AddLine and AddBezier) to add segments. When you are finished adding segments, call the EndFigure method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the Close method.
+Describes a geometric path that can contain lines, arcs, cubic Bezier curves, and quadratic Bezier curves.
+The
A geometry sink consists of one or more figures. Each figure is made up of one or more line, curve, or arc segments. To create a figure, call the BeginFigure method, specify the figure's start point, and then use its Add methods (such as AddLine and AddBezier) to add segments. When you are finished adding segments, call the EndFigure method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the Close method.
+Creates a line segment between the current point and the specified end point and adds it to the geometry sink.
+The end point of the line to draw.
Creates a quadratic Bezier curve between the current point and the specified end point.
+A structure that describes the control point and the end point of the quadratic Bezier curve to add.
Adds a sequence of quadratic Bezier segments as an array in a single call.
+An array of a sequence of quadratic Bezier segments.
A value indicating the number of quadratic Bezier segments in beziers.
Describes a geometric path that can contain lines, arcs, cubic Bezier curves, and quadratic Bezier curves.
+The
A geometry sink consists of one or more figures. Each figure is made up of one or more line, curve, or arc segments. To create a figure, call the BeginFigure method, specify the figure's start point, and then use its Add methods (such as AddLine and AddBezier) to add segments. When you are finished adding segments, call the EndFigure method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the Close method.
+Represents a device-dependent representation of a gradient mesh composed of patches. Use the
Returns the number of patches that make up this gradient mesh.
+Returns the number of patches that make up this gradient mesh.
+Returns the number of patches that make up this gradient mesh.
Returns a subset of the patches that make up this gradient mesh.
+Index of the first patch to return.
A reference to the array to be filled with the patch data.
The number of patches to be returned.
Represents an collection of
Retrieves the number of gradient stops in the collection.
+Indicates the gamma space in which the gradient stops are interpolated.
+Indicates the behavior of the gradient outside the normalized gradient range.
+Retrieves the number of gradient stops in the collection.
+The number of gradient stops in the collection.
Copies the gradient stops from the collection into an array of
Gradient stops are copied in order of position, starting with the gradient stop with the smallest position value and progressing to the gradient stop with the largest position value.
+Indicates the gamma space in which the gradient stops are interpolated.
+The gamma space in which the gradient stops are interpolated.
Indicates the behavior of the gradient outside the normalized gradient range.
+The behavior of the gradient outside the [0,1] normalized gradient range.
Represents a collection of
Gets the color space of the input colors as well as the space in which gradient stops are interpolated.
+If this object was created using
Gets the color space after interpolation has occurred.
+If you create using
Gets the precision of the gradient buffer.
+If this object was created using
Retrieves the color interpolation mode that the gradient stop collection uses.
+Copies the gradient stops from the collection into memory.
+When this method returns, contains a reference to a one-dimensional array of
The number of gradient stops to copy.
If the
If gradientStopsCount is less than the number of gradient stops in the collection, the remaining gradient stops are omitted. If gradientStopsCount is larger than the number of gradient stops in the collection, the extra gradient stops are set to
Gets the color space of the input colors as well as the space in which gradient stops are interpolated.
+This method returns the color space.
If this object was created using
Gets the color space after interpolation has occurred.
+This method returns the color space.
If you create using
Gets the precision of the gradient buffer.
+The buffer precision of the gradient buffer.
If this object was created using
Retrieves the color interpolation mode that the gradient stop collection uses.
+The color interpolation mode.
Represents a producer of pixels that can fill an arbitrary 2D plane.
+An
Images are evaluated lazily. If the type of image passed in is concrete, then the image can be directly sampled from. Other images can act only as a source of pixels and can produce content only as a result of calling
Represents a brush based on an
Gets or sets the image associated with the image brush.
+Gets or sets the extend mode of the image brush on the x-axis.
+Gets or sets the extend mode of the image brush on the y-axis of the image.
+Gets or sets the interpolation mode of the image brush.
+Gets or sets the rectangle that will be used as the bounds of the image when drawn as an image brush.
+Sets the image associated with the provided image brush.
+The image to be associated with the image brush.
Sets how the content inside the source rectangle in the image brush will be extended on the x-axis.
+The extend mode on the x-axis of the image.
Sets the extend mode on the y-axis.
+The extend mode on the y-axis of the image.
Sets the interpolation mode for the image brush.
+How the contents of the image will be interpolated to handle the brush transform.
Sets the source rectangle in the image brush.
+The source rectangle that defines the portion of the image to tile.
The top left corner of the sourceRectangle parameter maps to the brush space origin. That is, if the brush and world transforms are both identity, the portion of the image in the top left corner of the source rectangle will be rendered at (0,0) in the render target.
The source rectangle will be expanded differently depending on whether the input image is based on pixels (a bitmap or effect) or by a command list.
Gets the image associated with the image brush.
+When this method returns, contains the address of a reference to the image associated with this brush.
Gets the extend mode of the image brush on the x-axis.
+This method returns the x-extend mode.
Gets the extend mode of the image brush on the y-axis of the image.
+This method returns the y-extend mode.
Gets the interpolation mode of the image brush.
+This method returns the interpolation mode.
Gets the rectangle that will be used as the bounds of the image when drawn as an image brush.
+When this method returns, contains the address of the output source rectangle.
Represents a producer of pixels that can fill an arbitrary 2D plane.
+Allows the operating system to free the video memory of resources by discarding their content.
+OfferResources returns:
Restores access to resources that were previously offered by calling OfferResources.
+ReclaimResources returns:
After you call OfferResources to offer one or more resources, + you must call TryReclaimResources before you can use those resources again. + You must check the value in the resourcesDiscarded to determine whether the resource?s content was discarded. + If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.
+Produces 2D pixel data that has been sourced from WIC.
+ Create an an instance of
Retrieves the underlying bitmap image source from the Windows Imaging Component (WIC).
+Ensures that a specified region of the image source cache is populated. This method can be used to minimize glitches by performing expensive work to populate caches outside of a rendering loop. This method can also be used to speculatively load image data before it is needed by drawing routines.
+Specifies the region of the image, in pixels, that should be populated in the cache. By default, this is the entire extent of the image.
If this method succeeds, it returns
This API loads image data into caches of image sources, if that data was not already cached. It does not trim pre-existing caches, if any. More areas within the cache can be populated than actually requested.
?
The provided region must be constructed to include the scale with which the image source will subsequently be drawn. These coordinates must be provided in local coordinates. This means that they must be adjusted prior to calling the API according to the DPI and other relevant transforms, which can include the world transform and brush transforms.
This operation is only supported when the image source has been initialized using the
This method trims the populated regions of the image source cache to just the specified rectangle.
+Specifies the region of the image, in pixels, which should be preserved in the image source cache. Regions which are outside of the rectangle are evicted from the cache. By default, this is an empty rectangle, meaning that the entire image is evicted from the cache.
If this method succeeds, it returns
The provided region must be constructed to include the scale at which the image source will be drawn at. These coordinates must be provided in local coordinates. This means that they must be adjusted prior to calling the API according to the DPI and other relevant transforms, which can include the world transform and brush transforms.
?
This method will fail if on-demand caching was not requested when the image source was created.
?
As with
This operation is only supported when the image source has been initialized using the
Retrieves the underlying bitmap image source from the Windows Imaging Component (WIC).
+On return contains the bitmap image source.
Represents a single continuous stroke of variable-width ink, as defined by a series of Bezier segments and widths.
+Retrieves or sets the starting point for this ink object.
+Updates the last segment in this ink object with new control points.
+Returns the number of segments in this ink object.
+Sets the starting point for this ink object. This determines where this ink object will start rendering.
+The new starting point for this ink object.
Retrieves the starting point for this ink object.
+The starting point for this ink object.
Adds the given segments to the end of this ink object.
+A reference to an array of segments to be added to this ink object.
The number of segments to be added to this ink object.
If this method succeeds, it returns
Removes the given number of segments from the end of this ink object.
+The number of segments to be removed from the end of this ink object. Note that segmentsCount must be less or equal to the number of segments in the ink object.
If this method succeeds, it returns
Updates the specified segments in this ink object with new control points.
+The index of the first segment in this ink object to update.
A reference to the array of segment data to be used in the update.
The number of segments in this ink object that will be updated with new data. Note that segmentsCount must be less than or equal to the number of segments in the ink object minus startSegment.
If this method succeeds, it returns
Updates the last segment in this ink object with new control points.
+A reference to the segment data with which to overwrite this ink object's last segment. Note that if there are currently no segments in the ink object, SetSegmentsAtEnd will return an error.
If this method succeeds, it returns
Returns the number of segments in this ink object.
+Returns the number of segments in this ink object.
Retrieves the specified subset of segments stored in this ink object.
+The index of the first segment in this ink object to retrieve.
When this method returns, contains a reference to an array of retrieved segments.
The number of segments to retrieve. Note that segmentsCount must be less than or equal to the number of segments in the ink object minus startSegment.
If this method succeeds, it returns
Retrieves a geometric representation of this ink object.
+The ink style to be used in determining the geometric representation.
The world transform to be used in determining the geometric representation.
The flattening tolerance to be used in determining the geometric representation.
The geometry sink to which the geometry representation will be streamed.
If this method succeeds, it returns
Retrieve the bounds of the geometry, with an optional applied transform.
+The ink style to be used in determining the bounds of this ink object.
The world transform to be used in determining the bounds of this ink object.
When this method returns, contains the bounds of this ink object.
If this method succeeds, it returns
Represents a collection of style properties to be used by methods like
Retrieves or sets the transform to be applied to this style's nib shape.
+Retrieves or sets the pre-transform nib shape for this style.
+Sets the transform to apply to this style's nib shape.
+The transform to apply to this style?s nib shape. Note that the translation components of the transform matrix are ignored for the purposes of rendering.
Retrieves the transform to be applied to this style's nib shape.
+When this method returns, contains a reference to the transform to be applied to this style's nib shape.
Sets the pre-transform nib shape for this style.
+The pre-transform nib shape to use in this style.
Retrieves the pre-transform nib shape for this style.
+Returns the pre-transform nib shape for this style.
Represents the backing store required to render a layer.
+To create a layer, call the CreateLayer method of the render target where the layer will be used. To draw to a layer, push the layer to the render target stack by calling the PushLayer method. After you have finished drawing to the layer, call the PopLayer method.
Between PushLayer and PopLayer calls, the layer is in use and cannot be used by another render target.
If the size of the layer is not specified, the corresponding PushLayer call determines the minimum layer size, based on the layer content bounds and the geometric mask. The layer resource can be larger than the size required by PushLayer without any rendering artifacts.
If the size of a layer is specified, or if the layer has been used and the required backing store size as calculated during PushLayer is larger than the layer, then the layer resource is expanded on each axis monotonically to ensure that it is large enough. The layer resource never shrinks in size.
+Gets the size of the layer in device-independent pixels.
+Gets the size of the layer in device-independent pixels.
+The size of the layer in device-independent pixels.
Paints an area with a linear gradient.
+An
The start point and end point are described in the brush space and are mappped to the render target when the brush is used. Note the starting and ending coordinates are absolute, not relative to the render target size. A value of (0, 0) maps to the upper-left corner of the render target, while a value of (1, 1) maps one pixel diagonally away from (0, 0). If there is a nonidentity brush transform or render target transform, the brush start point and end point are also transformed.
It is possible to specify a gradient axis that does not completely fill the area that is being painted. When this occurs, the
Retrieves or sets the starting coordinates of the linear gradient.
+The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.
+Retrieves or sets the ending coordinates of the linear gradient.
+The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.
+ Retrieves the
Sets the starting coordinates of the linear gradient in the brush's coordinate space.
+The starting two-dimensional coordinates of the linear gradient, in the brush's coordinate space.
The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.
+Sets the ending coordinates of the linear gradient in the brush's coordinate space.
+The ending two-dimensional coordinates of the linear gradient, in the brush's coordinate space.
The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.
+Retrieves the starting coordinates of the linear gradient.
+The starting two-dimensional coordinates of the linear gradient, in the brush's coordinate space.
The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.
+Retrieves the ending coordinates of the linear gradient.
+The ending two-dimensional coordinates of the linear gradient, in the brush's coordinate space.
The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.
+ Retrieves the
A container for 3D lookup table data that can be passed to the LookupTable3D effect.
An ID2DLookupTable3D instance is created using
Represents a set of vertices that form a list of triangles.
+Opens the mesh for population.
+When this method returns, contains a reference to a reference to an
If this method succeeds, it returns
A locking mechanism from a Direct2D factory that Direct2D uses to control exclusive resource access in an app that is uses multiple threads.
+ You can get an
You should use this lock while doing any operation on a Direct3D/DXGI surface. Direct2D will wait on any call until you leave the critical section.
Note?? Normal rendering is guarded automatically by an internal Direct2D lock.? + Returns whether the Direct2D factory was created with the
Returns whether the Direct2D factory was created with the
Returns true if the Direct2D factory was created as multi-threaded, or false if it was created as single-threaded.
Enters the Direct2D API critical section, if it exists.
+Leaves the Direct2D API critical section, if it exists.
+Instructs the effect-rendering system to offset an input bitmap without inserting a rendering pass.
+Because a rendering pass is not required, the interface derives from a transform node. This allows it to be inserted into a graph but does not allow an output buffer to be specified.
+Sets the offset in the current offset transform.
+The new offset to apply to the offset transform.
Gets the offset currently in the offset transform.
+The current transform offset.
Represents a complex shape that may be composed of arcs, curves, and lines.
+An
Retrieves the number of segments in the path geometry.
+Retrieves the number of figures in the path geometry.
+Retrieves the geometry sink that is used to populate the path geometry with figures and segments.
+When this method returns, geometrySink contains the address of a reference to the geometry sink that is used to populate the path geometry with figures and segments. This parameter is passed uninitialized.
Because path geometries are immutable and can only be populated once, it is an error to call Open on a path geometry more than once.
Note that the fill mode defaults to
Copies the contents of the path geometry to the specified
If this method succeeds, it returns
Retrieves the number of segments in the path geometry.
+A reference that receives the number of segments in the path geometry when this method returns. You must allocate storage for this parameter.
If this method succeeds, it returns
Retrieves the number of figures in the path geometry.
+A reference that receives the number of figures in the path geometry when this method returns. You must allocate storage for this parameter.
If this method succeeds, it returns
The
This interface adds functionality to
Computes the point that exists at a given distance along the path geometry along with the index of the segment the point is on and the directional vector at that point.
+The distance to walk along the path.
The index of the segment at which to begin walking. Note: This index is global to the entire path, not just a particular figure.
The transform to apply to the path prior to walking.
The flattening tolerance to use when walking along an arc or Bezier segment. The flattening tolerance is the maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.
When this method returns, contains a description of the point that can be found at the given location.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | One of the inputs was in an invalid range. |
?
Converts Direct2D primitives stored in an
Converts Direct2D primitives in the passed-in command list into a fixed page representation for use by the print subsystem.
+The command list that contains the rendering operations.
The size of the page to add.
The print ticket stream.
Contains the first label for subsequent drawing operations. This parameter is passed uninitialized. If
Contains the second label for subsequent drawing operations. This parameter is passed uninitialized. If
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
The print job is already finished. |
?
Passes all remaining resources to the print sub-system, then clean up and close the current print job.
+The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
The print job is already finished. |
?
[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
TBD
+[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
TBD
+Represents a set of run-time bindable and discoverable properties that allow a data-driven application to modify the state of a Direct2D effect.
+This interface supports access through either indices or property names. In addition to top-level properties, each property in an
Gets the number of top-level properties.
+This method returns the number of custom properties on the
Gets the number of top-level properties.
+This method returns the number of custom (non-system) properties that can be accessed by the object.
This method returns the number of custom properties on the
Gets the number of characters for the given property name. This is a template overload. See Remarks.
+The index of the property name to retrieve.
This method returns the size in characters of the name corresponding to the given property index, or zero if the property index does not exist.
The value returned by this method can be used to ensure that the buffer size for GetPropertyName is appropriate.
template<typename U> UINT32 GetPropertyNameLength( U index ) CONST; +
Gets the
This method returns a
If the property does not exist, the method returns
Gets the index corresponding to the given property name.
+The name of the property to retrieve.
The index of the corresponding property name.
If the property does not exist, this method returns D2D1_INVALID_PROPERTY_INDEX. This reserved value will never map to a valid index and will cause
Sets the corresponding property by index. This is a template overload. See Remarks.
+The index of the property to set.
The data to set.
The method returns an
Description | |
---|---|
No error occurred. | |
The specified property does not exist. | |
E_OUTOFMEMORY | Failed to allocate necessary memory. |
D3DERR_OUT_OF_VIDEO_MEMORY | Failed to allocate required video memory. |
E_INVALIDARG | One or more arguments are invalid. |
E_FAIL | Unspecified failure. |
?
template<typename T, typename U>
Gets the property value by name. This is a template overload. See Remarks.
+The property name to get.
Returns the value requested.
If propertyName does not exist, no information is retrieved.
Any error not in the standard set returned by a property implementation will be mapped into the standard error range.
template<typename T> T GetValueByName( _In_ PCWSTR propertyName ) const; +
Gets the value of the property by index. This is a template overload. See Remarks.
+The index of the property from which the value is to be obtained.
Returns the value requested.
template<typename T, typename U> T GetValue( U index ) const; +
Gets the size of the property value in bytes, using the property index. This is a template overload. See Remarks.
+The index of the property.
This method returns size of the value in bytes, using the property index
This method returns zero if index does not exist.
template<typename U> UINT32 GetValueSize( U index ) CONST; +
Gets the sub-properties of the provided property by index. This is a template overload. See Remarks.
+The index of the sub-properties to be retrieved.
When this method returns, contains the address of a reference to the sub-properties.
If there are no sub-properties, subProperties will be
template<typename U>
Paints an area with a radial gradient.
+The
The brush maps the gradient stop position 0.0f of the gradient origin, and the position 1.0f is mapped to the ellipse boundary. When the gradient origin is within the ellipse, the contents of the ellipse enclose the entire [0, 1] range of the brush gradient stops. If the gradient origin is outside the bounds of the ellipse, the brush still works, but its gradient is not well-defined.
The start point and end point are described in the brush space and are mappped to the render target when the brush is used. Note the starting and ending coordinates are absolute, not relative to the render target size. A value of (0, 0) maps to the upper-left corner of the render target, while a value of (1, 1) maps just one pixel diagonally away from (0, 0). If there is a nonidentity brush transform or render target transform, the brush ellipse and gradient origin are also transformed.
It is possible to specify an ellipse that does not completely fill area being painted. When this occurs, the
Retrieves or sets the center of the gradient ellipse.
+Retrieves or sets the offset of the gradient origin relative to the gradient ellipse's center.
+Retrieves or sets the x-radius of the gradient ellipse.
+Retrieves or sets the y-radius of the gradient ellipse.
+Retrieves the
Specifies the center of the gradient ellipse in the brush's coordinate space.
+The center of the gradient ellipse, in the brush's coordinate space.
Specifies the offset of the gradient origin relative to the gradient ellipse's center.
+The offset of the gradient origin from the center of the gradient ellipse.
Specifies the x-radius of the gradient ellipse, in the brush's coordinate space.
+The x-radius of the gradient ellipse. This value is in the brush's coordinate space.
Specifies the y-radius of the gradient ellipse, in the brush's coordinate space.
+The y-radius of the gradient ellipse. This value is in the brush's coordinate space.
Retrieves the center of the gradient ellipse.
+The center of the gradient ellipse. This value is expressed in the brush's coordinate space.
Retrieves the offset of the gradient origin relative to the gradient ellipse's center.
+The offset of the gradient origin from the center of the gradient ellipse. This value is expressed in the brush's coordinate space.
Retrieves the x-radius of the gradient ellipse.
+The x-radius of the gradient ellipse. This value is expressed in the brush's coordinate space.
Retrieves the y-radius of the gradient ellipse.
+The y-radius of the gradient ellipse. This value is expressed in the brush's coordinate space.
Retrieves the
Describes a two-dimensional rectangle.
+Retrieves the rectangle that describes the rectangle geometry's dimensions.
+Retrieves the rectangle that describes the rectangle geometry's dimensions.
+Contains a reference to a rectangle that describes the rectangle geometry's dimensions when this method returns. You must allocate storage for this parameter.
Describes the render information common to all of the various transform implementations.
+This interface is used by a transform implementation to first describe and then indicate changes to the rendering pass that corresponds to the transform.
+Specifies that the output of the transform in which the render information is encapsulated is or is not cached.
+Provides an estimated hint of shader execution cost to D2D.
+The instruction count may be set according to the number of instructions in the shader. This information is used as a hint when rendering extremely large images. Calling this API is optional, but it may improve performance if you provide an accurate number.
Note??Instructions that occur in a loop should be counted according to the number of loop iterations.? +Sets how a specific input to the transform should be handled by the renderer in terms of sampling.
+The index of the input that will have the input description applied.
The description of the input to be applied to the transform.
The method returns an
Description | |
---|---|
No error occurred. | |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
The input description must be matched correctly by the effect shader code.
+Allows a caller to control the output precision and channel-depth of the transform in which the render information is encapsulated.
+The type of buffer that should be used as an output from this transform.
The number of channels that will be used on the output buffer.
If the method succeeds, it returns
If the output precision of the transform is not specified, then it will default to the precision specified on the Direct2D device context. The maximum of 16bpc UNORM and 16bpc FLOAT is 32bpc FLOAT.
The output channel depth will match the maximum of the input channel depths if the channel depth is
There is no global output channel depth, this is always left to the control of the transforms.
+Specifies that the output of the transform in which the render information is encapsulated is or is not cached.
+TRUE if the output of the transform is cached; otherwise,
Provides an estimated hint of shader execution cost to D2D.
+An approximate instruction count of the associated shader.
The instruction count may be set according to the number of instructions in the shader. This information is used as a hint when rendering extremely large images. Calling this API is optional, but it may improve performance if you provide an accurate number.
Note??Instructions that occur in a loop should be counted according to the number of loop iterations.? +Represents an object that can receive drawing commands. Interfaces that inherit from
Your application should create render targets once and hold onto them for the life of the application or until the render target's EndDraw method returns the
Gets or sets the current transform of the render target.
+Retrieves or sets the current antialiasing mode for nontext drawing operations.
+Gets or sets the current antialiasing mode for text and glyph drawing operations.
+Retrieves or sets the render target's current text rendering options.
+If the settings specified by textRenderingParams are incompatible with the render target's text antialiasing mode (specified by SetTextAntialiasMode), subsequent text and glyph drawing operations will fail and put the render target into an error state.
+Retrieves the pixel format and alpha mode of the render target.
+Returns the size of the render target in device-independent pixels.
+Returns the size of the render target in device pixels.
+Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.
+This method returns the maximum texture size of the Direct3D device.
Note??The software renderer and WARP devices return the value of 16 megapixels (16*1024*1024). You can create a Direct2D texture that is this size, but not a Direct3D texture that is this size.? +Creates a Direct2D bitmap from a reference to in-memory source data.
+The dimension of the bitmap to create in pixels.
A reference to the memory location of the image data, or
The byte count of each scanline, which is equal to (the image width in pixels ? the number of bytes per pixel) + memory padding. If srcData is
The pixel format and dots per inch (DPI) of the bitmap to create.
When this method returns, contains a reference to a reference to the new bitmap. This parameter is passed uninitialized.
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Before Direct2D can load a WIC bitmap, that bitmap must be converted to a supported pixel format and alpha mode. For a list of supported pixel formats and alpha modes, see Supported Pixel Formats and Alpha Modes.
+Creates an
If this method succeeds, it returns
The CreateSharedBitmap method is useful for efficiently reusing bitmap data and can also be used to provide interoperability with Direct3D.
+Creates an
If this method succeeds, it returns
Creates a new
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target and has the same size, DPI, and pixel format (but not alpha mode) as the current render target.
+When this method returns, contains a reference to a reference to a new bitmap render target. This parameter is passed uninitialized.
If this method succeeds, it returns
The bitmap render target created by this method is not compatible with GDI and has an alpha mode of
Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.
+If (0, 0) is specified, no backing store is created behind the layer resource. The layer resource is allocated to the minimum size when PushLayer is called.
When the method returns, contains a reference to a reference to the new layer. This parameter is passed uninitialized.
If this method succeeds, it returns
Regardless of whether a size is initially specified, the layer automatically resizes as needed.
+Create a mesh that uses triangles to describe a shape.
+When this method returns, contains a reference to a reference to the new mesh.
If this method succeeds, it returns
To populate a mesh, use its Open method to obtain an
Draws a line between the specified points using the specified stroke style.
+The start point of the line, in device-independent pixels.
The end point of the line, in device-independent pixels.
The brush used to paint the line's stroke.
The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.
The style of stroke to paint, or
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawLine) failed, check the result returned by the
Draws the outline of a rectangle that has the specified dimensions and stroke style.
+The dimensions of the rectangle to draw, in device-independent pixels.
The brush used to paint the rectangle's stroke.
The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.
The style of stroke to paint, or
When this method fails, it does not return an error code. To determine whether a drawing method (such as DrawRectangle) failed, check the result returned by the
Paints the interior of the specified rectangle.
+The dimension of the rectangle to paint, in device-independent pixels.
The brush used to paint the rectangle's interior.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as FillRectangle) failed, check the result returned by the
Draws the outline of the specified rounded rectangle using the specified stroke style.
+The dimensions of the rounded rectangle to draw, in device-independent pixels.
The brush used to paint the rounded rectangle's outline.
The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.
The style of the rounded rectangle's stroke, or
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawRoundedRectangle) failed, check the result returned by the
Paints the interior of the specified rounded rectangle.
+The dimensions of the rounded rectangle to paint, in device-independent pixels.
The brush used to paint the interior of the rounded rectangle.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as FillRoundedRectangle) failed, check the result returned by the
Draws the outline of the specified ellipse using the specified stroke style.
+The position and radius of the ellipse to draw, in device-independent pixels.
The brush used to paint the ellipse's outline.
The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.
The style of stroke to apply to the ellipse's outline, or
The DrawEllipse method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawEllipse) failed, check the result returned by the
Paints the interior of the specified ellipse.
+The position and radius, in device-independent pixels, of the ellipse to paint.
The brush used to paint the interior of the ellipse.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as FillEllipse) failed, check the result returned by the
Draws the outline of the specified geometry using the specified stroke style.
+The geometry to draw.
The brush used to paint the geometry's stroke.
The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.
The style of stroke to apply to the geometry's outline, or
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawGeometry) failed, check the result returned by the
Paints the interior of the specified geometry.
+The geometry to paint.
The brush used to paint the geometry's interior.
The opacity mask to apply to the geometry, or
If the opacityBrush parameter is not
When this method fails, it does not return an error code. To determine whether a drawing operation (such as FillGeometry) failed, check the result returned by the
Paints the interior of the specified mesh.
+The mesh to paint.
The brush used to paint the mesh.
The current antialias mode of the render target must be
FillMesh does not expect a particular winding order for the triangles in the
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as FillMesh) failed, check the result returned by the
For this method to work properly, the render target must be using the
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as FillOpacityMask) failed, check the result returned by the
Draws the specified bitmap after scaling it to the size of the specified rectangle.
+The bitmap to render.
The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. If the rectangle is not well-ordered, nothing is drawn, but the render target does not enter an error state.
A value between 0.0f and 1.0f, inclusive, that specifies the opacity value to be applied to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. Default is 1.0f.
The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. The default value is
The size and position, in device-independent pixels in the bitmap's coordinate space, of the area within the bitmap to draw;
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawBitmap) failed, check the result returned by the
Draws the specified text using the format information provided by an
To create an
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawText) failed, check the result returned by the
Draws the formatted text described by the specified
When drawing the same text repeatedly, using the DrawTextLayout method is more efficient than using the DrawText method because the text doesn't need to be formatted and the layout processed with each call.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawTextLayout) failed, check the result returned by the
Draws the specified glyphs.
+The origin, in device-independent pixels, of the glyphs' baseline.
The glyphs to render.
The brush used to paint the specified glyphs.
A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawGlyphRun) failed, check the result returned by the
Gets the current transform of the render target.
+When this returns, contains the current transform of the render target. This parameter is passed uninitialized.
Sets the antialiasing mode of the render target. The antialiasing mode applies to all subsequent drawing operations, excluding text and glyph drawing operations.
+The antialiasing mode for future drawing operations.
To specify the antialiasing mode for text and glyph operations, use the SetTextAntialiasMode method.
+Retrieves the current antialiasing mode for nontext drawing operations.
+The current antialiasing mode for nontext drawing operations.
Specifies the antialiasing mode to use for subsequent text and glyph drawing operations.
+The antialiasing mode to use for subsequent text and glyph drawing operations.
Gets the current antialiasing mode for text and glyph drawing operations.
+The current antialiasing mode for text and glyph drawing operations.
Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.
+The text rendering options to be applied to all subsequent text and glyph drawing operations;
If the settings specified by textRenderingParams are incompatible with the render target's text antialiasing mode (specified by SetTextAntialiasMode), subsequent text and glyph drawing operations will fail and put the render target into an error state.
+Retrieves the render target's current text rendering options.
+When this method returns, textRenderingParamscontains the address of a reference to the render target's current text rendering options.
If the settings specified by textRenderingParams are incompatible with the render target's text antialiasing mode (specified by SetTextAntialiasMode), subsequent text and glyph drawing operations will fail and put the render target into an error state.
+Specifies a label for subsequent drawing operations.
+A label to apply to subsequent drawing operations.
A label to apply to subsequent drawing operations.
The labels specified by this method are printed by debug error messages. If no tag is set, the default value for each tag is 0.
+Gets the label for subsequent drawing operations.
+When this method returns, contains the first label for subsequent drawing operations. This parameter is passed uninitialized. If
When this method returns, contains the second label for subsequent drawing operations. This parameter is passed uninitialized. If
If the same address is passed for both parameters, both parameters receive the value of the second tag.
+Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer is called.
+The PushLayer method allows a caller to begin redirecting rendering to a layer. All rendering operations are valid in a layer. The location of the layer is affected by the world transform set on the render target.
Each PushLayer must have a matching PopLayer call. If there are more PopLayer calls than PushLayer calls, the render target is placed into an error state. If Flush is called before all outstanding layers are popped, the render target is placed into an error state, and an error is returned. The error state can be cleared by a call to EndDraw.
A particular
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as PushLayer) failed, check the result returned by the
Stops redirecting drawing operations to the layer that is specified by the last PushLayer call.
+A PopLayer must match a previous PushLayer call.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as PopLayer) failed, check the result returned by the
Executes all pending drawing commands.
+When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.
When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.
If the method succeeds, it returns
This command does not flush the Direct3D device context that is associated with the render target.
Calling this method resets the error state of the render target.
+Saves the current drawing state to the specified
Sets the render target's drawing state to that of the specified
Specifies a rectangle to which all subsequent drawing operations are clipped.
+The size and position of the clipping area, in device-independent pixels.
The antialiasing mode that is used to draw the edges of clip rects that have subpixel boundaries, and to blend the clip with the scene contents. The blending is performed once when the PopAxisAlignedClip method is called, and does not apply to each primitive within the layer.
The clipRect is transformed by the current world transform set on the render target. After the transform is applied to the clipRect that is passed in, the axis-aligned bounding box for the clipRect is computed. For efficiency, the contents are clipped to this axis-aligned bounding box and not to the original clipRect that is passed in.
The following diagrams show how a rotation transform is applied to the render target, the resulting clipRect, and a calculated axis-aligned bounding box.
Assume the rectangle in the following illustration is a render target that is aligned to the screen pixels.
Apply a rotation transform to the render target. In the following illustration, the black rectangle represents the original render target and the red dashed rectangle represents the transformed render target.
After calling PushAxisAlignedClip, the rotation transform is applied to the clipRect. In the following illustration, the blue rectangle represents the transformed clipRect.
The axis-aligned bounding box is calculated. The green dashed rectangle represents the bounding box in the following illustration. All contents are clipped to this axis-aligned bounding box.
The PushAxisAlignedClip and PopAxisAlignedClip must match. Otherwise, the error state is set. For the render target to continue receiving new commands, you can call Flush to clear the error.
A PushAxisAlignedClip and PopAxisAlignedClip pair can occur around or within a PushLayer and PopLayer, but cannot overlap. For example, the sequence of PushAxisAlignedClip, PushLayer, PopLayer, PopAxisAlignedClip is valid, but the sequence of PushAxisAlignedClip, PushLayer, PopAxisAlignedClip, PopLayer is invalid.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as PushAxisAlignedClip) failed, check the result returned by the
Removes the last axis-aligned clip from the render target. After this method is called, the clip is no longer applied to subsequent drawing operations.
+A PushAxisAlignedClip/PopAxisAlignedClip pair can occur around or within a PushLayer/PopLayer pair, but may not overlap. For example, a PushAxisAlignedClip, PushLayer, PopLayer, PopAxisAlignedClip sequence is valid, but a PushAxisAlignedClip, PushLayer, PopAxisAlignedClip, PopLayer sequence is not.
PopAxisAlignedClip must be called once for every call to PushAxisAlignedClip.
For an example, see How to Clip with an Axis-Aligned Clip Rectangle.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as PopAxisAlignedClip) failed, check the result returned by the
Clears the drawing area to the specified color.
+The color to which the drawing area is cleared, or
Direct2D interprets the clearColor as straight alpha (not premultiplied). If the render target's alpha mode is
If the render target has an active clip (specified by PushAxisAlignedClip), the clear command is applied only to the area within the clip region.
+Initiates drawing on this render target.
+Drawing operations can only be issued between a BeginDraw and EndDraw call.
BeginDraw and EndDraw are used to indicate that a render target is in use by the Direct2D system. Different implementations of
The BeginDraw method must be called before rendering operations can be called, though state-setting and state-retrieval operations can be performed even outside of BeginDraw/EndDraw.
After BeginDraw is called, a render target will normally build up a batch of rendering commands, but defer processing of these commands until either an internal buffer is full, the Flush method is called, or until EndDraw is called. The EndDraw method causes any batched drawing operations to complete, and then returns an
If EndDraw is called without a matched call to BeginDraw, it returns an error indicating that BeginDraw must be called before EndDraw. Calling BeginDraw twice on a render target puts the target into an error state where nothing further is drawn, and returns an appropriate
Ends drawing operations on the render target and indicates the current error state and associated tags.
+When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.
When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.
If the method succeeds, it returns
Drawing operations can only be issued between a BeginDraw and EndDraw call.
BeginDraw and EndDraw are use to indicate that a render target is in use by the Direct2D system. Different implementations of
The BeginDraw method must be called before rendering operations can be called, though state-setting and state-retrieval operations can be performed even outside of BeginDraw/EndDraw.
After BeginDraw is called, a render target will normally build up a batch of rendering commands, but defer processing of these commands until either an internal buffer is full, the Flush method is called, or until EndDraw is called. The EndDraw method causes any batched drawing operations to complete, and then returns an
If EndDraw is called without a matched call to BeginDraw, it returns an error indicating that BeginDraw must be called before EndDraw. Calling BeginDraw twice on a render target puts the target into an error state where nothing further is drawn, and returns an appropriate
Retrieves the pixel format and alpha mode of the render target.
+The pixel format and alpha mode of the render target.
Sets the dots per inch (DPI) of the render target.
+A value greater than or equal to zero that specifies the horizontal DPI of the render target.
A value greater than or equal to zero that specifies the vertical DPI of the render target.
This method specifies the mapping from pixel space to device-independent space for the render target. If both dpiX and dpiY are 0, the factory-read system DPI is chosen. If one parameter is zero and the other unspecified, the DPI is not changed.
For
Return the render target's dots per inch (DPI).
+When this method returns, contains the horizontal DPI of the render target. This parameter is passed uninitialized.
When this method returns, contains the vertical DPI of the render target. This parameter is passed uninitialized.
This method indicates the mapping from pixel space to device-independent space for the render target.
For
Returns the size of the render target in device-independent pixels.
+The current size of the render target in device-independent pixels.
Returns the size of the render target in device pixels.
+The size of the render target in device pixels.
Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.
+The maximum size, in pixels, of any one bitmap dimension supported by the render target.
This method returns the maximum texture size of the Direct3D device.
Note??The software renderer and WARP devices return the value of 16 megapixels (16*1024*1024). You can create a Direct2D texture that is this size, but not a Direct3D texture that is this size.? +Indicates whether the render target supports the specified properties.
+The render target properties to test.
TRUE if the specified render target properties are supported by this render target; otherwise,
This method does not evaluate the DPI settings specified by the renderTargetProperties parameter.
+Ends drawing operations on the render target and indicates the current error state and associated tags.
+When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.
When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.
If the method succeeds, it returns
Drawing operations can only be issued between a BeginDraw and EndDraw call.
BeginDraw and EndDraw are use to indicate that a render target is in use by the Direct2D system. Different implementations of
The BeginDraw method must be called before rendering operations can be called, though state-setting and state-retrieval operations can be performed even outside of BeginDraw/EndDraw.
After BeginDraw is called, a render target will normally build up a batch of rendering commands, but defer processing of these commands until either an internal buffer is full, the Flush method is called, or until EndDraw is called. The EndDraw method causes any batched drawing operations to complete, and then returns an
If EndDraw is called without a matched call to BeginDraw, it returns an error indicating that BeginDraw must be called before EndDraw. Calling BeginDraw twice on a render target puts the target into an error state where nothing further is drawn, and returns an appropriate
Represents a Direct2D drawing resource.
+Retrieves the factory associated with this resource.
+Retrieves the factory associated with this resource.
+When this method returns, contains a reference to a reference to the factory that created this resource. This parameter is passed uninitialized.
Tracks a transform-created resource texture.
+Updates the specific resource texture inside the specific range or box using the supplied data.
+The "left" extent of the updates if specified; if
The "right" extent of the updates if specified; if
The stride to advance through the input data, according to dimension.
The number of dimensions in the resource texture. This must match the number used to load the texture.
The data to be placed into the resource texture.
The size of the data buffer to be used to update the resource texture.
The method returns an
Description | |
---|---|
No error occurred. | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
?
The number of dimensions in the update must match those of the created texture.
+Describes a rounded rectangle.
+Retrieves a rounded rectangle that describes this rounded rectangle geometry.
+Retrieves a rounded rectangle that describes this rounded rectangle geometry.
+A reference that receives a rounded rectangle that describes this rounded rectangle geometry. You must allocate storage for this parameter.
Describes a geometric path that does not contain quadratic bezier curves or arcs.
+A geometry sink consists of one or more figures. Each figure is made up of one or more line or Bezier curve segments. To create a figure, call the BeginFigure method and specify the figure's start point, then use AddLines and AddBeziers to add line and Bezier segments. When you are finished adding segments, call the EndFigure method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the Close method.
To create geometry paths that can contain arcs and quadratic Bezier curves, use an
Describes a geometric path that does not contain quadratic bezier curves or arcs.
+A geometry sink consists of one or more figures. Each figure is made up of one or more line or Bezier curve segments. To create a figure, call the BeginFigure method and specify the figure's start point, then use AddLines and AddBeziers to add line and Bezier segments. When you are finished adding segments, call the EndFigure method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the Close method.
To create geometry paths that can contain arcs and quadratic Bezier curves, use an
Specifies the method used to determine which points are inside the geometry described by this geometry sink and which points are outside.
+The method used to determine whether a given point is part of the geometry.
The fill mode defaults to
Specifies stroke and join options to be applied to new segments added to the geometry sink.
+Stroke and join options to be applied to new segments added to the geometry sink.
After this method is called, the specified segment flags are applied to each segment subsequently added to the sink. The segment flags are applied to every additional segment until this method is called again and a different set of segment flags is specified.
+Starts a new figure at the specified point.
+The point at which to begin the new figure.
Whether the new figure should be hollow or filled.
If this method is called while a figure is currently in progress, the interface is invalidated and all future methods will fail.
+Creates a sequence of lines using the specified points and adds them to the geometry sink.
+A reference to an array of one or more points that describe the lines to draw. A line is drawn from the geometry sink's current point (the end point of the last segment drawn or the location specified by BeginFigure) to the first point in the array. if the array contains additional points, a line is drawn from the first point to the second point in the array, from the second point to the third point, and so on.
The number of points in the points array.
Creates a sequence of cubic Bezier curves and adds them to the geometry sink.
+A reference to an array of Bezier segments that describes the Bezier curves to create. A curve is drawn from the geometry sink's current point (the end point of the last segment drawn or the location specified by BeginFigure) to the end point of the first Bezier segment in the array. if the array contains additional Bezier segments, each subsequent Bezier segment uses the end point of the preceding Bezier segment as its start point.
The number of Bezier segments in the beziers array.
Ends the current figure; optionally, closes it.
+A value that indicates whether the current figure is closed. If the figure is closed, a line is drawn between the current point and the start point specified by BeginFigure.
Calling this method without a matching call to BeginFigure places the geometry sink in an error state; subsequent calls are ignored, and the overall failure will be returned when the Close method is called.
+Closes the geometry sink, indicates whether it is in an error state, and resets the sink's error state.
+If this method succeeds, it returns
Do not close the geometry sink while a figure is still in progress; doing so puts the geometry sink in an error state. For the close operation to be successful, there must be one EndFigure call for each call to BeginFigure.
After calling this method, the geometry sink might not be usable. Direct2D implementations of this interface do not allow the geometry sink to be modified after it is closed, but other implementations might not impose this restriction.
+Paints an area with a solid color.
+Retrieves or sets the color of the solid color brush.
+Specifies the color of this solid color brush.
+The color of this solid color brush.
To help create colors, Direct2D provides the ColorF class. It offers several helper methods for creating colors and provides a set or predefined colors.
+Retrieves the color of the solid color brush.
+The color of this solid color brush.
Represents a CPU-based rasterization stage in the transform pipeline graph.
+Represents a CPU-based rasterization stage in the transform pipeline graph.
+Sets the render information for the transform.
+The interface supplied to the transform to allow specifying the CPU based transform pass.
If the method succeeds, it returns
Provides a render information interface to the source transform to allow it to specify state to the rendering system.
+Draws the transform to the graphics processing unit (GPU)?based Direct2D pipeline.
+The target to which the transform should be written.
The area within the source from which the image should be drawn.
The origin within the target bitmap to which the source data should be drawn.
If the method succeeds, it returns
The implementation of the rasterizer guarantees that adding the renderRect to the targetOrigin does not exceed the bounds of the bitmap.
When implementing this method you must update the bitmap in this way:
If you set the buffer precision manually on the associated
Adds the given sprites to the end of this sprite batch.
+In Direct2D, a sprite is defined by four properties: a destination rectangle, a source rectangle, a color, and a transform. Destination rectangles are mandatory, but the remaining properties are optional.
Note??Always omit or pass a null value for properties you do not wish to use. This allows Direct2D to avoid storing values for those properties and to skip their handling entirely, which improves drawing speed. For example, suppose you have a batch of 500 sprites, and you do not wish to transform any of their destination rectangles. Rather than passing an array of identity matrices, simply omit the transforms parameter. This allows Direct2D to avoid storing any transforms and will yield the fastest drawing performance. On the other hand, if any sprite in the batch has any value set for a property, then internally Direct2D must allocate space for that property array and assign every sprite a value for that property (even if it?s just the default value).? +Retrieves the number of sprites in this sprite batch.
+Adds the given sprites to the end of this sprite batch.
+The number of sprites to be added. This determines how many strides into each given array Direct2D will read.
A reference to an array containing the destination rectangles specifying where to draw the sprites on the destination device context.
A reference to an array containing the source rectangles specifying the regions of the source bitmap to draw as sprites. Direct2D will use the entire source bitmap for sprites that are assigned a null value or the InfiniteRectU. If this parameter is omitted entirely or set to a null value, then Direct2D will use the entire source bitmap for all the added sprites.
A reference to an array containing the colors to apply to each sprite. The output color is the result of component-wise multiplication of the source bitmap color and the provided color. The output color is not clamped.
Direct2D will not change the color of sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not change the color of any of the added sprites.
A reference to an array containing the transforms to apply to each sprite?s destination rectangle.
Direct2D will not transform the destination rectangle of any sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not transform the destination rectangle of any of the added sprites.
Specifies the distance, in bytes, between each rectangle in the destinationRectangles array. If you provide a stride of 0, then the same destination rectangle will be used for each added sprite.
Specifies the distance, in bytes, between each rectangle in the sourceRectangles array (if that array is given). If you provide a stride of 0, then the same source rectangle will be used for each added sprite.
Specifies the distance, in bytes, between each color in the colors array (if that array is given). If you provide a stride of 0, then the same color will be used for each added sprite.
Specifies the distance, in bytes, between each transform in the transforms array (if that array is given). If you provide a stride of 0, then the same transform will be used for each added sprite.
If this method succeeds, it returns
In Direct2D, a sprite is defined by four properties: a destination rectangle, a source rectangle, a color, and a transform. Destination rectangles are mandatory, but the remaining properties are optional.
Note??Always omit or pass a null value for properties you do not wish to use. This allows Direct2D to avoid storing values for those properties and to skip their handling entirely, which improves drawing speed. For example, suppose you have a batch of 500 sprites, and you do not wish to transform any of their destination rectangles. Rather than passing an array of identity matrices, simply omit the transforms parameter. This allows Direct2D to avoid storing any transforms and will yield the fastest drawing performance. On the other hand, if any sprite in the batch has any value set for a property, then internally Direct2D must allocate space for that property array and assign every sprite a value for that property (even if it?s just the default value).? +Updates the properties of the specified sprites in this sprite batch. Providing a null value for any property will leave that property unmodified for that sprite.
+The index of the first sprite in this sprite batch to update.
The number of sprites to update with new properties. This determines how many strides into each given array Direct2D will read.
A reference to an array containing the destination rectangles specifying where to draw the sprites on the destination device context.
A reference to an array containing the source rectangles specifying the regions of the source bitmap to draw as sprites.
Direct2D will use the entire source bitmap for sprites that are assigned a null value or the InfiniteRectU. If this parameter is omitted entirely or set to a null value, then Direct2D will use the entire source bitmap for all the updated sprites.
A reference to an array containing the colors to apply to each sprite. The output color is the result of component-wise multiplication of the source bitmap color and the provided color. The output color is not clamped.
Direct2D will not change the color of sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not change the color of any of the updated sprites.
A reference to an array containing the transforms to apply to each sprite?s destination rectangle.
Direct2D will not transform the destination rectangle of any sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not transform the destination rectangle of any of the updated sprites.
Specifies the distance, in bytes, between each rectangle in the destinationRectangles array. If you provide a stride of 0, then the same destination rectangle will be used for each updated sprite.
Specifies the distance, in bytes, between each rectangle in the sourceRectangles array (if that array is given). If you provide a stride of 0, then the same source rectangle will be used for each updated sprite.
Specifies the distance, in bytes, between each color in the colors array (if that array is given). If you provide a stride of 0, then the same color will be used for each updated sprite.
Specifies the distance, in bytes, between each transform in the transforms array (if that array is given). If you provide a stride of 0, then the same transform will be used for each updated sprite.
Returns
Retrieves the specified subset of sprites from this sprite batch. For the best performance, use nullptr for properties that you do not need to retrieve.
+The index of the first sprite in this sprite batch to retrieve.
The number of sprites to retrieve.
When this method returns, contains a reference to an array containing the destination rectangles for the retrieved sprites.
When this method returns, contains a reference to an array containing the source rectangles for the retrieved sprites.
The InfiniteRectU is returned for any sprites that were not assigned a source rectangle.
When this method returns, contains a reference to an array containing the colors to be applied to the retrieved sprites.
The color {1.0f, 1.0f, 1.0f, 1.0f} is returned for any sprites that were not assigned a color.
When this method returns, contains a reference to an array containing the transforms to be applied to the retrieved sprites.
The identity matrix is returned for any sprites that were not assigned a transform.
If this method succeeds, it returns
Retrieves the number of sprites in this sprite batch.
+Returns the number of sprites in this sprite batch
Removes all sprites from this sprite batch.
+Describes the caps, miter limit, line join, and dash information for a stroke.
+Retrieves the type of shape used at the beginning of a stroke.
+Retrieves the type of shape used at the end of a stroke.
+Gets a value that specifies how the ends of each dash are drawn.
+Retrieves the limit on the ratio of the miter length to half the stroke's thickness.
+Retrieves the type of joint used at the vertices of a shape's outline.
+Retrieves a value that specifies how far in the dash sequence the stroke will start.
+Gets a value that describes the stroke's dash pattern.
+If a custom dash style is specified, the dash pattern is described by the dashes array, which can be retrieved by calling the GetDashes method.
+Retrieves the number of entries in the dashes array.
+Retrieves the type of shape used at the beginning of a stroke.
+The type of shape used at the beginning of a stroke.
Retrieves the type of shape used at the end of a stroke.
+The type of shape used at the end of a stroke.
Gets a value that specifies how the ends of each dash are drawn.
+A value that specifies how the ends of each dash are drawn.
Retrieves the limit on the ratio of the miter length to half the stroke's thickness.
+A positive number greater than or equal to 1.0f that describes the limit on the ratio of the miter length to half the stroke's thickness.
Retrieves the type of joint used at the vertices of a shape's outline.
+A value that specifies the type of joint used at the vertices of a shape's outline.
Retrieves a value that specifies how far in the dash sequence the stroke will start.
+A value that specifies how far in the dash sequence the stroke will start.
Gets a value that describes the stroke's dash pattern.
+A value that describes the predefined dash pattern used, or
If a custom dash style is specified, the dash pattern is described by the dashes array, which can be retrieved by calling the GetDashes method.
+Retrieves the number of entries in the dashes array.
+The number of entries in the dashes array if the stroke is dashed; otherwise, 0.
Copies the dash pattern to the specified array.
+A reference to an array that will receive the dash pattern. The array must be able to contain at least as many elements as specified by dashesCount. You must allocate storage for this array.
The number of dashes to copy. If this value is less than the number of dashes in the stroke style's dashes array, the returned dashes are truncated to dashesCount. If this value is greater than the number of dashes in the stroke style's dashes array, the extra dashes are set to 0.0f. To obtain the actual number of dashes in the stroke style's dashes array, use the GetDashesCount method.
The dashes are specified in units that are a multiple of the stroke width, with subsequent members of the array indicating the dashes and gaps between dashes: the first entry indicates a filled dash, the second a gap, and so on.
+Describes the caps, miter limit, line join, and dash information for a stroke.
+This interface adds functionality to
Gets the stroke transform type.
+Gets the stroke transform type.
+This method returns the stroke transform type.
This interface performs all the same functions as the
This interface performs all the same functions as the
Interface for all SVG elements.
+This object supplies the values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
+Returns or sets the requested fill parameters.
+Returns the number of dashes in the dash array.
+Provides values to an SVG glyph for fill.
+Describes how the area is painted. A null brush will cause the context-fill value to come from the defaultFillBrush. If the defaultFillBrush is also null, the context-fill value will be 'none'. To set the ?context-fill? value, this method uses the provided brush with its opacity set to 1. To set the ?context-fill-opacity? value, this method uses the opacity of the provided brush.
This method returns an
Returns the requested fill parameters.
+Describes how the area is painted.
Provides values to an SVG glyph for stroke properties. The brush with opacity set to 1 is used as the 'context-stroke'. The opacity of the brush is used as the 'context-stroke-opacity' value.
+Describes how the stroke is painted. A null brush will cause the context-stroke value to be none.
Specifies the 'context-value' for the 'stroke-width' property.
Specifies the 'context-value' for the 'stroke-dasharray' property. A null value will cause the stroke-dasharray to be set to 'none'.
The the number of dashes in the dash array.
Specifies the 'context-value' for the 'stroke-dashoffset' property.
This method returns an
Returns the number of dashes in the dash array.
+Returns the number of dashes in the dash array.
Returns the requested stroke parameters. Any parameters that are non-null will receive the value of the requested parameter.
+Describes how the stroke is painted.
The 'context-value' for the 'stroke-width' property.
The 'context-value' for the 'stroke-dasharray' property.
The the number of dashes in the dash array.
The 'context-value' for the 'stroke-dashoffset' property.
Represents a bitmap that has been bound to an
This interface performs all the same functions as the
Interface describing an SVG points value in a polyline or polygon element.
+This interface performs all the same functions as the
Populates an
Populates an
Copies the specified triangles to the sink.
+An array of
The number of triangles to copy from the triangles array.
Closes the sink and returns its error status.
+If this method succeeds, it returns
Represents the base interface for all of the transforms implemented by the transform author.
+Transforms are aggregated by effect authors. This interface provides a common interface for implementing the Shantzis rectangle calculations which is the basis for all the transform processing in Direct2D imaging extensions. These calculations are described in the paper A model for efficient and flexible image computing.
+[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Allows a transform to state how it would map a rectangle requested on its output to a set of sample rectangles on its input.
+The output rectangle to which the inputs must be mapped.
The corresponding set of inputs. The inputs will directly correspond to the transform inputs.
The transform implementation must ensure that any pixel shader or software callback implementation it provides honors this calculation.
The transform implementation must regard this method as purely functional. It can base the mapped input and output rectangles on its current state as specified by the encapsulating effect properties. However, it must not change its own state in response to this method being invoked. The DirectImage renderer implementation reserves the right to call this method at any time and in any sequence.
+[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Performs the inverse mapping to MapOutputRectToInputRects.
+The transform implementation must ensure that any pixel shader or software callback implementation it provides honors this calculation.
The transform implementation must regard this method as purely functional. It can base the mapped input and output rectangles on its current state as specified by the encapsulating effect properties. However, it must not change its own state in response to this method being invoked. The Direct2D renderer implementation reserves the right to call this method at any time and in any sequence.
+Represents a geometry that has been transformed.
+Using an
Retrieves the source geometry of this transformed geometry object.
+Retrieves the matrix used to transform the
Retrieves the source geometry of this transformed geometry object.
+When this method returns, contains a reference to a reference to the source geometry for this transformed geometry object. This parameter is passed uninitialized.
Retrieves the matrix used to transform the
Represents an image source which shares resources with an original image source.
+Retrieves the source image used to create the transformed image source. This value corresponds to the value passed to CreateTransformedImageSource.
+Retrieves the properties specified when the transformed image source was created. This value corresponds to the value passed to CreateTransformedImageSource.
+Retrieves the source image used to create the transformed image source. This value corresponds to the value passed to CreateTransformedImageSource.
+Retrieves the properties specified when the transformed image source was created. This value corresponds to the value passed to CreateTransformedImageSource.
+Represents a graph of transform nodes.
+This interface allows a graph of transform nodes to be specified. This interface is passed to
Returns the number of inputs to the transform graph.
+Returns the number of inputs to the transform graph.
+The number of inputs to this transform graph.
Sets a single transform node as being equivalent to the whole graph.
+The node to be set.
The method returns an
Description | |
---|---|
No error occurred | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
?
This equivalent to calling
Adds the provided node to the transform graph.
+The node that will be added to the transform graph.
The method returns an
Description | |
---|---|
No error occurred | |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
?
This adds a transform node to the transform graph. A node must be added to the transform graph before it can be interconnected in any way. +
A transform graph cannot be directly added to another transform graph.
+ Only interfaces derived from
Removes the provided node from the transform graph.
+The node that will be removed from the transform graph.
The method returns an
Description | |
---|---|
No error occurred | |
D2DERR_NOT_FOUND = (HRESULT_FROM_WIN32( | Direct2D could not locate the specified node. |
?
The node must already exist in the graph; otherwise, the call fails with D2DERR_NOT_FOUND.
Any connections to this node will be removed when the node is removed.
After the node is removed, it cannot be used by the interface until it has been added to the graph by AddNode.
+Sets the output node for the transform graph.
+The node that will be considered the output of the transform node.
The method returns an
Description | |
---|---|
No error occurred | |
D2DERR_NOT_FOUND = (HRESULT_FROM_WIN32( | Direct2D could not locate the specified node. |
?
The node must already exist in the graph; otherwise, the call fails with D2DERR_NOT_FOUND.
+Connects two nodes inside the transform graph.
+The node from which the connection will be made.
The node to which the connection will be made.
The node input that will be connected.
The method returns an
Description | |
---|---|
No error occurred | |
D2DERR_NOT_FOUND = (HRESULT_FROM_WIN32( | Direct2D could not locate the specified node. |
?
Both nodes must already exist in the graph; otherwise, the call fails with D2DERR_NOT_FOUND.
+Connects a transform node inside the graph to the corresponding effect input of the encapsulating effect.
+The effect input to which the transform node will be bound.
The node to which the connection will be made.
The node input that will be connected.
The method returns an
Description | |
---|---|
No error occurred | |
D2DERR_NOT_FOUND = (HRESULT_FROM_WIN32( | Direct2D could not locate the specified node. |
?
Clears the transform nodes and all connections from the transform graph.
+Used when enough changes to transfoms would make editing of the transform graph inefficient.
+Uses the specified input as the effect output.
+The index of the input to the effect.
The method returns an
Description | |
---|---|
No error occurred | |
D2DERR_NOT_FOUND = (HRESULT_FROM_WIN32( | Direct2D could not locate the specified node. |
?
Represents the base interface for all of the transforms implemented by the transform author.
+Transforms are aggregated by effect authors. This interface provides a common interface for implementing the Shantzis rectangle calculations which is the basis for all the transform processing in Direct2D imaging extensions. These calculations are described in the paper A model for efficient and flexible image computing.
+Allows a transform to state how it would map a rectangle requested on its output to a set of sample rectangles on its input.
+The output rectangle from which the inputs must be mapped.
The corresponding set of inputs. The inputs will directly correspond to the transform inputs.
The number of inputs specified. Direct2D guarantees that this is equal to the number of inputs specified on the transform.
If the method succeeds, it returns
The transform implementation must ensure that any pixel shader or software callback implementation it provides honors this calculation.
The transform implementation must regard this method as purely functional. It can base the mapped input and output rectangles on its current state as specified by the encapsulating effect properties. However, it must not change its own state in response to this method being invoked. The Direct2D renderer implementation reserves the right to call this method at any time and in any sequence.
+Performs the inverse mapping to MapOutputRectToInputRects.
+The transform implementation must ensure that any pixel shader or software callback implementation it provides honors this calculation.
Unlike the MapOutputRectToInputRects and MapInvalidRect functions, this method is explicitly called by the renderer at a determined place in its rendering algorithm. The transform implementation may change its state based on the input rectangles and use this information to control its rendering information. This method is always called before the MapInvalidRect and MapOutputRectToInputRects methods of the transform.
+Sets the input rectangles for this rendering pass into the transform.
+The index of the input rectangle.
The invalid input rectangle.
The output rectangle to which the input rectangle must be mapped.
The transform implementation must regard MapInvalidRect as purely functional. The transform implementation can base the mapped input rectangle on the transform implementation's current state as specified by the encapsulating effect properties. But the transform implementation can't change its own state in response to a call to MapInvalidRect. Direct2D can call this method at any time and in any sequence following a call to the MapInputRectsToOutputRect method. +
+Describes a node in a transform topology.
+Transform nodes are type-less and only define the notion of an object that accepts a number of inputs and is an output. This interface limits a topology to single output nodes.
+Describes a node in a transform topology.
+Transform nodes are type-less and only define the notion of an object that accepts a number of inputs and is an output. This interface limits a topology to single output nodes.
+Gets the number of inputs to the transform node.
+This method returns the number of inputs to this transform node.
Defines a mappable single-dimensional vertex buffer.
+Maps the provided data into user memory.
+When this method returns, contains the address of a reference to the available buffer.
The desired size of the buffer.
The method returns an
Description | |
---|---|
No error occurred. | |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
D3DERR_DEVICELOST | The device has been lost but cannot be reset at this time. |
?
If data is larger than bufferSize, this method fails.
+Unmaps the vertex buffer.
+The method returns an
Description | |
---|---|
No error occurred. | |
The object was not in the correct state to process the method. |
?
After this method returns, the mapped memory from the vertex buffer is no longer accessible by the effect.
+Renders drawing instructions to a window.
+As is the case with other render targets, you must call BeginDraw before issuing drawing commands. After you've finished drawing, call EndDraw to indicate that drawing is finished and to release access to the buffer backing the render target. For
A hardware render target's back-buffer is the size specified by GetPixelSize. If EndDraw presents the buffer, this bitmap is stretched to cover the surface where it is presented: the entire client area of the window. This stretch is performed using bilinear filtering if the render target is rendering in hardware and using nearest-neighbor filtering if the rendering target is using software. (Typically, an application will call Resize to ensure the pixel size of the render target and the pixel size of the destination match, and no scaling is necessary, though this is not a requirement.)
In the case where a window straddles adapters, Direct2D ensures that the portion of the off-screen render target is copied from the adapter where rendering is occurring to the adapter that needs to display the contents. If the adapter a render target is on has been removed or the driver upgraded while the application is running, this is returned as an error in the EndDraw call. In this case, the application should create a new render target and resources as necessary. +
+ Returns the
Indicates whether the
A value that indicates whether the
After this method is called, the contents of the render target's back-buffer are not defined, even if the
Returns the
The
Describes an elliptical arc between two points.
+The end point of the arc.
The x-radius and y-radius of the arc.
A value that specifies how many degrees in the clockwise direction the ellipse is rotated relative to the current coordinate system.
A value that specifies whether the arc sweep is clockwise or counterclockwise.
A value that specifies whether the given arc is larger than 180 degrees.
Represents a cubic bezier segment drawn between two points.
+A cubic Bezier curve is defined by four points: a start point, an end point (point3), and two control points (point1 and point2). A Bezier segment does not contain a property for the starting point of the curve; it defines only the end point. The beginning point of the curve is the current point of the path to which the Bezier curve is added.
The two control points of a cubic Bezier curve behave like magnets, attracting portions of what would otherwise be a straight line toward themselves and producing a curve. The first control point, point1, affects the beginning portion of the curve; the second control point, point2, affects the ending portion of the curve.
Note??The curve doesn't necessarily pass through either of the control points; each control point moves its portion of the line toward itself, but not through itself.? +The first control point for the Bezier segment.
The second control point for the Bezier segment.
The end point for the Bezier segment.
Describes the extend modes and the interpolation mode of an
Describes the extend modes and the interpolation mode of an
Defines a blend description to be used in a particular blend transform.
+This description closely matches the
Specifies the first RGB data source and includes an optional preblend operation.
Specifies the second RGB data source and includes an optional preblend operation.
Specifies how to combine the RGB data sources.
Specifies the first alpha data source and includes an optional preblend operation. Blend options that end in _COLOR are not allowed.
Specifies the second alpha data source and includes an optional preblend operation. Blend options that end in _COLOR are not allowed.
Specifies how to combine the alpha data sources.
Parameters to the blend operations. The blend must use
Describes the opacity and transformation of a brush.
+This structure is used when creating a brush. For convenience, Direct2D provides the D2D1::BrushProperties function for creating
After creating a brush, you can change its opacity or transform by calling the SetOpacity or SetTransform methods.
+A value between 0.0f and 1.0f, inclusive, that specifies the degree of opacity of the brush.
The transformation that is applied to the brush.
Specifies the options with which the Direct2D device, factory, and device context are created. +
+The root objects referred to here are the Direct2D device, Direct2D factory and the Direct2D device context. +
+Describes the drawing state of a render target.
+The antialiasing mode for subsequent nontext drawing operations.
The antialiasing mode for subsequent text and glyph drawing operations.
A label for subsequent drawing operations.
A label for subsequent drawing operations.
The transformation to apply to subsequent drawing operations.
Describes the drawing state of a device context.
+The antialiasing mode for subsequent nontext drawing operations.
The antialiasing mode for subsequent text and glyph drawing operations.
A label for subsequent drawing operations.
A label for subsequent drawing operations.
The transformation to apply to subsequent drawing operations.
The blend mode for the device context to apply to subsequent drawing operations.
Contains the debugging level of an
To enable debugging, you must install the Direct2D Debug Layer.
+Describes compute shader support, which is an option on D3D10 feature level.
+You can fill this structure by passing a D2D1_ FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS structure to
Shader model 4 compute shaders are supported.
Describes the support for doubles in shaders.
+Fill this structure by passing a
TRUE is doubles are supported within the shaders.
Represents a tensor patch with 16 control points, 4 corner colors, and boundary flags. An
The following image shows the numbering of control points on a tensor grid.
+Contains the position and color of a gradient stop.
+Gradient stops can be specified in any order if they are at different positions. Two stops may share a position. In this case, the first stop specified is treated as the "low" stop (nearer 0.0f) and subsequent stops are treated as "higher" (nearer 1.0f). This behavior is useful if a caller wants an instant transition in the middle of a stop.
Typically, there are at least two points in a collection, although creation with only one stop is permitted. For example, one point is at position 0.0f, another point is at position 1.0f, and additional points are distributed in the [0, 1] range. Where the gradient progression is beyond the range of [0, 1], the stops are stored, but may affect the gradient.
When drawn, the [0, 1] range of positions is mapped to the brush, in a brush-dependent way. For details, see
Gradient stops with a position outside the [0, 1] range cannot be seen explicitly, but they can still affect the colors produced in the [0, 1] range. For example, a two-stop gradient 0.0f, Black}, {2.0f, White is indistinguishable visually from 0.0f, Black}, {1.0f, Mid-level gray. Also, the colors are clamped before interpolation.
+A value that indicates the relative position of the gradient stop in the brush. This value must be in the [0.0f, 1.0f] range if the gradient stop is to be seen explicitly.
The color of the gradient stop.
Contains the
Use this structure when you call the CreateHwndRenderTarget method to create a new
For convenience, Direct2D provides the D2D1::HwndRenderTargetProperties function for creating new
Describes image brush features.
+The source rectangle in the image space from which the image will be tiled or interpolated.
The extend mode in the image x-axis.
The extend mode in the image y-axis.
The interpolation mode to use when scaling the image brush.
Represents a Bezier segment to be used in the creation of an
Represents a point, radius pair that makes up part of a
Defines the general pen tip shape and the transform used in an
Describes the options that transforms may set on input textures.
+The type of filter to apply to the input texture.
The mip level to retrieve from the upstream transform, if specified.
A description of a single element to the vertex layout.
+This structure is a subset of
If the D2D1_APPEND_ALIGNED_ELEMENT constant is used for alignedByteOffset, the elements will be packed contiguously for convenience. +
+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 components 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.
The offset in bytes between each element.
Contains the content bounds, mask information, opacity settings, and other options for a layer resource.
+The content bounds of the layer. Content outside these bounds is not guaranteed to render.
The geometric mask specifies the area of the layer that is composited into the render target.
A value that specifies the antialiasing mode for the geometricMask.
A value that specifies the transform that is applied to the geometric mask when composing the layer.
An opacity value that is applied uniformly to all resources in the layer when compositing to the target.
A brush that is used to modify the opacity of the layer. The brush + is mapped to the layer, and the alpha channel of each mapped brush pixel is multiplied against the corresponding layer pixel.
A value that specifies whether the layer intends to render text with ClearType antialiasing.
Contains the content bounds, mask information, opacity settings, and other options for a layer resource.
+The content bounds of the layer. Content outside these bounds is not guaranteed to render.
The geometric mask specifies the area of the layer that is composited into the render target.
A value that specifies the antialiasing mode for the geometricMask.
A value that specifies the transform that is applied to the geometric mask when composing the layer.
An opacity value that is applied uniformly to all resources in the layer when compositing to the target.
A brush that is used to modify the opacity of the layer. The brush + is mapped to the layer, and the alpha channel of each mapped brush pixel is multiplied against the corresponding layer pixel.
Additional options for the layer creation.
Contains the starting point and endpoint of the gradient axis for an
Use this method when creating new
The following illustration shows how a linear gradient changes as you change its start and end points. For the first gradient, the start point is set to (0,0) and the end point to (150, 50); this creates a diagonal gradient that starts at the upper-left corner and extends to the lower-right corner of the area being painted. When you set the start point to (0, 25) and the end point to (150, 25), a horizontal gradient is created. Similarly, setting the start point to (75, 0) and the end point to (75, 50) creates a vertical gradient. Setting the start point to (0, 50) and the end point to (150, 0) creates a diagonal gradient that starts at the lower-left corner and extends to the upper-right corner of the area being painted.
+ Describes mapped memory from the
The mapped rectangle is used to map a rectangle into the caller's address space.
+Contains the data format and alpha mode for a bitmap or render target.
+For more information about the pixel formats and alpha modes supported by each render target, see Supported Pixel Formats and Alpha Modes.
+A value that specifies the size and arrangement of channels in each pixel.
A value that specifies whether the alpha channel is using pre-multiplied alpha, straight alpha, whether it should be ignored and considered opaque, or whether it is unkown.
Describes a point on a path geometry.
+The end point after walking the path.
A unit vector indicating the tangent point.
The index of the segment on which point resides. This index is global to the entire path, not just to a particular figure.
The index of the figure on which point resides.
The length of the section of the path stretching from the start of the path to the start of endSegment.
The creation properties for a
Defines a property binding to a pair of functions which get and set the corresponding property.
+The propertyName is used to cross-correlate the property binding with the registration XML. The propertyName must be present in the XML call or the registration will fail. All properties must be bound.
+The name of the property.
The function that will receive the data to set.
The function that will be asked to write the output data.
Contains the control point and end point for a quadratic Bezier segment.
+The control point of the quadratic Bezier segment.
The end point of the quadratic Bezier segment.
Contains the gradient origin offset and the size and position of the gradient ellipse for an
Different values for center, gradientOriginOffset, radiusX and/or radiusY produce different gradients. The following illustration shows several radial gradients that have different gradient origin offsets, creating the appearance of the light illuminating the circles from different angles.
For convenience, Direct2D provides the D2D1::RadialGradientBrushProperties function for creating new D2D1_RADIAL_GRADIENT_BRUSH structures.
+Describes limitations to be applied to an imaging effect renderer.
+The renderer can allocate tiles larger than the minimum tile allocation. The allocated tiles will be powers of two of the minimum size on each axis, except that the size on each axis will not exceed the guaranteed maximum texture size for the device feature level.
The minimumPixelRenderExtent is the size of the square tile below which the renderer will expand the tile allocation rather than attempting to subdivide the rendering tile any further. When this threshold is reached, the allocation tile size is expanded. This might occur repeatedly until rendering can either proceed or it is determined that the graph cannot be rendered.
The buffer precision is used for intermediate buffers if it is otherwise unspecified by the effects or the internal effect topology. The application can also use the Output.BufferPrecision method to specify the output precision for a particular effect. This takes precedence over the context precision. In addition, the effect might set a different precision internally if required. If the buffer type on the context is
The buffer precision used by default if the buffer precision is not otherwise specified by the effect or the transform.
The tile allocation size to be used by the imaging effect renderer.
Contains rendering options (hardware or software), pixel format, DPI information, remoting options, and Direct3D support requirements for a render target.
+Use this structure when creating a render target, or use it with the
As a convenience, Direct2D provides the D2D1::RenderTargetProperties helper function for creating
Not all render targets support hardware rendering. For a list, see the Render Targets Overview.
+A value that specifies whether the render target should force hardware or software rendering. A value of
The pixel format and alpha mode of the render target. You can use the D2D1::PixelFormat function to create a pixel format that specifies that Direct2D should select the pixel format and alpha mode for you. For a list of pixel formats and alpha modes supported by each render target, see Supported Pixel Formats and Alpha Modes.
The horizontal DPI of the render target. To use the default DPI, set dpiX and dpiY to 0. For more information, see the Remarks section.
The vertical DPI of the render target. To use the default DPI, set dpiX and dpiY to 0. For more information, see the Remarks section.
A value that specifies how the render target is remoted and whether it should be GDI-compatible. Set to
A value that specifies the minimum Direct3D feature level required for hardware rendering. If the specified minimum level is not available, the render target uses software rendering if the type member is set to
Defines a resource texture when the original resource texture is created.
+The extents of the resource table in each dimension.
The number of dimensions in the resource texture. This must be a number from 1 to 3.
The precision of the resource texture to create.
The number of channels in the resource texture.
The filtering mode to use on the texture.
Specifies how pixel values beyond the extent of the texture will be sampled, in every dimension.
Contains the dimensions and corner radii of a rounded rectangle.
+Each corner of the rectangle specified by the rect is replaced with a quarter ellipse, with a radius in each direction specified by radiusX and radiusY.
If the radiusX is greater than or equal to half the width of the rectangle, and the radiusY is greater than or equal to one-half the height, the rounded rectangle is an ellipse with the same width and height of the rect.
Even when both radiuX and radiusY are zero, the rounded rectangle is different from a rectangle., When stroked, the corners of the rounded rectangle are roundly joined, not mitered (square).
+The coordinates of the rectangle.
The x-radius for the quarter ellipse that is drawn to replace every corner of the rectangle.
The y-radius for the quarter ellipse that is drawn to replace every corner of the rectangle.
Creates a color context from a simple color profile. It is only valid to use this with the Color Management Effect in 'Best' mode.
+The simple color profile to create the color context from.
The created color context.
Describes the stroke that outlines a shape.
+The following illustration shows different dashOffset values for the same custom dash style.
+The cap applied to the start of all the open figures in a stroked geometry.
The cap applied to the end of all the open figures in a stroked geometry.
The shape at either end of each dash segment.
A value that describes how segments are joined. This value is ignored for a vertex if the segment flags specify that the segment should have a smooth join.
The limit of the thickness of the join on a mitered corner. This value is always treated as though it is greater than or equal to 1.0f.
A value that specifies whether the stroke has a dash pattern and, if so, the dash style.
A value that specifies an offset in the dash sequence. A positive dash offset value shifts the dash pattern, in units of stroke width, toward the start of the stroked geometry. A negative dash offset value shifts the dash pattern, in units of stroke width, toward the end of the stroked geometry.
Describes the stroke that outlines a shape.
+The cap to use at the start of each open figure.
The cap to use at the end of each open figure.
The cap to use at the start and end of each dash.
The line join to use.
The limit beyond which miters are either clamped or converted to bevels.
The type of dash to use.
The location of the first dash, relative to the start of the figure.
The rule that determines what render target properties affect the nib of the stroke.
A 3D vector that consists of three single-precision floating-point values (x, y, z).
+The x value of the vector.
The y value of the vector.
A description of a single element to the vertex layout.
+This structure is a subset of
If the D2D1_APPEND_ALIGNED_ELEMENT constant is used for alignedByteOffset, the elements will be packed contiguously for convenience. +
+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 components would have different semantic indices (0, 1, 2, and 3).
The data type of the element data.
A 3D vector that consists of three single-precision floating-point values (x, y, z).
+The x value of the vector.
The y value of the vector.
The z value of the vector.
Properties of a transformed image source.
+The orientation at which the image source is drawn.
The horizontal scale factor at which the image source is drawn.
The vertical scale factor at which the image source is drawn.
The interpolation mode used when the image source is drawn. This is ignored if the image source is drawn using the DrawImage method, or using an image brush.
Image sourc option flags.
Contains the three vertices that describe a triangle.
+The first vertex of a triangle.
The second vertex of a triangle.
The third vertex of a triangle.
Defines the properties of a vertex buffer that are standard for all vertex shader definitions.
+If usage is dynamic, the system might return a system memory buffer and copy these vertices into the rendering vertex buffer for each element.
If the initialization data is not specified, the buffer will be uninitialized.
+The number of inputs to the vertex shader.
Indicates how frequently the vertex buffer is likely to be updated.
The initial contents of the vertex buffer.
The size of the vertex buffer, in bytes.
Defines a range of vertices that are used when rendering less than the full contents of a vertex buffer.
+The first vertex in the range to process.
The number of vertices to use.
Encapsulates a 32-bit device independent bitmap and device context, which can be used for rendering glyphs.
+You create an
if (SUCCEEDED(hr)) + { hr = g_pGdiInterop->CreateBitmapRenderTarget(hdc, r.right, r.bottom, &g_pBitmapRenderTarget); + } +
Draws a run of glyphs to a bitmap target at the specified position.
+The horizontal position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB.
The vertical position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB.
The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.
The structure containing the properties of the glyph run.
The object that controls rendering behavior.
The foreground color of the text.
The optional rectangle that receives the bounding box (in pixels not DIPs) of all the pixels affected by drawing the glyph run. The black box rectangle may extend beyond the dimensions of the bitmap.
If this method succeeds, it returns
You can use the
STDMETHODIMP GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY,measuringMode, __in const* glyphRun, __in const* glyphRunDescription, * clientDrawingEffect ) + { hr = ; // Pass on the drawing call to the render target to do the real work. dirtyRect = {0}; hr = pRenderTarget_->DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, RGB(0,200,255), &dirtyRect ); return hr; + } +
The baselineOriginX, baslineOriginY, measuringMethod, and glyphRun parameters are provided (as arguments) when the callback method is invoked. The renderingParams, textColor and blackBoxRect are not.
Default rendering params can be retrieved by using the
STDMETHODIMP GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_MEASURING_MODE measuringMode, __in DWRITE_GLYPH_RUN const* glyphRun, __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, IUnknown* clientDrawingEffect )
+ { HRESULT hr = S_OK; // Pass on the drawing call to the render target to do the real work. RECT dirtyRect = {0}; hr = pRenderTarget_->DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, RGB(0,200,255), &dirtyRect ); return hr;
+ }
+
+ The baselineOriginX, baslineOriginY, measuringMethod, and glyphRun parameters are provided (as arguments) when the callback method is invoked. The renderingParams, textColor and blackBoxRect are not. Default rendering params can be retrieved by using the Gets a handle to the memory device context.
+ An application can use the device context to draw using GDI functions. An application can obtain the bitmap handle (
Note that this method takes no parameters and returns an
memoryHdc = g_pBitmapRenderTarget->GetMemoryDC(); +
The
Gets or sets the number of bitmap pixels per DIP.
+A DIP (device-independent pixel) is 1/96 inch. Therefore, this value is the number if pixels per inch divided by 96.
+Gets or sets the transform that maps abstract coordinates to DIPs. By default this is the identity transform. Note that this is unrelated to the world transform of the underlying device context.
+Gets the dimensions of the target bitmap.
+Draws a run of glyphs to a bitmap target at the specified position.
+The horizontal position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB.
The vertical position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB.
The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.
The structure containing the properties of the glyph run.
The object that controls rendering behavior.
The foreground color of the text.
The optional rectangle that receives the bounding box (in pixels not DIPs) of all the pixels affected by drawing the glyph run. The black box rectangle may extend beyond the dimensions of the bitmap.
If this method succeeds, it returns
You can use the
STDMETHODIMP GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY,measuringMode, __in const* glyphRun, __in const* glyphRunDescription, * clientDrawingEffect ) + { hr = ; // Pass on the drawing call to the render target to do the real work. dirtyRect = {0}; hr = pRenderTarget_->DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, RGB(0,200,255), &dirtyRect ); return hr; + } +
The baselineOriginX, baslineOriginY, measuringMethod, and glyphRun parameters are provided (as arguments) when the callback method is invoked. The renderingParams, textColor and blackBoxRect are not.
Default rendering params can be retrieved by using the
Gets a handle to the memory device context.
+Returns a device context handle to the memory device context.
An application can use the device context to draw using GDI functions. An application can obtain the bitmap handle (
Note that this method takes no parameters and returns an
memoryHdc = g_pBitmapRenderTarget->GetMemoryDC(); +
The
Gets the number of bitmap pixels per DIP.
+The number of bitmap pixels per DIP.
A DIP (device-independent pixel) is 1/96 inch. Therefore, this value is the number if pixels per inch divided by 96.
+Sets the number of bitmap pixels per DIP (device-independent pixel). A DIP is 1/96 inch, so this value is the number if pixels per inch divided by 96.
+A value that specifies the number of pixels per DIP.
If this method succeeds, it returns
Gets the transform that maps abstract coordinates to DIPs. By default this is the identity transform. Note that this is unrelated to the world transform of the underlying device context.
+When this method returns, contains a transform matrix.
If this method succeeds, it returns
Sets the transform that maps abstract coordinate to DIPs (device-independent pixel). This does not affect the world transform of the underlying device context.
+ Specifies the new transform. This parameter can be
If this method succeeds, it returns
Gets the dimensions of the target bitmap.
+Returns the width and height of the bitmap in pixels.
If this method succeeds, it returns
Resizes the bitmap.
+The new bitmap width, in pixels.
The new bitmap height, in pixels.
If this method succeeds, it returns
Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.
+ Create an
if (SUCCEEDED(hr)) + { hr =( , __uuidof( ), reinterpret_cast< **>(&pDWriteFactory_) ); + }
An
Creates an object that is used for interoperability with GDI.
+Gets an object which represents the set of installed fonts.
+If this parameter is nonzero, the function performs an immediate check for changes to the set of installed fonts. If this parameter is
When this method returns, contains the address of a reference to the system font collection object, or
Creates a font collection using a custom font collection loader.
+An application-defined font collection loader, which must have been previously registered using RegisterFontCollectionLoader.
The key used by the loader to identify a collection of font files. The buffer allocated for this key should at least be the size of collectionKeySize.
The size, in bytes, of the collection key.
Contains an address of a reference to the system font collection object if the method succeeds, or
If this method succeeds, it returns
Registers a custom font collection loader with the factory object.
+Pointer to a
If this method succeeds, it returns
This function registers a font collection loader with DirectWrite. The font collection loader interface, which should be implemented by a singleton object, handles enumerating font files in a font collection given a particular type of key. A given instance can only be registered once. Succeeding attempts will return an error, indicating that it has already been registered. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors, and must not unregister themselves inside their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration with DirectWrite of font file loaders should be performed outside of the font file loader implementation.
+Unregisters a custom font collection loader that was previously registered using RegisterFontCollectionLoader.
+If this method succeeds, it returns
Creates a font file reference object from a local font file.
+An array of characters that contains the absolute file path for the font file. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.
The last modified time of the input file path. If the parameter is omitted, the function will access the font file to obtain its last write time. You should specify this value to avoid extra disk access. Subsequent operations on the constructed object may fail if the user provided lastWriteTime doesn't match the file on the disk.
When this method returns, contains an address of a reference to the newly created font file reference object, or
If this method succeeds, it returns
Creates a reference to an application-specific font file resource.
+A font file reference key that uniquely identifies the font file resource during the lifetime of fontFileLoader.
The size of the font file reference key in bytes.
The font file loader that will be used by the font system to load data from the file identified by fontFileReferenceKey.
Contains an address of a reference to the newly created font file object when this method succeeds, or
If this method succeeds, it returns
This function is provided for cases when an application or a document needs to use a private font without having to install it on the system. fontFileReferenceKey has to be unique only in the scope of the fontFileLoader used in this call.
+Creates an object that represents a font face.
+A value that indicates the type of file format of the font face.
The number of font files, in element count, required to represent the font face.
A font file object representing the font face. Because
The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.
A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face.
When this method returns, contains an address of a reference to the newly created font face object, or
If this method succeeds, it returns
Creates an object that represents a font face.
+A value that indicates the type of file format of the font face.
The number of font files, in element count, required to represent the font face.
A font file object representing the font face. Because
The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.
A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face.
When this method returns, contains an address of a reference to the newly created font face object, or
If this method succeeds, it returns
Creates an object that represents a font face.
+A value that indicates the type of file format of the font face.
The number of font files, in element count, required to represent the font face.
A font file object representing the font face. Because
The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.
A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face.
When this method returns, contains an address of a reference to the newly created font face object, or
If this method succeeds, it returns
Creates a rendering parameters object with default settings for the primary monitor. Different monitors may have different rendering parameters, for more information see the How to Add Support for Multiple Monitors topic.
+Standard
Creates a rendering parameters object with default settings for the specified monitor. In most cases, this is the preferred way to create a rendering parameters object.
+A handle for the specified monitor.
When this method returns, contains an address of a reference to the rendering parameters object created by this method.
If this method succeeds, it returns
Creates a rendering parameters object with the specified properties.
+The gamma level to be set for the new rendering parameters object.
The enhanced contrast level to be set for the new rendering parameters object.
The ClearType level to be set for the new rendering parameters object.
Represents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text.
A value that represents the method (for example, ClearType natural quality) for rendering glyphs.
When this method returns, contains an address of a reference to the newly created rendering parameters object.
If this method succeeds, it returns
Registers a font file loader with DirectWrite.
+Pointer to a
If this method succeeds, it returns
This function registers a font file loader with DirectWrite. The font file loader interface, which should be implemented by a singleton object, handles loading font file resources of a particular type from a key. A given instance can only be registered once. Succeeding attempts will return an error, indicating that it has already been registered. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors, and must not unregister themselves inside their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration with DirectWrite of font file loaders should be performed outside of the font file loader implementation.
+Unregisters a font file loader that was previously registered with the DirectWrite font system using RegisterFontFileLoader.
+If this method succeeds, it returns
This function unregisters font file loader callbacks with the DirectWrite font system. You should implement the font file loader interface by a singleton object. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite should be performed outside of the font file loader implementation.
+Creates a text format object used for text layout.
+An array of characters that contains the name of the font family
A reference to a font collection object. When this is
A value that indicates the font weight for the text object created by this method.
A value that indicates the font style for the text object created by this method.
A value that indicates the font stretch for the text object created by this method.
The logical size of the font in DIP ("device-independent pixel") units. A DIP equals 1/96 inch.
An array of characters that contains the locale name.
When this method returns, contains an address of a reference to a newly created text format object, or
If this method succeeds, it returns
Creates a typography object for use in a text layout.
+When this method returns, contains the address of a reference to a newly created typography object, or
If this method succeeds, it returns
Creates an object that is used for interoperability with GDI.
+When this method returns, contains an address of a reference to a GDI interop object if successful, or
If this method succeeds, it returns
Takes a string, text format, and associated constraints, and produces an object that represents the fully analyzed and formatted result.
+An array of characters that contains the string to create a new
The number of characters in the string.
A reference to an object that indicates the format to apply to the string.
The width of the layout box.
The height of the layout box.
When this method returns, contains an address of a reference to the resultant text layout object.
If this method succeeds, it returns
Takes a string, format, and associated constraints, and produces an object representing the result, formatted for a particular display resolution and measuring mode.
+An array of characters that contains the string to create a new
The length of the string, in character count.
The text formatting object to apply to the string.
The width of the layout box.
The height of the layout box.
The number of physical pixels per DIP (device independent pixel). For example, if rendering onto a 96 DPI device pixelsPerDip is 1. If rendering onto a 120 DPI device pixelsPerDip is 1.25 (120/96).
An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specifies the font size and pixels per DIP.
Instructs the text layout to use the same metrics as GDI bi-level text when set to
When this method returns, contains an address to the reference of the resultant text layout object.
If this method succeeds, it returns
The resulting text layout should only be used for the intended resolution, and for cases where text scalability is desired CreateTextLayout should be used instead.
+Creates an inline object for trimming, using an ellipsis as the omission sign.
+A text format object, created with CreateTextFormat, used for text layout.
When this method returns, contains an address of a reference to the omission (that is, ellipsis trimming) sign created by this method.
If this method succeeds, it returns
The ellipsis will be created using the current settings of the format, including base font, style, and any effects. Alternate omission signs can be created by the application by implementing
Returns an interface for performing text analysis.
+When this method returns, contains an address of a reference to the newly created text analyzer object.
If this method succeeds, it returns
Creates a number substitution object using a locale name, substitution method, and an indicator whether to ignore user overrides (use NLS defaults for the given culture instead).
+A value that specifies how to apply number substitution on digits and related punctuation.
The name of the locale to be used in the numberSubstitution object.
A Boolean flag that indicates whether to ignore user overrides.
When this method returns, contains an address to a reference to the number substitution object created by this method.
If this method succeeds, it returns
Creates a glyph run analysis object, which encapsulates information used to render a glyph run.
+A structure that contains the properties of the glyph run (font face, advances, and so on).
Number of physical pixels per DIP (device independent pixel). For example, if rendering onto a 96 DPI bitmap then pixelsPerDip is 1. If rendering onto a 120 DPI bitmap then pixelsPerDip is 1.25.
Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified the emSize and pixelsPerDip.
A value that specifies the rendering mode, which must be one of the raster rendering modes (that is, not default and not outline).
Specifies the measuring mode to use with glyphs.
The horizontal position (X-coordinate) of the baseline origin, in DIPs.
Vertical position (Y-coordinate) of the baseline origin, in DIPs.
When this method returns, contains an address of a reference to the newly created glyph run analysis object.
If this method succeeds, it returns
The glyph run analysis object contains the results of analyzing the glyph run, including the positions of all the glyphs and references to all of the rasterized glyphs in the font cache.
+Creates a rendering parameters object with the specified properties.
+The root factory interface for all DirectWrite objects.
+Gets a font collection representing the set of EUDC (end-user defined characters) fonts.
+The font collection to fill.
Whether to check for updates.
If this method succeeds, it returns
Note that if no EUDC is set on the system, the returned collection will be empty, meaning it will return success but GetFontFamilyCount will be zero.
+Creates a rendering parameters object with the specified properties.
+The gamma level to be set for the new rendering parameters object.
The enhanced contrast level to be set for the new rendering parameters object.
The amount of contrast enhancement to use for grayscale antialiasing, zero or greater.
The ClearType level to be set for the new rendering parameters object.
Represents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text.
A value that represents the method (for example, ClearType natural quality) for rendering glyphs.
When this method returns, contains an address of a reference to the newly created rendering parameters object.
Standard
An object that encapsulates a set of fonts, such as the set of fonts installed on the system, or the set of fonts in a particular directory. The font collection API can be used to discover what font families and fonts are available, and to obtain some metadata about the fonts.
+The
* pFontCollection = null ; // Get the system font collection. + if (SUCCEEDED(hr)) + { hr = pDWriteFactory->GetSystemFontCollection(&pFontCollection); + } +
To determine what fonts are available on the system, get a reference to the system font collection. You can then use the
#include <dwrite.h> + #include <string.h> + #include <stdio.h> + #include <new> // SafeRelease inline function. + template <class T> inline void SafeRelease(T **ppT) + { if (*ppT) { (*ppT)->Release(); *ppT =+null ; } + } void wmain() + {* pDWriteFactory = null ;hr = ( , __uuidof( ), reinterpret_cast< **>(&pDWriteFactory) ); * pFontCollection = null ; // Get the system font collection. if (SUCCEEDED(hr)) { hr = pDWriteFactory->GetSystemFontCollection(&pFontCollection); } UINT32 familyCount = 0; // Get the number of font families in the collection. if (SUCCEEDED(hr)) { familyCount = pFontCollection->GetFontFamilyCount(); } for (UINT32 i = 0; i < familyCount; ++i) {* pFontFamily = null ; // Get the font family. if (SUCCEEDED(hr)) { hr = pFontCollection->GetFontFamily(i, &pFontFamily); }* pFamilyNames = null ; // Get a list of localized strings for the family name. if (SUCCEEDED(hr)) { hr = pFontFamily->GetFamilyNames(&pFamilyNames); } UINT32 index = 0;exists = false; wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; if (SUCCEEDED(hr)) { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames->FindLocaleName(localeName, &index, &exists); } if (SUCCEEDED(hr) && !exists) // if the above find did not find a match, retry with US English { hr = pFamilyNames->FindLocaleName(L"en-us", &index, &exists); } } // If the specified locale doesn't exist, select the first on the list. if (!exists) index = 0; UINT32 length = 0; // Get the string length. if (SUCCEEDED(hr)) { hr = pFamilyNames->GetStringLength(index, &length); } // Allocate a string big enough to hold the name. wchar_t* name = new (std::nothrow) wchar_t[length+1]; if (name == null ) { hr = E_OUTOFMEMORY; } // Get the family name. if (SUCCEEDED(hr)) { hr = pFamilyNames->GetString(index, name, length+1); } if (SUCCEEDED(hr)) { // Print out the family name. wprintf(L"%s\n", name); } SafeRelease(&pFontFamily); SafeRelease(&pFamilyNames); delete [] name; } SafeRelease(&pFontCollection); SafeRelease(&pDWriteFactory); + }
Gets the number of font families in the collection.
+Gets the number of font families in the collection.
+The number of font families in the collection.
Creates a font family object given a zero-based font family index.
+Zero-based index of the font family.
When this method returns, contains the address of a reference to the newly created font family object.
Finds the font family with the specified family name.
+An array of characters, which is null-terminated, containing the name of the font family. The name is not case-sensitive but must otherwise exactly match a family name in the collection.
When this method returns, contains the zero-based index of the matching font family if the family name was found; otherwise, UINT_MAX.
When this method returns, TRUE if the family name exists; otherwise,
Gets the font object that corresponds to the same physical font as the specified font face object. The specified physical font must belong to the font collection.
+A font face object that specifies the physical font.
When this method returns, contains the address of a reference to the newly created font object if successful; otherwise,
Used to construct a collection of fonts given a particular type of key.
+The font collection loader interface is recommended to be implemented by a singleton object. Note that font collection loader implementations must not register themselves with DirectWrite factory inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed outside of the font file loader implementation as a separate step.
+Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
+Obtains the file format type of a font face.
+Obtains the index of a font face in the context of its font files.
+Obtains the algorithmic style simulation flags of a font face.
+Determines whether the font is a symbol font.
+Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+Obtains the number of glyphs in the font face.
+Obtains the file format type of a font face.
+A value that indicates the type of format for the font face (such as Type 1, TrueType, vector, or bitmap).
Obtains the font files representing a font face.
+If fontFiles is
When this method returns, contains a reference to a user-provided array that stores references to font files representing the font face. This parameter can be
If this method succeeds, it returns
The
Then, call the method a second time, passing the numberOfFiles value that was output the first call, and a non-null buffer of the correct size to store the
Obtains the index of a font face in the context of its font files.
+The zero-based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value is zero.
Obtains the algorithmic style simulation flags of a font face.
+Font face simulation flags for algorithmic means of making text bold or italic.
Determines whether the font is a symbol font.
+Returns TRUE if the font is a symbol font, otherwise
Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+When this method returns, a?
Obtains the number of glyphs in the font face.
+The number of glyphs in the font face.
Obtains ideal (resolution-independent) glyph metrics in font design units.
+An array of glyph indices for which to compute metrics. The array must contain at least as many elements as specified by glyphCount.
The number of elements in the glyphIndices array.
When this method returns, contains an array of
Indicates whether the font is being used in a sideways run. This can affect the glyph metrics if the font has oblique simulation because sideways oblique simulation differs from non-sideways oblique simulation
If this method succeeds, it returns
Design glyph metrics are used for glyph positioning.
+Returns the nominal mapping of UCS4 Unicode code points to glyph indices as defined by the font 'CMAP' table.
+An array of USC4 code points from which to obtain nominal glyph indices. The array must be allocated and be able to contain the number of elements specified by codePointCount.
The number of elements in the codePoints array.
When this method returns, contains a reference to an array of nominal glyph indices filled by this function.
If this method succeeds, it returns
Note that this mapping is primarily provided for line layout engines built on top of the physical font API. Because of OpenType glyph substitution and line layout character substitution, the nominal conversion does not always correspond to how a Unicode string will map to glyph indices when rendering using a particular font face. Also, note that Unicode variant selectors provide for alternate mappings for character to glyph. This call will always return the default variant.
When characters are not present in the font this method returns the index 0, which is the undefined glyph or ".notdef" glyph. If a character isn't in a font,
Finds the specified OpenType font table if it exists and returns a reference to it. The function accesses the underlying font data through the
If this method succeeds, it returns
The context for the same tag may be different for each call, so each one must be held and released separately.
+Releases the table obtained earlier from TryGetFontTable.
+Computes the outline of a run of glyphs by calling back to the outline sink interface.
+The logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch.
An array of glyph indices. The glyphs are in logical order and the advance direction depends on the isRightToLeft parameter. The array must be allocated and be able to contain the number of elements specified by glyphCount.
An optional array of glyph advances in DIPs. The advance of a glyph is the amount to advance the position (in the direction of the baseline) after drawing the glyph. glyphAdvances contains the number of elements specified by glyphCount.
An optional array of glyph offsets, each of which specifies the offset along the baseline and offset perpendicular to the baseline of a glyph relative to the current pen position. glyphOffsets contains the number of elements specified by glyphCount.
The number of glyphs in the run.
If TRUE, the ascender of the glyph runs alongside the baseline. If
A client can render a vertical run by setting isSideways to TRUE and rotating the resulting geometry 90 degrees to the right using a transform. The isSideways and isRightToLeft parameters cannot both be true.
The visual order of the glyphs. If this parameter is
A reference to the interface that is called back to perform outline drawing operations.
If this method succeeds, it returns
Determines the recommended rendering mode for the font, using the specified size and rendering parameters.
+The logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch.
The number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96, this value is 1.0f. If the DPI is 120, this value is 120.0f/96.
The measuring method that will be used for glyphs in the font. Renderer implementations may choose different rendering modes for different measuring methods, for example:
A reference to an object that contains rendering settings such as gamma level, enhanced contrast, and ClearType level. This parameter is necessary in case the rendering parameters object overrides the rendering mode.
When this method returns, contains a value that indicates the recommended rendering mode to use.
Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.
+The logical size of the font in DIP units.
The number of physical pixels per DIP.
An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.
A reference to a DWRITE_FONT_METRICS structure to fill in. The metrics returned by this function are in font design units.
Obtains glyph metrics in font design units with the return values compatible with what GDI would produce.
+The ogical size of the font in DIP units.
The number of physical pixels per DIP.
An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.
When set to
An array of glyph indices for which to compute the metrics.
The number of elements in the glyphIndices array.
An array of
A
Standard
Allows you to access fallback fonts from the font list.
The
Determines an appropriate font to use to render the beginning range of text.
+The text source implementation holds the text and locale.
Starting position to analyze.
Length of the text to analyze.
Default font collection to use.
Family name of the base font. If you pass null, no matching will be done against the family.
The desired weight.
The desired style.
The desired stretch.
Length of text mapped to the mapped font. This will always be less than or equal to the text length and greater than zero (if the text length is non-zero) so the caller advances at least one character.
The font that should be used to render the first mappedLength characters of the text. If it returns
Scale factor to multiply the em size of the returned font by.
Determines an appropriate font to use to render the beginning range of text.
+The text source implementation holds the text and locale.
Starting position to analyze.
Length of the text to analyze.
Default font collection to use.
Family name of the base font. If you pass null, no matching will be done against the family.
The desired weight.
The desired style.
The desired stretch.
Length of text mapped to the mapped font. This will always be less than or equal to the text length and greater than zero (if the text length is non-zero) so the caller advances at least one character.
The font that should be used to render the first mappedLength characters of the text. If it returns
Scale factor to multiply the em size of the returned font by.
If this method succeeds, it returns
Specifies properties used to identify and execute typographic features in the current font face.
+A non-zero value generally enables the feature execution, while the zero value disables it. A feature requiring a selector uses this value to indicate the selector index.
The OpenType standard provides access to typographic features available in the font by means of a feature tag with the associated parameters. The OpenType feature tag is a 4-byte identifier of the registered name of a feature. For example, the 'kern' feature name tag is used to identify the 'Kerning' feature in OpenType font. Similarly, the OpenType feature tag for 'Standard Ligatures' and 'Fractions' is 'liga' and 'frac' respectively. Since a single run can be associated with more than one typographic features, the Text String API accepts typographic settings for a run as a list of features and are executed in the order they are specified.
The value of the tag member represents the OpenType name tag of the feature, while the param value represents additional parameter for the execution of the feature referred by the tag member. Both nameTag and parameter are stored as little endian, the same convention followed by GDI. Most features treat the Param value as a binary value that indicates whether to turn the execution of the feature on or off, with it being off by default in the majority of cases. Some features, however, treat this value as an integral value representing the integer index to the list of alternate results it may produce during the execution; for instance, the feature 'Stylistic Alternates' or 'salt' uses the parameter value as an index to the list of alternate substituting glyphs it could produce for a specified glyph.
+The feature OpenType name identifier.
The execution parameter of the feature.
Represents a font file. Applications such as font managers or font viewers can call
Obtains the reference to the reference key of a font file. The returned reference is valid until the font file object is released.
+When this method returns, contains an address of a reference to the font file reference key. Note that the reference value is only valid until the font file object it is obtained from is released. This parameter is passed uninitialized.
When this method returns, contains the size of the font file reference key in bytes. This parameter is passed uninitialized.
If this method succeeds, it returns
Obtains the file loader associated with a font file object.
+When this method returns, contains the address of a reference to the font file loader associated with the font file object.
If this method succeeds, it returns
Analyzes a file and returns whether it represents a font, and whether the font type is supported by the font system.
+TRUE if the font type is supported by the font system; otherwise,
When this method returns, contains a value that indicates the type of the font file. Note that even if isSupportedFontType is
When this method returns, contains a value that indicates the type of the font face. If fontFileType is not equal to
When this method returns, contains the number of font faces contained in the font file.
If this method succeeds, it returns
Advances to the next font file in the collection. When it is first created, the enumerator is positioned before the first element of the collection and the first call to MoveNext advances to the first file.
+Handles loading font file resources of a particular type from a font file reference key into a font file stream object.
+The font file loader interface is recommended to be implemented by a singleton object. Note that font file loader implementations must not register themselves with DirectWrite factory inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed outside of the font file loader implementation as a separate step.
+Handles loading font file resources of a particular type from a font file reference key into a font file stream object.
+The font file loader interface is recommended to be implemented by a singleton object. Note that font file loader implementations must not register themselves with DirectWrite factory inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed outside of the font file loader implementation as a separate step.
+Creates a font file stream object that encapsulates an open file resource.
+A reference to a font file reference key that uniquely identifies the font file resource within the scope of the font loader being used. The buffer allocated for this key must at least be the size, in bytes, specified by fontFileReferenceKeySize.
The size of font file reference key, in bytes.
When this method returns, contains the address of a reference to the newly created
If this method succeeds, it returns
The resource is closed when the last reference to fontFileStream is released.
+Reads a fragment from a font file.
+Note that ReadFileFragment implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from ReadFileFragment.
DirectWrite may invoke
Reads a fragment from a font file.
+Note that ReadFileFragment implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from ReadFileFragment.
DirectWrite may invoke
Reads a fragment from a font file.
+When this method returns, contains an address of a reference to the start of the font file fragment. This parameter is passed uninitialized.
The offset of the fragment, in bytes, from the beginning of the font file.
The size of the file fragment, in bytes.
When this method returns, contains the address of a reference to a reference to the client-defined context to be passed to ReleaseFileFragment.
If this method succeeds, it returns
Note that ReadFileFragment implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from ReadFileFragment.
DirectWrite may invoke
Releases a fragment from a file.
+A reference to the client-defined context of a font fragment returned from ReadFileFragment.
Obtains the total size of a file.
+When this method returns, contains the total size of the file.
If this method succeeds, it returns
Implementing GetFileSize() for asynchronously loaded font files may require downloading the complete file contents. Therefore, this method should be used only for operations that either require a complete font file to be loaded (for example, copying a font file) or that need to make decisions based on the value of the file size (for example, validation against a persisted file size).
+Obtains the last modified time of the file.
+When this method returns, contains the last modified time of the file in the format that represents the number of 100-nanosecond intervals since January 1, 1601 (UTC).
If this method succeeds, it returns
The "last modified time" is used by DirectWrite font selection algorithms to determine whether one font resource is more up to date than another one.
+Provides interoperability with GDI, such as methods to convert a font face to a
Creates a font object that matches the properties specified by the
A structure containing a GDI-compatible font description.
When this method returns, contains an address of a reference to a newly created
If this method succeeds, it returns
Initializes a
An
When this method returns, contains a structure that receives a GDI-compatible font description.
When this method returns, contains TRUE if the specified font object is part of the system font collection; otherwise,
If this method succeeds, it returns
The conversion to a
Initializes a
An
When this method returns, contains a reference to a structure that receives a GDI-compatible font description.
If this method succeeds, it returns
The conversion to a
Creates an
A handle to a device context into which a font has been selected. It is assumed that the client has already performed font mapping and that the font selected into the device context is the actual font to be used for rendering glyphs.
Contains an address of a reference to the newly created font face object, or
This function is intended for scenarios in which an application wants to use GDI and Uniscribe 1.x for text layout and shaping, but DirectWrite for final rendering. This function assumes the client is performing text output using glyph indexes.
+Creates an object that encapsulates a bitmap and memory DC (device context) which can be used for rendering glyphs.
+A handle to the optional device context used to create a compatible memory DC (device context).
The width of the bitmap render target.
The height of the bitmap render target.
When this method returns, contains an address of a reference to the newly created
Contains the information needed by renderers to draw glyph runs. All coordinates are in device independent pixels (DIPs).
+The physical font face object to draw with.
The logical size of the font in DIPs (equals 1/96 inch), not points.
The number of glyphs in the glyph run.
A reference to an array of indices to render for the glyph run.
A reference to an array containing glyph advance widths for the glyph run.
A reference to an array containing glyph offsets for the glyph run.
If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways = true and rotating the entire run 90 degrees to the right via a rotate transform.
The implicit resolved bidi level of the run. Odd levels indicate right-to-left languages like Hebrew and Arabic, while even levels indicate left-to-right languages like English and Japanese (when written horizontally). For right-to-left languages, the text origin is on the right, and text should be drawn to the left.
Contains low-level information used to render a glyph run.
+The alpha texture can be a bi-level alpha texture or a ClearType alpha texture.
A bi-level alpha texture contains one byte per pixel, therefore the size of the buffer for a bi-level texture will be the area of the texture bounds, in bytes. Each byte in a bi-level alpha texture created by CreateAlphaTexture is either set to DWRITE_ALPHA_MAX (that is, 255) or zero.
A ClearType alpha texture contains three bytes per pixel, therefore the size of the buffer for a ClearType alpha texture is three times the area of the texture bounds, in bytes.
+Gets the bounding rectangle of the physical pixels affected by the glyph run.
+Specifies the type of texture requested. If a bi-level texture is requested, the bounding rectangle includes only bi-level glyphs. Otherwise, the bounding rectangle includes only antialiased glyphs.
When this method returns, contains the bounding rectangle of the physical pixels affected by the glyph run, or an empty rectangle if there are no glyphs of the specified texture type.
Creates an alpha texture of the specified type for glyphs within a specified bounding rectangle.
+A value that specifies the type of texture requested. This can be DWRITE_TEXTURE_BILEVEL_1x1 or
The bounding rectangle of the texture, which can be different than the bounding rectangle returned by GetAlphaTextureBounds.
When this method returns, contains the array of alpha values from the texture. The buffer allocated for this array must be at least the size of bufferSize.
The size of the alphaValues array, in bytes. The minimum size depends on the dimensions of the rectangle and the type of texture requested.
If this method succeeds, it returns
Gets alpha blending properties required for ClearType blending.
+An object that specifies the ClearType level and enhanced contrast, gamma, pixel geometry, and rendering mode. In most cases, the values returned by the output parameters of this method are based on the properties of this object, unless a GDI-compatible rendering mode was specified.
When this method returns, contains the gamma value to use for gamma correction.
When this method returns, contains the enhanced contrast value to be used for blending.
When this method returns, contains the ClearType level used in the alpha blending.
If this method succeeds, it returns
Contains additional properties related to those in
Wraps an application-defined inline graphic, allowing DWrite to query metrics as if the graphic were a glyph inline with the text.
+Wraps an application-defined inline graphic, allowing DWrite to query metrics as if the graphic were a glyph inline with the text.
+ The application implemented rendering callback (
If this method succeeds, it returns
If this method succeeds, it returns
The overhangs should be returned relative to the reported size of the object (see
If this method succeeds, it returns
Layout uses this to determine the line-breaking behavior of the inline object among the text.
+When this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately preceding it.
When this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately following it.
If this method succeeds, it returns
Line breakpoint characteristics of a character.
+Indicates a breaking condition before the character.
Indicates a breaking condition after the character.
Indicates that the character is some form of whitespace, which may be meaningful for justification.
Indicates that the character is a soft hyphen, often used to indicate hyphenation points inside words.
Reserved for future use.
A built-in implementation of the
Obtains the absolute font file path from the font file reference key.
+The font file reference key that uniquely identifies the local font file within the scope of the font loader being used.
If this method succeeds, the absolute font file path from the font file reference key.
Obtains the last write time of the file from the font file reference key.
+The font file reference key that uniquely identifies the local font file within the scope of the font loader being used.
The time of the last font file modification.
Obtains the length of the absolute file path from the font file reference key.
+Font file reference key that uniquely identifies the local font file within the scope of the font loader being used.
Size of font file reference key in bytes.
Length of the file path string, not including the terminated
Obtains the absolute font file path from the font file reference key.
+The font file reference key that uniquely identifies the local font file within the scope of the font loader being used.
The size of font file reference key in bytes.
The character array that receives the local file path.
The length of the file path character array.
If this method succeeds, it returns
Obtains the last write time of the file from the font file reference key.
+The font file reference key that uniquely identifies the local font file within the scope of the font loader being used.
The size of font file reference key in bytes.
The time of the last font file modification.
Represents a collection of strings indexed by locale name.
+The set of strings represented by an
A common use for the
+* pFamilyNames = null ; // Get a list of localized strings for the family name. + if (SUCCEEDED(hr)) + { hr = pFontFamily->GetFamilyNames(&pFamilyNames); + } UINT32 index = 0; +exists = false; wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; if (SUCCEEDED(hr)) + { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames->FindLocaleName(localeName, &index, &exists); } if (SUCCEEDED(hr) && !exists) // if the above find did not find a match, retry with US English { hr = pFamilyNames->FindLocaleName(L"en-us", &index, &exists); } + } // If the specified locale doesn't exist, select the first on the list. + if (!exists) index = 0; UINT32 length = 0; // Get the string length. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetStringLength(index, &length); + } // Allocate a string big enough to hold the name. + wchar_t* name = new (std::nothrow) wchar_t[length+1]; + if (name == null ) + { hr = E_OUTOFMEMORY; + } // Get the family name. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetString(index, name, length+1); + } +
Gets the number of language/string pairs.
+Gets the number of language/string pairs.
+The number of language/string pairs.
Gets the zero-based index of the locale name/string pair with the specified locale name.
+A null-terminated array of characters containing the locale name to look for.
The zero-based index of the locale name/string pair. This method initializes index to UINT_MAX.
When this method returns, contains TRUE if the locale name exists; otherwise,
Note that if the locale name does not exist, the return value is a success and the exists parameter is
UINT32 index = 0; ++exists = false; wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; if (SUCCEEDED(hr)) + { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames->FindLocaleName(localeName, &index, &exists); } if (SUCCEEDED(hr) && !exists) // if the above find did not find a match, retry with US English { hr = pFamilyNames->FindLocaleName(L"en-us", &index, &exists); } + } // If the specified locale doesn't exist, select the first on the list. + if (!exists) index = 0; +
Gets the length in characters (not including the null terminator) of the locale name with the specified index.
+Zero-based index of the locale name to be retrieved.
When this method returns, contains the length in characters of the locale name, not including the null terminator.
If this method succeeds, it returns
Copies the locale name with the specified index to the specified array.
+Zero-based index of the locale name to be retrieved.
When this method returns, contains a character array, which is null-terminated, that receives the locale name from the language/string pair. The buffer allocated for this array must be at least the size of size, in element count.
The size of the array in characters. The size must include space for the terminating null character.
If this method succeeds, it returns
Gets the length in characters (not including the null terminator) of the string with the specified index.
+A zero-based index of the language/string pair.
The length in characters of the string, not including the null terminator, from the language/string pair.
If this method succeeds, it returns
Use GetStringLength to get the string length before calling the
UINT32 length = 0; // Get the string length. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetStringLength(index, &length); + } // Allocate a string big enough to hold the name. + wchar_t* name = new (std::nothrow) wchar_t[length+1]; + if (name ==+null ) + { hr = E_OUTOFMEMORY; + } // Get the family name. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetString(index, name, length+1); + } +
Copies the string with the specified index to the specified array.
+The zero-based index of the language/string pair to be examined.
The null terminated array of characters that receives the string from the language/string pair. The buffer allocated for this array should be at least the size of size. GetStringLength can be used to get the size of the array before using this method.
The size of the array in characters. The size must include space for the terminating null character. GetStringLength can be used to get the size of the array before using this method.
If this method succeeds, it returns
The string returned must be allocated by the caller. You can get the size of the string by using the GetStringLength method prior to calling GetString, as shown in the following example.
UINT32 length = 0; // Get the string length. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetStringLength(index, &length); + } // Allocate a string big enough to hold the name. + wchar_t* name = new (std::nothrow) wchar_t[length+1]; + if (name ==+null ) + { hr = E_OUTOFMEMORY; + } // Get the family name. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetString(index, name, length+1); + } +
Holds the appropriate digits and numeric punctuation for a specified locale.
+Defines the pixel snapping properties such as pixels per DIP(device-independent pixel) and the current transform matrix of a text renderer.
+Represents text rendering settings such as ClearType level, enhanced contrast, and gamma correction for glyph rasterization and filtering.
An application typically obtains a rendering parameters object by calling the
Gets the gamma value used for gamma correction. Valid values must be greater than zero and cannot exceed 256.
+The gamma value is used for gamma correction, which compensates for the non-linear luminosity response of most monitors.
+Gets the enhanced contrast property of the rendering parameters object. Valid values are greater than or equal to zero.
+Enhanced contrast is the amount to increase the darkness of text, and typically ranges from 0 to 1. Zero means no contrast enhancement.
+Gets the ClearType level of the rendering parameters object.
+The ClearType level represents the amount of ClearType ? that is, the degree to which the red, green, and blue subpixels of each pixel are treated differently. Valid values range from zero (meaning no ClearType, which is equivalent to grayscale anti-aliasing) to one (meaning full ClearType)
+Gets the pixel geometry of the rendering parameters object.
+Gets the rendering mode of the rendering parameters object.
+By default, the rendering mode is initialized to
Gets the gamma value used for gamma correction. Valid values must be greater than zero and cannot exceed 256.
+Returns the gamma value used for gamma correction. Valid values must be greater than zero and cannot exceed 256.
The gamma value is used for gamma correction, which compensates for the non-linear luminosity response of most monitors.
+Gets the enhanced contrast property of the rendering parameters object. Valid values are greater than or equal to zero.
+Returns the amount of contrast enhancement. Valid values are greater than or equal to zero.
Enhanced contrast is the amount to increase the darkness of text, and typically ranges from 0 to 1. Zero means no contrast enhancement.
+Gets the ClearType level of the rendering parameters object.
+The ClearType level of the rendering parameters object.
The ClearType level represents the amount of ClearType ? that is, the degree to which the red, green, and blue subpixels of each pixel are treated differently. Valid values range from zero (meaning no ClearType, which is equivalent to grayscale anti-aliasing) to one (meaning full ClearType)
+Gets the pixel geometry of the rendering parameters object.
+A value that indicates the type of pixel geometry used in the rendering parameters object.
Gets the rendering mode of the rendering parameters object.
+A value that indicates the rendering mode of the rendering parameters object.
By default, the rendering mode is initialized to
Contains shaping output properties for an output glyph.
+Indicates that the glyph has justification applied.
Indicates that the glyph is the start of a cluster.
Indicates that the glyph is a diacritic mark.
Indicates that the glyph is a word boundary with no visible space.
Reserved for future use.
This interface is implemented by the text analyzer's client to receive the output of a given text analysis.
+The text analyzer disregards any current state of the analysis sink, therefore, a Set method call on a range overwrites the previously set analysis result of the same range.
+The interface you implement to receive the output of the text analyzers.
+The text analyzer calls back to this to report the actual orientation of each character for shaping and drawing.
+The starting position to report from.
Number of UTF-16 units of the reported range.
A
The adjusted bidi level to be used by the client layout for reordering runs. This will differ from the resolved bidi level retrieved from the source for cases such as Arabic stacked top-to-bottom, where the glyphs are still shaped as RTL, but the runs are TTB along with any CJK or Latin.
Whether the glyphs are rotated on their side, which is the default case for CJK and the case stacked Latin
Whether the script should be shaped as right-to-left. For Arabic stacked top-to-bottom, even when the adjusted bidi level is coerced to an even level, this will still be true.
Returns a successful code or an error code to abort analysis.
Implemented by the text analyzer's client to provide text to the analyzer. It allows the separation between the logical view of text as a continuous stream of characters identifiable by unique text positions, and the actual memory layout of potentially discrete blocks of text in the client's backing store.
+If any of these callbacks returns an error, then the analysis functions will stop prematurely and return a callback error. Note that rather than return E_NOTIMPL, an application should stub the method and return a constant/null and
The interface you implement to provide needed information to the text analyzer, like the text and associated text properties.
Note?? If any of these callbacks return an error, the analysis functions will stop prematurely and return a callback error.? +
Used by the text analyzer to obtain the desired glyph orientation and resolved bidi level.
+The text position.
A reference to the text length.
A
A reference to the resolved bidi level.
Returning an error will abort the analysis.
The text analyzer calls back to this to get the desired glyph orientation and resolved bidi level, which it uses along with the script properties of the text to determine the actual orientation of each character, which it reports back to the client via the sink SetGlyphOrientation method.
+Analyzes various text properties for complex script processing such as bidirectional (bidi) support for languages like Arabic, determination of line break opportunities, glyph placement, and number substitution.
+Analyzes a text range for script boundaries, reading text attributes from the source and reporting the Unicode script ID to the sink callback SetScript.
+If this method succeeds, it returns
Analyzes a text range for script directionality, reading attributes from the source and reporting levels to the sink callback SetBidiLevel.
+If this method succeeds, it returns
While the function can handle multiple paragraphs, the text range should not arbitrarily split the middle of paragraphs. Otherwise, the returned levels may be wrong, because the Bidi algorithm is meant to apply to the paragraph as a whole.
+Analyzes a text range for spans where number substitution is applicable, reading attributes from the source and reporting substitutable ranges to the sink callback SetNumberSubstitution.
+If this method succeeds, it returns
Although the function can handle multiple ranges of differing number substitutions, the text ranges should not arbitrarily split the middle of numbers. Otherwise, it will treat the numbers separately and will not translate any intervening punctuation.
+Analyzes a text range for potential breakpoint opportunities, reading attributes from the source and reporting breakpoint opportunities to the sink callback SetLineBreakpoints.
+If this method succeeds, it returns
Although the function can handle multiple paragraphs, the text range should not arbitrarily split the middle of paragraphs, unless the specified text span is considered a whole unit. Otherwise, the returned properties for the first and last characters will inappropriately allow breaks.
+Parses the input text string and maps it to the set of glyphs and associated glyph data according to the font and the writing system's rendering rules.
+An array of characters to convert to glyphs.
The length of textString.
The font face that is the source of the output glyphs.
A Boolean flag set to TRUE if the text is intended to be drawn vertically.
A Boolean flag set to TRUE for right-to-left text.
A reference to a Script analysis result from an AnalyzeScript call.
The locale to use when selecting glyphs. For example the same character may map to different glyphs for ja-jp versus zh-chs. If this is
A reference to an optional number substitution which selects the appropriate glyphs for digits and related numeric characters, depending on the results obtained from AnalyzeNumberSubstitution. Passing
An array of references to the sets of typographic features to use in each feature range.
The length of each feature range, in characters. The sum of all lengths should be equal to textLength.
The number of feature ranges.
The maximum number of glyphs that can be returned.
When this method returns, contains the mapping from character ranges to glyph ranges.
When this method returns, contains a reference to an array of structures that contains shaping properties for each character.
The output glyph indices.
When this method returns, contains a reference to an array of structures that contain shaping properties for each output glyph.
When this method returns, contains the actual number of glyphs returned if the call succeeds.
If this method succeeds, it returns
Note that the mapping from characters to glyphs is, in general, many-to-many. The recommended estimate for the per-glyph output buffers is (3 * textLength / 2 + 16). This is not guaranteed to be sufficient. The value of the actualGlyphCount parameter is only valid if the call succeeds. In the event that maxGlyphCount is not big enough, HRESULT_FROM_WIN32(
Places glyphs output from the GetGlyphs method according to the font and the writing system's rendering rules.
+If this method succeeds, it returns
Place glyphs output from the GetGlyphs method according to the font and the writing system's rendering rules.
+If this method succeeds, it returns
Analyzes various text properties for complex script processing.
+Analyzes a text range for script orientation, reading text and attributes from the source and reporting results to the sink.
+Source object to analyze.
Starting position within the source object.
Length to analyze.
Length to analyze.
If this method succeeds, it returns
Applies spacing between characters, properly adjusting glyph clusters and diacritics.
+The spacing before each character, in reading order.
The spacing after each character, in reading order.
The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.
The length of the clustermap and original text.
The number of glyphs.
Mapping from character ranges to glyph ranges.
The advance width of each glyph.
The offset of the origin of each glyph.
Properties of each glyph, from GetGlyphs.
The new advance width of each glyph.
The new offset of the origin of each glyph.
If this method succeeds, it returns
The input and output advances/offsets are allowed to alias the same array.
+Retrieves the given baseline from the font.
+The font face to read.
A
Whether the baseline is vertical or horizontal.
Simulate the baseline if it is missing in the font.
Script analysis result from AnalyzeScript.
Note??You can pass an empty script analysis structure, like this scriptAnalysis = {};
, and this method will return the default baseline. ? The language of the run.
The baseline coordinate value in design units.
Whether the returned baseline exists in the font.
If this method succeeds, it returns
If the baseline does not exist in the font, it is not considered an error, but the function will return exists = false. You may then use heuristics to calculate the missing base, or, if the flag simulationAllowed is true, the function will compute a reasonable approximation for you.
+Analyzes a text range for script orientation, reading text and attributes from the source and reporting results to the sink callback SetGlyphOrientation.
+If this method succeeds, it returns
Returns 2x3 transform matrix for the respective angle to draw the glyph run.
+A
Whether the run's glyphs are sideways or not.
Returned transform.
If this method succeeds, it returns
The translation component of the transform returned is zero.
+Retrieves the properties for a given script.
+The script for a run of text returned from
A reference to a
Returns properties for the given script. If the script is invalid, it returns generic properties for the unknown script and E_INVALIDARG.
Determines the complexity of text, and whether you need to call
If this method succeeds, it returns
Text is not simple if the characters are part of a script that has complex shaping requirements, require bidi analysis, combine with other characters, reside in the supplementary planes, or have glyphs that participate in standard OpenType features. The length returned will not split combining marks from their base characters.
+Retrieves justification opportunity information for each of the glyphs given the text and shaping glyph properties.
+Font face that was used for shaping. This is mainly important for returning correct results of the kashida width.
May be
Font em size used for the glyph run.
Script of the text from the itemizer.
Length of the text.
Number of glyphs.
Characters used to produce the glyphs.
Clustermap produced from shaping.
Glyph properties produced from shaping.
A reference to a
If this method succeeds, it returns
This function is called per-run, after shaping is done via the
Justifies an array of glyph advances to fit the line width.
+The line width.
The glyph count.
A reference to a
An array of glyph advances.
An array of glyph offsets.
The returned array of justified glyph advances.
The returned array of justified glyph offsets.
If this method succeeds, it returns
You call JustifyGlyphAdvances after you call
Fills in new glyphs for complex scripts where justification increased the advances of glyphs, such as Arabic with kashida.
+Font face used for shaping.
May be
Font em size used for the glyph run.
Script of the text from the itemizer.
Length of the text.
Number of glyphs.
Maximum number of output glyphs allocated by caller.
Clustermap produced from shaping.
Original glyphs produced from shaping.
Original glyph advances produced from shaping.
Justified glyph advances from
Justified glyph offsets from
Properties of each glyph, from
The new glyph count written to the modified arrays, or the needed glyph count if the size is not large enough.
Updated clustermap.
Updated glyphs with new glyphs inserted where needed.
Updated glyph advances.
Updated glyph offsets.
If this method succeeds, it returns
You call GetJustifiedGlyphs after the line has been justified, and it is per-run.
You should call GetJustifiedGlyphs if
Use GetJustifiedGlyphs mainly for cursive scripts like Arabic. If maxGlyphCount is not large enough, GetJustifiedGlyphs returns the error E_NOT_SUFFICIENT_BUFFER and fills the variable to which actualGlyphCount points with the needed glyph count.
+ The
To get a reference to the
if (SUCCEEDED(hr)) + { hr = pDWriteFactory_->CreateTextFormat( L"Gabriola",null ,, , , 72.0f, L"en-us", &pTextFormat_ ); + }
When creating an
These properties cannot be changed after the
The
To draw text with multiple formats, or to use a custom text renderer, use the
This object may not be thread-safe, and it may carry the state of text format change.
+Sets trimming options for text overflowing the layout width.
+Text trimming options.
Application-defined omission sign. This parameter may be
If this method succeeds, it returns
Gets or sets the alignment option of text relative to the layout box's leading and trailing edge.
+Gets or sets the alignment option of a paragraph which is relative to the top and bottom edges of a layout box.
+Gets or sets the word wrapping option.
+Gets or sets the current reading direction for text in a paragraph.
+Gets or sets the direction that text lines flow.
+Gets or sets the incremental tab stop position.
+Gets the current font collection.
+Gets the font weight of the text.
+Gets the font style of the text.
+Gets the font stretch of the text.
+Gets the font size in DIP unites.
+Sets the alignment of text in a paragraph, relative to the leading and trailing edge of a layout box for a
This method can return one of these values.
Return code | Description |
---|---|
| The method succeeded. |
| The textAlignment argument is invalid. |
?
The text can be aligned to the leading or trailing edge of the layout box, or it can be centered. The following illustration shows text with the alignment set to
See
Sets the alignment option of a paragraph relative to the layout box's top and bottom edge.
+The paragraph alignment option being set for a paragraph; see
If this method succeeds, it returns
Sets the word wrapping option.
+The word wrapping option being set for a paragraph; see
If this method succeeds, it returns
Sets the paragraph reading direction.
+ The text reading direction (for example,
If this method succeeds, it returns
The reading direction and flow direction must always be set 90 degrees orthogonal to each other, or else you will get the error DWRITE_E_FLOWDIRECTIONCONFLICTS when you use layout functions like Draw or GetMetrics. So if you set a vertical reading direction (for example, to
Sets the paragraph flow direction.
+The paragraph flow direction; see
If this method succeeds, it returns
Sets a fixed distance between two adjacent tab stops.
+The fixed distance between two adjacent tab stops.
If this method succeeds, it returns
Sets trimming options for text overflowing the layout width.
+Text trimming options.
Application-defined omission sign. This parameter may be
If this method succeeds, it returns
Sets the line spacing.
+Specifies how line height is being determined; see
The line height, or distance between one baseline to another.
The distance from top of line to baseline. A reasonable ratio to lineSpacing is 80 percent.
If this method succeeds, it returns
For the default method, spacing depends solely on the content. For uniform spacing, the specified line height overrides the content.
+Gets the alignment option of text relative to the layout box's leading and trailing edge.
+Returns the text alignment option of the current paragraph.
Gets the alignment option of a paragraph which is relative to the top and bottom edges of a layout box.
+A value that indicates the current paragraph alignment option.
Gets the word wrapping option.
+Returns the word wrapping option; see
Gets the current reading direction for text in a paragraph.
+A value that indicates the current reading direction for text in a paragraph.
Gets the direction that text lines flow.
+The direction that text lines flow within their parent container. For example,
Gets the incremental tab stop position.
+The incremental tab stop value.
Gets the trimming options for text that overflows the layout box.
+When this method returns, it contains a reference to a
When this method returns, contains an address of a reference to a trimming omission sign. This parameter may be
If this method succeeds, it returns
Gets the line spacing adjustment set for a multiline text paragraph.
+A value that indicates how line height is determined.
When this method returns, contains the line height, or distance between one baseline to another.
When this method returns, contains the distance from top of line to baseline. A reasonable ratio to lineSpacing is 80 percent.
If this method succeeds, it returns
Gets the current font collection.
+When this method returns, contains an address of a reference to the font collection being used for the current text.
If this method succeeds, it returns
Gets the length of the font family name.
+The size of the character array, in character count, not including the terminated
Gets a copy of the font family name.
+When this method returns, contains a reference to a character array, which is null-terminated, that receives the current font family name. The buffer allocated for this array should be at least the size, in elements, of nameSize.
The size of the fontFamilyName character array, in character count, including the terminated
If this method succeeds, it returns
Gets the font weight of the text.
+A value that indicates the type of weight (such as normal, bold, or black).
Gets the font style of the text.
+A value which indicates the type of font style (such as slope or incline).
Gets the font stretch of the text.
+A value which indicates the type of font stretch (such as normal or condensed).
Gets the font size in DIP unites.
+The current font size in DIP units.
Gets the length of the locale name.
+The size of the character array in character count, not including the terminated
Gets a copy of the locale name.
+Contains a character array that receives the current locale name.
The size of the character array, in character count, including the terminated
If this method succeeds, it returns
The
To get a reference to the
// Create a text layout using the text format. + if (SUCCEEDED(hr)) + {rect; GetClientRect(hwnd_, &rect); float width = rect.right / dpiScaleX_; float height = rect.bottom / dpiScaleY_; hr = pDWriteFactory_->CreateTextLayout( wszText_, // The string to be laid out and formatted. cTextLength_, // The length of the string. pTextFormat_, // The text format to apply to the string (contains font information, etc). width, // The width of the layout box. height, // The height of the layout box. &pTextLayout_ // The interface reference. ); + }
The
// Set the font weight to bold for the first 5 letters. +textRange = {0, 4}; if (SUCCEEDED(hr)) + { hr = pTextLayout_->SetFontWeight( , textRange); + }
To draw the block of text represented by an
Gets or sets the layout maximum width.
+Gets or sets the layout maximum height.
+Retrieves overall metrics for the formatted string.
+Returns the overhangs (in DIPs) of the layout and all objects contained in it, including text glyphs and inline objects.
+Underlines and strikethroughs do not contribute to the black box determination, since these are actually drawn by the renderer, which is allowed to draw them in any variety of styles.
+Sets the layout maximum width.
+A value that indicates the maximum width of the layout box.
If this method succeeds, it returns
Sets the layout maximum height.
+A value that indicates the maximum height of the layout box.
If this method succeeds, it returns
Sets the font collection.
+The font collection to set.
Text range to which this change applies.
If this method succeeds, it returns
Sets null-terminated font family name for text within a specified text range.
+The font family name that applies to the entire text string within the range specified by textRange.
Text range to which this change applies.
If this method succeeds, it returns
Sets the font weight for text within a text range specified by a
If this method succeeds, it returns
The font weight can be set to one of the predefined font weight values provided in the
The following illustration shows an example of Normal and UltraBold weights for the Palatino Linotype typeface.
+ Sets the font style for text within a text range specified by a
If this method succeeds, it returns
The font style can be set to Normal, Italic or Oblique. The following illustration shows three styles for the Palatino font. For more information, see
Sets the font stretch for text within a specified text range.
+A value which indicates the type of font stretch for text within the range specified by textRange.
Text range to which this change applies.
If this method succeeds, it returns
Sets the font size in DIP units for text within a specified text range.
+The font size in DIP units to be set for text in the range specified by textRange.
Text range to which this change applies.
If this method succeeds, it returns
The
To get a reference to the
// Create a text layout using the text format. + if (SUCCEEDED(hr)) + {rect; GetClientRect(hwnd_, &rect); float width = rect.right / dpiScaleX_; float height = rect.bottom / dpiScaleY_; hr = pDWriteFactory_->CreateTextLayout( wszText_, // The string to be laid out and formatted. cTextLength_, // The length of the string. pTextFormat_, // The text format to apply to the string (contains font information, etc). width, // The width of the layout box. height, // The height of the layout box. &pTextLayout_ // The interface reference. ); + }
The
// Set the font weight to bold for the first 5 letters. +textRange = {0, 4}; if (SUCCEEDED(hr)) + { hr = pTextLayout_->SetFontWeight( , textRange); + }
To draw the block of text represented by an
Sets strikethrough for text within a specified text range.
+A Boolean flag that indicates whether strikethrough takes place in the range specified by textRange.
Text range to which this change applies.
If this method succeeds, it returns
Sets the application-defined drawing effect.
+Application-defined drawing effects that apply to the range. This data object will be passed back to the application's drawing callbacks for final rendering.
The text range to which this change applies.
If this method succeeds, it returns
An
This drawing effect is associated with the specified range and will be passed back to the application by way of the callback when the range is drawn at drawing time.
+Sets the inline object.
+An application-defined inline object.
Text range to which this change applies.
If this method succeeds, it returns
The application may call this function to specify the set of properties describing an application-defined inline object for specific range.
This inline object applies to the specified range and will be passed back to the application by way of the DrawInlineObject callback when the range is drawn. Any text in that range will be suppressed.
+Sets font typography features for text within a specified text range.
+Pointer to font typography settings.
Text range to which this change applies.
If this method succeeds, it returns
Sets the locale name for text within a specified text range.
+A null-terminated locale name string.
Text range to which this change applies.
If this method succeeds, it returns
Gets the layout maximum width.
+Returns the layout maximum width.
Gets the layout maximum height.
+The layout maximum height.
Gets the font collection associated with the text at the specified position.
+The position of the text to inspect.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the underline.
Contains an address of a reference to the current font collection.
Get the length of the font family name at the current position.
+The current text position.
When this method returns, contains the size of the character array containing the font family name, in character count, not including the terminated
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the font family.
If this method succeeds, it returns
Copies the font family name of the text at the specified position.
+The position of the text to examine.
When this method returns, contains an array of characters that receives the current font family name. You must allocate storage for this parameter.
The size of the character array in character count including the terminated
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the font family name.
If this method succeeds, it returns
Gets the font weight of the text at the specified position.
+The position of the text to inspect.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the font weight.
When this method returns, contains a value which indicates the type of font weight being applied at the specified position.
Gets the font style (also known as slope) of the text at the specified position.
+The position of the text to inspect.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the font style.
When this method returns, contains a value which indicates the type of font style (also known as slope or incline) being applied at the specified position.
Gets the font stretch of the text at the specified position.
+The position of the text to inspect.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the font stretch.
When this method returns, contains a value which indicates the type of font stretch (also known as width) being applied at the specified position.
Gets the font em height of the text at the specified position.
+The position of the text to inspect.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the font size.
When this method returns, contains the size of the font in ems of the text at the specified position.
Gets the underline presence of the text at the specified position.
+The current text position.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the underline.
A Boolean flag that indicates whether underline is present at the position indicated by currentPosition.
Get the strikethrough presence of the text at the specified position.
+The position of the text to inspect.
Contains the range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to strikethrough.
A Boolean flag that indicates whether strikethrough is present at the position indicated by currentPosition.
Gets the application-defined drawing effect at the specified text position.
+The position of the text whose drawing effect is to be retrieved.
Contains the range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the drawing effect.
When this method returns, contains an address of a reference to the current application-defined drawing effect. Usually this effect is a foreground brush that is used in glyph drawing.
Gets the inline object at the specified position.
+The specified text position.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the inline object.
Contains the application-defined inline object.
Gets the typography setting of the text at the specified position.
+The position of the text to inspect.
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the typography.
When this method returns, contains an address of a reference to the current typography setting.
Gets the length of the locale name of the text at the specified position.
+The position of the text to inspect.
Size of the character array, in character count, not including the terminated
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the locale name.
If this method succeeds, it returns
Gets the locale name of the text at the specified position.
+The position of the text to inspect.
When this method returns, contains the character array receiving the current locale name.
Size of the character array, in character count, including the terminated
The range of text that has the same formatting as the text at the position specified by currentPosition. This means the run has the exact formatting as the position specified, including but not limited to the locale name.
If this method succeeds, it returns
Draws text using the specified client drawing context.
+An application-defined drawing context.
Pointer to the set of callback functions used to draw parts of a text string.
The x-coordinate of the layout's left side.
The y-coordinate of the layout's top side.
If this method succeeds, it returns
To draw text with this method, a textLayout object needs to be created by the application using
After the textLayout object is obtained, the application calls the
If you set a vertical text reading direction on
Retrieves the information about each individual text line of the text string.
+When this method returns, contains a reference to an array of structures containing various calculated length values of individual text lines.
The maximum size of the lineMetrics array.
When this method returns, contains the actual size of the lineMetrics array that is needed.
If this method succeeds, it returns
If maxLineCount is not large enough E_NOT_SUFFICIENT_BUFFER, which is equivalent to HRESULT_FROM_WIN32(
Retrieves overall metrics for the formatted string.
+When this method returns, contains the measured distances of text and associated content after being formatted.
If this method succeeds, it returns
Returns the overhangs (in DIPs) of the layout and all objects contained in it, including text glyphs and inline objects.
+Overshoots of visible extents (in DIPs) outside the layout.
If this method succeeds, it returns
Underlines and strikethroughs do not contribute to the black box determination, since these are actually drawn by the renderer, which is allowed to draw them in any variety of styles.
+Retrieves logical properties and measurements of each glyph cluster.
+When this method returns, contains metrics, such as line-break or total advance width, for a glyph cluster.
The maximum size of the clusterMetrics array.
When this method returns, contains the actual size of the clusterMetrics array that is needed.
If this method succeeds, it returns
If maxClusterCount is not large enough, then E_NOT_SUFFICIENT_BUFFER, which is equivalent to HRESULT_FROM_WIN32(
Determines the minimum possible width the layout can be set to without emergency breaking between the characters of whole words occurring.
+Minimum width.
The application calls this function passing in a specific pixel location relative to the top-left location of the layout box and obtains the information about the correspondent hit-test metrics of the text string where the hit-test has occurred. When the specified pixel location is outside the text string, the function sets the output value *isInside to
The pixel location X to hit-test, relative to the top-left location of the layout box.
The pixel location Y to hit-test, relative to the top-left location of the layout box.
An output flag that indicates whether the hit-test location is at the leading or the trailing side of the character. When the output *isInside value is set to
An output flag that indicates whether the hit-test location is inside the text string. When
The output geometry fully enclosing the hit-test location. When the output *isInside value is set to
The application calls this function to get the pixel location relative to the top-left of the layout box given the text position and the logical side of the position. This function is normally used as part of caret positioning of text where the caret is drawn at the location corresponding to the current text editing position. It may also be used as a way to programmatically obtain the geometry of a particular text position in UI automation.
+The text position used to get the pixel location.
A Boolean flag that indicates whether the pixel location is of the leading or the trailing side of the specified text position.
When this method returns, contains the output pixel location X, relative to the top-left location of the layout box.
When this method returns, contains the output pixel location Y, relative to the top-left location of the layout box.
When this method returns, contains the output geometry fully enclosing the specified text position.
The application calls this function to get a set of hit-test metrics corresponding to a range of text positions. One of the main usages is to implement highlight selection of the text string. The function returns E_NOT_SUFFICIENT_BUFFER, which is equivalent to HRESULT_FROM_WIN32(
If this method succeeds, it returns
Specifies a range of text positions where format is applied in the text represented by an
Represents a set of application-defined callbacks that perform rendering of text, inline objects, and decorations such as underlines.
+Represents a font typography setting.
+Gets the number of OpenType font features for the current font.
+A single run of text can be associated with more than one typographic feature. The
Adds an OpenType font feature.
+A structure that contains the OpenType name identifier and the execution parameter for the font feature being added.
If this method succeeds, it returns
Gets the number of OpenType font features for the current font.
+The number of font features for the current text format.
A single run of text can be associated with more than one typographic feature. The
Gets the font feature at the specified index.
+The zero-based index of the font feature to retrieve.
When this method returns, contains the font feature which is at the specified index.
A single run of text can be associated with more than one typographic feature. The
The
The Roman baseline for horizontal; the Central baseline for vertical.
The baseline that is used by alphabetic scripts such as Latin, Greek, and Cyrillic.
Central baseline, which is generally used for vertical text.
Mathematical baseline, which math characters are centered on.
Hanging baseline, which is used in scripts like Devanagari.
Ideographic bottom baseline for CJK, left in vertical.
Ideographic top baseline for CJK, right in vertical.
The bottom-most extent in horizontal, left-most in vertical.
The top-most extent in horizontal, right-most in vertical.
Indicates the condition at the edges of inline object or text used to determine line-breaking behavior.
+Indicates whether a break is allowed by determining the condition of the neighboring text span or inline object.
Indicates that a line break is allowed, unless overruled by the condition of the neighboring text span or inline object, either prohibited by a "may not break" condition or forced by a "must break" condition.
Indicates that there should be no line break, unless overruled by a "must break" condition from the neighboring text span or inline object.
Indicates that the line break must happen, regardless of the condition of the adjacent text span or inline object.
Represents the degree to which a font has been stretched compared to a font's normal aspect ratio. The enumerated values correspond to the usWidthClass definition in the OpenType specification. The usWidthClass represents an integer value between 1 and 9?lower values indicate narrower widths; higher values indicate wider widths.
+A font stretch describes the degree to which a font form is stretched from its normal aspect ratio, which is the original width to height ratio specified for the glyphs in the font. + The following illustration shows an example of Normal and Condensed stretches for the Rockwell Bold typeface.
Note??Values other than the ones defined in the enumeration are considered to be invalid, and are rejected by font API functions.? +Predefined font stretch : Not known (0).
Predefined font stretch : Ultra-condensed (1).
Predefined font stretch : Extra-condensed (2).
Specifies the type of DirectWrite factory object.
+A DirectWrite factory object contains information about its internal state, such as font loader registration and cached font data. In most cases you should use the shared factory object, because it allows multiple components that use DirectWrite to share internal DirectWrite state information, thereby reducing memory usage. However, there are cases when it is desirable to reduce the impact of a component on the rest of the process, such as a plug-in from an untrusted source, by sandboxing and isolating it from the rest of the process components. In such cases, you should use an isolated factory for the sandboxed component.
+Indicates that the DirectWrite factory is a shared factory and that it allows for the reuse of cached font data across multiple in-process components. Such factories also take advantage of cross process font caching components for better performance.
Indicates that the DirectWrite factory object is isolated. Objects created from the isolated factory do not interact with internal DirectWrite state from other components.
Indicates the direction of how lines of text are placed relative to one another.
+Specifies that text lines are placed from top to bottom.
Specifies that text lines are placed from bottom to top.
Specifies that text lines are placed from left to right.
Specifies that text lines are placed from right to left.
Indicates the file format of a complete font face.
+Font formats that consist of multiple files, such as Type 1 .PFM and .PFB, have a single enum entry.
+OpenType font face with CFF outlines.
OpenType font face with TrueType outlines.
OpenType font face with TrueType outlines.
A Type 1 font face.
A vector .FON format font face.
A bitmap .FON format font face.
Font face type is not recognized by the DirectWrite font system.
The font data includes only the CFF table from an OpenType CFF font. This font face type can be used only for embedded fonts (i.e., custom font file loaders) and the resulting font face object supports only the minimum functionality necessary to render glyphs.
OpenType font face that is a part of a TrueType collection.
A value that indicates the typographic feature of text supplied by the font.
+Replaces figures separated by a slash with an alternative form.
Equivalent OpenType tag: 'afrc'
Turns capital characters into petite capitals. It is generally used for words which would otherwise be set in all caps, such as acronyms, but which are desired in petite-cap form to avoid disrupting the flow of text. See the pcap feature description for notes on the relationship of caps, smallcaps and petite caps.
Equivalent OpenType tag: 'c2pc'
Turns capital characters into small capitals. It is generally used for words which would otherwise be set in all caps, such as acronyms, but which are desired in small-cap form to avoid disrupting the flow of text.
Equivalent OpenType tag: 'c2sc'
In specified situations, replaces default glyphs with alternate forms which provide better joining behavior. Used in script typefaces which are designed to have some or all of their glyphs join.
Equivalent OpenType tag: 'calt'
Shifts various punctuation marks up to a position that works better with all-capital sequences or sets of lining figures; also changes oldstyle figures to lining figures. By default, glyphs in a text face are designed to work with lowercase characters. Some characters should be shifted vertically to fit the higher visual center of all-capital or lining text. Also, lining figures are the same height (or close to it) as capitals, and fit much better with all-capital text.
Equivalent OpenType tag: 'case'
To minimize the number of glyph alternates, it is sometimes desired to decompose a character into two glyphs. Additionally, it may be preferable to compose two characters into a single glyph for better glyph processing. This feature permits such composition/decomposition. The feature should be processed as the first feature processed, and should be processed only when it is called.
Equivalent OpenType tag: 'ccmp'
Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. Unlike other ligature features, clig specifies the context in which the ligature is recommended. This capability is important in some script designs and for swash ligatures.
Equivalent OpenType tag: 'clig'
Globally adjusts inter-glyph spacing for all-capital text. Most typefaces contain capitals and lowercase characters, and the capitals are positioned to work with the lowercase. When capitals are used for words, they need more space between them for legibility and esthetics. This feature would not apply to monospaced designs. Of course the user may want to override this behavior in order to do more pronounced letterspacing for esthetic reasons.
Equivalent OpenType tag: 'cpsp'
Replaces default character glyphs with corresponding swash glyphs in a specified context. Note that there may be more than one swash alternate for a given character.
Equivalent OpenType tag: 'cswh'
In cursive scripts like Arabic, this feature cursively positions adjacent glyphs.
Equivalent OpenType tag: 'curs'
Globally adjusts inter-glyph spacing for all-capital text. Most typefaces contain capitals and lowercase characters, and the capitals are positioned to work with the lowercase. When capitals are used for words, they need more space between them for legibility and esthetics. This feature would not apply to monospaced designs. Of course the user may want to override this behavior in order to do more pronounced letterspacing for esthetic reasons.
Equivalent OpenType tag: 'cpsp'
Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. This feature covers those ligatures which may be used for special effect, at the user's preference.
Equivalent OpenType tag: 'dlig'
Replaces standard forms in Japanese fonts with corresponding forms preferred by typographers. For example, a user would invoke this feature to replace kanji character U+5516 with U+555E. +
Equivalent OpenType tag: 'expt'
Replaces figures separated by a slash with 'common' (diagonal) fractions.
Equivalent OpenType tag: 'frac'
Replaces glyphs set on other widths with glyphs set on full (usually em) widths. In a CJKV font, this may include "lower ASCII" Latin characters and various symbols. In a European font, this feature replaces proportionally-spaced glyphs with monospaced glyphs, which are generally set on widths of 0.6 em. For example, a user may invoke this feature in a Japanese font to get full monospaced Latin glyphs instead of the corresponding proportionally-spaced versions.
Equivalent OpenType tag: 'fwid'
Produces the half forms of consonants in Indic scripts. For example, in Hindi (Devanagari script), the conjunct KKa, obtained by doubling the Ka, is denoted with a half form of Ka followed by the full form.
Equivalent OpenType tag: 'half'
Produces the halant forms of consonants in Indic scripts. For example, in Sanskrit (Devanagari script), syllable final consonants are frequently required in their halant form.
Equivalent OpenType tag: 'haln'
Respaces glyphs designed to be set on full-em widths, fitting them onto half-em widths. This differs from hwid in that it does not substitute new glyphs.
Equivalent OpenType tag: 'halt'
Replaces the default (current) forms with the historical alternates. While some ligatures are also used for historical effect, this feature deals only with single characters. Some fonts include the historical forms as alternates, so they can be used for a 'period' effect.
Equivalent OpenType tag: 'hist'
Replaces standard kana with forms that have been specially designed for only horizontal writing. This is a typographic optimization for improved fit and more even color.
Equivalent OpenType tag: 'hkna'
Replaces the default (current) forms with the historical alternates. Some ligatures were in common use in the past, but appear anachronistic today. Some fonts include the historical forms as alternates, so they can be used for a 'period' effect.
Equivalent OpenType tag: 'hlig'
Replaces glyphs on proportional widths, or fixed widths other than half an em, with glyphs on half-em (en) widths. Many CJKV fonts have glyphs which are set on multiple widths; this feature selects the half-em version. There are various contexts in which this is the preferred behavior, including compatibility with older desktop documents.
Equivalent OpenType tag: 'hwid'
Used to access the JIS X 0212-1990 glyphs for the cases when the JIS X 0213:2004 form is encoded. The JIS X 0212-1990 (aka, "Hojo Kanji") and JIS X 0213:2004 character sets overlap significantly. In some cases their prototypical glyphs differ. When building fonts that support both JIS X 0212-1990 and JIS X 0213:2004 (such as those supporting the Adobe-Japan 1-6 character collection), it is recommended that JIS X 0213:2004 forms be the preferred encoded form.
Equivalent OpenType tag: 'hojo'
The National Language Council (NLC) of Japan has defined new glyph shapes for a number of JIS characters, which were incorporated into JIS X 0213:2004 as new prototypical forms. The 'jp04' feature is A subset of the 'nlck' feature, and is used to access these prototypical glyphs in a manner that maintains the integrity of JIS X 0213:2004.
Equivalent OpenType tag: 'jp04'
Replaces default (JIS90) Japanese glyphs with the corresponding forms from the JIS C 6226-1978 (JIS78) specification.
Equivalent OpenType tag: 'jp78'
Replaces default (JIS90) Japanese glyphs with the corresponding forms from the JIS X 0208-1983 (JIS83) specification.
Equivalent OpenType tag: 'jp83'
Replaces Japanese glyphs from the JIS78 or JIS83 specifications with the corresponding forms from the JIS X 0208-1990 (JIS90) specification.
Equivalent OpenType tag: 'jp90'
Adjusts amount of space between glyphs, generally to provide optically consistent spacing between glyphs. Although a well-designed typeface has consistent inter-glyph spacing overall, some glyph combinations require adjustment for improved legibility. Besides standard adjustment in the horizontal direction, this feature can supply size-dependent kerning data via device tables, "cross-stream" kerning in the Y text direction, and adjustment of glyph placement independent of the advance adjustment. Note that this feature may apply to runs of more than two glyphs, and would not be used in monospaced fonts. Also note that this feature does not apply to text set vertically.
Equivalent OpenType tag: 'kern'
Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. This feature covers the ligatures which the designer/manufacturer judges should be used in normal conditions.
Equivalent OpenType tag: 'liga'
Changes selected figures from oldstyle to the default lining form. For example, a user may invoke this feature in order to get lining figures, which fit better with all-capital text. This feature overrides results of the Oldstyle Figures feature (onum).
Equivalent OpenType tag: 'lnum'
Enables localized forms of glyphs to be substituted for default forms. Many scripts used to write multiple languages over wide geographical areas have developed localized variant forms of specific letters, which are used by individual literary communities. For example, a number of letters in the Bulgarian and Serbian alphabets have forms distinct from their Russian counterparts and from each other. In some cases the localized form differs only subtly from the script 'norm', in others the forms are radically distinct.
Equivalent OpenType tag: 'locl'
Positions mark glyphs with respect to base glyphs. For example, in Arabic script positioning the Hamza above the Yeh.
Equivalent OpenType tag: 'mark'
Replaces standard typographic forms of Greek glyphs with corresponding forms commonly used in mathematical notation (which are a subset of the Greek alphabet).
Equivalent OpenType tag: 'mgrk'
Positions marks with respect to other marks. Required in various non-Latin scripts like Arabic. For example, in Arabic, the ligaturised mark Ha with Hamza above it can also be obtained by positioning these marks relative to one another.
Equivalent OpenType tag: 'mkmk'
Replaces default glyphs with various notational forms (such as glyphs placed in open or solid circles, squares, parentheses, diamonds or rounded boxes). In some cases an annotation form may already be present, but the user may want a different one.
Equivalent OpenType tag: 'nalt'
Used to access glyphs made from glyph shapes defined by the National Language Council (NLC) of Japan for a number of JIS characters in 2000.
Equivalent OpenType tag: 'nlck'
Changes selected figures from the default lining style to oldstyle form. For example, a user may invoke this feature to get oldstyle figures, which fit better into the flow of normal upper- and lowercase text. This feature overrides results of the Lining Figures feature (lnum).
Equivalent OpenType tag: 'onum'
Replaces default alphabetic glyphs with the corresponding ordinal forms for use after figures. One exception to the follows-a-figure rule is the numero character (U+2116), which is actually a ligature substitution, but is best accessed through this feature.
Equivalent OpenType tag: 'ordn'
Respaces glyphs designed to be set on full-em widths, fitting them onto individual (more or less proportional) horizontal widths. This differs from pwid in that it does not substitute new glyphs (GPOS, not GSUB feature). The user may prefer the monospaced form, or may simply want to ensure that the glyph is well-fit and not rotated in vertical setting (Latin forms designed for proportional spacing would be rotated).
Equivalent OpenType tag: 'palt'
Turns lowercase characters into petite capitals. Forms related to petite capitals, such as specially designed figures, may be included. Some fonts contain an additional size of capital letters, shorter than the regular smallcaps and it is referred to as petite caps. Such forms are most likely to be found in designs with a small lowercase x-height, where they better harmonise with lowercase text than the taller smallcaps (for examples of petite caps, see the Emigre type families Mrs Eaves and Filosofia).
Equivalent OpenType tag: 'pcap'
Replaces figure glyphs set on uniform (tabular) widths with corresponding glyphs set on glyph-specific (proportional) widths. Tabular widths will generally be the default, but this cannot be safely assumed. Of course this feature would not be present in monospaced designs.
Equivalent OpenType tag: 'pnum'
Replaces glyphs set on uniform widths (typically full or half-em) with proportionally spaced glyphs. The proportional variants are often used for the Latin characters in CJKV fonts, but may also be used for Kana in Japanese fonts.
Equivalent OpenType tag: 'pwid'
Replaces glyphs on other widths with glyphs set on widths of one quarter of an em (half an en). The characters involved are normally figures and some forms of punctuation.
Equivalent OpenType tag: 'qwid'
Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. This feature covers those ligatures, which the script determines as required to be used in normal conditions. This feature is important for some scripts to ensure correct glyph formation.
Equivalent OpenType tag: 'rlig'
Identifies glyphs in the font which have been designed for "ruby", from the old typesetting term for four-point-sized type. Japanese typesetting often uses smaller kana glyphs, generally in superscripted form, to clarify the meaning of kanji which may be unfamiliar to the reader.
Equivalent OpenType tag: 'ruby'
Replaces the default forms with the stylistic alternates. Many fonts contain alternate glyph designs for a purely esthetic effect; these don't always fit into a clear category like swash or historical. As in the case of swash glyphs, there may be more than one alternate form.
Equivalent OpenType tag: 'salt'
Replaces lining or oldstyle figures with inferior figures (smaller glyphs which sit lower than the standard baseline, primarily for chemical or mathematical notation). May also replace lowercase characters with alphabetic inferiors.
Equivalent OpenType tag: 'sinf'
Turns lowercase characters into small capitals. This corresponds to the common SC font layout. It is generally used for display lines set in Large & small caps, such as titles. Forms related to small capitals, such as oldstyle figures, may be included.
Equivalent OpenType tag: 'smcp'
Replaces 'traditional' Chinese or Japanese forms with the corresponding 'simplified' forms.
Equivalent OpenType tag: 'smpl'
In addition to, or instead of, stylistic alternatives of individual glyphs (see 'salt' feature), some fonts may contain sets of stylistic variant glyphs corresponding to portions of the character set, such as multiple variants for lowercase letters in a Latin font. Glyphs in stylistic sets may be designed to harmonise visually, interract in particular ways, or otherwise work together. Examples of fonts including stylistic sets are Zapfino Linotype and Adobe's Poetica. Individual features numbered sequentially with the tag name convention 'ss01' 'ss02' 'ss03' . 'ss20' provide a mechanism for glyphs in these sets to be associated via GSUB lookup indexes to default forms and to each other, and for users to select from available stylistic sets
Equivalent OpenType tag: 'ss01'
See the description for
Equivalent OpenType tag: 'ss02'
See the description for
Equivalent OpenType tag: 'ss03'
See the description for
Equivalent OpenType tag: 'ss04'
See the description for
Equivalent OpenType tag: 'ss05'
See the description for
Equivalent OpenType tag: 'ss06'
See the description for
Equivalent OpenType tag: 'ss07'
See the description for
Equivalent OpenType tag: 'ss08'
See the description for
Equivalent OpenType tag: 'ss09'
See the description for
Equivalent OpenType tag: 'ss10'
See the description for
Equivalent OpenType tag: 'ss11'
See the description for
Equivalent OpenType tag: 'ss12'
See the description for
Equivalent OpenType tag: 'ss13'
See the description for
Equivalent OpenType tag: 'ss14'
See the description for
Equivalent OpenType tag: 'ss15'
See the description for
Equivalent OpenType tag: 'ss16'
See the description for
Equivalent OpenType tag: 'ss17'
See the description for
Equivalent OpenType tag: 'ss18'
See the description for
Equivalent OpenType tag: 'ss19'
See the description for
Equivalent OpenType tag: 'ss20'
May replace a default glyph with a subscript glyph, or it may combine a glyph substitution with positioning adjustments for proper placement.
Equivalent OpenType tag: 'subs'
Replaces lining or oldstyle figures with superior figures (primarily for footnote indication), and replaces lowercase letters with superior letters (primarily for abbreviated French titles).
Equivalent OpenType tag: 'sups'
Replaces default character glyphs with corresponding swash glyphs. Note that there may be more than one swash alternate for a given character.
Equivalent OpenType tag: 'swsh'
Replaces the default glyphs with corresponding forms designed specifically for titling. These may be all-capital and/or larger on the body, and adjusted for viewing at larger sizes.
Equivalent OpenType tag: 'titl'
Replaces 'simplified' Japanese kanji forms with the corresponding 'traditional' forms. This is equivalent to the Traditional Forms feature, but explicitly limited to the traditional forms considered proper for use in personal names (as many as 205 glyphs in some fonts).
Equivalent OpenType tag: 'tnam'
Replaces figure glyphs set on proportional widths with corresponding glyphs set on uniform (tabular) widths. Tabular widths will generally be the default, but this cannot be safely assumed. Of course this feature would not be present in monospaced designs.
Equivalent OpenType tag: 'tnum'
Replaces 'simplified' Chinese hanzi or Japanese kanji forms with the corresponding 'traditional' forms.
Equivalent OpenType tag: 'trad'
Replaces glyphs on other widths with glyphs set on widths of one third of an em. The characters involved are normally figures and some forms of punctuation.
Equivalent OpenType tag: 'twid'
Maps upper- and lowercase letters to a mixed set of lowercase and small capital forms, resulting in a single case alphabet (for an example of unicase, see the Emigre type family Filosofia). The letters substituted may vary from font to font, as appropriate to the design. If aligning to the x-height, smallcap glyphs may be substituted, or specially designed unicase forms might be used. Substitutions might also include specially designed figures. +
Equivalent OpenType tag: 'unic'
Indicates that the font is displayed vertically.
Replaces normal figures with figures adjusted for vertical display.
Allows the user to change from the default 0 to a slashed form. Some fonts contain both a default form of zero, and an alternative form which uses a diagonal slash through the counter. Especially in condensed designs, it can be difficult to distinguish between 0 and O (zero and capital O) in any situation where capitals and lining figures may be arbitrarily mixed.
Equivalent OpenType tag: 'zero'
The type of a font represented by a single font file. Font formats that consist of multiple files, for example Type 1 .PFM and .PFB, have separate enum values for each of the file types.
+Font type is not recognized by the DirectWrite font system.
OpenType font with CFF outlines.
OpenType font with TrueType outlines.
OpenType font that contains a TrueType collection.
Type 1 PFM font.
Type 1 PFB font.
Vector .FON font.
Bitmap .FON font.
OpenType font that contains a TrueType collection.
Specify whether
Identifies a string in a font.
+Unspecified font property identifier.
Family name for the weight-width-slope model.
Family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with GDI. This name is typically only present if it differs from the GDI-compatible family name.
Face name of the font, for example Regular or Bold.
The full name of the font, for example "Arial Bold", from name id 4 in the name table.
GDI-compatible family name. Because GDI allows a maximum of four fonts per family, fonts in the same family may have different GDI-compatible family names, for example "Arial", "Arial Narrow", "Arial Black".
The postscript name of the font, for example "GillSans-Bold", from name id 6 in the name table.
Script/language tag to identify the scripts or languages that the font was primarily designed to support.
Script/language tag to identify the scripts or languages that the font declares it is able to support.
Semantic tag to describe the font, for example Fancy, Decorative, Handmade, Sans-serif, Swiss, Pixel, Futuristic.
Weight of the font represented as a decimal string in the range 1-999.
Stretch of the font represented as a decimal string in the range 1-9.
Style of the font represented as a decimal string in the range 0-2.
Total number of properties.
Specifies algorithmic style simulations to be applied to the font face. Bold and oblique simulations can be combined via bitwise OR operation.
+Style simulations are not recommended for good typographic quality.
+Indicates that no simulations are applied to the font face.
Indicates that algorithmic emboldening is applied to the font face.
Indicates that algorithmic italicization is applied to the font face.
Represents the degree to which a font has been stretched compared to a font's normal aspect ratio. The enumerated values correspond to the usWidthClass definition in the OpenType specification. The usWidthClass represents an integer value between 1 and 9?lower values indicate narrower widths; higher values indicate wider widths.
+A font stretch describes the degree to which a font form is stretched from its normal aspect ratio, which is the original width to height ratio specified for the glyphs in the font. + The following illustration shows an example of Normal and Condensed stretches for the Rockwell Bold typeface.
Note??Values other than the ones defined in the enumeration are considered to be invalid, and are rejected by font API functions.? +Predefined font stretch : Not known (0).
Predefined font stretch : Ultra-condensed (1).
Predefined font stretch : Extra-condensed (2).
Predefined font stretch : Condensed (3).
Predefined font stretch : Semi-condensed (4).
Predefined font stretch : Normal (5).
Predefined font stretch : Medium (5).
Predefined font stretch : Semi-expanded (6).
Predefined font stretch : Expanded (7).
Predefined font stretch : Extra-expanded (8).
Predefined font stretch : Ultra-expanded (9).
Represents the style of a font face as normal, italic, or oblique.
+Three terms categorize the slant of a font: normal, italic, and oblique.
Font style | Description |
---|---|
Normal | The characters in a normal, or roman, font are upright. + |
Italic + | The characters in an italic font are truly slanted and appear as they were designed. + |
Oblique | The characters in an oblique font are artificially slanted. |
?
For Oblique, the slant is achieved by performing a shear transformation on the characters from a normal font. When a true italic font is not available on a computer or printer, an oblique style can be generated from the normal font and used to simulate an italic font. The following illustration shows the normal, italic, and oblique font styles for the Palatino Linotype font. Notice how the italic font style has a more flowing and visually appealing appearance than the oblique font style, which is simply created by skewing the normal font style version of the text.
Note?? Values other than the ones defined in the enumeration are considered to be invalid, and they are rejected by font API functions.? +Font style : Normal.
Font style : Oblique.
Font style : Italic.
Represents the density of a typeface, in terms of the lightness or heaviness of the strokes. The enumerated values correspond to the usWeightClass definition in the OpenType specification. The usWeightClass represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.
+Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a typeface, as compared to a "normal" character from that same typeface. + The following illustration shows an example of Normal and UltraBold weights for the Palatino Linotype typeface.
Note??Not all weights are available for all typefaces. When a weight is not available for a typeface, the closest matching weight is returned.?Font weight values less than 1 or greater than 999 are considered invalid, and they are rejected by font API functions.
+Predefined font weight : Thin (100).
Predefined font weight : Extra-light (200).
Predefined font weight : Ultra-light (200).
Predefined font weight : Light (300).
Predefined font weight : Semi-Light (350).
Predefined font weight : Normal (400).
Predefined font weight : Regular (400).
Predefined font weight : Medium (500).
Predefined font weight : Demi-bold (600).
Predefined font weight : Semi-bold (600).
Predefined font weight : Bold (700).
Predefined font weight : Extra-bold (800).
Predefined font weight : Ultra-bold (800).
Predefined font weight : Black (900).
Predefined font weight : Heavy (900).
Predefined font weight : Extra-black (950).
Predefined font weight : Ultra-black (950).
The
The text analyzer outputs
Glyph orientation is upright.
Glyph orientation is rotated 90 degrees clockwise.
Glyph orientation is upside-down.
Glyph orientation is rotated 270 degrees clockwise.
Specifies whether to enable grid-fitting of glyph outlines (also known as hinting).
+Choose grid fitting based on the font's table information.
Always disable grid fitting, using the ideal glyph outlines.
Enable grid fitting, adjusting glyph outlines for device pixel display.
The informational string enumeration which identifies a string embedded in a font file.
+Indicates the string containing the unspecified name ID.
Indicates the string containing the copyright notice provided by the font.
Indicates the string containing a version number.
Indicates the string containing the trademark information provided by the font.
Indicates the string containing the name of the font manufacturer.
Indicates the string containing the name of the font designer.
Indicates the string containing the URL of the font designer (with protocol, e.g., http://, ftp://).
Indicates the string containing the description of the font. This may also contain revision information, usage recommendations, history, features, and so on.
Indicates the string containing the URL of the font vendor (with protocol, e.g., http://, ftp://). If a unique serial number is embedded in the URL, it can be used to register the font.
Indicates the string containing the description of how the font may be legally used, or different example scenarios for licensed use.
Indicates the string containing the URL where additional licensing information can be found.
Indicates the string containing the GDI-compatible family name. Since GDI allows a maximum of four fonts per family, fonts in the same family may have different GDI-compatible family names (e.g., "Arial", "Arial Narrow", "Arial Black").
Indicates the string containing a GDI-compatible subfamily name.
Indicates the string containing the family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with GDI. This name is typically only present if it differs from the GDI-compatible family name.
Indicates the string containing the subfamily name preferred by the designer. This name is typically only present if it differs from the GDI-compatible subfamily name.
Contains sample text for display in font lists. This can be the font name or any other text that the designer thinks is the best example to display the font in.
The full name of the font, like Arial Bold, from name id 4 in the name table
The postscript name of the font, like GillSans-Bold, from name id 6 in the name table.
The postscript CID findfont name, from name id 20 in the name table
The method used for line spacing in a text layout.
+The line spacing method is set by using the SetLineSpacing method of the
Line spacing depends solely on the content, adjusting to accommodate the size of fonts and inline objects.
Lines are explicitly set to uniform spacing, regardless of the size of fonts and inline objects. This can be useful to avoid the uneven appearance that can occur from font fallback.
Line spacing and baseline distances are proportional to the computed values based on the content, the size of the fonts and inline objects.
Note??This value is only available on Windows?10 or later and it can be used withSpecifies the location of a resource.
+The resource is remote, and information about it is unknown, including the file size and date. If you attempt to create a font or file stream, the creation will fail until locality becomes at least partial.
The resource is partially local, which means you can query the size and date of the file stream. With this type, you also might be able to create a font face and retrieve the particular glyphs for metrics and drawing, but not all the glyphs will be present.
The resource is completely local, and all font functions can be called without concern of missing data or errors related to network connectivity.
Specifies how to apply number substitution on digits and related punctuation.
+Specifies that the substitution method should be determined based on the LOCALE_IDIGITSUBSTITUTION value of the specified text culture.
If the culture is Arabic or Persian, specifies that the number shapes depend on the context. Either traditional or nominal number shapes are used, depending on the nearest preceding strong character or (if there is none) the reading direction of the paragraph.
Specifies that code points 0x30-0x39 are always rendered as nominal numeral shapes (ones of the European number), that is, no substitution is performed.
Specifies that numbers are rendered using the national number shapes as specified by the LOCALE_SNATIVEDIGITS value of the specified text culture.
Specifies that numbers are rendered using the traditional shapes for the specified culture. For most cultures, this is the same as NativeNational. However, NativeNational results in Latin numbers for some Arabic cultures, whereasDWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL results in arabic numbers for all Arabic cultures.
The optical margin alignment mode.
By default, glyphs are aligned to the margin by the default origin and side-bearings of the glyph. If you specify
Align to the default origin and side-bearings of the glyph.
Align to the ink of the glyphs, such that the black box abuts the margins.
The
Glyphs are rendered in outline mode by default at large sizes for performance reasons, but how large (that is, the outline threshold) depends on the quality of outline rendering. If the graphics system renders anti-aliased outlines, a relatively low threshold is used. But if the graphics system renders aliased outlines, a much higher threshold is used.
+The
Any arm style.
No fit arm style.
The arm style is straight horizontal.
The arm style is straight wedge.
The arm style is straight vertical.
The arm style is straight single serif.
The arm style is straight double serif.
The arm style is non-straight horizontal.
The arm style is non-straight wedge.
The arm style is non-straight vertical.
The arm style is non-straight single serif.
The arm style is non-straight double serif.
The arm style is straight horizontal.
The arm style is straight vertical.
The arm style is non-straight horizontal.
The arm style is non-straight wedge.
The arm style is non-straight vertical.
The arm style is non-straight single serif.
The arm style is non-straight double serif.
The
Any aspect.
No fit for aspect.
Super condensed aspect.
Very condensed aspect.
Condensed aspect.
Normal aspect.
Extended aspect.
Very extended aspect.
Super extended aspect.
Monospace aspect.
The
Any aspect ratio.
No fit for aspect ratio.
Very condensed aspect ratio.
Condensed aspect ratio.
Normal aspect ratio.
Expanded aspect ratio.
Very expanded aspect ratio.
The
Any range.
No fit for range.
The range includes extended collection.
The range includes literals.
The range doesn't include lower case.
The range includes small capitals.
The
Any contrast.
No fit contrast.
No contrast.
Very low contrast.
Low contrast.
Medium low contrast.
Medium contrast.
Medium high contrast.
High contrast.
Very high contrast.
Horizontal low contrast.
Horizontal medium contrast.
Horizontal high contrast.
Broken contrast.
The
Any class of decorative typeface.
No fit for decorative typeface.
Derivative decorative typeface.
Nonstandard topology decorative typeface.
Nonstandard elements decorative typeface.
Nonstandard aspect decorative typeface.
Initials decorative typeface.
Cartoon decorative typeface.
Picture stems decorative typeface.
Ornamented decorative typeface.
Text and background decorative typeface.
Collage decorative typeface.
Montage decorative typeface.
The
Any decorative topology.
No fit for decorative topology.
Standard decorative topology.
Square decorative topology.
Multiple segment decorative topology.
Art deco decorative topology.
Uneven weighting decorative topology.
Diverse arms decorative topology.
Diverse forms decorative topology.
Lombardic forms decorative topology.
Upper case in lower case decorative topology.
The decorative topology is implied.
Horseshoe E and A decorative topology.
Cursive decorative topology.
Blackletter decorative topology.
Swash variance decorative topology.
The
Any typeface classification.
No fit typeface classification.
Text display typeface classification.
Script (or hand written) typeface classification.
Decorative typeface classification.
Symbol typeface classification.
Pictorial (or symbol) typeface classification.
The
Any fill.
No fit for fill.
The fill is the standard solid fill.
No fill.
The fill is patterned fill.
The fill is complex fill.
The fill is shaped fill.
The fill is drawn distressed.
The
Any finials.
No fit for finials.
No loops.
No closed loops.
No open loops.
Sharp with no loops.
Sharp with closed loops.
Sharp with open loops.
Tapered with no loops.
Tapered with closed loops.
Tapered with open loops.
Round with no loops.
Round with closed loops.
Round with open loops.
The
Any letterform.
No fit letterform.
Normal contact letterform.
Normal weighted letterform.
Normal boxed letterform.
Normal flattened letterform.
Normal rounded letterform.
Normal off-center letterform.
Normal square letterform.
Oblique contact letterform.
Oblique weighted letterform.
Oblique boxed letterform.
Oblique flattened letterform.
Oblique rounded letterform.
Oblique off-center letterform.
Oblique square letterform.
The
Any lining.
No fit for lining.
No lining.
The lining is inline.
The lining is outline.
The lining is engraved.
The lining is shadowed.
The lining is relief.
The lining is backdrop.
The
Any midline.
No fit midline.
Standard trimmed midline.
Standard pointed midline.
Standard serifed midline.
High trimmed midline.
High pointed midline.
High serifed midline.
Constant trimmed midline.
Constant pointed midline.
Constant serifed midline.
Low trimmed midline.
Low pointed midline.
Low serifed midline.
The
Any proportion for the text.
No fit proportion for the text.
Old style proportion for the text.
Modern proportion for the text.
Extra width proportion for the text.
Expanded proportion for the text.
Condensed proportion for the text.
Very expanded proportion for the text.
Very condensed proportion for the text.
Monospaced proportion for the text.
The
Any script form.
No fit for script form.
Script form is upright with no wrapping.
Script form is upright with some wrapping.
Script form is upright with more wrapping.
Script form is upright with extreme wrapping.
Script form is oblique with no wrapping.
Script form is oblique with some wrapping.
Script form is oblique with more wrapping.
Script form is oblique with extreme wrapping.
Script form is exaggerated with no wrapping.
Script form is exaggerated with some wrapping.
Script form is exaggerated with more wrapping.
Script form is exaggerated with extreme wrapping.
The
Any script topology.
No fit for script topology.
Script topology is roman disconnected.
Script topology is roman trailing.
Script topology is roman connected.
Script topology is cursive disconnected.
Script topology is cursive trailing.
Script topology is cursive connected.
Script topology is black-letter disconnected.
Script topology is black-letter trailing.
Script topology is black-letter connected.
The
Any appearance of the serif text.
No fit appearance of the serif text.
Cove appearance of the serif text.
Obtuse cove appearance of the serif text.
Square cove appearance of the serif text.
Obtuse square cove appearance of the serif text.
Square appearance of the serif text.
Thin appearance of the serif text.
Oval appearance of the serif text.
Exaggerated appearance of the serif text.
Triangle appearance of the serif text.
Normal sans appearance of the serif text.
Obtuse sans appearance of the serif text.
Perpendicular sans appearance of the serif text.
Flared appearance of the serif text.
Rounded appearance of the serif text.
Script appearance of the serif text.
Perpendicular sans appearance of the serif text.
Oval appearance of the serif text.
The
Any spacing.
No fit for spacing.
Spacing is proportional.
Spacing is monospace.
The
Any stroke variation for text characters.
No fit stroke variation for text characters.
No stroke variation for text characters.
The stroke variation for text characters is gradual diagonal.
The stroke variation for text characters is gradual transitional.
The stroke variation for text characters is gradual vertical.
The stroke variation for text characters is gradual horizontal.
The stroke variation for text characters is rapid vertical.
The stroke variation for text characters is rapid horizontal.
The stroke variation for text characters is instant vertical.
The stroke variation for text characters is instant horizontal.
The
Any aspect ratio of symbolic characters.
No fit for aspect ratio of symbolic characters.
No width aspect ratio of symbolic characters.
Exceptionally wide symbolic characters.
Super wide symbolic characters.
Very wide symbolic characters.
Wide symbolic characters.
Normal aspect ratio of symbolic characters.
Narrow symbolic characters.
Very narrow symbolic characters.
The
Any kind of symbol set.
No fit for the kind of symbol set.
The kind of symbol set is montages.
The kind of symbol set is pictures.
The kind of symbol set is shapes.
The kind of symbol set is scientific symbols.
The kind of symbol set is music symbols.
The kind of symbol set is expert symbols.
The kind of symbol set is patterns.
The kind of symbol set is boarders.
The kind of symbol set is icons.
The kind of symbol set is logos.
The kind of symbol set is industry specific.
The
Any kind of tool.
No fit for the kind of tool.
Flat NIB tool.
Pressure point tool.
Engraved tool.
Ball tool.
Brush tool.
Rough tool.
Felt-pen-brush-tip tool.
Wild-brush tool.
The
The
Any weight.
No fit weight.
Very light weight.
Light weight.
Thin weight.
Book weight.
Medium weight.
Demi weight.
Bold weight.
Heavy weight.
Black weight.
Extra black weight.
Extra black weight.
The
Any xascent.
No fit for xascent.
Very low xascent.
Low xascent.
Medium xascent.
High xascent.
Very high xascent.
The
Any xheight.
No fit xheight.
Constant small xheight.
Constant standard xheight.
Constant large xheight.
Ducking small xheight.
Ducking standard xheight.
Ducking large xheight.
Constant standard xheight.
Ducking standard xheight.
Specifies the alignment of paragraph text along the flow direction axis, relative to the top and bottom of the flow's layout box.
+The top of the text flow is aligned to the top edge of the layout box.
The bottom of the text flow is aligned to the bottom edge of the layout box.
The center of the flow is aligned to the center of the layout box.
Represents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text. +
+The red, green, and blue color components of each pixel are assumed to occupy the same point.
Each pixel is composed of three vertical stripes, with red on the left, green in the center, and blue on the right. This is the most common pixel geometry for LCD monitors.
Each pixel is composed of three vertical stripes, with blue on the left, green in the center, and red on the right.
Specifies the direction in which reading progresses.
Note??Indicates that reading progresses from left to right.
Indicates that reading progresses from right to left.
Indicates that reading progresses from top to bottom.
Indicates that reading progresses from bottom to top.
Represents a method of rendering glyphs.
Note?? This topic is aboutRepresents a method of rendering glyphs.
Note?? This topic is aboutIndicates additional shaping requirements for text.
+Indicates that there is no additional shaping requirements for text. Text is shaped with the writing system default behavior.
Indicates that text should leave no visible control or format control characters.
Specifies the alignment of paragraph text along the reading direction axis, relative to the leading and trailing edge of the layout box.
+The leading edge of the paragraph text is aligned to the leading edge of the layout box.
The trailing edge of the paragraph text is aligned to the trailing edge of the layout box.
The center of the paragraph text is aligned to the center of the layout box.
Align text to the leading side, and also justify text to fill the lines.
The
ClearType antialiasing computes coverage independently for the red, green, and blue color elements of each pixel. This allows for more detail than conventional antialiasing. However, because there is no one alpha value for each pixel, ClearType is not suitable for rendering text onto a transparent intermediate bitmap.
Grayscale antialiasing computes one coverage value for each pixel. Because the alpha value of each pixel is well-defined, text can be rendered onto a transparent bitmap, which can then be composited with other content.
Note??Grayscale rendering withIdentifies a type of alpha texture.
+An alpha texture is a bitmap of alpha values, each representing opacity of a pixel or subpixel.
+Specifies an alpha texture for aliased text rendering (that is, each pixel is either fully opaque or fully transparent), with one byte per pixel.
Specifies an alpha texture for ClearType text rendering, with three bytes per pixel in the horizontal dimension and one byte per pixel in the vertical dimension.
Specifies the text granularity used to trim text overflowing the layout box.
+No trimming occurs. Text flows beyond the layout width.
Trimming occurs at a character cluster boundary.
Trimming occurs at a word boundary.
The
The client specifies a
The default glyph orientation. In vertical layout, naturally horizontal scripts (Latin, Thai, Arabic, Devanagari) rotate 90 degrees clockwise, while ideographic scripts (Chinese, Japanese, Korean) remain upright, 0 degrees.
Stacked glyph orientation. Ideographic scripts and scripts that permit stacking (Latin, Hebrew) are stacked in vertical reading layout. Connected scripts (Arabic, Syriac, 'Phags-pa, Ogham), which would otherwise look broken if glyphs were kept at 0 degrees, remain connected and rotate.
Specifies the word wrapping to be used in a particular multiline paragraph.
Note??Indicates that words are broken across lines to avoid text overflowing the layout box.
Indicates that words are kept within the same line even when it overflows the layout box. This option is often used with scrolling to reveal overflow text.
Words are broken across lines to avoid text overflowing the layout box. Emergency wrapping occurs if the word is larger than the maximum width. +
When emergency wrapping, only wrap whole words, never breaking words when the layout width is too small for even a single word. +
Wrap between any valid character clusters.
Creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects.
+A value that specifies whether the factory object will be shared or isolated.
A
An address of a reference to the newly created DirectWrite factory object.
If this function succeeds, it returns
This function creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects. DirectWrite factory contains internal state data such as font loader registration and cached font data. In most cases it is recommended you use the shared factory object, because it allows multiple components that use DirectWrite to share internal DirectWrite state data, and thereby reduce memory usage. However, there are cases when it is desirable to reduce the impact of a component, such as a plug-in from an untrusted source, on the rest of the process, by sandboxing and isolating it from the rest of the process components. In such cases, it is recommended you use an isolated factory for the sandboxed component.
The following example shows how to create a shared DirectWrite factory.
if (SUCCEEDED(hr)) + { hr =+( , __uuidof( ), reinterpret_cast< **>(&pDWriteFactory_) ); + }
Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
+Encapsulates a 32-bit device independent bitmap and device context, which you can use for rendering glyphs.
+Gets or sets the current text antialiasing mode of the bitmap render target.
+Gets the current text antialiasing mode of the bitmap render target.
+Returns a
Sets the current text antialiasing mode of the bitmap render target.
+A
Returns
The antialiasing mode of a newly-created bitmap render target defaults to
This interface allows the application to enumerate through the color glyph runs. The enumerator enumerates the layers in a back to front order for appropriate layering.
+Returns the current glyph run of the enumerator.
+Move to the next glyph run in the enumerator.
+Returns TRUE if there is a next glyph run.
If this method succeeds, it returns
Returns the current glyph run of the enumerator.
+A reference to the current glyph run.
If this method succeeds, it returns
Enumerator for an ordered collection of color glyph runs.
+Gets the current color glyph run.
+Gets the current color glyph run.
+Receives a reference to the color glyph run. The reference remains valid until the next call to MoveNext or until the interface is released.
Standard
The root factory interface for all DirectWrite objects.
+Creates a font fallback object from the system font fallback list.
+Creates a font fallback object from the system font fallback list.
+Contains an address of a reference to the newly created font fallback object.
If this method succeeds, it returns
Creates a font fallback builder object.
A font fall back builder allows you to create Unicode font fallback mappings and create a font fall back object from those mappings.
+Contains an address of a reference to the newly created font fallback builder object.
If this method succeeds, it returns
This method is called on a glyph run to translate it in to multiple color glyph runs.
+The horizontal baseline origin of the original glyph run.
The vertical baseline origin of the original glyph run.
Original glyph run containing monochrome glyph IDs.
Optional glyph run description.
Measuring mode used to compute glyph positions if the run contains color glyphs.
World transform multiplied by any DPI scaling. This is needed to compute glyph positions if the run contains color glyphs and the measuring mode is not
Zero-based index of the color palette to use. Valid indices are less than the number of palettes in the font, as returned by
If the original glyph run contains color glyphs, this parameter receives a reference to an
If this method succeeds, it returns
If the code calls this method with a glyph run that contains no color information, the method returns DWRITE_E_NOCOLOR to let the application know that it can just draw the original glyph run. If the glyph run contains color information, the function returns an object that can be enumerated through to expose runs and associated colors. The application then calls DrawGlyphRun with each of the returned glyph runs and foreground colors.
+Creates a rendering parameters object with the specified properties.
+The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256.
The amount of contrast enhancement, zero or greater.
The amount of contrast enhancement, zero or greater.
The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType).
The geometry of a device pixel.
Method of rendering glyphs. In most cases, this should be
How to grid fit glyph outlines. In most cases, this should be DWRITE_GRID_FIT_DEFAULT to automatically choose an appropriate mode.
Holds the newly created rendering parameters object, or
If this method succeeds, it returns
Creates a glyph run analysis object, which encapsulates information used to render a glyph run.
+Structure specifying the properties of the glyph run.
Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the emSize and pixelsPerDip.
Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default and not outline).
Specifies the method to measure glyphs.
How to grid-fit glyph outlines. This must be non-default.
Specifies the antialias mode.
Horizontal position of the baseline origin, in DIPs.
Vertical position of the baseline origin, in DIPs.
Receives a reference to the newly created object.
If this method succeeds, it returns
Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.
+ Create an
if (SUCCEEDED(hr)) + { hr =( , __uuidof( ), reinterpret_cast< **>(&pDWriteFactory_) ); + }
An
Retrieves the list of system fonts.
+Gets the font download queue associated with this factory object.
+Creates a glyph-run-analysis object that encapsulates info that DirectWrite uses to render a glyph run.
+If this method succeeds, it returns
Creates a rendering parameters object with the specified properties.
+The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256.
The amount of contrast enhancement, zero or greater.
The amount of contrast enhancement to use for grayscale antialiasing, zero or greater.
The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType).
A
A
A
A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Creates a reference to a font given a full path.
+Absolute file path. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.
The zero based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.
Font face simulation flags for algorithmic emboldening and italicization.
Contains newly created font face reference object, or nullptr in case of failure.
If this method succeeds, it returns
Creates a reference to a font given a full path.
+Absolute file path. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.
Last modified time of the input file path. If the parameter is omitted, the function will access the font file to obtain its last write time, so the clients are encouraged to specify this value to avoid extra disk access. Subsequent operations on the constructed object may fail if the user provided lastWriteTime doesn't match the file on the disk.
The zero based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.
Font face simulation flags for algorithmic emboldening and italicization.
Contains newly created font face reference object, or nullptr in case of failure.
If this method succeeds, it returns
Retrieves the list of system fonts.
+Holds the newly created font set object, or
If this method succeeds, it returns
Creates an empty font set builder to add font face references and create a custom font set.
+Holds the newly created font set builder object, or
If this method succeeds, it returns
Create a weight/width/slope tree from a set of fonts.
+A set of fonts to use to build the collection.
Holds the newly created font collection object, or
If this method succeeds, it returns
Retrieves a weight/width/slope tree of system fonts.
+If this parameter is TRUE, the function performs an immediate check for changes to the set of system fonts. If this parameter is
Holds the newly created font collection object, or
If this parameter is TRUE, the function performs an immediate check for changes to the set of system fonts. If this parameter is
If this method succeeds, it returns
Gets the font download queue associated with this factory object.
+Receives a reference to the font download queue interface.
If this method succeeds, it returns
The root factory interface for all DirectWrite objects.
+Translates a glyph run to a sequence of color glyph runs, which can be rendered to produce a color representation of the original "base" run.
+Horizontal and vertical origin of the base glyph run in pre-transform coordinates.
Pointer to the original "base" glyph run.
Optional glyph run description.
Which data formats the runs should be split into.
Measuring mode, needed to compute the origins of each glyph.
Matrix converting from the client's coordinate space to device coordinates (pixels), i.e., the world transform multiplied by any DPI scaling.
Zero-based index of the color palette to use. Valid indices are less than the number of palettes in the font, as returned by
If the function succeeds, receives a reference to an enumerator object that can be used to obtain the color glyph runs. If the base run has no color glyphs, then the output reference is
Returns DWRITE_E_NOCOLOR if the font has no color information, the glyph run does not contain any color glyphs, or the specified color palette index is out of range. In this case, the client should render the original glyph run. Otherwise, returns a standard
Calling
Converts glyph run placements to glyph origins.
+Structure containing the properties of the glyph run.
The position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB.
On return contains the glyph origins for the glyphrun.
If this method succeeds, it returns
The transform and DPI have no effect on the origin scaling. They are solely used to compute glyph advances when not supplied and align glyphs in pixel aligned measuring modes.
+Converts glyph run placements to glyph origins.
+Structure containing the properties of the glyph run.
The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.
The position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB.
World transform multiplied by any DPI scaling. This is needed to compute glyph positions if the run contains color glyphs and the measuring mode is not
On return contains the glyph origins for the glyphrun.
If this method succeeds, it returns
The transform and DPI have no effect on the origin scaling. They are solely used to compute glyph advances when not supplied and align glyphs in pixel aligned measuring modes.
+Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.
+ Create an
if (SUCCEEDED(hr)) + { hr =( , __uuidof( ), reinterpret_cast< **>(&pDWriteFactory_) ); + }
An
This topic describes various ways in which you can use custom fonts in your app.
This topic describes various ways in which you can use custom fonts in your app.
Represents a physical font in a font collection. This interface is used to create font faces from physical fonts, or to retrieve information such as font face metrics or face names from existing font faces.
+Gets the font family to which the specified font belongs.
+Gets the weight, or stroke thickness, of the specified font.
+Gets the stretch, or width, of the specified font.
+Gets the style, or slope, of the specified font.
+Determines whether the font is a symbol font.
+Gets a localized strings collection containing the face names for the font (such as Regular or Bold), indexed by locale name.
+Gets a value that indicates what simulations are applied to the specified font.
+Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+Gets the font family to which the specified font belongs.
+When this method returns, contains an address of a reference to the font family object to which the specified font belongs.
If this method succeeds, it returns
Gets the weight, or stroke thickness, of the specified font.
+A value that indicates the weight for the specified font.
Gets the stretch, or width, of the specified font.
+A value that indicates the type of stretch, or width, applied to the specified font.
Gets the style, or slope, of the specified font.
+A value that indicates the type of style, or slope, of the specified font.
Determines whether the font is a symbol font.
+TRUE if the font is a symbol font; otherwise,
Gets a localized strings collection containing the face names for the font (such as Regular or Bold), indexed by locale name.
+When this method returns, contains an address to a reference to the newly created localized strings object.
If this method succeeds, it returns
Gets a localized strings collection containing the specified informational strings, indexed by locale name.
+A value that identifies the informational string to get. For example,
When this method returns, contains an address of a reference to the newly created localized strings object.
When this method returns, TRUE if the font contains the specified string ID; otherwise,
If the font does not contain the string specified by informationalStringID, the return value is
Gets a value that indicates what simulations are applied to the specified font.
+A value that indicates one or more of the types of simulations (none, bold, or oblique) applied to the specified font.
Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+When this method returns, contains a structure that has font metrics for the current font face. The metrics returned by this function are in font design units.
Determines whether the font supports a specified character.
+A Unicode (UCS-4) character value for the method to inspect.
When this method returns, TRUE if the font supports the specified character; otherwise,
Creates a font face object for the font.
+When this method returns, contains an address of a reference to the newly created font face object.
If this method succeeds, it returns
Represents a physical font in a font collection.
+Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+Gets the PANOSE values from the font and is used for font selection and matching.
+If the font has no PANOSE values, they are set to 'any' (0) and DirectWrite doesn't simulate those values.
+Determines if the font is monospaced, that is, the characters are the same fixed-pitch width (non-proportional).
+Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+ A filled
Gets the PANOSE values from the font and is used for font selection and matching.
+A reference to the
If the font has no PANOSE values, they are set to 'any' (0) and DirectWrite doesn't simulate those values.
+Retrieves the list of character ranges supported by a font.
+The maximum number of character ranges passed in from the client.
An array of
A reference to the actual number of character ranges, regardless of the maximum count.
This method can return one of these values.
Return value | Description |
---|---|
| The method executed successfully. |
| The buffer is too small. The actualRangeCount was more than the maxRangeCount. |
?
The list of character ranges supported by a font, is useful for scenarios like character picking, glyph display, and efficient font selection lookup. GetUnicodeRanges is similar to GDI's GetFontUnicodeRanges, except that it returns the full Unicode range, not just 16-bit UCS-2.
These ranges are from the cmap, not the OS/2::ulCodePageRange1.
If this method is unavailable, you can use the
The
Determines if the font is monospaced, that is, the characters are the same fixed-pitch width (non-proportional).
+Returns true if the font is monospaced, else it returns false.
Represents a physical font in a font collection.
This interface adds the ability to check if a color rendering path is potentially necessary.
+Enables determining if a color rendering path is potentially necessary.
+Enables determining if a color rendering path is potentially necessary.
+Returns TRUE if the font has color information (COLR and CPAL tables); otherwise
Represents a font in a font collection.
+Gets a font face reference that identifies this font.
+Gets the current locality of the font.
+For fully local files, the result will always be
Creates a font face object for the font.
+A reference to a memory block that receives a reference to a
If this method succeeds, it returns
This method returns DWRITE_E_REMOTEFONT if it could not construct a remote font.
Compares two instances of font references for equality.
+A reference to a
Returns whether the two instances of font references are equal. Returns TRUE if the two instances are equal; otherwise,
Gets a font face reference that identifies this font.
+A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Gets the current locality of the font.
+Returns the current locality of the font.
For fully local files, the result will always be
An object that encapsulates a set of fonts, such as the set of fonts installed on the system, or the set of fonts in a particular directory. The font collection API can be used to discover what font families and fonts are available, and to obtain some metadata about the fonts.
+Gets the underlying font set used by this collection.
+Gets the underlying font set used by this collection.
+Returns the font set used by the collection.
If this method succeeds, it returns
Application-defined callback interface that receives notifications from the font download queue (
The DownloadCompleted method is called back on an arbitrary thread when a download operation ends.
+Pointer to the download queue interface on which the BeginDownload method was called.
Optional context object that was passed to BeginDownload. AddRef is called on the context object by BeginDownload and Release is called after the DownloadCompleted method returns.
Result of the download operation.
Determines whether the download queue is empty. Note that the queue does not include requests that are already being downloaded. Calling BeginDownload clears the queue.
+Gets the current generation number of the download queue, which is incremented every time after a download completes, whether failed or successful. This cookie value can be compared against cached data to determine if it is stale.
+Registers a client-defined listener object that receives download notifications. All registered listener's DownloadCompleted will be called after BeginDownload completes.
+If this method succeeds, it returns
An
Unregisters a notification handler that was previously registered using AddListener.
+If this method succeeds, it returns
Determines whether the download queue is empty. Note that the queue does not include requests that are already being downloaded. Calling BeginDownload clears the queue.
+TRUE if the queue is empty,
Begins an asynchronous download operation. The download operation executes in the background until it completes or is cancelled by a CancelDownload call.
+ Returns
BeginDownload removes all download requests from the queue, transferring them to a background download operation. If any previous downloads are still ongoing when BeginDownload is called again, the new download does not complete until the previous downloads have finished. If the queue is empty and no active downloads are pending, the DownloadCompleted callback is called immediately with DWRITE_DOWNLOAD_RESULT_NONE.
+Removes all download requests from the queue and cancels any active download operations.
+If this method succeeds, it returns
Gets the current generation number of the download queue, which is incremented every time after a download completes, whether failed or successful. This cookie value can be compared against cached data to determine if it is stale.
+The current generation number of the download queue.
Represents an absolute reference to a font face.
This interface contains the font face type, appropriate file references, and face identification data.
You obtain various font data like metrics, names, and glyph outlines from the
Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+Gets caret metrics for the font in design units.
+Caret metrics are used by text editors for drawing the correct caret placement and slant.
+Determines whether the font of a text range is monospaced, that is, the font characters are the same fixed-pitch width.
+Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
+A filled
Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.
+The logical size of the font in DIP units.
The number of physical pixels per DIP.
An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.
A reference to a
Standard
Gets caret metrics for the font in design units.
+A reference to the
Caret metrics are used by text editors for drawing the correct caret placement and slant.
+Retrieves a list of character ranges supported by a font.
+Maximum number of character ranges passed in from the client.
An array of
A reference to the actual number of character ranges, regardless of the maximum count.
This method can return one of these values.
Return value | Description |
---|---|
| The method executed successfully. |
| The buffer is too small. The actualRangeCount was more than the maxRangeCount. |
?
A list of character ranges supported by the font is useful for scenarios like character picking, glyph display, and efficient font selection lookup. This is similar to GDI's GetFontUnicodeRanges, except that it returns the full Unicode range, not just 16-bit UCS-2.
These ranges are from the cmap, not the OS/2::ulCodePageRange1.
If this method is unavailable, you can use the
The
Determines whether the font of a text range is monospaced, that is, the font characters are the same fixed-pitch width.
+Returns TRUE if the font is monospaced, otherwise it returns
Retrieves the advances in design units for a sequences of glyphs.
+The number of glyphs to retrieve advances for.
An array of glyph id's to retrieve advances for.
The returned advances in font design units for each glyph.
Retrieve the glyph's vertical advance height rather than horizontal advance widths.
If this method succeeds, it returns
This is equivalent to calling GetGlyphMetrics and using only the advance width and height.
+Returns the pixel-aligned advances for a sequences of glyphs.
+Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch.
Number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96 this value is 1.0f. If the DPI is 120, this value is 120.0f/96.
Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.
When
Retrieve the glyph's vertical advances rather than horizontal advances.
Total glyphs to retrieve adjustments for.
An array of glyph id's to retrieve advances.
The returned advances in font design units for each glyph.
If this method succeeds, it returns
This is equivalent to calling GetGdiCompatibleGlyphMetrics and using only the advance width and height.
Like GetGdiCompatibleGlyphMetrics, these are in design units, meaning they must be scaled down by DWRITE_FONT_METRICS::designUnitsPerEm.
+Retrieves the kerning pair adjustments from the font's kern table.
+Number of glyphs to retrieve adjustments for.
An array of glyph id's to retrieve adjustments for.
The advances, returned in font design units, for each glyph. The last glyph adjustment is zero.
If this method succeeds, it returns
GetKerningPairAdjustments isn't a direct replacement for GDI's character based GetKerningPairs, but it serves the same role, without the client needing to cache them locally. GetKerningPairAdjustments also uses glyph id's directly rather than UCS-2 characters (how the kern table actually stores them), which avoids glyph collapse and ambiguity, such as the dash and hyphen, or space and non-breaking space.
Newer fonts may have only GPOS kerning instead of the legacy pair-table kerning. Such fonts, like Gabriola, will only return 0's for adjustments. GetKerningPairAdjustments doesn't virtualize and flatten these GPOS entries into kerning pairs.
You can realize a performance benefit by calling
Determines whether the font supports pair-kerning.
+Returns TRUE if the font supports kerning pairs, otherwise
If the font doesn't support pair table kerning, you don't need to call
Determines the recommended rendering mode for the font, using the specified size and rendering parameters.
+The logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch.
The number of physical pixels per DIP in a horizontal position. For example, if the DPI of the rendering surface is 96, this value is 1.0f. If the DPI is 120, this value is 120.0f/96.
The number of physical pixels per DIP in a vertical position. For example, if the DPI of the rendering surface is 96, this value is 1.0f. If the DPI is 120, this value is 120.0f/96.
Specifies the world transform.
Whether the glyphs in the run are sideways or not.
A
The measuring method that will be used for glyphs in the font. Renderer implementations may choose different rendering modes for different measuring methods, for example:
When this method returns, contains a value that indicates the recommended rendering mode to use.
If this method succeeds, it returns
This method should be used to determine the actual rendering mode in cases where the rendering mode of the rendering params object is
Retrieves the vertical forms of the nominal glyphs retrieved from GetGlyphIndices.
+The number of glyphs to retrieve.
Original glyph indices from cmap.
The vertical form of glyph indices.
If this method succeeds, it returns
The retrieval uses the font's 'vert' table. This is used in CJK vertical layout so the correct characters are shown.
Call GetGlyphIndices to get the nominal glyph indices, followed by calling this to remap the to the substituted forms, when the run is sideways, and the font has vertical glyph variants. See HasVerticalGlyphVariants for more info. +
+Determines whether the font has any vertical glyph variants.
+Returns TRUE if the font contains vertical glyph variants, otherwise
For OpenType fonts, HasVerticalGlyphVariants returns TRUE if the font contains a "vert" feature.
Represents an absolute reference to a font face.
This interface contains the font face type, appropriate file references, and face identification data.
You obtain various font data like metrics, names, and glyph outlines from the
This interface adds the ability to check if a color rendering path is potentially necessary.
+Allows you to determine if a color rendering path is potentially necessary.
+Gets the number of color palettes defined by the font.
+Get the number of entries in each color palette.
+Allows you to determine if a color rendering path is potentially necessary.
+Returns TRUE if a color rendering path is potentially necessary.
Gets the number of color palettes defined by the font.
+The return value is zero if the font has no color information. Color fonts are required to define at least one palette, with palette index zero reserved as the default palette.
Get the number of entries in each color palette.
+The number of entries in each color palette. All color palettes in a font have the same number of palette entries. The return value is zero if the font has no color information.
Gets color values from the font's color palette.
+Zero-based index of the color palette. If the font does not have a palette with the specified index, the method returns DWRITE_E_NOCOLOR.
Zero-based index of the first palette entry to read.
Number of palette entries to read.
Array that receives the color values.
This method can return one of these values.
Return value | Description |
---|---|
| The sum of firstEntryIndex and entryCount is greater than the actual number of palette entries that's returned by the GetPaletteEntryCount method. |
| The font doesn't have a palette with the specified palette index. |
?
Determines the recommended text rendering and grid-fit mode to be used based on the font, size, world transform, and measuring mode.
+Logical font size in DIPs.
Number of pixels per logical inch in the horizontal direction.
Number of pixels per logical inch in the vertical direction.
A
Specifies whether the font is sideways. TRUE if the font is sideways; otherwise,
A
A
A reference to a
A reference to a variable that receives a
A reference to a variable that receives a
If this method succeeds, it returns
Represents an absolute reference to a font face.
+Gets a font face reference that identifies this font.
+Gets the PANOSE values from the font, used for font selection and matching.
+This method doesn't simulate these values, such as substituting a weight or proportion inferred on other values. If the font doesn't specify them, they are all set to 'any' (0).
+Gets the weight of this font.
+Gets the stretch (also known as width) of this font.
+Gets the style (also known as slope) of this font.
+Creates a localized strings object that contains the family names for the font family, indexed by locale name.
+Creates a localized strings object that contains the face names for the font (for example, Regular or Bold), indexed by locale name.
+Gets a font face reference that identifies this font.
+A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Gets the PANOSE values from the font, used for font selection and matching.
+A reference to a
This method doesn't simulate these values, such as substituting a weight or proportion inferred on other values. If the font doesn't specify them, they are all set to 'any' (0).
+Gets the weight of this font.
+Returns a
Gets the stretch (also known as width) of this font.
+Returns a
Gets the style (also known as slope) of this font.
+Returns a
Creates a localized strings object that contains the family names for the font family, indexed by locale name.
+A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Creates a localized strings object that contains the face names for the font (for example, Regular or Bold), indexed by locale name.
+A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Gets a localized strings collection that contains the specified informational strings, indexed by locale name.
+A
A reference to a memory block that receives a reference to a
A reference to a variable that receives whether the font contains the specified string ID. TRUE if the font contains the specified string ID; otherwise,
If the font doesn't contain the specified string, the return value is
Determines whether the font supports the specified character.
+A Unicode (UCS-4) character value.
Returns whether the font supports the specified character. Returns TRUE if the font has the specified character; otherwise,
Determines the recommended text rendering and grid-fit mode to be used based on the font, size, world transform, and measuring mode.
+Logical font size in DIPs.
Number of pixels per logical inch in the horizontal direction.
Number of pixels per logical inch in the vertical direction.
A
Specifies whether the font is sideways. TRUE if the font is sideways; otherwise,
A
A
A reference to a
A reference to a variable that receives a
A reference to a variable that receives a
If this method succeeds, it returns
Determines whether the character is locally downloaded from the font.
+A Unicode (UCS-4) character value.
Returns TRUE if the font has the specified character locally available,
Determines whether the glyph is locally downloaded from the font.
+Glyph identifier.
Returns TRUE if the font has the specified glyph locally available.
Determines whether the specified characters are local.
+Array of characters.
The number of elements in the character array.
Specifies whether to enqueue a download request if any of the specified characters are not local.
Receives TRUE if all of the specified characters are local,
If this method succeeds, it returns
Determines whether the specified glyphs are local.
+Array of glyph indices.
The number of elements in the glyph index array.
Specifies whether to enqueue a download request if any of the specified glyphs are not local.
Receives TRUE if all of the specified glyphs are local,
If this method succeeds, it returns
Represents an absolute reference to a font face. It contains font face type, appropriate file references and face identification data. Various font data such as metrics, names and glyph outlines are obtained from
Gets the available image formats of a specific glyph and ppem.
+Glyphs often have at least TrueType or CFF outlines, but they may also have SVG outlines, or they may have only bitmaps with no TrueType/CFF outlines. Some image formats, notably the PNG/JPEG ones, are size specific and will return no match when there isn't an entry in that size range.
Glyph ids beyond the glyph count return
Gets the available image formats of a specific glyph and ppem.
+The ID of the glyph.
Specifies which formats are supported in the font.
If this method succeeds, it returns
Glyphs often have at least TrueType or CFF outlines, but they may also have SVG outlines, or they may have only bitmaps with no TrueType/CFF outlines. Some image formats, notably the PNG/JPEG ones, are size specific and will return no match when there isn't an entry in that size range.
Glyph ids beyond the glyph count return
Gets the available image formats of a specific glyph and ppem.
+If this method succeeds, it returns
Glyphs often have at least TrueType or CFF outlines, but they may also have SVG outlines, or they may have only bitmaps with no TrueType/CFF outlines. Some image formats, notably the PNG/JPEG ones, are size specific and will return no match when there isn't an entry in that size range.
Glyph ids beyond the glyph count return
Gets a reference to the glyph data based on the desired image format.
+The ID of the glyph to retrieve image data for.
Requested pixels per em.
Specifies which formats are supported in the font.
On return contains data for a glyph.
If this method succeeds, it returns
The glyphDataContext must be released via ReleaseGlyphImageData when done if the data is not empty, similar to
The DWRITE_GLYPH_IMAGE_DATA::uniqueDataId is valuable for caching purposes so that if the same resource is returned more than once, an existing resource can be quickly retrieved rather than needing to reparse or decompress the data.
The function only returns SVG or raster data - requesting TrueType/CFF/COLR data returns DWRITE_E_INVALIDARG. Those must be drawn via DrawGlyphRun or queried using GetGlyphOutline instead. Exactly one format may be requested or else the function returns DWRITE_E_INVALIDARG. If the glyph does not have that format, the call is not an error, but the function returns empty data.
+Releases the table data obtained from ReadGlyphData.
+Opaque context from ReadGlyphData.
Represents a reference to a font face. A uniquely identifying reference to a font, from which you can create a font face to query font metrics and use for rendering. A font face reference consists of a font file, font face index, and font face simulation. The file data may or may not be physically present on the local machine yet.
+Obtains the zero-based index of the font face in its font file or files. If the font files contain a single face, the return value is zero.
+Obtains the algorithmic style simulation flags of a font face.
+Obtains the font file representing a font face.
+Get the local size of the font face in bytes, which will always be less than or equal to GetFullSize. If the locality is remote, this value is zero. If full, this value will equal GetFileSize.
+Get the total size of the font face in bytes.
+Get the last modified date.
+Get the locality of this font face reference.
+You can always successfully create a font face from a fully local font. Attempting to create a font face on a remote or partially local font may fail with DWRITE_E_REMOTEFONT. This function may change between calls depending on background downloads and whether cached data expires.
+Creates a font face from the reference for use with layout, shaping, or rendering.
+Newly created font face object, or nullptr in the case of failure.
If this method succeeds, it returns
This function can fail with DWRITE_E_REMOTEFONT if the font is not local.
+Creates a font face with alternate font simulations, for example, to explicitly simulate a bold font face out of a regular variant.
+Font face simulation flags for algorithmic emboldening and italicization.
Newly created font face object, or nullptr in the case of failure.
If this method succeeds, it returns
This function can fail with DWRITE_E_REMOTEFONT if the font is not local.
+Obtains the zero-based index of the font face in its font file or files. If the font files contain a single face, the return value is zero.
+the zero-based index of the font face in its font file or files. If the font files contain a single face, the return value is zero.
Obtains the algorithmic style simulation flags of a font face.
+Returns the algorithmic style simulation flags of a font face.
Obtains the font file representing a font face.
+If this method succeeds, it returns
Get the local size of the font face in bytes, which will always be less than or equal to GetFullSize. If the locality is remote, this value is zero. If full, this value will equal GetFileSize.
+the local size of the font face in bytes, which will always be less than or equal to GetFullSize. If the locality is remote, this value is zero. If full, this value will equal GetFileSize.
Get the total size of the font face in bytes.
+Returns the total size of the font face in bytes. If the locality is remote, this value is unknown and will be zero.
Get the last modified date.
+Returns the last modified date. The time may be zero if the font file loader does not expose file time.
If this method succeeds, it returns
Get the locality of this font face reference.
+Returns the locality of this font face reference.
You can always successfully create a font face from a fully local font. Attempting to create a font face on a remote or partially local font may fail with DWRITE_E_REMOTEFONT. This function may change between calls depending on background downloads and whether cached data expires.
+Adds a request to the font download queue (
If this method succeeds, it returns
Adds a request to the font download queue (
If this method succeeds, it returns
Downloading a character involves downloading every glyph it depends on directly or indirectly, via font tables (cmap, GSUB, COLR, glyf).
+Adds a request to the font download queue (
If this method succeeds, it returns
Downloading a glyph involves downloading any other glyphs it depends on from the font tables (GSUB, COLR, glyf).
+Adds a request to the font download queue (
If this method succeeds, it returns
Allows you to create Unicode font fallback mappings and create a font fall back object from those mappings.
+Appends a single mapping to the list. Call this once for each additional mapping.
+Unicode ranges that apply to this mapping.
Number of Unicode ranges.
List of target family name strings.
Number of target family names.
Optional explicit font collection for this mapping.
Locale of the context.
Base family name to match against, if applicable.
Scale factor to multiply the result target font by.
If this method succeeds, it returns
Add all the mappings from an existing font fallback object.
+An existing font fallback object.
If this method succeeds, it returns
Creates the finalized fallback object from the mappings added.
+Contains an address of a reference to the created fallback list.
If this method succeeds, it returns
Represents a family of related fonts.
+A font family is a set of fonts that share the same family name, such as "Times New Roman", but that differ in features. These feature differences include style, such as italic, and weight, such as bold. The following illustration shows examples of fonts that are members of the "Times New Roman" font family.
An
* pFontFamily = null ; // Get the font family. + if (SUCCEEDED(hr)) + { hr = pFontCollection->GetFontFamily(i, &pFontFamily); + } +
The font family name is used to specify the font family for text layout and text format objects. You can get a list of localized font family names from an
+* pFamilyNames = null ; // Get a list of localized strings for the family name. + if (SUCCEEDED(hr)) + { hr = pFontFamily->GetFamilyNames(&pFamilyNames); + } +
Creates a localized strings object that contains the family names for the font family, indexed by locale name.
+ The following code example shows how to get the font family name from a
+* pFamilyNames = null ; // Get a list of localized strings for the family name. + if (SUCCEEDED(hr)) + { hr = pFontFamily->GetFamilyNames(&pFamilyNames); + } UINT32 index = 0; +exists = false; wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; if (SUCCEEDED(hr)) + { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames->FindLocaleName(localeName, &index, &exists); } if (SUCCEEDED(hr) && !exists) // if the above find did not find a match, retry with US English { hr = pFamilyNames->FindLocaleName(L"en-us", &index, &exists); } + } // If the specified locale doesn't exist, select the first on the list. + if (!exists) index = 0; UINT32 length = 0; // Get the string length. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetStringLength(index, &length); + } // Allocate a string big enough to hold the name. + wchar_t* name = new (std::nothrow) wchar_t[length+1]; + if (name == null ) + { hr = E_OUTOFMEMORY; + } // Get the family name. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetString(index, name, length+1); + } +
Creates a localized strings object that contains the family names for the font family, indexed by locale name.
+The address of a reference to the newly created
If this method succeeds, it returns
The following code example shows how to get the font family name from a
+* pFamilyNames = null ; // Get a list of localized strings for the family name. + if (SUCCEEDED(hr)) + { hr = pFontFamily->GetFamilyNames(&pFamilyNames); + } UINT32 index = 0; +exists = false; wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; if (SUCCEEDED(hr)) + { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames->FindLocaleName(localeName, &index, &exists); } if (SUCCEEDED(hr) && !exists) // if the above find did not find a match, retry with US English { hr = pFamilyNames->FindLocaleName(L"en-us", &index, &exists); } + } // If the specified locale doesn't exist, select the first on the list. + if (!exists) index = 0; UINT32 length = 0; // Get the string length. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetStringLength(index, &length); + } // Allocate a string big enough to hold the name. + wchar_t* name = new (std::nothrow) wchar_t[length+1]; + if (name == null ) + { hr = E_OUTOFMEMORY; + } // Get the family name. + if (SUCCEEDED(hr)) + { hr = pFamilyNames->GetString(index, name, length+1); + } +
Gets the font that best matches the specified properties.
+A value that is used to match a requested font weight.
A value that is used to match a requested font stretch.
A value that is used to match a requested font style.
When this method returns, contains the address of a reference to the newly created
Gets a list of fonts in the font family ranked in order of how well they match the specified properties.
+A value that is used to match a requested font weight.
A value that is used to match a requested font stretch.
A value that is used to match a requested font style.
An address of a reference to the newly created
Represents a family of related fonts.
+Gets the current location of a font given its zero-based index.
+Zero-based index of the font in the font list.
Returns a
For fully local files, the result will always be
Gets a font given its zero-based index.
+Zero-based index of the font in the font list.
A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Gets a font face reference given its zero-based index.
+Zero-based index of the font in the font list.
A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Gets the number of fonts in the font list.
+Gets the font collection that contains the fonts in the font list.
+Gets the number of fonts in the font list.
+Gets the font collection that contains the fonts in the font list.
+When this method returns, contains the address of a reference to the current
If this method succeeds, it returns
Gets the number of fonts in the font list.
+The number of fonts in the font list.
Gets a font given its zero-based index.
+Zero-based index of the font in the font list.
When this method returns, contains the address of a reference to the newly created
Represents a list of fonts.
+Gets the current location of a font given its zero-based index.
+Zero-based index of the font in the font list.
Returns a
For fully local files, the result will always be
Gets a font given its zero-based index.
+Zero-based index of the font in the font list.
A reference to a memory block that receives a reference to a
If this method succeeds, it returns
This method returns DWRITE_E_REMOTEFONT if it could not construct a remote font.
Gets a font face reference given its zero-based index.
+Zero-based index of the font in the font list.
A reference to a memory block that receives a reference to a
If this method succeeds, it returns
Get the number of total fonts in the set.
+Get the number of total fonts in the set.
+Returns the number of total fonts in the set.
Gets a reference to the font at the specified index, which may be local or remote.
+Zero-based index of the font.
Receives a reference the font face reference object, or nullptr on failure.
If this method succeeds, it returns
Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations.
+Font face object that specifies the physical font.
Receives the zero-based index of the matching font if the font was found, or UINT_MAX otherwise.
Receives TRUE if the font exists or
If this method succeeds, it returns
Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations.
+Font face object that specifies the physical font.
Receives the zero-based index of the matching font if the font was found, or UINT_MAX otherwise.
Receives TRUE if the font exists or
If this method succeeds, it returns
Returns all unique property values in the set, which can be used for purposes such as displaying a family list or tag cloud. Values are returned in priority order according to the language list, such that if a font contains more than one localized name, the preferred one will be returned.
+Font property of interest.
Receives a reference to the newly created strings list.
If this method succeeds, it returns
Returns all unique property values in the set, which can be used for purposes such as displaying a family list or tag cloud. Values are returned in priority order according to the language list, such that if a font contains more than one localized name, the preferred one will be returned.
+Font property of interest.
List of semicolon delimited language names in preferred order. When a particular string like font family has more than one localized name, the first match is returned. For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. The returned list of distinct family names would include either the Japanese name (if "ja-jp" was specified as a preferred locale) or the English name (in all other cases).
Receives a reference to the newly created strings list.
If this method succeeds, it returns
Returns all unique property values in the set, which can be used for purposes such as displaying a family list or tag cloud. Values are returned in priority order according to the language list, such that if a font contains more than one localized name, the preferred one will be returned.
+Font property of interest.
List of semicolon delimited language names in preferred order. When a particular string like font family has more than one localized name, the first match is returned. For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. The returned list of distinct family names would include either the Japanese name (if "ja-jp" was specified as a preferred locale) or the English name (in all other cases).
Receives a reference to the newly created strings list.
Receives a reference to the newly created strings list.
If this method succeeds, it returns
Returns how many times a given property value occurs in the set.
+Font property of interest.
Receives how many times the property occurs.
If this method succeeds, it returns
Returns a subset of fonts filtered by the given properties.
+List of properties to filter using.
The number of properties to filter.
The subset of fonts that match the properties, or nullptr on failure.
The subset of fonts that match the properties, or nullptr on failure.
If this method succeeds, it returns
If no fonts matched the filter, the subset will be empty (GetFontCount returns 0), but the function does not return an error. The subset will always be equal to or less than the original set. If you only want to filter out remote fonts, you may pass null in properties and zero in propertyCount.
+Returns a subset of fonts filtered by the given properties.
+List of properties to filter using.
The number of properties to filter.
The subset of fonts that match the properties, or nullptr on failure.
If this method succeeds, it returns
If no fonts matched the filter, the subset will be empty (GetFontCount returns 0), but the function does not return an error. The subset will always be equal to or less than the original set. If you only want to filter out remote fonts, you may pass null in properties and zero in propertyCount.
+Contains methods for building a font set.
+Adds a reference to a font to the set being built. The caller supplies enough information to search on, avoiding the need to open the potentially non-local font. Any properties not supplied by the caller will be missing, and those properties will not be available as filters in GetMatchingFonts. GetPropertyValues for missing properties will return an empty string list. The properties passed should generally be consistent with the actual font contents, but they need not be. You could, for example, alias a font using a different name or unique identifier, or you could set custom tags not present in the actual font.
+Reference to the font.
List of properties to associate with the reference.
The number of properties defined.
If this method succeeds, it returns
Adds a reference to a font to the set being built. The caller supplies enough information to search on, avoiding the need to open the potentially non-local font. Any properties not supplied by the caller will be missing, and those properties will not be available as filters in GetMatchingFonts. GetPropertyValues for missing properties will return an empty string list. The properties passed should generally be consistent with the actual font contents, but they need not be. You could, for example, alias a font using a different name or unique identifier, or you could set custom tags not present in the actual font.
+Reference to the font.
If this method succeeds, it returns
Appends an existing font set to the one being built, allowing one to aggregate two sets or to essentially extend an existing one.
+Font set to append font face references from.
If this method succeeds, it returns
Creates a font set from all the font face references added so far with AddFontFaceReference.
+Contains the newly created font set object, or nullptr in case of failure.
If this method succeeds, it returns
Creating a font set takes less time if the references were added with metadata rather than needing to extract the metadata from the font file.
+Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
+Provides interoperability with GDI, such as methods to convert a font face to a
Creates a font object that matches the properties specified by the
Structure containing a GDI-compatible font description.
The font collection to search. If
Receives a newly created font object if successful, or
Reads the font signature from the given font face.
+Font face to read font signature from.
Font signature from the OS/2 table, ulUnicodeRange and ulCodePageRange.
Reads the font signature from the given font face.
+Font face to read font signature from.
Font signature from the OS/2 table, ulUnicodeRange and ulCodePageRange.
Gets a list of matching fonts based on the specified
Structure containing a GDI-compatible font description.
The font set to search.
>Receives the filtered font set if successful.
If this method succeeds, it returns
Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
+Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
+Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
+Represents text rendering settings for glyph rasterization and filtering.
+Gets the amount of contrast enhancement to use for grayscale antialiasing.
+Gets the amount of contrast enhancement to use for grayscale antialiasing.
+The contrast enhancement value. Valid values are greater than or equal to zero.
Represents text rendering settings for glyph rasterization and filtering.
+Gets the grid fitting mode.
+Gets the grid fitting mode.
+Returns a
Represents text rendering settings for glyph rasterization and filtering.
+Gets the rendering mode.
+Gets the rendering mode.
+Returns a
Represents a collection of strings indexed by number. An
Gets the number of strings in the string list.
+Gets the number of strings in the string list.
+Returns the number of strings in the string list.
Gets the length in characters (not including the null terminator) of the locale name with the specified index.
+Zero-based index of the locale name.
Receives the length in characters, not including the null terminator.
If this method succeeds, it returns
Copies the locale name with the specified index to the specified array.
+Zero-based index of the locale name.
Character array that receives the locale name.
Size of the array in characters. The size must include space for the terminating null character.
If this method succeeds, it returns
Gets the length in characters (not including the null terminator) of the string with the specified index.
+Zero-based index of the string.
Receives the length in characters of the string, not including the null terminator.
If this method succeeds, it returns
Copies the string with the specified index to the specified array.
+Zero-based index of the string.
Character array that receives the string.
Size of the array in characters. The size must include space for the terminating null character.
If this method succeeds, it returns
Analyzes various text properties for complex script processing.
+Returns 2x3 transform matrix for the respective angle to draw the glyph run.
Extends
If this method succeeds, it returns
Returns a complete list of OpenType features available for a script or font. If a feature is partially supported, then this method indicates that it is supported.
+The font face to get features from.
The script analysis for the script or font to check.
The locale name to check.
The maximum number of tags to return.
The actual number of tags returned.
An array of OpenType font feature tags.
If this method succeeds, it returns
Checks if a typographic feature is available for a glyph or a set of glyphs.
+The font face to read glyph information from.
The script analysis for the script or font to check.
The locale name to check.
The font feature tag to check.
The number of glyphs to check.
An array of glyph indices to check.
An array of integers that indicate whether or not the font feature applies to each glyph specified.
If this method succeeds, it returns
Describes the font and paragraph properties used to format text, and it describes locale information. This interface has all the same methods as
Get or sets the preferred orientation of glyphs when using a vertical reading direction.
+Gets or sets the wrapping mode of the last line.
+Gets or sets the optical margin alignment for the text format.
+Gets or sets the current fallback. If none was ever set since creating the layout, it will be nullptr.
+Sets the orientation of a text format.
+The orientation to apply to the text format.
If this method succeeds, it returns
Get the preferred orientation of glyphs when using a vertical reading direction.
+The preferred orientation of glyphs when using a vertical reading direction.
Sets the wrapping mode of the last line.
+If set to
The last line is wrapped by default.
If this method succeeds, it returns
Gets the wrapping mode of the last line.
+Returns
Sets the optical margin alignment for the text format.
By default, glyphs are aligned to the margin by the default origin and side-bearings of the glyph. If you specify DWRITE_OPTICAL_ALIGNMENT_USING_SIDE_BEARINGS, then the alignment Suses the side bearings to offset the glyph from the aligned edge to ensure the ink of the glyphs are aligned.
+The optical alignment to set.
If this method succeeds, it returns
Gets the optical margin alignment for the text format.
+The optical alignment.
Applies the custom font fallback onto the layout. If none is set, it uses the default system fallback list.
+The font fallback to apply to the layout.
If this method succeeds, it returns
Gets the current fallback. If none was ever set since creating the layout, it will be nullptr.
+Contains an address of a reference to the the current font fallback object.
If this method succeeds, it returns
Describes the font and paragraph properties used to format text, and it describes locale information.
+Gets or sets the line spacing adjustment set for a multiline text paragraph.
+Set line spacing.
+How to manage space between lines.
If this method succeeds, it returns
Gets the line spacing adjustment set for a multiline text paragraph.
+A structure describing how the space between lines is managed for the paragraph.
If this method succeeds, it returns
Represents a block of text after it has been fully analyzed and formatted.
+Enables or disables pair-kerning on a given text range.
+The flag that indicates whether text is pair-kerned.
The text range to which the change applies.
If this method succeeds, it returns
Gets whether or not pair-kerning is enabled at given position.
+The current text position.
The flag that indicates whether text is pair-kerned.
The position range of the current format.
If this method succeeds, it returns
Sets the spacing between characters.
+The spacing before each character, in reading order.
The spacing after each character, in reading order.
The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.
Text range to which this change applies.
If this method succeeds, it returns
Gets the spacing between characters.
+The current text position.
The spacing before each character, in reading order.
The spacing after each character, in reading order.
The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.
The position range of the current format.
If this method succeeds, it returns
Represents a block of text after it has been fully analyzed and formatted.
+Retrieves overall metrics for the formatted string.
+Get or sets the preferred orientation of glyphs when using a vertical reading direction.
+Get or sets whether or not the last word on the last line is wrapped.
+Get or sets how the glyphs align to the edges the margin.
+Get or sets the current font fallback object.
+Retrieves overall metrics for the formatted string.
+When this method returns, contains the measured distances of text and associated content after being formatted.
If this method succeeds, it returns
Set the preferred orientation of glyphs when using a vertical reading direction.
+Preferred glyph orientation.
If this method succeeds, it returns
Get the preferred orientation of glyphs when using a vertical reading direction.
+Set whether or not the last word on the last line is wrapped.
+Line wrapping option.
If this method succeeds, it returns
Get whether or not the last word on the last line is wrapped.
+Set how the glyphs align to the edges the margin. Default behavior is to align glyphs using their default glyphs metrics, which include side bearings.
+Optical alignment option.
If this method succeeds, it returns
Get how the glyphs align to the edges the margin.
+Apply a custom font fallback onto layout. If none is specified, the layout uses the system fallback list.
+ Custom font fallback created from
If this method succeeds, it returns
Get the current font fallback object.
+The current font fallback object.
If this method succeeds, it returns
Gets or sets line spacing information.
+Invalidates the layout, forcing layout to remeasure before calling the metrics or drawing functions. This is useful if the locality of a font changes, and layout should be redrawn, or if the size of a client implemented
If this method succeeds, it returns
Set line spacing.
+How to manage space between lines.
If this method succeeds, it returns
Gets line spacing information.
+How to manage space between lines.
If this method succeeds, it returns
Retrieves properties of each line.
+The array to fill with line information.
The maximum size of the lineMetrics array.
The actual size of the lineMetrics array that is needed.
If this method succeeds, it returns
If maxLineCount is not large enough E_NOT_SUFFICIENT_BUFFER, which is equivalent to HRESULT_FROM_WIN32(
Represents a set of application-defined callbacks that perform rendering of text, inline objects, and decorations such as underlines.
+The
Vertical rise of the caret in font design units. Rise / Run yields the caret angle. Rise = 1 for perfectly upright fonts (non-italic).
Horizontal run of the caret in font design units. Rise / Run yields the caret angle. Run = 0 for perfectly upright fonts (non-italic).
Horizontal offset of the caret, in font design units, along the baseline for good appearance. Offset = 0 for perfectly upright fonts (non-italic).
Contains information about a glyph cluster.
+The total advance width of all glyphs in the cluster.
The number of text positions in the cluster.
Indicates whether a line can be broken right after the cluster.
Indicates whether the cluster corresponds to a whitespace character.
Indicates whether the cluster corresponds to a newline character.
Indicates whether the cluster corresponds to a soft hyphen character.
Indicates whether the cluster is read from right to left.
Reserved for future use.
Contains the information needed by renderers to draw glyph runs with glyph color information. All coordinates are in device independent pixels (DIPs).
+Glyph run to draw for this layer.
Pointer to the glyph run description for this layer. This may be
X coordinate of the baseline origin for the layer.
Y coordinate of the baseline origin for the layer.
Color value of the run; if all members are zero, the run should be drawn using the current brush.
Zero-based index into the font?s color palette; if this is 0xFFFF, the run should be drawn using the current brush.
Represents a color glyph run. The
Glyph run to draw for this layer.
Pointer to the glyph run description for this layer. This may be
X coordinate of the baseline origin for the layer.
Y coordinate of the baseline origin for the layer.
Color value of the run; if all members are zero, the run should be drawn using the current brush.
Zero-based index into the font?s color palette; if this is 0xFFFF, the run should be drawn using the current brush.
Type of glyph image format for this color run. Exactly one type will be set since TranslateColorGlyphRun has already broken down the run into separate parts.
Measuring mode to use for this glyph run.
The
The number of font design units per em unit. Font files use their own coordinate system of font design units. A font design unit is the smallest measurable unit in the em square, an imaginary square that is used to size and align glyphs. The concept of em square is used as a reference scale factor when defining font size and device transformation semantics. The size of one em square is also commonly used to compute the paragraph identation value.
The ascent value of the font face in font design units. Ascent is the distance from the top of font character alignment box to the English baseline.
The descent value of the font face in font design units. Descent is the distance from the bottom of font character alignment box to the English baseline.
The line gap in font design units. Recommended additional white space to add between lines to improve legibility. The recommended line spacing (baseline-to-baseline distance) is the sum of ascent, descent, and lineGap. The line gap is usually positive or zero but can be negative, in which case the recommended line spacing is less than the height of the character alignment box.
The cap height value of the font face in font design units. Cap height is the distance from the English baseline to the top of a typical English capital. Capital "H" is often used as a reference character for the purpose of calculating the cap height value.
The x-height value of the font face in font design units. x-height is the distance from the English baseline to the top of lowercase letter "x", or a similar lowercase character.
The underline position value of the font face in font design units. Underline position is the position of underline relative to the English baseline. The value is usually made negative in order to place the underline below the baseline.
The suggested underline thickness value of the font face in font design units.
The strikethrough position value of the font face in font design units. Strikethrough position is the position of strikethrough relative to the English baseline. The value is usually made positive in order to place the strikethrough above the baseline.
The suggested strikethrough thickness value of the font face in font design units.
The
struct : public
+ {
+ ...
+ };
+ The number of font design units per em unit. Font files use their own coordinate system of font design units. A font design unit is the smallest measurable unit in the em square, an imaginary square that is used to size and align glyphs. The concept of em square is used as a reference scale factor when defining font size and device transformation semantics. The size of one em square is also commonly used to compute the paragraph identation value.
The ascent value of the font face in font design units. Ascent is the distance from the top of font character alignment box to the English baseline.
The descent value of the font face in font design units. Descent is the distance from the bottom of font character alignment box to the English baseline.
The line gap in font design units. Recommended additional white space to add between lines to improve legibility. The recommended line spacing (baseline-to-baseline distance) is the sum of ascent, descent, and lineGap. The line gap is usually positive or zero but can be negative, in which case the recommended line spacing is less than the height of the character alignment box.
The cap height value of the font face in font design units. Cap height is the distance from the English baseline to the top of a typical English capital. Capital "H" is often used as a reference character for the purpose of calculating the cap height value.
The x-height value of the font face in font design units. x-height is the distance from the English baseline to the top of lowercase letter "x", or a similar lowercase character.
The underline position value of the font face in font design units. Underline position is the position of underline relative to the English baseline. The value is usually made negative in order to place the underline below the baseline.
The suggested underline thickness value of the font face in font design units.
The strikethrough position value of the font face in font design units. Strikethrough position is the position of strikethrough relative to the English baseline. The value is usually made positive in order to place the strikethrough above the baseline.
The suggested strikethrough thickness value of the font face in font design units.
Left edge of accumulated bounding blackbox of all glyphs in the font.
Top edge of accumulated bounding blackbox of all glyphs in the font.
Right edge of accumulated bounding blackbox of all glyphs in the font.
Bottom edge of accumulated bounding blackbox of all glyphs in the font.
Horizontal position of the subscript relative to the baseline origin. This is typically negative (to the left) in italic and oblique fonts, and zero in regular fonts.
Vertical position of the subscript relative to the baseline. This is typically negative.
Horizontal size of the subscript em box in design units, used to scale the simulated subscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client uses its own policy.
Vertical size of the subscript em box in design units, used to scale the simulated subscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client uses its own policy.
Horizontal position of the superscript relative to the baseline origin. This is typically positive (to the right) in italic and oblique fonts, and zero in regular fonts.
Vertical position of the superscript relative to the baseline. This is typically positive.
Horizontal size of the superscript em box in design units, used to scale the simulated superscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client should use its own policy.
Vertical size of the superscript em box in design units, used to scale the simulated superscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client should use its own policy.
A Boolean value that indicates that the ascent, descent, and lineGap are based on newer 'typographic' values in the font, rather than legacy values.
Font property used for filtering font sets and building a font set with explicit properties.
+Specifies the requested font property, such as
Specifies the value, such as "Segoe UI".
Specifies the locale to use, such as "en-US". Simply leave this empty when used with the font set filtering functions, as they will find a match regardless of language. For passing to AddFontFaceReference, the localeName specifies the language of the property value.
Data for a single glyph from GetGlyphImageData.
+Pointer to the glyph data.
Size of glyph data in bytes.
Unique identifier for the glyph data. Clients may use this to cache a parsed/decompressed version and tell whether a repeated call to the same font returns the same data.
Pixels per em of the returned data. For non-scalable raster data (PNG/TIFF/JPG), this can be larger or smaller than requested from GetGlyphImageData when there isn't an exact match. For scaling intermediate sizes, use: desired pixels per em * font em size / actual pixels per em.
Size of image when the format is pixel data.
Left origin along the horizontal Roman baseline.
Right origin along the horizontal Roman baseline.
Top origin along the vertical central baseline.
Bottom origin along vertical central baseline.
Specifies the metrics of an individual glyph. The units depend on how the metrics are obtained.
+Specifies the X offset from the glyph origin to the left edge of the black box. The glyph origin is the current horizontal writing position. A negative value means the black box extends to the left of the origin (often true for lowercase italic 'f').
Specifies the X offset from the origin of the current glyph to the origin of the next glyph when writing horizontally.
Specifies the X offset from the right edge of the black box to the origin of the next glyph when writing horizontally. The value is negative when the right edge of the black box overhangs the layout box.
Specifies the vertical offset from the vertical origin to the top of the black box. Thus, a positive value adds whitespace whereas a negative value means the glyph overhangs the top of the layout box.
Specifies the Y offset from the vertical origin of the current glyph to the vertical origin of the next glyph when writing vertically. Note that the term "origin" by itself denotes the horizontal origin. The vertical origin is different. Its Y coordinate is specified by verticalOriginY value, and its X coordinate is half the advanceWidth to the right of the horizontal origin.
Specifies the vertical distance from the bottom edge of the black box to the advance height. This is positive when the bottom edge of the black box is within the layout box, or negative when the bottom edge of black box overhangs the layout box.
Specifies the Y coordinate of a glyph's vertical origin, in the font's design coordinate system. The y coordinate of a glyph's vertical origin is the sum of the glyph's top side bearing and the top (that is, yMax) of the glyph's bounding box.
The optional adjustment to a glyph's position.
+An glyph offset changes the position of a glyph without affecting the pen position. Offsets are in logical, pre-transform units.
+The offset in the advance direction of the run. A positive advance offset moves the glyph to the right (in pre-transform coordinates) if the run is left-to-right or to the left if the run is right-to-left.
The offset in the ascent direction, that is, the direction ascenders point. A positive ascender offset moves the glyph up (in pre-transform coordinates). A negative ascender offset moves the glyph down.
Describes the region obtained by a hit test.
+The first text position within the hit region.
The number of text positions within the hit region.
The x-coordinate of the upper-left corner of the hit region.
The y-coordinate of the upper-left corner of the hit region.
The width of the hit region.
The height of the hit region.
The BIDI level of the text positions within the hit region.
true if the hit region contains text; otherwise, false.
true if the text range is trimmed; otherwise, false.
Contains properties describing the geometric measurement of an + application-defined inline object.
+The width of the inline object.
The height of the inline object.
The distance from the top of the object to the point where it is lined up with the adjacent text. If the baseline is at the bottom, then baseline simply equals height.
A Boolean flag that indicates whether the object is to be placed upright or alongside the text baseline for vertical text.
The
Minimum amount of expansion to apply to the side of the glyph. This might vary from zero to infinity, typically being zero except for kashida.
Maximum amount of expansion to apply to the side of the glyph. This might vary from zero to infinity, being zero for fixed-size characters and connected scripts, and non-zero for discrete scripts, and non-zero for cursive scripts at expansion points.
Maximum amount of compression to apply to the side of the glyph. This might vary from zero up to the glyph cluster size.
Priority of this expansion point. Larger priorities are applied later, while priority zero does nothing.
Priority of this compression point. Larger priorities are applied later, while priority zero does nothing.
Allow this expansion point to use up any remaining slack space even after all expansion priorities have been used up.
Allow this compression point to use up any remaining space even after all compression priorities have been used up.
Apply expansion and compression to the leading edge of the glyph. This bit is
Apply expansion and compression to the trailing edge of the glyph. This bit is
Reserved
Contains information about a formatted line of text.
+The number of text positions in the text line. This includes any trailing whitespace and newline characters.
The number of whitespace positions at the end of the text line. Newline sequences are considered whitespace.
The number of characters in the newline sequence at the end of the text line. If the count is zero, then the text line was either wrapped or it is the end of the text.
The height of the text line.
The distance from the top of the text line to its baseline.
The line is trimmed.
Contains information about a formatted line of text.
+The number of text positions in the text line. This includes any trailing whitespace and newline characters.
The number of whitespace positions at the end of the text line. Newline sequences are considered whitespace.
The number of characters in the newline sequence at the end of the text line. If the count is zero, then the text line was either wrapped or it is the end of the text.
The height of the text line.
The distance from the top of the text line to its baseline.
The line is trimmed.
White space before the content of the line. This is included in the line height and baseline distances. If the line is formatted horizontally either with a uniform line spacing or with proportional line spacing, this value represents the extra space above the content.
White space after the content of the line. This is included in the height of the line. If the line is formatted horizontally either with a uniform line spacing or with proportional line spacing, this value represents the extra space below the content.
Method used to determine line spacing.
Spacing between lines. The interpretation of this parameter depends upon the line spacing method, as follows:
Distance from top of line to baseline. The interpretation of this parameter depends upon the line spacing method, as follows:
Proportion of the entire leading distributed before the line. The allowed value is between 0 and 1.0. The remaining leading is distributed after the line. It is ignored for the default and uniform line spacing methods. The leading that is available to distribute before or after the line depends on the values of the height and baseline parameters.
Specify whether
Indicates how much any visible DIPs (device independent pixels) overshoot each side of the layout or inline objects.
Positive overhangs indicate that the visible area extends outside the layout box or inline object, while negative values mean there is whitespace inside. The returned values are unaffected by rendering transforms or pixel snapping. Additionally, they may not exactly match the final target's pixel bounds after applying grid fitting and hinting.
+The distance from the left-most visible DIP to its left-alignment edge.
The distance from the top-most visible DIP to its top alignment edge.
The distance from the right-most visible DIP to its right-alignment edge.
The distance from the bottom-most visible DIP to its lower-alignment edge.
The
Stores the association of text and its writing system script, as well as some display attributes.
+The zero-based index representation of writing system script.
A value that indicates additional shaping requirement of text.
The
The standardized four character code for the given script.
Note??These only include the general Unicode scripts, not any additional ISO 15924 scripts for bibliographic distinction. ?The standardized numeric code, ranging 0-999.
Number of characters to estimate look-ahead for complex scripts. Latin and all Kana are generally 1. Indic scripts are up to 15, and most others are 8.
Note??Combining marks and variation selectors can produce clusters that are longer than these look-aheads, so this estimate is considered typical language use. Diacritics must be tested explicitly separately. ?Appropriate character to elongate the given script for justification. For example:
Restrict the caret to whole clusters, like Thai and Devanagari. Scripts such as Arabic by default allow navigation between clusters. Others like Thai always navigate across whole clusters.
The language uses dividers between words, such as spaces between Latin or the Ethiopic wordspace. Examples include Latin, Greek, Devanagari, and Ethiopic. Chinese, Korean, and Thai are excluded.
The characters are discrete units from each other. This includes both block scripts and clustered scripts. Examples include Latin, Greek, Cyrillic, Hebrew, Chinese, and Thai.
The language is a block script, expanding between characters. Examples include Chinese, Japanese, Korean, and Bopomofo.
The language is justified within glyph clusters, not just between glyph clusters, such as the character sequence of Thai Lu and Sara Am (U+E026, U+E033), which form a single cluster but still expand between them. Examples include Thai, Lao, and Khmer.
The script's clusters are connected to each other (such as the baseline-linked Devanagari), and no separation is added between characters.
Note??Cursively linked scripts like Arabic are also connected (but not all connected scripts are cursive). ?Examples include Devanagari, Arabic, Syriac, Bengala, Gurmukhi, and Ogham. Latin, Chinese, and Thaana are excluded.
The script is naturally cursive (Arabic and Syriac), meaning it uses other justification methods like kashida extension rather than inter-character spacing.
Note?? Although other scripts like Latin and Japanese might actually support handwritten cursive forms, they are not considered cursive scripts. ?Examples include Arabic, Syriac, and Mongolian. Thaana, Devanagari, Latin, and Chinese are excluded.
Reserved
Shaping output properties for an output glyph.
+Indicates that the glyph is shaped alone.
Reserved for future use.
Contains information regarding the size and placement of strikethroughs. All coordinates are in device independent pixels (DIPs).
+A value that indicates the width of the strikethrough, measured parallel to the baseline.
A value that indicates the thickness of the strikethrough, measured perpendicular to the baseline.
A value that indicates the offset of the strikethrough from the baseline. A positive offset represents a position below the baseline and a negative offset is above. Typically, the offset will be negative.
Reading direction of the text associated with the strikethrough. This value is used to interpret whether the width value runs horizontally or vertically.
Flow direction of the text associated with the strikethrough. This value is used to interpret whether the thickness value advances top to bottom, left to right, or right to left.
An array of characters containing the locale of the text that is the strikethrough is being drawn over.
The measuring mode can be useful to the renderer to determine how underlines are rendered, such as rounding the thickness to a whole pixel in GDI-compatible modes.
Contains the metrics associated with text after layout. All coordinates are in device independent pixels (DIPs).
+A value that indicates the left-most point of formatted text relative to the layout box, while excluding any glyph overhang.
A value that indicates the top-most point of formatted text relative to the layout box, while excluding any glyph overhang.
A value that indicates the width of the formatted text, while ignoring trailing whitespace at the end of each line.
The width of the formatted text, taking into account the trailing whitespace at the end of each line.
The height of the formatted text. The height of an empty string is set to the same value as that of the default font.
The initial width given to the layout. It can be either larger or smaller than the text content width, depending on whether the text was wrapped.
Initial height given to the layout. Depending on the length of the text, it may be larger or smaller than the text content height.
The maximum reordering count of any line of text, used to calculate the most number of hit-testing boxes needed. If the layout has no bidirectional text, or no text at all, the minimum level is 1.
Total number of lines.
Contains the metrics associated with text after layout. All coordinates are in device independent pixels (DIPs).
+A value that indicates the left-most point of formatted text relative to the layout box, while excluding any glyph overhang.
A value that indicates the top-most point of formatted text relative to the layout box, while excluding any glyph overhang.
A value that indicates the width of the formatted text, while ignoring trailing whitespace at the end of each line.
The width of the formatted text, taking into account the trailing whitespace at the end of each line.
The height of the formatted text. The height of an empty string is set to the same value as that of the default font.
The initial width given to the layout. It can be either larger or smaller than the text content width, depending on whether the text was wrapped.
Initial height given to the layout. Depending on the length of the text, it may be larger or smaller than the text content height.
The maximum reordering count of any line of text, used to calculate the most number of hit-testing boxes needed. If the layout has no bidirectional text, or no text at all, the minimum level is 1.
Total number of lines.
A value that indicates the left-most point of formatted text relative to the layout box, while excluding any glyph overhang.
Specifies the trimming option for text overflowing the layout box.
+A value that specifies the text granularity used to trim text overflowing the layout box.
A character code used as the delimiter that signals the beginning of the portion of text to be preserved. Text starting from the Nth occurence of the delimiter (where N equals delimiterCount) counting backwards from the end of the text block will be preserved. For example, given the text is a path like c:\A\B\C\D\file.txt and delimiter equal to '\' and delimiterCount equal to 1, the file.txt portion of the text would be preserved. Specifying a delimiterCount of 2 would preserve D\file.txt.
The delimiter count, counting from the end of the text, to preserve text from.
Contains a set of typographic features to be applied during text shaping.
+A reference to a structure that specifies properties used to identify and execute typographic features in the font.
A value that indicates the number of features being applied to a font face.
Contains information about the width, thickness, offset, run height, reading direction, and flow direction of an underline.
+All coordinates are in device independent pixels (DIPs).
+A value that indicates the width of the underline, measured parallel to the baseline.
A value that indicates the thickness of the underline, measured perpendicular to the baseline.
A value that indicates the offset of the underline from the baseline. A positive offset represents a position below the baseline (away from the text) and a negative offset is above (toward the text).
A value that indicates the height of the tallest run where the underline is applied.
A value that indicates the reading direction of the text associated with the underline. This value is used to interpret whether the width value runs horizontally or vertically.
A value that indicates the flow direction of the text associated with the underline. This value is used to interpret whether the thickness value advances top to bottom, left to right, or right to left.
An array of characters which contains the locale of the text that the underline is being drawn under. For example, in vertical text, the underline belongs on the left for Chinese but on the right for Japanese.
The measuring mode can be useful to the renderer to determine how underlines are rendered, such as rounding the thickness to a whole pixel in GDI-compatible modes.
The
The first code point in the Unicode range.
The last code point in the Unicode range.
Specifies the identifiers of the metadata items in an 8BIM IPTC digest metadata block.
+[VT_LPSTR] A name that identifies the 8BIM block.
[VT_BLOB] The embedded IPTC digest value.
Specifies the identifiers of the metadata items in an 8BIM IPTC block.
+[VT_LPSTR] A name that identifies the 8BIM block.
[VT_UNKNOWN] The IPTC block embedded in this 8BIM IPTC block.
Specifies the identifiers of the metadata items in an 8BIMResolutionInfo block.
+[VT_LPSTR] A name that identifies the 8BIM block.
[VT_UI4] The horizontal resolution of the image.
[VT_UI2] The units that the horizontal resolution is specified in; a 1 indicates pixels per inch and a 2 indicates pixels per centimeter.
[VT_UI2] The units that the image width is specified in; a 1 indicates inches, a 2 indicates centimeters, a 3 indicates points, a 4 specifies picas, and a 5 specifies columns.
[VT_UI4] The vertical resolution of the image.
[VT_UI2] The units that the vertical resolution is specified in; a 1 indicates pixels per inch and a 2 indicates pixels per centimeter.
[VT_UI2] The units that the image height is specified in; a 1 indicates inches, a 2 indicates centimeters, a 3 indicates points, a 4 specifies picas, and a 5 specifies columns.
Specifies the desired alpha channel usage.
+Use alpha channel.
Use a pre-multiplied alpha channel.
Ignore alpha channel.
Specifies the desired cache usage.
+The CreateBitmap of the
Do not cache the bitmap.
Cache the bitmap when needed.
Cache the bitmap at initialization.
Specifies the capabilities of the decoder.
+Decoder recognizes the image was encoded with an encoder produced by the same vendor.
Decoder can decode all the images within an image container.
Decoder can decode some of the images within an image container.
Decoder can enumerate the metadata blocks within a container format.
Decoder can find and decode a thumbnail.
Specifies the type of dither algorithm to apply when converting between image formats.
+A solid color algorithm without dither.
A solid color algorithm without dither.
A 4x4 ordered dither algorithm.
An 8x8 ordered dither algorithm.
A 16x16 ordered dither algorithm.
A 4x4 spiral dither algorithm.
An 8x8 spiral dither algorithm.
A 4x4 dual spiral dither algorithm.
An 8x8 dual spiral dither algorithm.
An error diffusion algorithm.
Specifies the cache options available for an encoder.
+The encoder is cached in memory. This option is not supported.
The encoder is cached to a temporary file. This option is not supported.
The encoder is not cached.
Specifies the sampling or filtering mode to use when scaling an image.
+A nearest neighbor interpolation algorithm. Also known as nearest pixel or point interpolation.
The output pixel is assigned the value of the pixel that the point falls within. No other pixels are considered.
A bilinear interpolation algorithm.
The output pixel values are computed as a weighted average of the nearest four pixels in a 2x2 grid.
A bicubic interpolation algorithm.
Destination pixel values are computed as a weighted average of the nearest sixteen pixels in a 4x4 grid.
A Fant resampling algorithm.
Destination pixel values are computed as a weighted average of the all the pixels that map to the new pixel.
A high quality bicubic interpolation algorithm. Destination pixel values are computed using a much denser sampling kernel than regular cubic. The kernel is resized in response to the scale factor, making it suitable for downscaling by factors greater than 2.
Note??This value is supported beginning with Windows?10. ?Specifies access to an
Specifies the type of palette used for an indexed image format.
+An arbitrary custom palette provided by caller.
An optimal palette generated using a median-cut algorithm. Derived from the colors in an image.
A black and white palette.
A palette that has its 8-color on-off primaries and the 16 system colors added. With duplicates removed, 16 colors are available.
A palette that has 3 intensity levels of each primary: 27-color on-off primaries and the 16 system colors added. With duplicates removed, 35 colors are available.
A palette that has 4 intensity levels of each primary: 64-color on-off primaries and the 16 system colors added. With duplicates removed, 72 colors are available.
A palette that has 5 intensity levels of each primary: 125-color on-off primaries and the 16 system colors added. With duplicates removed, 133 colors are available.
A palette that has 6 intensity levels of each primary: 216-color on-off primaries and the 16 system colors added. With duplicates removed, 224 colors are available. This is the same as WICBitmapPaletteFixedHalftoneWeb.
A palette that has 6 intensity levels of each primary: 216-color on-off primaries and the 16 system colors added. With duplicates removed, 224 colors are available. This is the same as
A palette that has its 252-color on-off primaries and the 16 system colors added. With duplicates removed, 256 colors are available.
A palette that has its 256-color on-off primaries and the 16 system colors added. With duplicates removed, 256 colors are available.
A palette that has 4 shades of gray.
A palette that has 16 shades of gray.
A palette that has 256 shades of gray.
Specifies the flip and rotation transforms.
+A rotation of 0 degrees.
A clockwise rotation of 90 degrees.
A clockwise rotation of 180 degrees.
A clockwise rotation of 270 degrees.
A horizontal flip. Pixels are flipped around the vertical y-axis.
A vertical flip. Pixels are flipped around the horizontal x-axis.
Specifies the color context types.
+An uninitialized color context.
A color context that is a full ICC color profile.
A color context that is one of a number of set color spaces (sRGB, AdobeRGB) that are defined in the EXIF specification.
Specifies component enumeration options.
+Enumerate any components that are not disabled. Because this value is 0x0, it is always included with the other options.
Force a read of the registry before enumerating components.
Include disabled components in the enumeration. The set of disabled components is disjoint with the set of default enumerated components
Include unsigned components in the enumeration. This option has no effect.
At the end of component enumeration, filter out any components that are not Windows provided.
Specifies the component signing status.
+A signed component.
An unsigned component
A component is safe.
Components that do not have a binary component to sign, such as a pixel format, should return this value.
A component has been disabled.
Specifies the type of Windows Imaging Component (WIC) component.
+A WIC decoder.
A WIC encoder.
A WIC pixel converter.
A WIC metadata reader.
A WIC metadata writer.
A WIC pixel format.
All WIC components.
Specifies the the meaning of pixel color component values contained in the DDS image.
+Alpha behavior is unspecified and must be determined by the reader.
The alpha data is straight.
The alpha data is premultiplied.
The alpha data is opaque (UNORM value of 1). This can be used by a compliant reader as a performance optimization. For example, blending operations can be converted to copies.
The alpha channel contains custom data that is not alpha.
Specifies the dimension type of the data contained in DDS image.
+Both WICDdsTexture2d and
DDS image contains a 1-dimensional texture .
DDS image contains a 2-dimensional texture .
DDS image contains a 3-dimensional texture .
The DDS image contains a cube texture represented as an array of 6 faces.
Specifies decode options.
+Cache metadata when needed.
Cache metadata when decoder is loaded.
Specifies the application extension metadata properties for a Graphics Interchange Format (GIF) image.
+[VT_UI1 | VT_VECTOR] Indicates a string that identifies the application.
[VT_UI1 | VT_VECTOR] Indicates data that is exposed by the application.
Specifies the comment extension metadata properties for a Graphics Interchange Format (GIF) image.
+[VT_LPSTR] Indicates the comment text.
Specifies the graphic control extension metadata properties that define the transitions between each frame animation for Graphics Interchange Format (GIF) images.
+[VT_UI1] Indicates the disposal requirements. 0 - no disposal, 1 - do not dispose, 2 - restore to background color, 3 - restore to previous.
[VT_BOOL] Indicates the user input flag. TRUE if user input should advance to the next frame; otherwise,
[VT_BOOL] Indicates the transparency flag. TRUE if a transparent color in is in the color table for this frame; otherwise,
[VT_UI2] Indicates how long to display the next frame before advancing to the next frame, in units of 1/100th of a second.
[VT_UI1] Indicates which color in the palette should be treated as transparent.
Specifies the image descriptor metadata properties for Graphics Interchange Format (GIF) frames.
+[VT_UI2] Indicates the X offset at which to locate this frame within the logical screen.
[VT_UI2] Indicates the Y offset at which to locate this frame within the logical screen.
[VT_UI2] Indicates width of this frame, in pixels.
[VT_UI2] Indicates height of this frame, in pixels.
[VT_BOOL] Indicates the local color table flag. TRUE if global color table is present; otherwise,
[VT_BOOL] Indicates the interlace flag. TRUE if image is interlaced; otherwise,
[VT_BOOL] Indicates the sorted color table flag. TRUE if the color table is sorted from most frequently to least frequently used color; otherwise,
[VT_UI1] Indicates the value used to calculate the number of bytes contained in the global color table.
To calculate the actual size of the color table, raise 2 to the value of the field + 1.
Specifies the logical screen descriptor properties for Graphics Interchange Format (GIF) metadata.
+[VT_UI1 | VT_VECTOR] Indicates the signature property.
[VT_UI2] Indicates the width in pixels.
[VT_UI2] Indicates the height in pixels.
[VT_BOOL] Indicates the global color table flag. TRUE if a global color table is present; otherwise,
[VT_UI1] Indicates the color resolution in bits per pixel.
[VT_BOOL] Indicates the sorted color table flag. TRUE if the table is sorted; otherwise,
[VT_UI1] Indicates the value used to calculate the number of bytes contained in the global color table.
To calculate the actual size of the color table, raise 2 to the value of the field + 1.
[VT_UI1] Indicates the index within the color table to use for the background (pixels not defined in the image).
[VT_UI1] Indicates the factor used to compute an approximation of the aspect ratio.
Specifies the JPEG chrominance table property.
+[VT_UI2|VT_VECTOR] Indicates the metadata property is a chrominance table.
Specifies the JPEG comment properties.
+Indicates the metadata property is comment text.
Specifies the options for indexing a JPEG image.
+Index generation is deferred until
Index generation is performed when the when the image is initially loaded.
Specifies the JPEG luminance table property.
+[VT_UI2|VT_VECTOR] Indicates the metadata property is a luminance table.
Specifies the memory layout of pixel data in a JPEG image scan.
+The pixel data is stored in an interleaved memory layout.
The pixel data is stored in a planar memory layout.
The pixel data is stored in a progressive layout.
Specifies conversion matrix from Y'Cb'Cr' to R'G'B'.
+Specifies the identity transfer matrix.
Specifies the BT601 transfer matrix.
Specifies the JPEG YCrCB subsampling options.
+The native JPEG encoder uses
The default subsampling option.
Subsampling option that uses both horizontal and vertical decimation.
Subsampling option that uses horizontal decimation .
Subsampling option that uses no decimation.
Subsampling option that uses 2x vertical downsampling only. This option is only available in Windows?8.1 and later.
Specifies named white balances for raw images.
+The default white balance.
A daylight white balance.
A cloudy white balance.
A shade white balance.
A tungsten white balance.
A fluorescent white balance.
Daylight white balance.
A flash white balance.
A custom white balance. This is typically used when using a picture (grey-card) as white balance.
An automatic balance.
An "as shot" white balance.
Specifies additional options to an
Specifies the Portable Network Graphics (PNG) background (bKGD) chunk metadata properties.
+Indicates the background color. There are three possible types, depending on the image's pixel format.
Specifies the index of the background color in an image with an indexed pixel format.
Specifies the background color in a grayscale image.
Specifies the background color in an RGB image as three USHORT values: {0xRRRR, 0xGGGG, 0xBBBB}.
Specifies the Portable Network Graphics (PNG) cHRM chunk metadata properties for CIE XYZ chromaticity.
+[VT_UI4] Indicates the whitepoint x value ratio.
[VT_UI4] Indicates the whitepoint y value ratio.
[VT_UI4] Indicates the red x value ratio.
[VT_UI4] Indicates the red y value ratio.
[VT_UI4] Indicates the green x value ratio.
[VT_UI4] Indicates the green y value ratio.
[VT_UI4] Indicates the blue x value ratio.
[VT_UI4] Indicates the blue y value ratio.
Specifies the Portable Network Graphics (PNG) filters available for compression optimization.
+Indicates an unspecified PNG filter. This enables WIC to algorithmically choose the best filtering option for the image.
Indicates no PNG filter.
Indicates a PNG sub filter.
Indicates a PNG up filter.
Indicates a PNG average filter.
Indicates a PNG paeth filter.
Indicates a PNG adaptive filter. This enables WIC to choose the best filtering mode on a per-scanline basis.
Specifies the Portable Network Graphics (PNG) gAMA chunk metadata properties.
+[VT_UI4] Indicates the gamma value.
Specifies the Portable Network Graphics (PNG) hIST chunk metadata properties.
+[VT_VECTOR | VT_UI2] Indicates the approximate usage frequency of each color in the color palette.
Specifies the Portable Network Graphics (PNG) iCCP chunk metadata properties.
+[VT_LPSTR] Indicates the International Color Consortium (ICC) profile name.
[VT_VECTOR | VT_UI1] Indicates the embedded ICC profile.
Specifies the Portable Network Graphics (PNG) iTXT chunk metadata properties.
+[VT_LPSTR] Indicates the keywords in the iTXT metadata chunk.
[VT_UI1] Indicates whether the text in the iTXT chunk is compressed. 1 if the text is compressed; otherwise, 0.
[VT_LPSTR] Indicates the human language used by the translated keyword and the text.
[VT_LPWSTR] Indicates a translation of the keyword into the language indicated by the language tag.
[VT_LPWSTR] Indicates additional text in the iTXT metadata chunk.
Specifies the Portable Network Graphics (PNG) sRGB chunk metadata properties.
+[VT_UI1] Indicates the rendering intent for an sRGB color space image. The rendering intents have the following meaning.
Value | Meaning |
---|---|
0 | Perceptual |
1 | Relative colorimetric |
2 | Saturation |
3 | Absolute colorimetric |
?
Specifies the Portable Network Graphics (PNG) tIME chunk metadata properties.
+[VT_UI2] Indicates the year of the last modification.
[VT_UI1] Indicates the month of the last modification.
[VT_UI1] Indicates day of the last modification.
[VT_UI1] Indicates the hour of the last modification.
[VT_UI1] Indicates the minute of the last modification.
[VT_UI1] Indicates the second of the last modification.
Specifies when the progress notification callback should be called.
+The callback should be called when codec operations begin.
The callback should be called when codec operations end.
The callback should be called frequently to report status.
The callback should be called on all available progress notifications.
Specifies the progress operations to receive notifications for.
+Receive copy pixel operation.
Receive write pixel operation.
Receive all progress operations available.
Specifies the capability support of a raw image.
+The capability is not supported.
The capability supports only get operations.
The capability supports get and set operations.
Specifies the parameter set used by a raw codec.
+An as shot parameter set.
A user adjusted parameter set.
A codec adjusted parameter set.
Specifies the render intent of the next CopyPixels call.
+Specifies the rotation capabilities of the codec.
+Rotation is not supported.
Set operations for rotation is not supported.
90 degree rotations are supported.
All rotation angles are supported.
Specifies the access level of a Windows Graphics Device Interface (GDI) section.
+Indicates a read only access level.
Indicates a read/write access level.
Specifies the Tagged Image File Format (TIFF) compression options.
+Indicates a suitable compression algorithm based on the image and pixel format.
Indicates no compression.
Indicates a CCITT3 compression algorithm. This algorithm is only valid for 1bpp pixel formats.
Indicates a CCITT4 compression algorithm. This algorithm is only valid for 1bpp pixel formats.
Indicates a LZW compression algorithm.
Indicates a RLE compression algorithm. This algorithm is only valid for 1bpp pixel formats.
Indicates a ZIP compression algorithm.
Indicates an LZWH differencing algorithm.
Defines methods that add the concept of writeability and static in-memory representations of bitmaps to
Because of to the internal memory representation implied by the
Provides access for palette modifications.
+Provides access to a rectangular area of the bitmap.
+The rectangle to be accessed.
The access mode you wish to obtain for the lock. This is a bitwise combination of
Value | Meaning |
---|---|
The read access lock. | |
The write access lock. |
?
A reference that receives the locked memory location.
Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the
Provides access for palette modifications.
+The palette to use for conversion.
If this method succeeds, it returns
Changes the physical resolution of the image.
+The horizontal resolution.
The vertical resolution.
If this method succeeds, it returns
This method has no effect on the actual pixels or samples stored in the bitmap. Instead the interpretation of the sampling rate is modified. This means that a 96 DPI image which is 96 pixels wide is one inch. If the physical resolution is modified to 48 DPI, then the bitmap is considered to be 2 inches wide but has the same number of pixels. If the resolution is less than REAL_EPSILON (1.192092896e-07F) the error code
Provides access to a rectangular area of the bitmap.
+The access mode you wish to obtain for the lock. This is a bitwise combination of
Value | Meaning |
---|---|
The read access lock. | |
The write access lock. |
?
A reference that receives the locked memory location.
Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the
Provides access to a rectangular area of the bitmap.
+The rectangle to be accessed.
The access mode you wish to obtain for the lock. This is a bitwise combination of
Value | Meaning |
---|---|
The read access lock. | |
The write access lock. |
?
A reference that receives the locked memory location.
Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the
Exposes methods that produce a clipped version of the input bitmap for a specified rectangular region of interest.
+Initializes the bitmap clipper with the provided parameters.
+he input bitmap source.
The rectangle of the bitmap source to clip.
If this method succeeds, it returns
Initializes the bitmap clipper with the provided parameters.
+he input bitmap source.
The rectangle of the bitmap source to clip.
If this method succeeds, it returns
Exposes methods that provide information about a particular codec.
+Proxy function for the GetContainerFormat method.
+Proxy function for the DoesSupportAnimation method.
+Retrieves a value indicating whether the codec supports chromakeys.
+Retrieves a value indicating whether the codec supports lossless formats.
+Retrieves a value indicating whether the codec supports multi frame images.
+Proxy function for the GetContainerFormat method.
+If this function succeeds, it returns
Retrieves the pixel formats the codec supports.
+The size of the pguidPixelFormats array. Use 0
on first call to determine the needed array size.
Receives the supported pixel formats. Use
on first call to determine needed array size.
The array size needed to retrieve all supported pixel formats.
If this method succeeds, it returns
The usage pattern for this method is a two call process. The first call retrieves the array size needed to retrieve all the supported pixel formats by calling it with cFormats set to 0
and pguidPixelFormats set to
. This call sets pcActual to the array size needed. Once the needed array size is determined, a second GetPixelFormats call with pguidPixelFormats set to an array of the appropriate size will retrieve the pixel formats.
Retrieves the color manangement version number the codec supports.
+The size of the version buffer. Use 0
on first call to determine needed buffer size.
Receives the color management version number. Use
on first call to determine needed buffer size.
The actual buffer size needed to retrieve the full color management version number.
If this method succeeds, it returns
The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with cchColorManagementVersion set to 0
and wzColorManagementVersion set to
. This call sets pcchActual to the buffer size needed. Once the needed buffer size is determined, a second GetColorManagementVersion call with cchColorManagementVersion set to the buffer size and wzColorManagementVersion set to a buffer of the appropriate size will retrieve the pixel formats.
Retrieves the name of the device manufacture associated with the codec.
+The size of the device manufacture's name. Use 0
on first call to determine needed buffer size.
Receives the device manufacture's name. Use
on first call to determine needed buffer size.
The actual buffer size needed to retrieve the device manufacture's name.
If this method succeeds, it returns
The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with cchDeviceManufacturer set to 0
and wzDeviceManufacturer set to
. This call sets pcchActual to the buffer size needed. Once the needed buffer size is determined, a second GetDeviceManufacturer call with cchDeviceManufacturer set to the buffer size and wzDeviceManufacturer set to a buffer of the appropriate size will retrieve the pixel formats.
Retrieves a comma delimited list of device models associated with the codec.
+The size of the device models buffer. Use 0
on first call to determine needed buffer size.
Receives a comma delimited list of device model names associated with the codec. Use
on first call to determine needed buffer size.
The actual buffer size needed to retrieve all of the device model names.
If this method succeeds, it returns
The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with cchDeviceModels set to 0
and wzDeviceModels set to
. This call sets pcchActual to the buffer size needed. Once the needed buffer size is determined, a second GetDeviceModels call with cchDeviceModels set to the buffer size and wzDeviceModels set to a buffer of the appropriate size will retrieve the pixel formats.
Proxy function for the GetMimeTypes method.
+If this function succeeds, it returns
Retrieves a comma delimited list of the file name extensions associated with the codec.
+The size of the file name extension buffer. Use 0
on first call to determine needed buffer size.
Receives a comma delimited list of file name extensions associated with the codec. Use
on first call to determine needed buffer size.
The actual buffer size needed to retrieve all file name extensions associated with the codec.
If this method succeeds, it returns
The default extension for an image encoder is the first item in the list of returned extensions.
The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with cchFileExtensions set to 0
and wzFileExtensions set to
. This call sets pcchActual to the buffer size needed. Once the needed buffer size is determined, a second GetFileExtensions call with cchFileExtensions set to the buffer size and wzFileExtensions set to a buffer of the appropriate size will retrieve the pixel formats.
Proxy function for the DoesSupportAnimation method.
+If this function succeeds, it returns
Retrieves a value indicating whether the codec supports chromakeys.
+Receives TRUE if the codec supports chromakeys; otherwise,
If this method succeeds, it returns
Retrieves a value indicating whether the codec supports lossless formats.
+Receives TRUE if the codec supports lossless formats; otherwise,
If this method succeeds, it returns
Retrieves a value indicating whether the codec supports multi frame images.
+Receives TRUE if the codec supports multi frame images; otherwise,
If this method succeeds, it returns
Retrieves a value indicating whether the given mime type matches the mime type of the codec.
+The mime type to compare.
Receives TRUE if the mime types match; otherwise,
Registers a progress notification callback function.
+A function reference to the application defined progress notification callback function. See ProgressNotificationCallback for the callback signature.
A reference to component data for the callback method.
The
If this method succeeds, it returns
Applications can only register a single callback. Subsequent registration calls will replace the previously registered callback. To unregister a callback, pass in
Progress is reported in an increasing order between 0.0 and 1.0. If dwProgressFlags includes
Exposes methods that represent a decoder.
The interface provides access to the decoder's properties such as global thumbnails (if supported), frames, and palette.
+There are a number of concrete implemenations of this interface representing each of the standard decoders provided by the platform including bitmap (BMP), Portable Network Graphics (PNG), icon (ICO), Joint Photographic Experts Group (JPEG), Graphics Interchange Format (GIF), Tagged Image File Format (TIFF), and Microsoft?Windows Digital Photo (WDP). The following table includes the class identifier (CLSID) for each native decoder.
CLSID Name | CLSID |
---|---|
0x6b462062, 0x7cbf, 0x400d, 0x9f, 0xdb, 0x81, 0x3d, 0xd1, 0xf, 0x27, 0x78 | |
0x389ea17b, 0x5078, 0x4cde, 0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51 | |
0xc61bfcdf, 0x2e0f, 0x4aad, 0xa8, 0xd7, 0xe0, 0x6b, 0xaf, 0xeb, 0xcd, 0xfe | |
0x9456a480, 0xe88b, 0x43ea, 0x9e, 0x73, 0xb, 0x2d, 0x9b, 0x71, 0xb1, 0xca | |
0x381dda3c, 0x9ce9, 0x4834, 0xa2, 0x3e, 0x1f, 0x98, 0xf8, 0xfc, 0x52, 0xbe | |
0xb54e85d9, 0xfe23, 0x499f, 0x8b, 0x88, 0x6a, 0xce, 0xa7, 0x13, 0x75, 0x2b | |
0xa26cec36, 0x234c, 0x4950, 0xae, 0x16, 0xe3, 0x4a, 0xac, 0xe7, 0x1d, 0x0d |
?
This interface may be sub-classed to provide support for third party codecs as part of the extensibility model. See the AITCodec Sample CODEC.
Codecs written as TIFF container formats that are not register will decode as a TIFF image. Client applications should check for a zero frame count to determine if the codec is valid.
+Retrieves the image's container format.
+Retrieves an
Proxy function for the GetMetadataQueryReader method.
+Retrieves a preview image, if supported.
+Not all formats support previews. Only the native Microsoft?Windows Digital Photo (WDP) codec support previews.
+Proxy function for the GetThumbnail method.
+Retrieves the total number of frames in the image.
+Retrieves the capabilities of the decoder based on the specified stream.
+The stream to retrieve the decoder capabilities from.
The
Custom decoder implementations should save the current position of the specified
Initializes the decoder with the provided stream.
+The stream to use for initialization.
The stream contains the encoded pixels which are decoded each time the CopyPixels method on the
The
If this method succeeds, it returns
Retrieves the image's container format.
+A reference that receives the image's container format
If this method succeeds, it returns
Retrieves an
If this method succeeds, it returns
Proxy function for the CopyPalette method.
+If this function succeeds, it returns
Proxy function for the GetMetadataQueryReader method.
+If this function succeeds, it returns
Retrieves a preview image, if supported.
+Receives a reference to the preview bitmap if supported.
If this method succeeds, it returns
Not all formats support previews. Only the native Microsoft?Windows Digital Photo (WDP) codec support previews.
+Proxy function for the GetColorContexts method.
+If this function succeeds, it returns
Proxy function for the GetColorContexts method.
+If this function succeeds, it returns
Proxy function for the GetColorContexts method.
+If this function succeeds, it returns
Proxy function for the GetThumbnail method.
+If this function succeeds, it returns
Retrieves the total number of frames in the image.
+A reference that receives the total number of frames in the image.
If this method succeeds, it returns
Retrieves the specified frame of the image.
+The particular frame to retrieve.
A reference that receives a reference to the
Exposes methods that provide information about a decoder.
+Retrieves the file pattern signatures supported by the decoder.
+The array size of the pPatterns array.
Receives a list of
Receives the number of patterns the decoder supports.
Receives the actual buffer size needed to retrieve all pattern signatures supported by the decoder.
If this method succeeds, it returns
To retrieve all pattern signatures, this method should first be called with pPatterns set to
to retrieve the actual buffer size needed through pcbPatternsActual. Once the needed buffer size is known, allocate a buffer of the needed size and call GetPatterns again with the allocated buffer.
Retrieves a value that indicates whether the codec recognizes the pattern within a specified stream.
+The stream to pattern match within.
A reference that receives TRUE if the patterns match; otherwise,
Creates a new
If this method succeeds, it returns
Defines methods for setting an encoder's properties such as thumbnails, frames, and palettes.
+There are a number of concrete implemenations of this interface representing each of the standard encoders provided by the platform including bitmap (BMP), Portable Network Graphics (PNG), Joint Photographic Experts Group (JPEG), Graphics Interchange Format (GIF), Tagged Image File Format (TIFF), and Microsoft?Windows Digital Photo (WDP). The following table includes the class identifier (CLSID) for each native encoder.
CLSID Name | CLSID |
---|---|
0x69be8bb4, 0xd66d, 0x47c8, 0x86, 0x5a, 0xed, 0x15, 0x89, 0x43, 0x37, 0x82 | |
0x27949969, 0x876a, 0x41d7, 0x94, 0x47, 0x56, 0x8f, 0x6a, 0x35, 0xa4, 0xdc | |
0x1a34f5c1, 0x4a5a, 0x46dc, 0xb6, 0x44, 0x1f, 0x45, 0x67, 0xe7, 0xa6, 0x76 | |
0x114f5598, 0xb22, 0x40a0, 0x86, 0xa1, 0xc8, 0x3e, 0xa4, 0x95, 0xad, 0xbd | |
0x0131be10, 0x2001, 0x4c5f, 0xa9, 0xb0, 0xcc, 0x88, 0xfa, 0xb6, 0x4c, 0xe8 | |
0xac4ce3cb, 0xe1c1, 0x44cd, 0x82, 0x15, 0x5a, 0x16, 0x65, 0x50, 0x9e, 0xc2 |
?
Additionally this interface may be sub-classed to provide support for third party codecs as part of the extensibility model. See the AITCodec Sample CODEC.
+Retrieves the encoder's container format.
+Retrieves an
Proxy function for the SetPalette method.
+Sets the global thumbnail for the image.
+Sets the global preview for the image.
+Proxy function for the GetMetadataQueryWriter method.
+Initializes the encoder with an
If this method succeeds, it returns
Retrieves the encoder's container format.
+A reference that receives the encoder's container format
If this method succeeds, it returns
Retrieves an
If this method succeeds, it returns
Sets the
If this method succeeds, it returns
Sets the
If this method succeeds, it returns
Sets the
If this method succeeds, it returns
Proxy function for the SetPalette method.
+If this function succeeds, it returns
Sets the global thumbnail for the image.
+The
Returns
Returns
Sets the global preview for the image.
+The
Returns
Returns
Creates a new
If this method succeeds, it returns
The parameter ppIEncoderOptions can be used to receive an
Otherwise, you can pass
See Encoding Overview for an example of how to set encoder options.
For formats that support encoding multiple frames (for example, TIFF, JPEG-XR), you can work on only one frame at a time. This means that you must call
Commits all changes for the image and closes the stream.
+If this method succeeds, it returns
To finalize an image, both the frame Commit and the encoder Commit must be called. However, only call the encoder Commit method after all frames have been committed.
After the encoder has been committed, it can't be re-initialized or reused with another stream. A new encoder interface must be created, for example, with
For the encoder Commit to succeed, you must at a minimum call
Proxy function for the GetMetadataQueryWriter method.
+If this function succeeds, it returns
Exposes methods that provide information about an encoder.
+Creates a new
If this method succeeds, it returns
Exposes methods that produce a flipped (horizontal or vertical) and/or rotated (by 90 degree increments) bitmap source. Rotations are done before the flip.
+IWICBitmapFipRotator requests data on a per-pixel basis, while WIC codecs provide data on a per-scanline basis. This causes the fliprotator object to exhibit n? behavior if there is no buffering. This occures because each pixel in the transformed image requires an entire scanline to be decoded in the file. It is recommended that you buffer the image using
Initializes the bitmap flip rotator with the provided parameters.
+The input bitmap source.
The
If this method succeeds, it returns
Defines methods for decoding individual image frames of an encoded file.
+Retrieves a metadata query reader for the frame.
+For image formats with one frame (JPG, PNG, JPEG-XR), the frame-level query reader of the first frame is used to access all image metadata, and the decoder-level query reader isn?t used. For formats with more than one frame (GIF, TIFF), the frame-level query reader for a given frame is used to access metadata specific to that frame, and in the case of GIF a decoder-level metadata reader will be present. If the decoder doesn?t support metadata (BMP, ICO), this will return
Retrieves a small preview of the frame, if supported by the codec.
+Not all formats support thumbnails. Joint Photographic Experts Group (JPEG), Tagged Image File Format (TIFF), and Microsoft?Windows Digital Photo (WDP) support thumbnails.
+Retrieves a metadata query reader for the frame.
+When this method returns, contains a reference to the frame's metadata query reader.
If this method succeeds, it returns
For image formats with one frame (JPG, PNG, JPEG-XR), the frame-level query reader of the first frame is used to access all image metadata, and the decoder-level query reader isn?t used. For formats with more than one frame (GIF, TIFF), the frame-level query reader for a given frame is used to access metadata specific to that frame, and in the case of GIF a decoder-level metadata reader will be present. If the decoder doesn?t support metadata (BMP, ICO), this will return
Retrieves the
If this method succeeds, it returns
If
The ppIColorContexts array must be filled with valid data: each
Retrieves the
If this method succeeds, it returns
If
The ppIColorContexts array must be filled with valid data: each
Retrieves the
If this method succeeds, it returns
If
The ppIColorContexts array must be filled with valid data: each
Retrieves a small preview of the frame, if supported by the codec.
+A reference that receives a reference to the
If this method succeeds, it returns
Not all formats support thumbnails. Joint Photographic Experts Group (JPEG), Tagged Image File Format (TIFF), and Microsoft?Windows Digital Photo (WDP) support thumbnails.
+Represents an encoder's individual image frames.
+Sets the
This method doesn't fail if called on a frame whose pixel format is set to a non-indexed pixel format. If the target pixel format is a non-indexed format, the palette will be ignored.
If you already called
The palette must be specified before your first call to WritePixels/WriteSource. Doing so will cause WriteSource to use the specified palette when converting the source image to the encoder pixel format. If no palette is specified, a palette will be generated on the first call to WriteSource. +
+Proxy function for the SetThumbnail method.
+Gets the metadata query writer for the encoder frame.
+If you are setting metadata on the frame, you must do this before you use
Initializes the frame encoder using the given properties.
+The set of properties to use for
If this method succeeds, it returns
If you don't want any encoding options, pass
For a complete list of encoding options supported by the Windows-provided codecs, see Native WIC Codecs.
+Sets the output image dimensions for the frame.
+The width of the output image.
The height of the output image.
If this method succeeds, it returns
Sets the physical resolution of the output image.
+The horizontal resolution value.
The vertical resolution value.
If this method succeeds, it returns
Windows Imaging Component (WIC) doesn't perform any special processing as a result of DPI resolution values. For example, data returned from
Requests that the encoder use the specified pixel format.
+On input, the requested pixel format
Possible return values include the following.
Return code | Description |
---|---|
| Success. |
| The |
?
The encoder might not support the requested pixel format. If not, SetPixelFormat returns the closest match in the memory block that pPixelFormat points to. If the returned pixel format doesn't match the requested format, you must use an
Proxy function for the SetColorContexts method.
+If this function succeeds, it returns
Proxy function for the SetColorContexts method.
+If this function succeeds, it returns
Proxy function for the SetColorContexts method.
+If this function succeeds, it returns
Sets the
If this method succeeds, it returns
This method doesn't fail if called on a frame whose pixel format is set to a non-indexed pixel format. If the target pixel format is a non-indexed format, the palette will be ignored.
If you already called
The palette must be specified before your first call to WritePixels/WriteSource. Doing so will cause WriteSource to use the specified palette when converting the source image to the encoder pixel format. If no palette is specified, a palette will be generated on the first call to WriteSource. +
+Proxy function for the SetThumbnail method.
+If this function succeeds, it returns
Copies scan-line data from a caller-supplied buffer to the
Possible return values include the following.
Return code | Description |
---|---|
| Success. |
| The value of lineCount is larger than the number of scan lines in the image. |
?
Successive WritePixels calls are assumed to be sequential scan-line access in the output image.
+Encodes a bitmap source.
+The bitmap source to encode.
The size rectangle of the bitmap source.
If this method succeeds, it returns
If SetSize is not called prior to calling WriteSource, the size given in prc is used if not
If SetPixelFormat is not called prior to calling WriteSource, the pixel format of the
If SetResolution is not called prior to calling WriteSource, the pixel format of pIBitmapSource is used.
If SetPalette is not called prior to calling WriteSource, the target pixel format is indexed, and the pixel format of pIBitmapSource matches the encoder frame's pixel format, then the pIBitmapSource pixel format is used.
When encoding a GIF image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor (ISV) GIF codec, WriteSource will use the global palette to encode the frame even when pIBitmapSource has a frame level palette.
Starting with Windows?Vista, repeated WriteSource calls can be made as long as the total accumulated source rect height is the same as set through SetSize.
Starting with Windows?8.1, the source rect must be at least the dimensions set through SetSize. If the source rect width exceeds the SetSize width, extra pixels on the right side are ignored. If the source rect height exceeds the remaining unfilled height, extra scan lines on the bottom are ignored. +
+Commits the frame to the image.
+If this method succeeds, it returns
After the frame Commit has been called, you can't use or reinitialize the
To finalize the image, both the frame Commit and the encoder Commit must be called. However, only call the encoder Commit method after all frames have been committed.
+Gets the metadata query writer for the encoder frame.
+When this method returns, contains a reference to metadata query writer for the encoder frame.
If this method succeeds, it returns
If you are setting metadata on the frame, you must do this before you use
Encodes the frame scanlines.
+The number of lines to encode.
Successive WritePixels calls are assumed to be sequential scanline access in the output image.
+Encodes the frame scanlines.
+The number of lines to encode.
Successive WritePixels calls are assumed to be sequential scanline access in the output image.
+Encodes the frame scanlines.
+The number of lines to encode.
The stride of the image pixels.
A reference to the pixel buffer.
Successive WritePixels calls are assumed to be sequential scanline access in the output image.
+Encodes a bitmap source.
+The bitmap source to encode.
If SetSize is not called prior to calling WriteSource, the size given in prc is used if not
If SetPixelFormat is not called prior to calling WriteSource, the pixel format of the
If SetResolution is not called prior to calling WriteSource, the pixel format of pIBitmapSource is used.
If SetPalette is not called prior to calling WriteSource, the target pixel format is indexed, and the pixel format of pIBitmapSource matches the encoder frame's pixel format, then the pIBitmapSource pixel format is used.
When encoding a GIF image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor (ISV) GIF codec, WriteSource will use the global palette to encode the frame even when pIBitmapSource has a frame level palette.
Windows Vista:The source rect width must match the width set through SetSize. Repeated WriteSource calls can be made as long as the total accumulated source rect height is the same as set through SetSize.
+Encodes a bitmap source.
+The bitmap source to encode.
The size rectangle of the bitmap source.
If SetSize is not called prior to calling WriteSource, the size given in prc is used if not
If SetPixelFormat is not called prior to calling WriteSource, the pixel format of the
If SetResolution is not called prior to calling WriteSource, the pixel format of pIBitmapSource is used.
If SetPalette is not called prior to calling WriteSource, the target pixel format is indexed, and the pixel format of pIBitmapSource matches the encoder frame's pixel format, then the pIBitmapSource pixel format is used.
When encoding a GIF image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor (ISV) GIF codec, WriteSource will use the global palette to encode the frame even when pIBitmapSource has a frame level palette.
Windows Vista:The source rect width must match the width set through SetSize. Repeated WriteSource calls can be made as long as the total accumulated source rect height is the same as set through SetSize.
+Exposes methods that support the Lock method.
+The bitmap lock is simply an abstraction for a rectangular memory window into the bitmap. For the simplest case, a system memory bitmap, this is simply a reference to the top left corner of the rectangle and a stride value.
To release the exclusive lock set by Lock method and the associated
Provides access to the stride value for the memory.
+ Note the stride value is specific to the
Gets the pixel format of for the locked area of pixels. This can be used to compute the number of bytes-per-pixel in the locked area.
+Retrieves the width and height, in pixels, of the locked rectangle.
+A reference that receives the width of the locked rectangle.
A reference that receives the height of the locked rectangle.
If this method succeeds, it returns
Provides access to the stride value for the memory.
+If this method succeeds, it returns
Note the stride value is specific to the
Gets the reference to the top left pixel in the locked rectangle.
+A reference that receives the size of the buffer.
A reference that receives a reference to the top left pixel in the locked rectangle.
The reference provided by this method should not be used outside of the lifetime of the lock itself.
GetDataPointer is not available in multi-threaded apartment applications.
+Gets the pixel format of for the locked area of pixels. This can be used to compute the number of bytes-per-pixel in the locked area.
+A reference that receives the pixel format
If this method succeeds, it returns
Represents a resized version of the input bitmap using a resampling or filtering algorithm.
+Images can be scaled to larger sizes; however, even with sophisticated scaling algorithms, there is only so much information in the image and artifacts tend to worsen the more you scale up.
The scaler will reapply the resampling algorithm every time CopyPixels is called. If the scaled image is to be animated, the scaled image should be created once and cached in a new bitmap, after which the
The scaler is optimized to use the minimum amount of memory required to scale the image correctly. The scaler may be used to produce parts of the image incrementally (banding) by calling CopyPixels with different rectangles representing the output bands of the image. Resampling typically requires overlapping rectangles from the source image and thus may need to request the same pixels from the source bitmap multiple times. Requesting scanlines out-of-order from some image decoders can have a significant performance penalty. Because of this reason, the scaler is optimized to handle consecutive horizontal bands of scanlines (rectangle width equal to the bitmap width). In this case the accumulator from the previous vertically adjacent rectangle is re-used to avoid duplicate scanline requests from the source. This implies that banded output from the scaler may have better performance if the bands are requested sequentially. Of course if the scaler is simply used to produce a single rectangle output, this concern is eliminated because the scaler will internally request scanlines in the correct order.
+Initializes the bitmap scaler with the provided parameters.
+The input bitmap source.
The destination width.
The desination height.
The
If this method succeeds, it returns
Exposes methods that refers to a source from which pixels are retrieved, but cannot be written back to.
+This interface provides a common way of accessing and linking together bitmaps, decoders, format converters, and scalers. Components that implement this interface can be connected together in a graph to pull imaging data through.
This interface defines only the notion of readability or being able to produce pixels. Modifying or writing to a bitmap is considered to be a specialization specific to bitmaps which have storage and is defined in the descendant interface
Retrieves the pixel format of the bitmap source..
+The pixel format returned by this method is not necessarily the pixel format the image is stored as. The codec may perform a format conversion from the storage pixel format to an output pixel format.
+Retrieves the pixel width and height of the bitmap.
+A reference that receives the pixel width of the bitmap.
A reference that receives the pixel height of the bitmap
If this method succeeds, it returns
Retrieves the pixel format of the bitmap source..
+Receives the pixel format
If this method succeeds, it returns
The pixel format returned by this method is not necessarily the pixel format the image is stored as. The codec may perform a format conversion from the storage pixel format to an output pixel format.
+Retrieves the sampling rate between pixels and physical world measurements.
+A reference that receives the x-axis dpi resolution.
A reference that receives the y-axis dpi resolution.
If this method succeeds, it returns
Some formats, such as GIF and ICO, do not have full DPI support. For GIF, this method calculates the DPI values from the aspect ratio, using a base DPI of (96.0, 96.0). The ICO format does not support DPI at all, and the method always returns (96.0,96.0) for ICO images.
Additionally, WIC itself does not transform images based on the DPI values in an image. It is up to the caller to transform an image based on the resolution returned.
+Retrieves the color table for indexed pixel formats.
+An
Returns one of the following values.
Return code | Description |
---|---|
| The palette was unavailable. |
| The palette was successfully copied. |
?
If the
Instructs the object to produce pixels.
+The rectangle to copy. A
The stride of the bitmap
The size of the buffer.
A reference to the buffer.
If this method succeeds, it returns
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
Retrieves the pixel width and height of the bitmap.
+Instructs the object to produce pixels.
+The rectangle to copy. A
The stride of the bitmap
A reference to the buffer.
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
+Instructs the object to produce pixels.
+The stride of the bitmap
A reference to the buffer.
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
+Instructs the object to produce pixels.
+The stride of the bitmap
A reference to the buffer.
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
+Instructs the object to produce pixels.
+The rectangle to copy. A
If this method succeeds, it returns
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
Instructs the object to produce pixels.
+If this method succeeds, it returns
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
+Instructs the object to produce pixels.
+If this method succeeds, it returns
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
Instructs the object to produce pixels.
+If this method succeeds, it returns
CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.
The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a
The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.
If the caller needs to perform numerous copies of an expensive
The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).
Copies pixel data using the supplied input parameters.
+The rectangle of pixels to copy.
The width to scale the source bitmap. This parameter must equal the value obtainable through
The height to scale the source bitmap. This parameter must equal the value obtainable through
The
This
The desired rotation or flip to perform prior to the pixel copy.
The transform must be an operation supported by an DoesSupportTransform call.
If a dstTransform is specified, nStride is the transformed stride and is based on the pguidDstFormat pixel format, not the original source's pixel format.
The stride of the destination buffer.
The size of the destination buffer.
The output buffer.
If this method succeeds, it returns
Returns the closest dimensions the implementation can natively scale to given the desired dimensions.
+The desired width. A reference that receives the closest supported width.
The desired height. A reference that receives the closest supported height.
If this method succeeds, it returns
The Windows provided codecs provide the following support for native scaling: +
Retrieves the closest pixel format to which the implementation of
If this method succeeds, it returns
The Windows provided codecs provide the following support:
Determines whether a specific transform option is supported natively by the implementation of the
If this method succeeds, it returns
The Windows provided codecs provide the following level of support:
Exposes methods for color management.
+A Color Context is an abstraction for a color profile. The profile can either be loaded from a file (like "sRGB Color Space Profile.icm"), read from a memory buffer, or can be defined by an EXIF color space. The system color profile directory can be obtained by calling GetColorDirectory.
Once a color context has been initialized, it cannot be re-initialized.
+Retrieves the color context type.
+Retrieves the Exchangeable Image File (EXIF) color space color context.
+This method should only be used when
Initializes the color context from the given file.
+The name of the file.
If this method succeeds, it returns
Once a color context has been initialized, it can't be re-initialized. +
+Initializes the color context from a memory block.
+The buffer used to initialize the
The size of the pbBuffer buffer.
If this method succeeds, it returns
Once a color context has been initialized, it can't be re-initialized. +
+Initializes the color context using an Exchangeable Image File (EXIF) color space.
+The value of the EXIF color space.
Value | Meaning |
---|---|
| A sRGB color space. |
| An Adobe RGB color space. |
?
If this method succeeds, it returns
Once a color context has been initialized, it can't be re-initialized. +
+Retrieves the color context type.
+A reference that receives the
If this method succeeds, it returns
Retrieves the color context profile.
+The size of the pbBuffer buffer.
A reference that receives the color context profile.
A reference that receives the actual buffer size needed to retrieve the entire color context profile.
If this method succeeds, it returns
Only use this method if the context type is
Calling this method with pbBuffer set to
Retrieves the Exchangeable Image File (EXIF) color space color context.
+A reference that receives the EXIF color space color context.
Value | Meaning |
---|---|
| A sRGB color space. |
| An Adobe RGB color space. |
| Unused. |
?
If this method succeeds, it returns
This method should only be used when
Exposes methods that transforms an
A
Once initialized, a color transform cannot be reinitialized. Because of this, a color transform cannot be used with multiple sources or varying parameters.
+Initializes an
If this method succeeds, it returns
The currently supported formats for the pIContextSource and pixelFmtDest parameters are: +
In order to get correct behavior from a color transform, the input and output pixel formats must be compatible with the source and destination color profiles. For example, an sRGB destination color profile will produce incorrect results when used with a CMYK destination pixel format.
+Exposes methods that provide component information.
+Retrieves the component's
Proxy function for the GetCLSID method.
+Retrieves the signing status of the component.
+Signing is unused by WIC. Therefore, all components
This function can be used to determine whether a component has no binary component or has been added to the disabled components list in the registry.
+Retrieves the vendor
Retrieves the component's
If this method succeeds, it returns
Proxy function for the GetCLSID method.
+If this function succeeds, it returns
Retrieves the signing status of the component.
+A reference that receives the
If this method succeeds, it returns
Signing is unused by WIC. Therefore, all components
This function can be used to determine whether a component has no binary component or has been added to the disabled components list in the registry.
+Retrieves the name of component's author.
+The size of the wzAuthor buffer.
A reference that receives the name of the component's author. The locale of the string depends on the value that the codec wrote to the registry at install time. For built-in components, these strings are always in English.
A reference that receives the actual length of the component's authors name. The author name is optional; if an author name is not specified by the component, the length returned is 0.
If this method succeeds, it returns
If cchAuthor is 0 and wzAuthor is
Retrieves the vendor
A reference that receives the component's vendor
If this method succeeds, it returns
Proxy function for the GetVersion method.
+If this function succeeds, it returns
Retrieves the component's specification version.
+The size of the wzSpecVersion buffer.
When this method returns, contain a culture invarient string of the component's specification version. The version form is NN.NN.NN.NN.
A reference that receives the actual length of the component's specification version. The specification version is optional; if a value is not specified by the component, the length returned is 0.
If this method succeeds, it returns
All built-in components return "1.0.0.0", except for pixel formats, which do not have a spec version.
If cchAuthor is 0 and wzAuthor is
Retrieves the component's friendly name, which is a human-readable display name for the component.
+The size of the wzFriendlyName buffer.
A reference that receives the friendly name of the component. The locale of the string depends on the value that the codec wrote to the registry at install time. For built-in components, these strings are always in English.
A reference that receives the actual length of the component's friendly name.
If this method succeeds, it returns
If cchFriendlyName is 0 and wzFriendlyName is
Provides information and functionality specific to the DDS image format.
+This interface is implemented by the WIC DDS codec. To obtain this interface, create an
Gets DDS-specific data.
+Gets DDS-specific data.
+A reference to the structure where the information is returned.
If this method succeeds, it returns
Retrieves the specified frame of the DDS image.
+The requested index within the texture array.
The requested mip level.
The requested slice within the 3D texture.
A reference to a
If this method succeeds, it returns
A DDS file can contain multiple images that are organized into a three level hierarchy. First, DDS file may contain multiple textures in a texture array. Second, each texture can have multiple mip levels. Finally, the texture may be a 3D (volume) texture and have multiple slices, each of which is a 2D texture. See the DDS documentation for more information.
WIC maps this three level hierarchy into a linear array of
Enables writing DDS format specific information to an encoder.
+This interface is implemented by the WIC DDS codec. To obtain this interface, create an
Gets or sets DDS-specific data.
+An application can call GetParameters to obtain the default DDS parameters, modify some or all of them, and then call SetParameters.
+Sets DDS-specific data.
+Points to the structure where the information is described.
If this method succeeds, it returns
You cannot call this method after you have started to write frame data, for example by calling
Setting DDS parameters using this method provides the DDS encoder with information about the expected number of frames and the dimensions and other parameters of each frame. The DDS encoder will fail if you do not set frame data that matches these expectations. For example, if you set WICDdsParameters::Width and Height to 32, and MipLevels to 6, the DDS encoder will expect 6 frames with the following dimensions:
Gets DDS-specific data.
+Points to the structure where the information is returned.
If this method succeeds, it returns
An application can call GetParameters to obtain the default DDS parameters, modify some or all of them, and then call SetParameters.
+Creates a new frame to encode.
+A reference to the newly created frame object.
Points to the location where the array index is returned.
Points to the location where the mip level index is returned.
Points to the location where the slice index is returned.
If this method succeeds, it returns
This is equivalent to
Provides access to a single frame of DDS image data in its native
This interface is implemented by the WIC DDS codec. To obtain this interface, create an
Gets information about the format in which the DDS image is stored.
+This information can be used for allocating memory or constructing Direct3D or Direct2D resources, for example by using
Gets the width and height, in blocks, of the DDS image.
+The width of the DDS image in blocks.
The height of the DDS image in blocks.
If this method succeeds, it returns
For block compressed textures, the returned width and height values do not completely define the texture size because the image is padded to fit the closest whole block size. For example, three BC1 textures with pixel dimensions of 1x1, 2x2 and 4x4 will all report pWidthInBlocks = 1 and pHeightInBlocks = 1.
If the texture does not use a block-compressed
Gets information about the format in which the DDS image is stored.
+Information about the DDS format.
If this method succeeds, it returns
This information can be used for allocating memory or constructing Direct3D or Direct2D resources, for example by using
Requests pixel data as it is natively stored within the DDS file.
+The rectangle to copy from the source. A
If the texture uses a block-compressed
The stride, in bytes, of the destination buffer. This represents the number of bytes from the buffer reference to the next row of data. If the texture uses a block-compressed
The size, in bytes, of the destination buffer.
A reference to the destination buffer.
If this method succeeds, it returns
If the texture does not use a block-compressed
If the texture uses a block-compressed
[This documentation is preliminary and is subject to change.]
Requests pixel data as it is natively stored within the DDS file.
+The rectangle to copy from the source. A
If the texture uses a block-compressed
The stride, in bytes, of the destination buffer. This represents the number of bytes from the buffer reference to the next row of data. If the texture uses a block-compressed
A reference to the destination buffer.
If this method succeeds, it returns
If the texture does not use a block-compressed
If the texture uses a block-compressed
Gets the current set of parameters.
+Gets or sets the exposure compensation stop value of the raw image.
+Gets or sets the named white point of the raw image.
+If the named white points are not supported by the raw image or the raw file contains named white points that are not supported by this API, the codec implementer should still mark this capability as supported.
If the named white points are not supported by the raw image, a best effort should be made to adjust the image to the named white point even when it isn't a pre-defined white point of the raw file.
If the raw file containes named white points not supported by this API, the codec implementer should support the named white points in
Gets or sets the white point Kelvin temperature of the raw image.
+Gets or sets the contrast value of the raw image.
+Gets or sets the current gamma setting of the raw image.
+Gets or sets the sharpness value of the raw image.
+Gets or sets the saturation value of the raw image.
+Gets or sets the tint value of the raw image.
+Gets or sets the noise reduction value of the raw image.
+Sets the destination color context.
+Gets or sets the current rotation angle.
+Gets or sets the current
Sets the notification callback method.
+Retrieves information about which capabilities are supported for a raw image.
+A reference that receives
If this method succeeds, it returns
It is recommended that a codec report that a capability is supported even if the results at the outer range limits are not of perfect quality.
+Sets the desired
If this method succeeds, it returns
Gets the current set of parameters.
+A reference that receives a reference to the current set of parameters.
If this method succeeds, it returns
Sets the exposure compensation stop value.
+The exposure compensation value. The value range for exposure compensation is -5.0 through +5.0, which equates to 10 full stops.
If this method succeeds, it returns
It is recommended that a codec report that this method is supported even if the results at the outer range limits are not of perfect quality.
+Gets the exposure compensation stop value of the raw image.
+A reference that receives the exposure compensation stop value. The default is the "as-shot" setting.
If this method succeeds, it returns
Sets the white point RGB values.
+The red white point value.
The green white point value.
The blue white point value.
If this method succeeds, it returns
Due to other white point setting methods (e.g. SetWhitePointKelvin), care must be taken by codec implementers to ensure proper interoperability. For instance, if the caller sets via a named white point then the codec implementer may whis to disable reading back the correspoinding Kelvin temperature. In specific cases where the codec implementer wishes to deny a given action because of previous calls,
Gets the white point RGB values.
+A reference that receives the red white point value.
A reference that receives the green white point value.
A reference that receives the blue white point value.
If this method succeeds, it returns
Sets the named white point of the raw file.
+A bitwise combination of the enumeration values.
If this method succeeds, it returns
If the named white points are not supported by the raw image or the raw file contains named white points that are not supported by this API, the codec implementer should still mark this capability as supported.
If the named white points are not supported by the raw image, a best effort should be made to adjust the image to the named white point even when it isn't a pre-defined white point of the raw file.
If the raw file containes named white points not supported by this API, the codec implementer should support the named white points in the API.
Due to other white point setting methods (e.g. SetWhitePointKelvin), care must be taken by codec implementers to ensure proper interoperability. For instance, if the caller sets via a named white point then the codec implementer may whis to disable reading back the correspoinding Kelvin temperature. In specific cases where the codec implementer wishes to deny a given action because of previous calls,
Gets the named white point of the raw image.
+A reference that receives the bitwise combination of the enumeration values.
If this method succeeds, it returns
If the named white points are not supported by the raw image or the raw file contains named white points that are not supported by this API, the codec implementer should still mark this capability as supported.
If the named white points are not supported by the raw image, a best effort should be made to adjust the image to the named white point even when it isn't a pre-defined white point of the raw file.
If the raw file containes named white points not supported by this API, the codec implementer should support the named white points in
Sets the white point Kelvin value.
+The white point Kelvin value. Acceptable Kelvin values are 1,500 through 30,000.
If this method succeeds, it returns
Codec implementers should faithfully adjust the color temperature within the range supported natively by the raw image. For values outside the native support range, the codec implementer should provide a best effort representation of the image at that color temperature.
Codec implementers should return
Codec implementers must ensure proper interoperability with other white point setting methods such as SetWhitePointRGB. For example, if the caller sets the white point via SetNamedWhitePoint then the codec implementer may want to disable reading back the correspoinding Kelvin temperature. In specific cases where the codec implementer wants to deny a given action because of previous calls,
Gets the white point Kelvin temperature of the raw image.
+A reference that receives the white point Kelvin temperature of the raw image. The default is the "as-shot" setting value.
If this method succeeds, it returns
Gets the information about the current Kelvin range of the raw image.
+A reference that receives the minimum Kelvin temperature.
A reference that receives the maximum Kelvin temperature.
A reference that receives the Kelvin step value.
If this method succeeds, it returns
Sets the contrast value of the raw image.
+The contrast value of the raw image. The default value is the "as-shot" setting. The value range for contrast is 0.0 through 1.0. The 0.0 lower limit represents no contrast applied to the image, while the 1.0 upper limit represents the highest amount of contrast that can be applied.
If this method succeeds, it returns
The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.
+Gets the contrast value of the raw image.
+A reference that receives the contrast value of the raw image. The default value is the "as-shot" setting. The value range for contrast is 0.0 through 1.0. The 0.0 lower limit represents no contrast applied to the image, while the 1.0 upper limit represents the highest amount of contrast that can be applied.
If this method succeeds, it returns
Sets the desired gamma value.
+The desired gamma value.
If this method succeeds, it returns
Gets the current gamma setting of the raw image.
+A reference that receives the current gamma setting.
If this method succeeds, it returns
Sets the sharpness value of the raw image.
+The sharpness value of the raw image. The default value is the "as-shot" setting. The value range for sharpness is 0.0 through 1.0. The 0.0 lower limit represents no sharpening applied to the image, while the 1.0 upper limit represents the highest amount of sharpness that can be applied.
If this method succeeds, it returns
The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.
+Gets the sharpness value of the raw image.
+A reference that receives the sharpness value of the raw image. The default value is the "as-shot" setting. The value range for sharpness is 0.0 through 1.0. The 0.0 lower limit represents no sharpening applied to the image, while the 1.0 upper limit represents the highest amount of sharpness that can be applied.
If this method succeeds, it returns
Sets the saturation value of the raw image.
+The saturation value of the raw image. The value range for saturation is 0.0 through 1.0. A value of 0.0 represents an image with a fully de-saturated image, while a value of 1.0 represents the highest amount of saturation that can be applied.
If this method succeeds, it returns
The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.
+Gets the saturation value of the raw image.
+A reference that receives the saturation value of the raw image. The default value is the "as-shot" setting. The value range for saturation is 0.0 through 1.0. A value of 0.0 represents an image with a fully de-saturated image, while a value of 1.0 represents the highest amount of saturation that can be applied.
If this method succeeds, it returns
Sets the tint value of the raw image.
+The tint value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for sharpness is -1.0 through +1.0. The -1.0 lower limit represents a full green bias to the image, while the 1.0 upper limit represents a full magenta bias.
If this method succeeds, it returns
The codec implementer must determine what the outer range values represent and must determine how to map the values to their image processing routines.
+Gets the tint value of the raw image.
+A reference that receives the tint value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for sharpness is -1.0 through +1.0. The -1.0 lower limit represents a full green bias to the image, while the 1.0 upper limit represents a full magenta bias.
If this method succeeds, it returns
Sets the noise reduction value of the raw image.
+The noise reduction value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for noise reduction is 0.0 through 1.0. The 0.0 lower limit represents no noise reduction applied to the image, while the 1.0 upper limit represents highest noise reduction amount that can be applied.
If this method succeeds, it returns
The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.
+Gets the noise reduction value of the raw image.
+A reference that receives the noise reduction value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for noise reduction is 0.0 through 1.0. The 0.0 lower limit represents no noise reduction applied to the image, while the 1.0 upper limit represents full highest noise reduction amount that can be applied.
If this method succeeds, it returns
Sets the destination color context.
+The destination color context.
If this method succeeds, it returns
Sets the tone curve for the raw image.
+The size of the pToneCurve structure.
The desired tone curve.
If this method succeeds, it returns
Gets the tone curve of the raw image.
+The size of the pToneCurve buffer.
A reference that receives the
A reference that receives the size needed to obtain the tone curve structure.
If this method succeeds, it returns
Sets the desired rotation angle.
+The desired rotation angle.
If this method succeeds, it returns
Gets the current rotation angle.
+A reference that receives the current rotation angle.
If this method succeeds, it returns
Sets the current
If this method succeeds, it returns
Gets the current
If this method succeeds, it returns
Sets the notification callback method.
+Pointer to the notification callback method.
If this method succeeds, it returns
An application-defined callback method used for raw image parameter change notifications.
+An application-defined callback method used for raw image parameter change notifications.
+A set of
If this method succeeds, it returns
Exposes methods that provide enumeration services for individual metadata items.
+Skips to given number of objects.
+The number of objects to skip.
If this method succeeds, it returns
Resets the current position to the beginning of the enumeration.
+If this method succeeds, it returns
Creates a copy of the current
If this method succeeds, it returns
Exposes methods used for in-place metadata editing. A fast metadata encoder enables you to add and remove metadata to an image without having to fully re-encode the image.
+ A decoder must be created using the
Not all metadata formats support fast metadata encoding. The native metadata handlers that support metadata are IFD, Exif, XMP, and GPS.
If a fast metadata encoder fails, the image will need to be fully re-encoded to add the metadata.
+Proxy function for the GetMetadataQueryWriter method.
+Finalizes metadata changes to the image stream.
+If this method succeeds, it returns
If the commit fails and returns
If the commit fails for any reason, you will need to re-encode the image to ensure the new metadata is added to the image.
+Proxy function for the GetMetadataQueryWriter method.
+If this function succeeds, it returns
Initializes the format converter.
+If you do not have a predefined palette, you must first create one. Use InitializeFromBitmap to create the palette object, then pass it in along with your other parameters.
dither, pIPalette, alphaThresholdPercent, and paletteTranslate are used to mitigate color loss when converting to a reduced bit-depth format. For conversions that do not need these settings, the following parameters values should be used: dither set to
The basic algorithm involved when using an ordered dither requires a fixed palette, found in the
If colors in pIPalette do not closely match those in paletteTranslate, the mapping may produce undesireable results.
When converting a bitmap which has an alpha channel, such as a Portable Network Graphics (PNG), to 8bpp, the alpha channel is normally ignored. Any pixels which were transparent in the original bitmap show up as black in the final output because both transparent and black have pixel values of zero in the respective formats.
Some 8bpp content can contains an alpha color; for instance, the Graphics Interchange Format (GIF) format allows for a single palette entry to be used as a transparent color. For this type of content, alphaThresholdPercent specifies what percentage of transparency should map to the transparent color. Because the alpha value is directly proportional to the opacity (not transparency) of a pixel, the alphaThresholdPercent indicates what level of opacity is mapped to the fully transparent color. For instance, 9.8% implies that any pixel with an alpha value of less than 25 will be mapped to the transparent color. A value of 100% maps all pixels which are not fully opaque to the transparent color. Note that the palette should provide a transparent color. If it does not, the 'transparent' color will be the one closest to zero - often black.
+Initializes the format converter.
+The input bitmap to convert
The destination pixel format
The
The palette to use for conversion.
The alpha threshold to use for conversion.
The palette translation type to use for conversion.
If this method succeeds, it returns
If you do not have a predefined palette, you must first create one. Use InitializeFromBitmap to create the palette object, then pass it in along with your other parameters.
dither, pIPalette, alphaThresholdPercent, and paletteTranslate are used to mitigate color loss when converting to a reduced bit-depth format. For conversions that do not need these settings, the following parameters values should be used: dither set to
The basic algorithm involved when using an ordered dither requires a fixed palette, found in the
If colors in pIPalette do not closely match those in paletteTranslate, the mapping may produce undesireable results.
When converting a bitmap which has an alpha channel, such as a Portable Network Graphics (PNG), to 8bpp, the alpha channel is normally ignored. Any pixels which were transparent in the original bitmap show up as black in the final output because both transparent and black have pixel values of zero in the respective formats.
Some 8bpp content can contains an alpha color; for instance, the Graphics Interchange Format (GIF) format allows for a single palette entry to be used as a transparent color. For this type of content, alphaThresholdPercent specifies what percentage of transparency should map to the transparent color. Because the alpha value is directly proportional to the opacity (not transparency) of a pixel, the alphaThresholdPercent indicates what level of opacity is mapped to the fully transparent color. For instance, 9.8% implies that any pixel with an alpha value of less than 25 will be mapped to the transparent color. A value of 100% maps all pixels which are not fully opaque to the transparent color. Note that the palette should provide a transparent color. If it does not, the 'transparent' color will be the one closest to zero - often black.
+Determines if the source pixel format can be converted to the destination pixel format.
+The source pixel format.
The destionation pixel format.
A reference that receives a value indicating whether the source pixel format can be converted to the destination pixel format.
Exposes methods that provide information about a pixel format converter.
+Retrieves a list of GUIDs that signify which pixel formats the converter supports.
+The size of the pPixelFormatGUIDs array.
Pointer to a
The actual array size needed to retrieve all pixel formats supported by the converter.
If this method succeeds, it returns
The format converter does not necessarily guarantee symmetricality with respect to conversion; that is, a converter may be able to convert FROM a particular format without actually being able to convert TO a particular format. In order to test symmetricality, use CanConvert.
To determine the number of pixel formats a coverter can handle, set cFormats to 0
and pPixelFormatGUIDs to
. The converter will fill pcActual with the number of formats supported by that converter.
Creates a new
If this method succeeds, it returns
Encodes
Encodes the image to the frame given by the
If this method succeeds, it returns
The image passed in must be created on the same device as in
You must correctly and independently have set up the
Encodes the image as a thumbnail to the frame given by the
If this method succeeds, it returns
The image passed in must be created on the same device as in
You must correctly and independently have set up the
Encodes the given image as the thumbnail to the given WIC bitmap encoder.
+The Direct2D image that will be encoded.
The encoder on which the thumbnail is set.
Additional parameters to control encoding.
If this method succeeds, it returns
You must create the image that you pass in on the same device as in
Before you call WriteThumbnail, you must set up the
If WriteThumbnail fails, it might return E_OUTOFMEMORY,
Exposes methods used to create components for the Windows Imaging Component (WIC) such as decoders, encoders and pixel format converters.
+Creates a new instance of the
If this method succeeds, it returns
Creates a new instance of the
If this method succeeds, it returns
Creates a new instance of the
If this method succeeds, it returns
When a decoder is created using this method, the file handle must remain alive during the lifetime of the decoder.
+Proxy function for the CreateComponentInfo method.
+If this function succeeds, it returns
Creates a new instance of
If this method succeeds, it returns
Other values may be available for both guidContainerFormat and pguidVendor depending on the installed WIC-enabled encoders. The values listed are those that are natively supported by the operating system.
+Creates a new instance of the
If this method succeeds, it returns
Other values may be available for both guidContainerFormat and pguidVendor depending on the installed WIC-enabled encoders. The values listed are those that are natively supported by the operating system.
+Creates a new instance of the
If this method succeeds, it returns
Creates a new instance of the
If this method succeeds, it returns
Creates a new instance of an
If this method succeeds, it returns
Proxy function for the CreateBitmapClipper method.
+If this function succeeds, it returns
Proxy function for the CreateBitmapFlipRotator method.
+If this function succeeds, it returns
Creates a new instance of the
If this method succeeds, it returns
Creates a new instance of the
If this method succeeds, it returns
Creates a new instance of the
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Creates a
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Providing a rectangle that is larger than the source will produce undefined results.
This method always creates a separate copy of the source image, similar to the cache option
Creates an
If this method succeeds, it returns
The size of the
The stride of the destination bitmap will equal the stride of the source data, regardless of the width and height specified.
The pixelFormat parameter defines the pixel format for both the input data and the output bitmap.
+Creates an
If this method succeeds, it returns
For a non-palletized bitmap, set
Creates an
If this method succeeds, it returns
Creates an
If this method succeeds, it returns
Component types must be enumerated seperately. Combinations of component types and
Creates a new instance of the fast metadata encoder based on the given
If this method succeeds, it returns
The Windows provided codecs do not support fast metadata encoding at the decoder level, and only support fast metadata encoding at the frame level. To create a fast metadata encoder from a frame, see CreateFastMetadataEncoderFromFrameDecode.
+Creates a new instance of the fast metadata encoder based on the given image frame.
+The
When this method returns, contains a reference to a new fast metadata encoder.
If this method succeeds, it returns
For a list of support metadata formats for fast metadata encoding, see WIC Metadata Overview.
+Proxy function for the CreateQueryWriter method.
+If this function succeeds, it returns
Proxy function for the CreateQueryWriterFromReader method.
+If this function succeeds, it returns
An extension of the WIC factory interface that includes the ability to create an
Creates a new image encoder object.
+The
A reference to a variable that receives a reference to the
If this method succeeds, it returns
You must create images to pass to the image encoder on the same Direct2D device that you pass to this method.
You are responsible for setting up the bitmap encoder itself through the existing
Exposes methods for decoding JPEG images. Provides access to the Start Of Frame (SOF) header, Start of Scan (SOS) header, the Huffman and Quantization tables, and the compressed JPEG JPEG data. Also enables indexing for efficient random access.
+Obtain this interface by calling IUnknown::QueryInterface on the Windows-provided IWICBitmapFrameDecoder interface for the JPEG decoder.
+Retrieves header data from the entire frame. The result includes parameters from the Start Of Frame (SOF) marker for the scan as well as parameters derived from other metadata such as the color model of the compressed data.
+Retrieves a value indicating whether this decoder supports indexing for efficient random access.
+True if indexing is supported; otherwise, false.
Returns
Indexing is only supported for some JPEG types. Call this method
+Enables indexing of the JPEG for efficient random access.
+A value specifying whether indexes should be generated immediately or deferred until a future call to
The granularity of the indexing, in pixels.
Returns
This method enables efficient random-access to the image pixels at the expense of memory usage. The amount of memory required for indexing depends on the requested index granularity. Unless SetIndexing is called, it is much more efficient to access a JPEG by progressing through its pixels top-down during calls to
This method will fail if indexing is unsupported on the file.
The provided interval size controls horizontal spacing of index entries. This value is internally rounded up according to the JPEG?s MCU (minimum coded unit) size, which is typically either 8 or 16 unscaled pixels. The vertical size of the index interval is always equal to one MCU size.
Indexes can be generated immediately, or during future calls to
Removes the indexing from a JPEG that has been indexed using
Returns
Retrieves a copy of the AC Huffman table for the specified scan and table.
+The zero-based index of the scan for which data is retrieved.
The index of the AC Huffman table to retrieve. Valid indices for a given scan can be determined by retrieving the scan header with
A reference that receives the table data. This parameter must not be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
| Can occur if pAcHuffmanTable is |
?
Retrieves a copy of the DC Huffman table for the specified scan and table.
+The zero-based index of the scan for which data is retrieved.
The index of the DC Huffman table to retrieve. Valid indices for a given scan can be determined by retrieving the scan header with
A reference that receives the table data. This parameter must not be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
| Can occur if pTable is |
?
Retrieves a copy of the quantization table.
+The zero-based index of the scan for which data is retrieved.
The index of the quantization table to retrieve. Valid indices for a given scan can be determined by retrieving the scan header with
A reference that receives the table data. This parameter must not be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
| Can occur if pTable is |
?
Retrieves header data from the entire frame. The result includes parameters from the Start Of Frame (SOF) marker for the scan as well as parameters derived from other metadata such as the color model of the compressed data.
+A reference that receives the frame header data.
Returns
Retrieves parameters from the Start Of Scan (SOS) marker for the scan with the specified index.
+The index of the scan for which header data is retrieved.
A reference that receives the frame header data.
Returns
Retrieves a copy of the compressed JPEG scan directly from the WIC decoder frame's output stream.
+The zero-based index of the scan for which data is retrieved.
The byte position in the scan data to begin copying. Use 0 on the first call. If the output buffer size is insufficient to store the entire scan, this offset allows you to resume copying from the end of the previous copy operation.
The size, in bytes, of the pbScanData array.
A reference that receives the table data. This parameter must not be
A reference that receives the size of the scan data actually copied into pbScanData. The size returned may be smaller that the size of cbScanData. This parameter may be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
?
Exposes methods for writing compressed JPEG scan data directly to the WIC encoder's output stream. Also provides access to the Huffman and quantization tables.
+Obtain this interface by calling IUnknown::QueryInterface on the Windows-provided IWICBitmapFrameEncoder interface for the JPEG encoder.
The WIC JPEG encoder supports a smaller subset of JPEG features than the decoder does.
Retrieves a copy of the AC Huffman table for the specified scan and table.
+The zero-based index of the scan for which data is retrieved.
The index of the AC Huffman table to retrieve.
A reference that receives the table data. This parameter must not be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
| Can occur if pAcHuffmanTable is |
?
Retrieves a copy of the DC Huffman table for the specified scan and table.
+The zero-based index of the scan for which data is retrieved.
The index of the DC Huffman table to retrieve.
A reference that receives the table data. This parameter must not be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
| Can occur if pTable is |
?
Retrieves a copy of the quantization table.
+The zero-based index of the scan for which data is retrieved.
The index of the quantization table to retrieve.
A reference that receives the table data. This parameter must not be
This method can return one of these values.
Return value | Description |
---|---|
| The operation was successful. |
| The specified scan index is invalid. |
| Can occur if pTable is |
?
Writes scan data to a JPEG frame.
+The size of the data in the pbScanData parameter.
The scan data to write.
Returns
WriteScan may be called multiple times. Each call appends the scan data specified to any previous scan data. Complete the scan by calling
Any calls to set encoder parameters or image metadata that will appear before the scan data in the resulting JPEG file must be completed before the first call to this method. This includes calls to
Exposes methods for retrieving metadata blocks and items from a decoder or its image frames using a metadata query expression.
+A metadata query reader uses metadata query expressions to access embedded metadata. For more information on the metadata query language, see the Metadata Query Language Overview.
The benefit of the query reader is the ability to access a metadata item in a single step. +
The query reader also provides the way to traverse the whole set of metadata hierarchy with the help of the GetEnumerator method. + However, it is not recommended to use this method since IWICMetadataBlockReader and IWICMetadataReader provide a more convenient and cheaper way. +
+Gets the metadata query readers container format.
+Gets the metadata query readers container format.
+Pointer that receives the cointainer format
If this method succeeds, it returns
Retrieves the current path relative to the root metadata block.
+The length of the wzNamespace buffer.
Pointer that receives the current namespace location.
The actual buffer length that was needed to retrieve the current namespace location.
If this method succeeds, it returns
If you pass
If the query reader is relative to the top of the metadata hierarchy, it will return a single-char string.
If the query reader is relative to a nested metadata block, this method will return the path to the current query reader.
+Retrieves the metadata block or item identified by a metadata query expression.
+The query expression to the requested metadata block or item.
When this method returns, contains the metadata block or item requested.
If this method succeeds, it returns
GetMetadataByName uses metadata query expressions to access embedded metadata. For more information on the metadata query language, see the Metadata Query Language Overview.
If multiple blocks or items exist that are expressed by the same query expression, the first metadata block or item found will be returned.
+Gets an enumerator of all metadata items at the current relative location within the metadata hierarchy.
+A reference to a variable that receives a reference to the
The retrieved enumerator only contains query strings for the metadata blocks and items in the current level of the hierarchy. +
+Exposes methods for setting or removing metadata blocks and items to an encoder or its image frames using a metadata query expression.
+A metadata query writer uses metadata query expressions to set or remove metadata. For more information on the metadata query language, see the Metadata Query Language Overview.
+Sets a metadata item to a specific location.
+The name of the metadata item.
The metadata to set.
If this method succeeds, it returns
SetMetadataByName uses metadata query expressions to remove metadata. For more information on the metadata query language, see the Metadata Query Language Overview.
If the value set is a nested metadata block then use variant type VT_UNKNOWN
and pvarValue pointing to the
Proxy function for the RemoveMetadataByName method.
+If this function succeeds, it returns
Exposes methods for accessing and building a color table, primarily for indexed pixel formats.
+If the
InitializeFromBitmap's fAddTransparentColor parameter will add a transparent color to the end of the color collection if its size if less than 256, otherwise index 255 will be replaced with the transparent color. If a pre-defined palette type is used, it will change to BitmapPaletteTypeCustom since it no longer matches the predefined palette.
The palette interface is an auxiliary imaging interface in that it does not directly concern bitmaps and pixels; rather it provides indexed color translation for indexed bitmaps. For an indexed pixel format with M bits per pixels: (The number of colors in the palette) greater than 2^M.
Traditionally the basic operation of the palette is to provide a translation from a byte (or smaller) index into a 32bpp color value. This is often accomplished by a 256 entry table of color values.
+Retrieves the
WICBitmapPaletteCustom is used for palettes initialized from both InitializeCustom and InitializeFromBitmap. There is no distinction is made between optimized and custom palettes.
+Proxy function for the GetColorCount method.
+Retrieves a value that describes whether the palette is black and white.
+A palette is considered to be black and white only if it contains exactly two entries, one full black (0xFF000000) and one full white (0xFFFFFFF). +
+Retrieves a value that describes whether a palette is grayscale.
+A palette is considered grayscale only if, for every entry, the alpha value is 0xFF and the red, green and blue values match. +
+Initializes the palette to one of the pre-defined palettes specified by
If this method succeeds, it returns
If a transparent color is added to a palette, the palette is no longer predefined and is returned as
Proxy function for the InitializeCustom method.
+If this function succeeds, it returns
Initializes a palette using a computed optimized values based on the reference bitmap.
+Pointer to the source bitmap.
The number of colors to initialize the palette with.
A value to indicate whether to add a transparent color.
If this method succeeds, it returns
The resulting palette contains the specified number of colors which best represent the colors present in the bitmap. The algorithm operates on the opaque RGB color value of each pixel in the reference bitmap and hence ignores any alpha values. If a transparent color is required, set the fAddTransparentColor parameter to TRUE and one fewer optimized color will be computed, reducing the colorCount, and a fully transparent color entry will be added.
+Initialize the palette based on a given palette.
+Pointer to the source palette.
If this method succeeds, it returns
Retrieves the
If this method succeeds, it returns
WICBitmapPaletteCustom is used for palettes initialized from both InitializeCustom and InitializeFromBitmap. There is no distinction is made between optimized and custom palettes.
+Proxy function for the GetColorCount method.
+If this function succeeds, it returns
Fills out the supplied color array with the colors from the internal color table. The color array should be sized according to the return results from GetColorCount.
+If this method succeeds, it returns
Retrieves a value that describes whether the palette is black and white.
+A reference to a variable that receives a boolean value that indicates whether the palette is black and white. TRUE indicates that the palette is black and white; otherwise,
If this method succeeds, it returns
A palette is considered to be black and white only if it contains exactly two entries, one full black (0xFF000000) and one full white (0xFFFFFFF). +
+Retrieves a value that describes whether a palette is grayscale.
+A reference to a variable that receives a boolean value that indicates whether the palette is grayscale. TRUE indicates that the palette is grayscale; otherwise
If this method succeeds, it returns
A palette is considered grayscale only if, for every entry, the alpha value is 0xFF and the red, green and blue values match. +
+Proxy function for the HasAlpha method.
+If this function succeeds, it returns
Exposes methods that provide information about a pixel format.
+Gets the pixel format
Gets the pixel format's
The returned color context is the default color space for the pixel format. However, if an
Proxy function for the GetBitsPerPixel method.
+Proxy function for the GetChannelCount method.
+Gets the pixel format
Pointer that receives the pixel format
If this method succeeds, it returns
Gets the pixel format's
If this method succeeds, it returns
The returned color context is the default color space for the pixel format. However, if an
Proxy function for the GetBitsPerPixel method.
+If this function succeeds, it returns
Proxy function for the GetChannelCount method.
+If this function succeeds, it returns
Gets the pixel format's channel mask.
+The index to the channel mask to retrieve.
The size of the pbMaskBuffer buffer.
Pointer to the mask buffer.
The actual buffer size needed to obtain the channel mask.
If this method succeeds, it returns
If 0 and
Extends
Returns whether the format supports transparent pixels.
+An indexed pixel format will not return TRUE even though it may have some transparency support. +
+Returns whether the format supports transparent pixels.
+Returns TRUE if the pixel format supports transparency; otherwise,
If this method succeeds, it returns
An indexed pixel format will not return TRUE even though it may have some transparency support. +
+Returns the
If this method succeeds, it returns
Allows planar component image pixels to be written to an encoder. When supported by the encoder, this allows an application to encode planar component image data without first converting to an interleaved pixel format.
You can use QueryInterface to obtain this interface from the Windows provided implementation of
Encoding YCbCr data using
Writes lines from the source planes to the encoded format.
+The number of lines to encode. See the Remarks section for WIC Jpeg specific line count restrictions.
Specifies the source buffers for each component plane encoded.
The number of component planes specified by the pPlanes parameter.
If the planes and source rectangle do not meet the requirements, this method fails with
Successive WritePixels calls are assumed sequentially add scanlines to the output image.
The interleaved pixel format set via
WIC JPEG Encoder:
+ QueryInterface can be used to obtain this interface from the WIC JPEG
Depending upon the configured chroma subsampling, the lineCount parameter has the following restrictions: +
Chroma Subsampling | Line Count Restriction | Chroma Plane Width | Chroma Plane Height |
---|---|---|---|
4:2:0 | Multiple of 2, unless the call covers the last scanline of the image | lumaWidth / 2 Rounded up to the nearest integer. | lumaHeight / 2 Rounded up to the nearest integer. |
4:2:2 | Any | lumaWidth / 2 Rounded up to the nearest integer. | Any |
4:4:4 | Any | Any | Any |
4:4:0 | Multiple of 2, unless the call covers the last scanline of the image | Any | llumaHeight / 2 Rounded up to the nearest integer. |
?
The full scanline width must be encoded, and the width of the bitmap sources must match their planar configuration.
Additionally, if a pixel format is set via
The supported pixel formats of the bitmap sources passed into this method are as follows: +
Plane Count | Plane 1 | Plane 2 | Plane 3 |
---|---|---|---|
3 | |||
2 | N/A |
?
+Writes lines from the source planes to the encoded format.
+Specifies an array of
The number of component planes specified by the planes parameter.
The source rectangle of pixels to encode from the
If the planes and source rectangle do not meet the requirements, this method fails with
If the
Successive WriteSource calls are assumed sequentially add scanlines to the output image.
The interleaved pixel format set via
WIC JPEG Encoder:
+ QueryInterface can be used to obtain this interface from the WIC JPEG
Depending upon the configured chroma subsampling, the lineCount parameter has the following restrictions: +
Chroma Subsampling | X Coordinate | Y Coordinate | Chroma Width | Chroma Height |
---|---|---|---|---|
4:2:0 | Multiple of 2 | Multiple of 2 | lumaWidth / 2 Rounded up to the nearest integer. | lumaHeight / 2 Rounded up to the nearest integer. |
4:2:2 | Multiple of 2 | Any | lumaWidth / 2 Rounded up to the nearest integer. | Any |
4:4:4 | Any | Any | Any | Any |
4:4:0 | Any | Multiple of 2 | lumaWidth | llumaHeight / 2 Rounded up to the nearest integer. |
?
The full scanline width must be encoded, and the width of the bitmap sources must match their planar configuration.
Additionally, if a pixel format is set via
The supported pixel formats of the bitmap sources passed into this method are as follows: +
Plane Count | Plane 1 | Plane 2 | Plane 3 |
---|---|---|---|
3 | |||
2 | N/A |
?
+Writes lines from the source planes to the encoded format.
+Specifies an array of
The number of component planes specified by the planes parameter.
The source rectangle of pixels to encode from the
If the planes and source rectangle do not meet the requirements, this method fails with
If the
Successive WriteSource calls are assumed sequentially add scanlines to the output image.
The interleaved pixel format set via
WIC JPEG Encoder:
+ QueryInterface can be used to obtain this interface from the WIC JPEG
Depending upon the configured chroma subsampling, the lineCount parameter has the following restrictions: +
Chroma Subsampling | X Coordinate | Y Coordinate | Chroma Width | Chroma Height |
---|---|---|---|---|
4:2:0 | Multiple of 2 | Multiple of 2 | lumaWidth / 2 Rounded up to the nearest integer. | lumaHeight / 2 Rounded up to the nearest integer. |
4:2:2 | Multiple of 2 | Any | lumaWidth / 2 Rounded up to the nearest integer. | Any |
4:4:4 | Any | Any | Any | Any |
4:4:0 | Any | Multiple of 2 | lumaWidth | llumaHeight / 2 Rounded up to the nearest integer. |
?
The full scanline width must be encoded, and the width of the bitmap sources must match their planar configuration.
Additionally, if a pixel format is set via
The supported pixel formats of the bitmap sources passed into this method are as follows: +
Plane Count | Plane 1 | Plane 2 | Plane 3 |
---|---|---|---|
3 | |||
2 | N/A |
?
+Writes lines from the source planes to the encoded format.
+Specifies an array of
The number of component planes specified by the planes parameter.
The source rectangle of pixels to encode from the
If the planes and source rectangle do not meet the requirements, this method fails with
If the
Successive WriteSource calls are assumed sequentially add scanlines to the output image.
The interleaved pixel format set via
WIC JPEG Encoder:
+ QueryInterface can be used to obtain this interface from the WIC JPEG
Depending upon the configured chroma subsampling, the lineCount parameter has the following restrictions: +
Chroma Subsampling | X Coordinate | Y Coordinate | Chroma Width | Chroma Height |
---|---|---|---|---|
4:2:0 | Multiple of 2 | Multiple of 2 | lumaWidth / 2 Rounded up to the nearest integer. | lumaHeight / 2 Rounded up to the nearest integer. |
4:2:2 | Multiple of 2 | Any | lumaWidth / 2 Rounded up to the nearest integer. | Any |
4:4:4 | Any | Any | Any | Any |
4:4:0 | Any | Multiple of 2 | lumaWidth | llumaHeight / 2 Rounded up to the nearest integer. |
?
The full scanline width must be encoded, and the width of the bitmap sources must match their planar configuration.
Additionally, if a pixel format is set via
The supported pixel formats of the bitmap sources passed into this method are as follows: +
Plane Count | Plane 1 | Plane 2 | Plane 3 |
---|---|---|---|
3 | |||
2 | N/A |
?
+Provides access to planar Y?CbCr pixel formats where pixel components are stored in separate component planes. This interface also allows access to other codec optimizations for flip/rotate, scale, and format conversion to other Y?CbCr planar formats; this is similar to the pre-existing
QueryInterface can be used to obtain this interface from the Windows provided implementations of
Use this method to determine if a desired planar output is supported and allow the caller to choose an optimized code path if it is. Otherwise, callers should fall back to
The following transforms can be checked:
When a transform is supported, this method returns the description of the resulting planes in the pPlaneDescriptions parameter. +
+Check the value of pfIsSupported to determine if the transform is supported via
Copies pixels into the destination planes. Configured by the supplied input parameters.
If a dstTransform, scale, or format conversion is specified, cbStride is the transformed stride and is based on the destination pixel format of the pDstPlanes parameter, not the original source's pixel format.
+The source rectangle of pixels to copy.
The width to scale the source bitmap. This parameter must be equal to a value obtainable through IWICPlanarBitmapSourceTransform:: DoesSupportTransform.
The height to scale the source bitmap. This parameter must be equal to a value obtainable through IWICPlanarBitmapSourceTransform:: DoesSupportTransform.
The desired rotation or flip to perform prior to the pixel copy. A rotate can be combined with a flip horizontal or a flip vertical, see
Used to specify additional configuration options for the transform. See
WIC JPEG Decoder:
Specifies the pixel format and output buffer for each component plane. The number of planes and pixel format of each plane must match values obtainable through
The number of component planes specified by the pDstPlanes parameter.
If the specified scale, flip/rotate, and planar format configuration is not supported this method fails with
WIC JPEG Decoder: + Depending on the configured chroma subsampling of the image, the source rectangle has the following restrictions: +
Chroma Subsampling | X Coordinate | Y Coordinate | Chroma Width | Chroma Height |
---|---|---|---|---|
4:2:0 | Multiple of 2 | Multiple of 2 | lumaWidth / 2 Rounded up to the nearest integer. | lumaHeight / 2 Rounded up to the nearest integer. |
4:2:2 | Multiple of 2 | Any | lumaWidth / 2 Rounded up to the nearest integer. | lumaHeight |
4:4:4 | Any | Any | llumaWidth | llumaHeight |
4:4:0 | Any | Multiple of 2 | lumaWidth | llumaHeight / 2 Rounded up to the nearest integer. |
?
The pDstPlanes parameter supports the following pixel formats.
Plane Count | Plane 1 | Plane 2 | Plane 3 |
---|---|---|---|
3 | |||
2 | N/A |
?
+Allows a format converter to be initialized with a planar source. You can use QueryInterface to obtain this interface from the Windows provided implementation of
Initializes a format converter with a planar source, and specifies the interleaved output pixel format.
+An array of
The number of component planes specified by the planes parameter.
The destination interleaved pixel format.
The
The palette to use for conversion.
The alpha threshold to use for conversion.
The palette translation type to use for conversion.
If this method succeeds, it returns
Initializes a format converter with a planar source, and specifies the interleaved output pixel format.
+An array of
The number of component planes specified by the planes parameter.
The destination interleaved pixel format.
The
The palette to use for conversion.
The alpha threshold to use for conversion.
The palette translation type to use for conversion.
If this method succeeds, it returns
Initializes a format converter with a planar source, and specifies the interleaved output pixel format.
+An array of
The number of component planes specified by the planes parameter.
The destination interleaved pixel format.
The
The palette to use for conversion.
The alpha threshold to use for conversion.
The palette translation type to use for conversion.
If this method succeeds, it returns
Query if the format converter can convert from one format to another.
+An array of WIC pixel formats that represents source image planes.
The number of source pixel formats specified by the pSrcFormats parameter.
The destination interleaved pixel format.
True if the conversion is supported.
If the conversion is not supported, this method returns
If this method fails, the out parameter pfCanConvert is invalid.
To specify an interleaved input pixel format, provide a length 1 array to pSrcPixelFormats.
+Notify method is documented only for compliance; its use is not recommended and may be altered or unavailable in the future. Instead, and use RegisterProgressNotification. +
+If this method succeeds, it returns
Exposes methods for obtaining information about and controlling progressive decoding.
+Images can only be progressively decoded if they were progressively encoded. Progressive images automatically start at the highest (best quality) progressive level. The caller must manually set the decoder to a lower progressive level.
E_NOTIMPL is returned if the codec does not support progressive level decoding.
+Gets the number of levels of progressive decoding supported by the CODEC.
+Users should not use this function to iterate through the progressive levels of a progressive JPEG image. JPEG progressive levels are determined by the image and do not have a fixed level count. Using this method will force the application to wait for all progressive levels to be downloaded before it can return. Instead, applications should use the following code to iterate through the progressive levels of a progressive JPEG image.
+Gets or sets the decoder's current progressive level.
+The level always defaults to the highest progressive level. In order to decode a lower progressive level, SetCurrentLevel must first be called.
+Gets the number of levels of progressive decoding supported by the CODEC.
+Indicates the number of levels supported by the CODEC.
If this method succeeds, it returns
Users should not use this function to iterate through the progressive levels of a progressive JPEG image. JPEG progressive levels are determined by the image and do not have a fixed level count. Using this method will force the application to wait for all progressive levels to be downloaded before it can return. Instead, applications should use the following code to iterate through the progressive levels of a progressive JPEG image.
+Gets the decoder's current progressive level.
+Indicates the current level specified.
If this method succeeds, it returns
The level always defaults to the highest progressive level. In order to decode a lower progressive level, SetCurrentLevel must first be called.
+Specifies the level to retrieve on the next call to CopyPixels.
+If this method succeeds, it returns
A call does not have to request every level supported. If a caller requests level 1, without having previously requested level 0, the bits returned by the next call to CopyPixels will include both levels.
If the requested level is invalid, the error returned is
Represents a Windows Imaging Component (WIC) stream for referencing imaging and metadata content.
+Decoders and metadata handlers are expected to create sub streams of whatever stream they hold when handing off control for embedded metadata to another metadata handler. If the stream is not restricted then use MAXLONGLONG as the max size and offset 0.
The
Initializes a stream from another stream. Access rights are inherited from the underlying stream.
+The initialize stream.
If this method succeeds, it returns
Initializes a stream from a particular file.
+The file used to initialize the stream.
The desired file access mode.
Value | Meaning |
---|---|
| Read access. |
| Write access. |
?
If this method succeeds, it returns
The
Initializes a stream to treat a block of memory as a stream. The stream cannot grow beyond the buffer size.
+Pointer to the buffer used to initialize the stream.
The size of buffer.
If this method succeeds, it returns
This method should be avoided whenever possible. The caller is responsible for ensuring the memory block is valid for the lifetime of the stream when using InitializeFromMemory. A workaround for this behavior is to create an
If you require a growable memory stream, use CreateStreamOnHGlobal.
+Initializes the stream as a substream of another stream.
+Pointer to the input stream.
The stream offset used to create the new stream.
The maximum size of the stream.
If this method succeeds, it returns
The stream functions with its own stream position, independent of the underlying stream but restricted to a region. All seek positions are relative to the sub region. It is allowed, though not recommended, to have multiple writable sub streams overlapping the same range.
+Contains members that identify a pattern within an image file which can be used to identify a particular format.
+The offset the pattern is located in the file.
The pattern length.
The actual pattern.
The pattern mask.
The end of the stream.
Specifies the pixel format, buffer, stride and size of a component plane for a planar pixel format.
+Describes the pixel format of the plane.
Pointer to the buffer that holds the plane?s pixel components.
The stride of the buffer ponted to by pbData. Stride indicates the total number of bytes to go from the beginning of one scanline to the beginning of the next scanline.
The total size of the buffer pointed to by pbBuffer.
Specifies the pixel format and size of a component plane.
+Describes the pixel format of the plane.
Component width of the plane.
Component height of the plane.
Specifies the
Specifies the DDS image dimension,
This defines parameters that you can use to override the default parameters normally used when encoding an image.
+If this parameter is not passed to the encoding API, the encoder uses these settings.
The pixel format to which the image is processed before it is written to the encoder.
The DPI in the x dimension.
The DPI in the y dimension.
The top corner in pixels of the image space to be encoded to the destination.
The left corner in pixels of the image space to be encoded to the destination.
The width in pixels of the part of the image to write.
The height in pixels of the part of the image to write.
Represents a JPEG frame header.
+Get the frame header for an image by calling
The width of the JPEG frame.
The height of the JPEG frame.
The transfer matrix of the JPEG frame.
The scan type of the JPEG frame.
The number of components in the frame.
The component identifiers.
The sample factors. Use one of the following constants, described in
The format of the quantization table indices. Use one of the following constants, described in
Represents a JPEG frame header.
+Get the scan header for an image by calling
The number of components in the scan.
The interval of reset markers within the scan.
The component identifiers.
The format of the quantization table indices. Use one of the following constants, described in
The start of the spectral selection.
The end of the spectral selection.
The successive approximation high.
The successive approximation low.
Defines raw codec capabilites.
+Size of the
The codec's major version.
The codec's minor version.
The
The
The
The
The
The
The
The
The
The
The
The
The
The
The
Represents a raw image tone curve.
+The number of tone curve points.
The array of tone curve points.
Represents a raw image tone curve point.
+The tone curve input.
The tone curve output.
This interface encapsulates methods for retrieving data from the GPU asynchronously.
+There are three types of asynchronous interfaces, all of which inherit this interface:
Starts the collection of GPU data.
+Calling Begin starts the asynchronous collection of GPU data. Calling
Ends the collection of GPU data.
+Calling
Get data from the GPU asynchronously.
+Address of memory that will receive the data. If
Size of the data to retrieve or 0. This value can be obtained with
Optional flags. Can be 0 or any combination of the flags enumerated by
If this function succeeds, it returns
GetData retrieves the data collected between calls to
If DataSize is 0, GetData is only used to check status where a return value of
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
Query Type | Output Data Type | Supports Begin Method |
---|---|---|
NO | ||
UINT64 | YES | |
UINT64 | NO | |
YES | ||
YES | ||
YES | ||
YES | ||
YES |
?
If the asynchronous interface that calls this API is
Counter Type | Output Data Type | Units |
---|---|---|
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of theoretical maximum | |
FLOAT32 | fraction of theoretical maximum | |
FLOAT32 | fraction of theoretical maximum | |
FLOAT32 | fraction of theoretical maximum | |
FLOAT32 | fraction of theoretical maximum | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction of time | |
FLOAT32 | fraction | |
FLOAT32 | fraction |
?
The value returned by a
The number of parallel counters that a video card has is available from NumDetectableParallelUnits in
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.
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
Get the blend state.
+Get the blend state.
+A reference to the blend state (see
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
This method requires Windows Vista Service Pack 1.
+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
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.
+Get the properties of a buffer resource.
+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
Pointer to the buffer resource data.
If this function succeeds, it returns
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,
Call
Differences between Direct3D 9 and Direct3D 10: |
?
+Invalidate the reference to the resource retrieved by
Differences between Direct3D 9 and Direct3D 10: Unmap() in Direct3D 10 is analogous to resource Unlock() in Direct3D 9. |
?
+Get the properties of a buffer resource.
+Pointer to a resource description (see
Describes a buffer resource.
+This structure is used by
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.
+This interface encapsulates methods for measuring GPU performance.
+A counter can be created with
This is a derived class of
Counter data is gathered by issuing an
Counters are best suited for profiling.
For a list of the types of performance counters, see
Get a counter description.
+Get a counter description.
+Pointer to a counter description (see
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
Get the depth-stencil state.
+Get the depth-stencil state.
+A reference to the depth-stencil state (see
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
Get the depth-stencil view.
+Get the depth-stencil view.
+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
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 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.
+ Get the reason why the device was removed.
+Get or sets the exception-mode flags.
+An exception-mode flag is used to elevate an error condition to a non-continuable exception.
+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.
+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.
+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.
+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).
+Set a rendering predicate.
+Pointer to a predicate (see
If TRUE, rendering will be affected by when the predicate's conditions are met. If
The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to
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
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,
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.
+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
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:
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
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:
Direct3D 10.1 has added support for the following features:
|
?
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
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:
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
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 It is possible to copy between prestructured+typed resources and block-compressed textures. See Format Conversion using Direct3D 10.1. |
?
+The CPU copies data from memory to a subresource created in non-mappable memory. See remarks.
+For a shader-constant buffer; set pDstBox to
A resource cannot be used as a destination if:
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.
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
To calculate the source row pitch and source depth pitch for a given resource, use the following formulas:
In the case of this example 3D volume texture where the size of each element is 16 bytes, the formulas are as follows:
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. |
?
+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.
+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. |
?
+Generates mipmaps for the given shader resource.
+A reference to an
GenerateMips may be called on any
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.
+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
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.
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:
Scenario | Requirements |
---|---|
Source and destination are prestructured and typed | Both 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 typeless | The typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is |
Source and destination are prestructured and typeless | Both the source and desintation must have the same typeless format (i.e. both must have |
?
+Get the rendering predicate state.
+Address of a reference to a predicate (see
Address of a boolean to fill with the predicate comparison value.
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.
+Get the reason why the device was removed.
+Possible return values include:
For more detail on these return codes, see DXGI_ERROR.
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.
+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.
+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
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.
+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
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.
+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
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).
+Create a buffer (vertex buffer, index buffer, or shader-constant buffer).
+This method returns one of the following Direct3D 10 Return Codes.
For example code, see:
Create an array of 1D textures (see Texture1D).
+If the method succeeds, the return code is
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
Create an array of 2D textures (see Texture2D).
+If the method succeeds, the return code is
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
Create a single 3D texture (see Texture3D).
+If the method succeeds, the return code is
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
Create a shader-resource view for accessing data in a resource.
+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.
+Create a render-target view for accessing resource data.
+This method returns one of the following Direct3D 10 Return Codes.
A rendertarget view can be bound to the output merger stage by calling
Create a depth-stencil view for accessing resource data.
+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.
+Create an input-layout object to describe the input-buffer data for the input-assembler stage.
+If the method succeeds, the return code is
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. |
?
+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
This method returns one of the following Direct3D 10 Return Codes.
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
This method returns one of the following Direct3D 10 Return Codes.
Once created, the shader can be set to the device by calling
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
Size of the compiled geometry shader.
Pointer to a
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
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.
+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
This method returns one of the following Direct3D 10 Return Codes.
After creating the pixel shader, you can set it to the device using
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
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.
+Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.
+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.
+Create a rasterizer state object that tells the rasterizer stage how to behave.
+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.
+Create a sampler-state object that encapsulates sampling information for a texture.
+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.
+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.
+Creates a predicate.
+Pointer to a query description where the type of query must be a
Address of a reference to a predicate (see
This method returns one of the following Direct3D 10 Return Codes.
Create a counter object for measuring GPU performance.
+Pointer to a counter description (see
Address of a reference to a counter (see
If this function succeeds, it will return
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.
Get the support of a given format on the installed video device.
+A
A bitfield of
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.
+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.
+Get a counter's information.
+Get the type, name, units of measure, and a description of an existing counter.
+Pointer to a counter description (see
Pointer to the data type of a counter (see
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
Length of the string returned to szName. Can be
Name of the units a counter measures, provided the memory the reference points to has enough room to hold the string. Can be
Length of the string returned to szUnits. Can be
A description of the counter, provided the memory the reference points to has enough room to hold the string. Can be
Length of the string returned to szDescription. Can be
This method returns one of the following Direct3D 10 Return Codes.
Length parameters can be
Get the flags used during the call to create the device with
A bitfield containing the flags used to create the device. See
Give a device access to a shared resource created on a different Direct3d device.
+A resource handle. See remarks.
The globally unique identifier (
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
The REFIID, or
When sharing a resource between two Direct3D 10 devices the unique handle of the resource can be obtained by querying the resource for the
* 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 tonull 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.
If a shared texture is updated on one device
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
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.
+Get or sets information about the primitive type, and data order that describes input data for the input assembler stage.
+Bind an input-layout object to the input-assembler stage.
+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.
+Bind an array of vertex buffers to the input-assembler stage.
+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
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.
+Bind an array of vertex buffers to the input-assembler stage.
+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
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.
+Bind an array of vertex buffers to the input-assembler stage.
+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
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.
+Bind an index buffer to the input-assembler stage.
+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
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.
+Bind information about the primitive type, and data order that describes input data for the input assembler stage.
+Get 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.
+Get the vertex buffers bound to the input-assembler 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.
+Get a reference to the index buffer that is bound to the input-assembler 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.
+Get information about the primitive type, and data order that describes input data for the input assembler stage.
+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
Bind one or more render targets and the depth-stencil buffer to the output-merger stage.
+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
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.
+Bind one or more render targets and the depth-stencil buffer to the output-merger stage.
+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
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.
+Bind one or more render targets and the depth-stencil buffer to the output-merger stage.
+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
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.
+Set the blend state of the output-merger stage.
+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
State | Default Value |
---|---|
AlphaToCoverageEnable | |
BlendEnable | |
SrcBlend | |
DstBlend | |
BlendOp | |
SrcBlendAlpha | |
DstBlendAlpha | |
BlendOpAlpha | |
RenderTargetWriteMask[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.
+Sets the depth-stencil state of the output-merger stage.
+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.
+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.
+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.
+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.
+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
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.
+Set the rasterizer state for the rasterizer stage of the pipeline.
+To create a rasterizer state interface, 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.
+Bind an array of viewports to the rasterizer stage of the pipeline.
+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.
+Bind an array of scissor rectangles to the rasterizer stage.
+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
Get 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.
+Get the array of viewports bound to the rasterizer stage
+Get the array of scissor rectangles bound to the rasterizer stage.
+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
Set the target output buffers for the StreamOutput stage, which enables/disables the pipeline to stream-out data.
+Call
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
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.
+Set the target output buffers for the StreamOutput stage, which enables/disables the pipeline to stream-out data.
+Call
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
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.
+Set the target output buffers for the StreamOutput stage, which enables/disables the pipeline to stream-out data.
+Call
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
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.
+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.
+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.
+Gets the feature level of the hardware device.
+This method requires Windows Vista Service Pack 1.
+Create a shader-resource view for accessing data in a resource.
+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.
+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
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.
+Gets the feature level of the hardware device.
+The feature level (see
This method requires Windows Vista Service Pack 1.
+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.
+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.
+Get a reference to the device that created this interface.
+Address of a reference to a device (see
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.
+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
This method returns one of the following Direct3D 10 Return Codes.
The data stored in the device child is set with
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
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
Associate an
This method returns one of the following Direct3D 10 Return Codes.
When this method is called ::addref() will be called on the
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
Get or sets the number of milliseconds to sleep after Present is called.
+Value is set with
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
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 |
?
These feature-mask flags apply to the following rendering-operation methods:
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
Set the number of milliseconds to sleep after Present is called.
+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
Get the number of milliseconds to sleep after Present is called.
+Number of milliseconds to sleep after Present is called.
Value is set with
Set a swap chain that the runtime will use for automatically calling Present.
+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
Get the swap chain that the runtime will use for automatically calling Present.
+This method returns one of the following Direct3D 10 Return Codes.
The swap chain retrieved by this method will only be used if
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.
+An
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
+* pIUnknown = ( *)pEffect; pIUnknown->AddRef(); +
Test an effect to see if it contains valid syntax.
+Test an effect to see if it is part of a memory pool.
+Get the device that created the effect.
+An effect is created for a specific device, by calling a function such as
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.
+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
Test an effect to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
Test an effect to see if it is part of a memory pool.
+TRUE if the effect is pooled; otherwise
Get the device that created the effect.
+A reference to an
Returns one of the following Direct3D 10 Return Codes.
An effect is created for a specific device, by calling a function such as
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.
+Get a constant buffer by index.
+A zero-based index.
A reference to a
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.
+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.
+Get a variable by index.
+A zero-based index.
A reference to a
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
Get a variable by name.
+The variable name.
A reference to an
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
Get a variable by semantic.
+The semantic name.
A reference to the effect variable indicated by the Semantic. See
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
Get a technique by index.
+A zero-based index.
A reference to an
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.
+Get a technique by name.
+The name of the technique.
A reference to an
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.
+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
The following methods will fail after Optimize has been called on an effect.
Note that references retrieved with these methods before calling
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
The blend-variable interface accesses blend state.
+An
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.
+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
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.
+A depth-stencil-variable interface accesses depth-stencil state.
+An
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.
+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
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.
+A depth-stencil-view-variable interface accesses a depth-stencil view.
+Set a depth-stencil-view resource.
+A reference to a depth-stencil-view interface. See
Returns one of the following Direct3D 10 Return Codes.
Get a depth-stencil-view resource.
+The address of a reference to a depth-stencil-view interface. See
Set an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
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.
Set an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
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.
Set an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
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.
Get an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
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.
A matrix-variable interface accesses a matrix.
+Set a floating-point matrix.
+A reference to the first element in the matrix.
Returns one of the following Direct3D 10 Return Codes.
Get a matrix.
+A reference to the first element in a matrix.
Returns one of the following Direct3D 10 Return Codes.
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.
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.
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).
+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).
+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).
+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).
+A pass interface encapsulates state assignments within a technique.
The lifetime of an
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
Test a pass to see if it contains valid syntax.
+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.
+Get a vertex-shader description.
+An effect pass can contain render state assignments and shader object assignments.
+Get a geometry-shader description.
+An effect pass can contain render state assignments and shader object assignments.
+Get a pixel-shader description.
+An effect pass can contain render state assignments and shader object assignments.
+Test a pass to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
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.
+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.
+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.
+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.
+Get an annotation by index.
+A zero-based index.
A reference to an
Get an annotation by name.
+The name of the annotation.
A reference to an
Set the state contained in a pass to the device.
+Unused.
Returns one of the following Direct3D 10 Return Codes.
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.
Describes an effect pass, which contains pipeline state.
+Get a pass description by calling
A string that contains the name of the pass; otherwise
The number of annotations.
A reference to the input signature or the vertex shader; otherwise
The size of the input signature (in bytes).
The stencil-reference value used in the depth-stencil state (see Configuring Depth-Stencil Functionality (Direct3D 10)).
The sample mask for the blend state (see Configuring Blending Functionality (Direct3D 10)).
The per-component blend factors (RGBA) for the blend state (see Configuring Blending Functionality (Direct3D 10)).
Describes an effect variable that contains a shader.
+To get a shader description, call a method like
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.
A zero-based array index; otherwise 0.
A pool interface represents a common memory space (or pool) for sharing variables between effects.
+To create an effect pool, call a function like
Get the effect that created the effect pool.
+A reference to an
A rasterizer-variable interface accesses rasterizer state.
+An
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.
+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
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.
+A render-target-view interface accesses a render target.
+Set a render-target.
+A reference to a render-target-view interface. See
Returns one of the following Direct3D 10 Return Codes.
Get a render-target.
+The address of a reference to a render-target-view interface. See
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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
Get an array of render-targets.
+A reference to an array of render-target-view interfaces. See
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.
A sampler interface accesses sampler state.
+An
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.
+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
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.
An effect-scalar-variable interface accesses scalar values.
+Set a floating-point variable.
+A reference to the variable.
Returns one of the following Direct3D 10 Return Codes.
Get a floating-point variable.
+A reference to the variable.
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.
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.
Set an integer variable.
+A reference to the variable.
Returns one of the following Direct3D 10 Return Codes.
Get an integer variable.
+A reference to the variable.
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.
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.
Set a boolean variable.
+A reference to the variable.
Returns one of the following Direct3D 10 Return Codes.
Get a boolean variable.
+A reference to the variable.
Returns one of the following Direct3D 10 Return Codes.
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.
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.
Describes an effect shader.
+To get an effect-shader description, call
Passed into CreateInputLayout. Only valid on a vertex shader or geometry shader. See ID3D10Device_CreateInputLayout.
TRUE is the shader is defined inline; otherwise
A reference to the compiled shader.
The length of pBytecode.
A string that constains a declaration of the stream output from a geometry shader.
The number of entries in the input signature.
The number of entries in the output signature.
A shader-resource interface accesses a shader resource.
+Set a shader resource.
+The address of a reference to a shader-resource-view interface. See
Returns one of the following Direct3D 10 Return Codes.
Get a shader resource.
+The address of a reference to a shader-resource-view interface. See
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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
Get 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.
The number of elements in the array.
Returns one of the following Direct3D 10 Return Codes.
A string-variable interface accesses a string variable.
+Get the string.
+A reference to the string.
Returns one of the following Direct3D 10 Return Codes.
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.
The
The lifetime of an
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).
+Get type information.
+Get a description.
+Get a constant buffer.
+Effect variables are read-from or written-to a constant buffer.
+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).
+Get type information.
+A reference to an
Get a description.
+A reference to an effect-variable description (see
Returns one of the following Direct3D 10 Return Codes.
Get an annotation by index.
+A zero-based index.
A reference to an
Annonations can be attached to a technique, a pass or a gloval variable. For the syntax, see Annotation Syntax (Direct3D 10).
+Get an annotation by name.
+The annotation name.
A reference to an
Annonations can be attached to a technique, a pass or a gloval variable. For the syntax, see Annotation Syntax (Direct3D 10).
+Get a structure member by index.
+A zero-based index.
A reference to an
If the effect variable is an structure, use this method to look up a member by index.
+Get a structure member by name.
+Member name.
A reference to an
If the effect variable is an structure, use this method to look up a member by name.
+Get a structure member by semantic.
+The semantic.
A reference to an
If the effect variable is an structure, use this method to look up a member by attached semantic.
+Get an array element.
+A zero-based index; otherwise 0.
A reference to an
If the effect variable is an array, use this method to return one of the elements.
+Get a constant buffer.
+A reference to a
Effect variables are read-from or written-to a constant buffer.
+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.
+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.
+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.
+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.
+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.
+Get a render-target-view variable.
+A reference to a render-target-view variable. See
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.
+Get a depth-stencil-view variable.
+A reference to a depth-stencil-view variable. See
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.
+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.
+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.
+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.
+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.
+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.
+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.
+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.
+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.
+A vector-variable interface accesses a four-component vector.
+Set a four-component vector that contains boolean data.
+A reference to the first component.
Returns one of the following Direct3D 10 Return Codes.
Set a four-component vector that contains integer data.
+A reference to the first component.
Returns one of the following Direct3D 10 Return Codes.
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.
Get a four-component vector that contains boolean data.
+A reference to the first component.
Returns one of the following Direct3D 10 Return Codes.
Get a four-component vector that contains integer data.
+A reference to the first component.
Returns one of the following Direct3D 10 Return Codes.
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.
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.
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.
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.
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.
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.
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.
The
The
The LPD3DX10FONT type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DX10FONT; +
Retrieve the Direct3D device associated with the font object.
+Note??Calling this method will increase the internal reference count on the
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.
+Return a handle to a display device context (DC) that has the font set onto it.
+Retrieve the Direct3D device associated with the font object.
+Address of a reference to an
If the method succeeds, the return value is
Note??Calling this method will increase the internal reference count on the
Get a description of the current font object.
+Pointer to a
If the method succeeds, the return value is
This method describes Unicode font objects if UNICODE is defined. Otherwise GetDescA is called, which returns a reference to the D3DX10FONT_DESCA structure.
+Retrieve font characteristics.
+Pointer to a
Nonzero if the function is successful; otherwise 0.
Return a handle to a display device context (DC) that has the font set onto it.
+Handle to a display DC.
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
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
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;
This method internally converts characters to glyphs using the GDI function GetCharacterPlacement.
+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
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;
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
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;
This method internally converts characters to glyphs using the GDI function GetCharacterPlacement.
+Draw formatted text. This method supports ANSI and Unicode strings.
+Pointer to an
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
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
Pointer to a
Specify the method of formatting the text. It can be any combination of the following values:
Item | Description |
---|---|
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, |
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. |
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.
+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:
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
Bind a buffer as a vertex buffer to the input-assembler stage.
Bind a buffer as an index buffer to the input-assembler stage.
Bind a buffer as a constant buffer to a shader stage; this flag may NOT be combined with any other bind flag.
Bind a buffer or texture to a shader stage; this flag cannot be used with the
Bind an output buffer for the stream-output stage.
Bind a texture as a render target for the output-merger stage.
Bind a texture as a depth-stencil target for the output-merger stage.
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.
+Add source 1 and source 2.
Subtract source 1 from source 2.
Subtract source 2 from source 1.
Find the minimum of source 1 and source 2.
Find the maximum of source 1 and source 2.
Describes the blend state.
+To see how blending is done, see Output-Merger Stage (Direct3D 10).
These are the default values for blend state.
State | Default Value |
---|---|
AlphaToCoverageEnable | |
BlendEnable[8] | |
SrcBlend | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
RenderTargetWriteMask[8] |
?
+Determines whether or not to use alpha-to-coverage as a multisampling technique when setting a pixel to a rendertarget.
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.
This blend option specifies the first RGB data source and includes an optional pre-blend operation.
This blend option specifies the second RGB data source and includes an optional pre-blend operation.
This blend operation defines how to combine the RGB data sources.
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.
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.
This blend operation defines how to combine the alpha data sources.
A per-pixel write mask that allows control over which components can be written (see
These flags are used by functions which operate on one or more channels in a texture.
+Indicates the red channel should be used.
Indicates the blue channel should be used.
Indicates the green channel should be used.
Indicates the alpha channel should be used.
Indicates the luminaces of the red, green, and blue channels should be used.
Identify which components of each pixel of a render target are writable during blending.
+These flags can be combined with a bitwise OR.
+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
Never pass the comparison.
If the source data is less than the destination data, the comparison passes.
If the source data is equal to the destination data, the comparison passes.
If the source data is less than or equal to the destination data, the comparison passes.
If the source data is greater than the destination data, the comparison passes.
If the source data is not equal to the destination data, the comparison passes.
If the source data is greater than or equal to the destination data, the comparison passes.
Always pass the comparison.
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
A device can support one or more of these performance counters, but it is not required to support any of them.
+Percentage of the time that the GPU is idle.
Percentage of the time that the GPU does vertex processing.
Percentage of the time that the GPU does geometry processing.
Percentage of the time that the GPU does pixel processing.
Percentage of the time that the GPU does other processing (not vertex, geometry, or pixel processing).
Percentage of bandwidth used on a host adapter. Value returned by
Percentage of bandwidth used by the local video memory. Value returned by
Percentage of throughput used for vertices. Value returned by
Percentage of throughput used for triangle setup. Value returned by
Percentage of throughput used for the fillrate. Value returned by
Percentage of time that a vertex shader spends sampling resources.
Percentage of time that a vertex shader spends doing computations.
Percentage of time that a geometry shader spends sampling resources.
Percentage of time that a geometry shader spends doing computations.
Percentage of time that a pixel shader spends sampling resources.
Percentage of time that a pixel shader spends doing computations.
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.
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.
Start of the device-dependent counters. See remarks.
Data type of a performance counter.
+These flags are an output parameter in
32-bit floating point.
16-bit unsigned integer.
32-bit unsigned integer.
64-bit unsigned integer.
Specifies the types of CPU access allowed for a resource.
+This enumeration is used in
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.
+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
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
Indicates triangles facing a particular direction are not drawn.
+This enumeration is part of a rasterizer-state object description (see
Always draw all triangles.
Do not draw triangles that are front-facing.
Do not draw triangles that are back-facing.
Specifies the parts of the depth stencil to clear. Usually used with
These flags can be bitwise ORed together.
+Specifies how to access a resource used in a depth-stencil view.
+This enumeration is used in
Identify the portion of a depth-stencil buffer for writing depth data.
+Device creation flags.
+Device creation flags are used by
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
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.
Create a device that supports the debug layer.
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
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.
Return a
Causes device creation to fail if BGRA support is not available.
BGRA support enables the following formats.
Note that BGRA support may be present even if the application didn't specify
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.
Reserved. This flag is currently not supported. Do not use.
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.
The device-driver type.
+The device-driver type needs to be specified when the device is created (using
For information about limitations creating nonhardware-type devices on certain feature levels, see Limitations Creating WARP and Reference Devices.
+A hardware device; commonly called a HAL device.
A reference device; commonly called a REF device.
A
Reserved for later use.
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]).
Describes an effect variable.
+To get an effect-variable description, call
A string that contains the variable name.
The semantic attached to the variable; otherwise
Optional flags for effect variables.
The version of hardware acceleration requested.
+Use this enumeration when creating a device with
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.
+The hardware supports Direct3D 10.0 features.
The hardware supports Direct3D 10.1 features.
The hardware supports 9.1 feature level.
The hardware supports 9.2 feature level.
The hardware supports 9.3 feature level.
Determines the fill mode to use when rendering triangles.
+This enumeration is part of a rasterizer-state object description (see
Draw lines connecting the vertices. Adjacent vertices are not drawn.
Fill the triangles formed by the vertices. Adjacent vertices are not drawn.
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 Function | Texture 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.
+Use point sampling for minification, magnification, and mip-level sampling.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.
Use linear interpolation for minification, magnification, and mip-level sampling.
Use anisotropic interpolation for minification, magnification, and mip-level sampling.
Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
For use in pixel shaders with textures that have the R1_UNORM format.
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.
+No scaling or filtering will take place. Pixels outside the bounds of the source image are assumed to be transparent black.
Each destination pixel is computed by sampling the nearest pixel from the source image.
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.
Every pixel in the source image contributes equally to the destination image. This is the slowest of the filters.
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.
Pixels off the edge of the texture on the u-axis should be mirrored, not wrapped.
Pixels off the edge of the texture on the v-axis should be mirrored, not wrapped.
Pixels off the edge of the texture on the w-axis should be mirrored, not wrapped.
Specifying this flag is the same as specifying the D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V, and D3DX_FILTER_MIRROR_W flags.
The resulting image must be dithered using a 4x4 ordered dither algorithm. This happens when converting from one format to another.
Do diffuse dithering on the image when changing from one format to another.
Input data is in standard RGB (sRGB) color space. See remarks.
Output data is in standard RGB (sRGB) color space. See remarks.
Same as specifying D3DX_FILTER_SRGB_IN | D3DX_FILTER_SRGB_OUT. See remarks.
Types of magnification or minification sampler filters.
+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.
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.
Which resources are supported for a given format and given device (see
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. +
+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.
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.
Portable Network Graphics (PNG) file format. A non-proprietary bitmap format using lossless compression. The file extension for this format is .png.
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.
Tagged Image File Format (TIFF). The file extensions for this format are .tif and .tiff.
Graphics Interchange Format (GIF).The file extension for this format is .gif.
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,
Type of data contained in an input slot.
+Use these values to specify the type of data for a particular input element (see
Input data is per-vertex data.
Input data is per-instance data.
Specifies how the CPU should respond when Map is called on a resource being used by the GPU.
+This enumeration is used by
For more information about potential conflicts between the GPU and CPU during resource mapping, see Copying and Accessing Resource Data (Direct3D 10).
+Specifies that Map should return
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
These remarks are divided into the following topics:
Resource is mapped for reading. The resource must have been created with read access (see
Resource is mapped for writing. The resource must have been created with write access (see
Resource is mapped for reading and writing. The resource must have been created with read and write access (see
Resource is mapped for writing; the previous contents of the resource will be undefined. The resource must have been created with write access (see
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
Specifies which pieces of mesh data to discard from the device. Used with
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.
+The mesh has 32-bit indices instead of 16-bit indices. See Remarks.
Signals that the mesh contains geometry shader adjacency data.
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.
+Reorders faces to remove unused vertices and faces.
Reorders faces to optimize for fewer attribute bundle state changes and enhanced DrawSubset performance.
Reorders faces to increase the cache hit rate of vertex caches.
Reorders faces to maximize length of adjacent triangles.
Optimize the faces only; do not optimize the vertices.
While attribute sorting, do not split vertices that are shared between attribute groups.
Affects the vertex cache size. Using this flag specifies a default vertex cache size that works well on legacy hardware.
Categories of debug messages. This will identify the category of a message when retrieving a message with
This is part of the Information Queue feature. See
Debug messages for setting up an info-queue filter (see
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
Defines some type of corruption which has occurred.
Defines an error message.
Defines a warning message.
Defines an information message.
These flags are used to control how
Flags that describe miscellaneous query behavior.
+This flag is part of a query description (see
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
Query types.
+Determines whether or not the GPU is finished processing commands. When the GPU is finished processing commands GetData will return
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.
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
Determines whether or not a
Get pipeline statistics, such as the number of pixel shader invocations in between Begin and End. GetData will return a
Similar to
Get streaming output statistics, such as the number of primitives streamed out in between Begin and End. GetData will return a
Determines whether or not any of the streaming output buffers overflowed in between Begin and End. GetData returns a
Specifies how to access a resource used in a render-target view.
+This enumeration is used in
Identifies the type of resource being used.
+This enumeration is used in
Identifies other, less common options for resources.
+This enumeration is used in
These flags can be combined by bitwise OR.
Enables an application to call
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.
Enables an application to create a cube texture from a Texture2DArray that contains 6 textures.
Enables the resource created to be synchronized using the
If any of the listed functions are called with the
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.
Enables a surface to be used for GDI interoperability. Setting this flag enables rendering on the surface via
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:
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. |
?
+A resource that requires read and write access by the GPU. This is likely to be the most common usage choice.
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.
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.
A resource that supports data transfer (copy) from the GPU to the CPU.
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.
+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: Direct3D 11 has defined two standard quality levels: |
?
+The number of multisamples per pixel.
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.1 and Direct3D 11, you can use two special quality level values. For more information about these quality level values, see Remarks.
The stencil operations that can be performed during depth-stencil testing.
+Identify a technique for resolving texture coordinates that are outside of the boundaries of a texture.
+Tile the texture at every integer junction. For example, for u values between 0 and 3, the texture is repeated three times.
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.
Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in
Similar to
The different faces of a cube texture.
+Positive X face.
Negative X face.
Positive Y face.
Negative Y face.
Positive Z face.
Negative Z face.
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
Optional. Device creation flags (see
The version of hardware that is available for acceleration (see
Bit flag that indicates the version of the SDK. Should be
Description of the swap chain. See
Address of a reference to an
Address of a reference to an
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
Create a Direct3D 10.1 device that represents the display adapter.
+Pointer to the display adapter (see
The device-driver type (see
This is set to
Optional. Device creation flags (see
The version of hardware that is available for acceleration (see
Bit flag that indicates the version of the SDK. Should be
Address of a reference to the device created (see
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
+* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice);
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
Optional. Device creation flags (see
Bit flag that indicates the version of the SDK. Should be
Description of the swap chain. See
Address of a reference to an
Address of a reference to an
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
Create a Direct3D 10.0 device that represents the display adapter.
+Pointer to the display adapter (see
The device-driver type (see
Reserved. Set to
Optional. Device creation flags (see
Bit flag that indicates the version of the SDK. Should always be
Address of a reference to the device created (see
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
+* pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice);
Get the vertex shader profile best suited to a given device.
+The shader profile.
Get the pixel shader profile best suited to a given device.
+The shader profile.
Get the geometry shader profile best suited to a given device.
+The shader profile.
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
A reference to the
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).
+Creates an
A reference to a compiled effect.
Length of pData.
Effect compile options.
A reference to the device (see
Optional. A reference to an memory space for effect variables that are shared across effects (see
A reference to an
Returns one of the following Direct3D 10 Return Codes.
This method is used to create an
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
Address of a reference to the buffer created (see
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
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 |
?
+Compile an effect. +
Note??Use D3DX10CompileFromMemory instead of this function.
+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).
+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.
+If the function succeeds, the return value is
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.
+Creates a font object.
Note??Instead of using this function, we recommend that you use DirectWrite and the DirectXTK library, SpriteFont class.
+The return value is one of the values listed in Direct3D 10 Return Codes.
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.
+If the function succeeds, the return value is
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
Optional. Device creation flags (see
Description of the swap chain. See
Address of a reference to an
Address of a reference to an
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:
This method requires Windows Vista Service Pack 1.
+Verify that the version of D3DX you compiled with is the version that you are running.
+Use
Use D3DX10_SDK_VERSION. See remarks.
If the version doesn't match, the function will return
Use this function during the initialization of your application.
+hr; if( FAILED( ( , D3DX10_SDK_VERSION) ) ) return E_FAIL; +
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
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:
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.
+Get a Direct3D 10.1 device interface reference from a Direct3D 10.0 interface reference.
+Pointer to the Direct3D 10.0 device (see the
Pointer to the Direct3D 10.1 device (see the
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
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.
+Create a shader-resource view from a file.
+A reference to the device (see
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
Pointer to a thread-pump interface (see
Address of a reference to the shader-resource view (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
For a list of supported image formats, see
Save a texture to a file.
+Pointer to the texture to be saved. See
The format the texture will be saved as (see
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.
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
Information about the image in memory.
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
Retrieves information about a given image in a resource.
+Module where the resource is loaded. Set this parameter to
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
Pointer to a
A reference to the return value. May be
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
Create a texture resource from a file.
+A reference to the device (see
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
Optional. Identifies the characteristics of a texture (see
A reference to a thread pump interface (see
The address of a reference to the texture resource (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
For a list of supported image formats see
Save a texture to memory.
+Pointer to the texture to be saved. See
The format the texture will be saved as. See
Address of a reference to the memory containing the saved texture. See
Optional.
The return value is one of the values listed in Direct3D 10 Return Codes.
Create a shader-resource view from a resource.
+A reference to the device (see
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
A reference to a thread pump interface (see
Address of a reference to the shader-resource view (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
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.
Load a texture from a texture.
+Pointer to the source texture. See
Pointer to texture loading parameters. See
Pointer to the destination texture. See
The return value is one of the values listed in Direct3D 10 Return Codes.
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
Pointer to a
A reference to the return value. May be
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.
+Create a shader-resource view from a file in memory.
+A reference to the device (see
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
A reference to a thread pump interface (see
Address of a reference to the newly created shader resource view. See
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
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
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
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.
+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
The return value is one of the values listed in Direct3D 10 Return Codes.
Create a texture from another resource.
+A reference to the device (see
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
A reference to a thread pump interface (see
The address of a reference to the texture resource (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
For a list of supported image formats see
Create a texture resource from a file residing in system memory.
+A reference to the device (see
Pointer to the resource in system memory.
Size of the resource in system memory.
Optional. Identifies the characteristics of a texture (see
A reference to a thread pump interface (see
Address of a reference to the created resource. See
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
For a list of supported image formats see
Creates a mesh object using a declarator.
+Pointer to an
Array of
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
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.
Creates an empty skin mesh object using a declarator.
+Address of a reference to an
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be: E_OUTOFMEMORY.
Use the
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
A
A reference to an include interface (see ID3D10Include Interface). This parameter can be
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
A reference to a thread pump interface (see
The address of a reference to the effect pool (see
The address of a reference to memory (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
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
A reference to an include interface (see ID3D10Include Interface). This parameter can be
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
A reference to a thread pump interface (see
The address of a reference to the effect pool (see
The address of a reference to memory (see
A reference to the return value. May be
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 ); +
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
A reference to an include interface (see ID3D10Include Interface). This parameter can be
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
Pointer to an effect pool (see
A reference to a thread pump interface (see
Address of a reference to the effect (see
The address of a reference to memory (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
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
A reference to an include interface (see ID3D10Include Interface). This parameter can be
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
Pointer to an effect pool (see
A reference to a thread pump interface (see
Address of a reference to the effect (see
The address of a reference to memory (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
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
A reference to an include interface (see ID3D10Include Interface). This parameter can be
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
A reference to a thread pump interface (see
The address of a reference to the effect pool (see
The address of a reference to memory (see
A reference to the return value. May be
Returns one of the following Direct3D 10 Return Codes.
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
A
A reference to an include interface (see ID3D10Include Interface). This parameter can be
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
Pointer to an effect pool (see
A reference to a thread pump interface (see
Address of a reference to the effect (see
The address of a reference to memory (see
A reference to the return value. May be
The return value is one of the values listed in Direct3D 10 Return Codes.
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.
+Set a constant-buffer.
+A reference to a constant-buffer interface. See
Returns one of the following Direct3D 10 Return Codes.
Get a constant-buffer.
+The address of a reference to a constant-buffer interface. See
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.
Get a texture-buffer.
+The address of a reference to a shader-resource-view interface for accessing a texture buffer. See
A shader-variable interface accesses a shader variable.
+Get a shader description.
+A zero-based index.
A reference to a shader description (see
Get a vertex shader.
+A zero-based index.
A reference to a
Get a geometry shader.
+A zero-based index.
A reference to a
Get a pixel shader.
+A zero-based index.
A reference to a
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.
+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.
+An
The lifetime of an
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
Test a technique to see if it contains valid syntax.
+Get a technique description.
+Test a technique to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
Get a technique description.
+A reference to a technique description (see
Returns one of the following Direct3D 10 Return Codes.
Get an annotation by index.
+The zero-based index of the interface reference.
A reference to an
Use an annotation to attach a piece of metadata to a technique.
+Get an annotation by name.
+Name of the annotation.
A reference to an
Use an annotation to attach a piece of metadata to a technique.
+Get a pass by index.
+A zero-based index.
A reference to a
A technique contains one or more passes; get a pass using a name or an index.
+Get a pass by name.
+The name of the pass.
A reference to an
A technique contains one or more passes; get a pass using a name or an index.
+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.
Get an member type by name.
+Tests that the effect type is valid.
+Get an effect-type description.
+The effect-variable description contains data about the name, annotations, semantic, flags and buffer offset of the effect type.
+Tests that the effect type is valid.
+TRUE if it is valid; otherwise
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.
+Get a member type by index.
+A zero-based index.
A reference to an
Get an member type by name.
+A member's name.
A reference to an
Get a member type by semantic.
+A semantic.
A reference to an
Get the name of a member.
+A zero-based index.
The name of the member.
Get the semantic attached to a member.
+A zero-based index.
A string that contains the semantic.
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
This interface is defined in D3D10.h.
+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
Set the constant buffers used by the geometry shader pipeline stage.
+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.
+Set the constant buffers used by the geometry shader pipeline stage.
+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.
+Set the constant buffers used by the geometry shader pipeline stage.
+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.
+Set a geometry shader to the device.
+Pointer to a geometry shader (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.
+Bind an array of shader resources to the geometry shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Bind an array of shader resources to the geometry shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Bind an array of shader resources to the geometry shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Set an array of sampler states to the geometry shader pipeline stage.
+Any sampler may be set to
//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.
+Set an array of sampler states to the geometry shader pipeline stage.
+Any sampler may be set to
//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.
+Set an array of sampler states to the geometry shader pipeline stage.
+Any sampler may be set to
//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.
+Get the constant buffers used by the geometry 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.
+Get the geometry shader currently set on the device.
+Address of a reference to a geometry shader (see
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.
+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.
+Get an array of sampler states from the geometry 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.
+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
hr =+( null , g_driverType,null ,, , &sd, &g_pSwapChain, &g_pd3dDevice ); + ... + * infoQueue; + g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&infoQueue); +
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.
+Get the number of messages that were allowed to pass through a storage filter.
+Get the number of messages that were denied passage through a storage filter.
+Get the number of messages currently stored in the message queue.
+Get the number of messages that are able to pass through a retrieval filter.
+Get the number of messages that were discarded due to the message count limit.
+Get and set the message count limit with
Get the size of the storage-filter stack in bytes.
+Get the size of the retrieval-filter stack in bytes.
+Get or sets a boolean that turns the debug output on or off.
+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.
+Clear all messages from the message queue.
+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
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.
+Get the number of messages that were allowed to pass through a storage filter.
+Number of messages allowed by a storage filter.
Get the number of messages that were denied passage through a storage filter.
+Number of messages denied by a storage filter.
Get the number of messages currently stored in the message queue.
+Number of messages currently stored in the message queue.
Get the number of messages that are able to pass through a retrieval filter.
+Number of messages allowed by a retrieval filter.
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
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.
+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.
+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
This method returns one of the following Direct3D 10 Return Codes.
Remove a storage filter from the top of the storage-filter stack.
+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.
+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.
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.
Pop a storage filter from the top of the storage-filter stack.
+Get the size of the storage-filter stack in bytes.
+Size of the storage-filter stack in bytes.
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
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
This method returns one of the following Direct3D 10 Return Codes.
Remove a retrieval filter from the top of the retrieval-filter stack.
+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.
+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.
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.
Pop a retrieval filter from the top of the retrieval-filter stack.
+Get the size of the retrieval-filter stack in bytes.
+Size of the retrieval-filter stack in bytes.
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
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.
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.
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.
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.
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).
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).
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).
Set a boolean that turns the debug output on or off.
+Disable/Enable the debug output (TRUE to disable or mute 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.
+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).
An input-layout interface accesses the input data for the input-assembler stage.
+This interface is created by calling
Applications use the methods of the
To obtain the
Retrieves the number of faces in the mesh.
+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.
+Get the number of vertex buffers in the mesh.
+Retrieves the number of faces in the mesh.
+Returns the number of faces in the mesh.
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.
Get the number of vertex buffers in the mesh.
+The number of vertex buffers in the mesh.
Access the mesh's creation flags.
+The creation flags passed into the options parameter of
Access the vertex description passed into
The return value is one of the values listed in Direct3D 10 Return Codes.
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.
Retrieves the vertex buffer associated with the mesh.
+The vertex buffer to get. This is an index value.
The vertex buffer. See
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.
Retrieves the data in an index buffer.
+Address of a reference to a
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.
Access the mesh's attribute buffer.
+The attribute buffer. See
The return value is one of the values listed in Direct3D 10 Return Codes.
Sets the attribute table for a mesh and the number of entries stored in the table.
+Pointer to an array of
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
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
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.
+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.
+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.
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.
Access the mesh's adjacency buffer.
+The adjacency buffer. See
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.
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.
Removes mesh data from the device that has been committed to the device (with
The return value is one of the values listed in Direct3D 10 Return Codes.
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
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.
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
Address of a reference to an
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
This method is very similar to the
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.
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.
+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.
+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 0 | Faces 0 ~ 50 |
AttribID 1 | Faces 51 ~ 125 |
AttribID 2 | Faces 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
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);
Access the mesh's vertex buffer after it has been committed to the device with
Access the mesh's index buffer after it has been committed to the device with
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.
+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:
Get the size of the mesh buffer, in bytes.
+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. |
?
+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. |
?
+Get the size of the mesh buffer, in bytes.
+The size of the mesh buffer, in bytes.
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
This interface is defined in D3D10.h.
+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
Bind an array of shader resources to the pixel shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Bind an array of shader resources to the pixel shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Bind an array of shader resources to the pixel shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Sets a pixel shader to the device.
+Pointer to a pixel shader (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.
+Set an array of sampler states to the pixel shader pipeline stage.
+Any sampler may be set to
State | Default Value |
---|---|
Filter | |
AddressU | |
AddressV | |
AddressW | |
MipLODBias | 0 |
MaxAnisotropy | 1 |
ComparisonFunc | |
BorderColor[0] | 1.0f |
BorderColor[1] | 1.0f |
BorderColor[2] | 1.0f |
BorderColor[3] | 1.0f |
MinLOD | -FLT_MAX |
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.
+Set an array of sampler states to the pixel shader pipeline stage.
+Any sampler may be set to
State | Default Value |
---|---|
Filter | |
AddressU | |
AddressV | |
AddressW | |
MipLODBias | 0 |
MaxAnisotropy | 1 |
ComparisonFunc | |
BorderColor[0] | 1.0f |
BorderColor[1] | 1.0f |
BorderColor[2] | 1.0f |
BorderColor[3] | 1.0f |
MinLOD | -FLT_MAX |
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.
+Set an array of sampler states to the pixel shader pipeline stage.
+Any sampler may be set to
State | Default Value |
---|---|
Filter | |
AddressU | |
AddressV | |
AddressW | |
MipLODBias | 0 |
MaxAnisotropy | 1 |
ComparisonFunc | |
BorderColor[0] | 1.0f |
BorderColor[1] | 1.0f |
BorderColor[2] | 1.0f |
BorderColor[3] | 1.0f |
MinLOD | -FLT_MAX |
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.
+Set the constant buffers used by the pixel shader 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.
+Set the constant buffers used by the pixel shader 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.
+Set the constant buffers used by the pixel shader 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.
+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.
+Get the pixel shader currently set on the device.
+Address of a reference to a pixel shader (see
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.
+Get an array of sampler states from the pixel 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.
+Get the constant buffers used by the pixel 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.
+A predicate interface determines whether geometry should be processed depending on the results of a previous draw call.
+A predicate can be created 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.
+A query interface queries information from the GPU.
+A query can be created with
This interface inherits the functionality of an
Query data is typically gathered by issuing an
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.
+Get a query description.
+Get a query description.
+Pointer to a query description (see
A rasterizer-state interface accesses rasterizer state for the rasterizer stage.
+A rasterizer-state object is created with
Get the properties of a rasterizer-state object.
+Get the properties of a rasterizer-state object.
+Pointer to a rasterizer-state description (see
A render-target-view interface identifies the render-target subresources that can be accessed during rendering.
+To create a render-target view, 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.
+Get the properties of a render target view.
+Get the properties of a render target view.
+Pointer to the description of a render target view (see
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).
+Get the type of the resource.
+Get or sets the eviction priority of a resource.
+This method is a wrapper for GetEvictionPriority and is provided in the
Get the type of the resource.
+Pointer to the resource type (see
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,
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
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
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.
All resources must be bound to the pipeline before they can be accessed.
A view can also be used to access a typeless resource.
+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.
+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.
+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
Get the sampler state.
+Get the sampler state.
+A reference to the sampler state (see
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
Get the shader resource view's description.
+Get the shader resource view's description.
+A reference to a
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
This method requires Windows Vista Service Pack 1.
+Get the shader resource view's description.
+This method requires Windows Vista Service Pack 1.
+Get the shader resource view's description.
+A reference to a
This method requires Windows Vista Service Pack 1.
+Create a
The LPD3DX10SKININFO type is defined as a reference to the
typedef struct+*LPD3DX10SKININFO; +
Get the number of vertices in
Get the number of bones in
Get the number of vertices a bone can maximally influence.
+Get the number of vertices in
The number of vertices in
Get the number of bones in
The number of bones in
Get the number of vertices a bone can maximally influence.
+The number of vertices a bone can maximally influence.
Allocate space for additional vertices.
+The number of vertices to add.
If this method succeeds, the return value is
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
Allocate space for more bones.
+The number of bones to add.
If this method succeeds, the return value is
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
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
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
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
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
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
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
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.
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
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
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
If this value is
Pointer to a
The number of
If the method succeeds, the return value is
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); +
The
The
Get or sets the view transform that applies to all sprites.
+Get or sets the sprite projection matrix that is applied to all sprites.
+Retrieve the device associated with the sprite object.
+Calling this method will increase the internal reference count on the
Prepare a device for drawing sprites.
+Flags that control how the sprites will be drawn. See
If the method succeeds, the return value is
Every call to Begin must be matched with a call to
Add an array of sprites to the batch of sprites to be rendered. This must be called in between calls to
If the method succeeds, the return value is
Force all batched sprites to be submitted to the device. Device states remain as they were after the last call to
If the method succeeds, the return value is
Draw an array of sprites. This will immediately send the sprites to the device for rendering, which is different from
If the method succeeds, the return value is
Call this after
If the method succeeds, the return value is
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
Set the view transform that applies to all sprites.
+Pointer to a
If the method succeeds, the return value is
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.
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.
Retrieve the device associated with the sprite object.
+Address of a reference to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count on the
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.
+Get the device.
+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.
+Apply the state block to the current device state.
+Returns one of the following Direct3D 10 Return Codes.
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
Get the device.
+Pointer to the
Returns one of the following Direct3D 10 Return Codes.
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
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.
+Switch between a hardware and a software device.
+A boolean value. Set this to TRUE to change to a software device, set this to
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
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.
+Get a boolean value that indicates the type of device being used.
+TRUE if the device is a software device,
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.
+A 1D texture interface accesses texel data, which is structured memory.
+To create an empty 1D texture, call
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
Get the properties of the texture resource.
+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
Invalidate the reference to a resource that was retrieved by
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. |
?
+Get the properties of the texture resource.
+Pointer to a resource description (see
A 2D texture interface manages texel data, which is structured memory.
+To create an empty Texture2D resource, call
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
Get the properties of the texture resource.
+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 (
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
Invalidate the reference to the resource that was retrieved by
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. |
?
+Get the properties of the texture resource.
+Pointer to a resource description (see
A 3D texture interface accesses texel data, which is structured memory.
+To create an empty Texture3D resource, call
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
Get the properties of the texture resource.
+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 (
If this function succeeds, it returns
Invalidate the reference to the resource retrieved by
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. |
?
+Get the properties of the texture resource.
+Pointer to a resource description (see
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
This interface is defined in D3D10.h.
+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
Set the constant buffers used by the vertex shader 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.
+Set the constant buffers used by the vertex shader 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.
+Set the constant buffers used by the vertex shader 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.
+Set a vertex shader to the device.
+Pointer to a vertex shader (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.
+Bind an array of shader resources to the vertex shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Bind an array of shader resources to the vertex shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Bind an array of shader resources to the vertex shader stage.
+If you bind a subresource as an input and an output, this API will fill the destination shader resource slot with
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.
+Set an array of sampler states to the vertex shader pipeline stage.
+Any sampler may be set to
//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.
+Set an array of sampler states to the vertex shader pipeline stage.
+Any sampler may be set to
//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.
+Set an array of sampler states to the vertex shader pipeline stage.
+Any sampler may be set to
//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.
+Get the constant buffers used by the vertex 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.
+Get the vertex shader currently set on the device.
+Address of a reference to a vertex shader (see
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.
+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.
+Get an array of sampler states from the vertex 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.
+Describes the blend state.
+To see how blending is done, see Output-Merger Stage (Direct3D 10).
These are the default values for blend state.
State | Default Value |
---|---|
AlphaToCoverageEnable | |
BlendEnable[8] | |
SrcBlend | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
RenderTargetWriteMask[8] |
?
+Determines whether or not to use alpha-to-coverage as a multisampling technique when setting a pixel to a rendertarget.
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.
This blend option specifies the first RGB data source and includes an optional pre-blend operation.
This blend option specifies the second RGB data source and includes an optional pre-blend operation.
This blend operation defines how to combine the RGB data sources.
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.
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.
This blend operation defines how to combine the alpha data sources.
A per-pixel write mask that allows control over which components can be written (see
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.
State | Default 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
Determines whether or not to use the alpha-to-coverage multisampling technique when setting a render-target pixel.
Set to TRUE to enable independent blending in simultaneous render targets. If set to
An array of render-target-blend descriptions (see
Information about the video card's performance counter capabilities.
+This structure is returned by
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
Number of counters that can be simultaneously supported.
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
Describes a counter.
+Type of counter (see
Reserved.
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
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
A Boolean value that enables depth testing. The default value is TRUE.
A member of the
A member of the
A Boolean value that enables stencil testing. The default value is
A value that identifies a portion of the depth-stencil buffer for reading stencil data. The default value is D3D10_DEFAULT_STENCIL_READ_MASK.
A value that identifies a portion of the depth-stencil buffer for writing stencil data. The default value is D3D10_DEFAULT_STENCIL_WRITE_MASK.
A
A
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
A depth-stencil-view description is needed when calling
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
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
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
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
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
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.
+Describes an effect.
+To get an effect description, call
TRUE if the effect is a child effect; otherwise
The number of constant buffers.
The number of constant buffers shared in an effect pool.
The number of global variables.
The number of global variables shared in an effect pool.
The number of techniques.
Describes an effect technique.
+To get a technique, call
A string that contains the technique name; otherwise
The number of passes in the technique.
The number of annotations.
Describes an effect-variable type.
+To get an effect-variable type, call
A string that contains the variable name.
The variable class (see D3D10_SHADER_VARIABLE_CLASS).
The variable type (see D3D10_SHADER_VARIABLE_TYPE).
The number of elements if the variable is an array; otherwise 0.
The number of members if the variable is a structure; otherwise 0.
The number of rows if the variable is a matrix; otherwise 0.
The number of columns if the variable is a matrix; otherwise 0.
The number of bytes that the variable consumes when it is packed tightly by the compiler.
The number of bytes that the variable consumes before it is packed by the compiler.
The number of bytes between elements.
Describes an effect variable.
+To get an effect-variable description, call
A string that contains the variable name.
The semantic attached to the variable; otherwise
Optional flags for effect variables.
The number of annotations; otherwise 0.
The offset between the beginning of the constant buffer and this variable; otherwise 0.
The register that this variable is bound to. To bind a variable explicitly use the
Defines font attributes.
+The compiler setting also determines the structure type. If Unicode is defined, the
Possible values of the above members are given in the GDI
Height, in logical units, of the font's character cell or character.
Width, in logical units, of characters in the font.
Weight of the font in the range from 0 through 1000.
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.
Set to TRUE for an Italic font.
Character set.
Output precision. The output precision defines how closely the output must match the requested font height, width, character orientation, escapement, pitch, and font type.
Output quality.
Pitch and family of the font.
A
Returns a description of the original contents of an image file.
+Width of original image in pixels.
Height of original image in pixels.
Depth of original image in pixels.
Size of the texture array. ArraySize will be 1 for a single image.
Number of mipmap levels in original image.
Miscellaneous resource properties (see
A value from the
Represents the type of the texture stored in the file. See
Represents the format of the image file. See
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:
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.
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.
The depth of the texture. This only applies to volume textures.
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.
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.
The way the texture resource is intended to be used. See
The pipeline stages that the texture will be allowed to bind to. See
The access permissions the cpu will have for the texture resource. See
Miscellaneous resource properties (see
The format the texture will be in after it is loaded. See
Filter the texture using the specified filter (only when resampling). See
Filter the texture mip levels using the specified filter (only if generating mipmaps). Valid values are
Information about the original image. See
Allow or deny certain types of messages to pass through a filter.
+Number of message categories to allow or deny.
Array of message categories to allow or deny. Array must have at least NumCategories members (see
Allow or deny certain types of messages to pass through a filter.
+Number of message categories to allow or deny.
Array of message categories to allow or deny. Array must have at least NumCategories members (see
Number of message severity levels to allow or deny.
Array of message severity levels to allow or deny. Array must have at least NumSeverities members (see
Number of message IDs to allow or deny.
Array of message IDs to allow or deny. Array must have at least NumIDs members (see
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
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; ++
Attribute table identifier.
Starting face.
Face count.
Starting vertex.
Vertex count.
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; ++
Position.
Blend weight.
Normal.
Diffuse lighting value.
Specular lighting value.
Eight texture coordinates.
Tangent.
Binormal.
Categories of debug messages. This will identify the category of a message when retrieving a message with
This is part of the Information Queue feature. See
Query information about graphics-pipeline activity in between calls to
Query information about the reliability of a timestamp query.
+For a list of query types see
How frequently the GPU counter increments in Hz.
If this is TRUE, something occurred in between the query's
Describes a query.
+Type of query (see
Miscellaneous flags (see
Describes the rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
---|---|---|
Aliased | ||
Alpha antialiased | TRUE | |
Quadrilateral | TRUE | |
Quadrilateral | TRUE | TRUE |
?
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.
+A member of the
A member of the
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
Specifies the depth value added to a given pixel. The default value is 0. For info about depth bias, see Depth Bias.
Specifies the maximum depth bias of a pixel. The default value is 0.0f. For info about depth bias, see Depth Bias.
Specifies a scalar on a given pixel's slope. The default value is 0.0f. For info about depth bias, see Depth Bias.
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
Enable or disables scissor-rectangle culling. All pixels outside an active scissor rectangle are culled. The default value is
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. The default value is
Specifies whether to enable line antialiasing; only applies when alpha blending is enabled, you are drawing lines, and the MultisampleEnable member is
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.
State | Default Value |
---|---|
BlendEnable | |
SrcBlend | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
RenderTargetWriteMask |
?
+Enable (or disable) blending.
This blend option specifies the first RGB data source and includes an optional pre-blend operation.
This blend option specifies the second RGB data source and includes an optional pre-blend operation.
This blend operation defines how to combine the RGB data sources.
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.
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.
This blend operation defines how to combine the alpha data sources.
A write mask.
Specifies the subresource(s) from a resource that are accessible using a render-target view.
+A render-target-view description is passed into
A render-target-view cannot use the following formats:
If the format is set to
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
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
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
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
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
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
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
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
Defines a 3D box.
+The following diagram shows a 3D box, where the origin is the left, front, top corner.
+The x position of the left hand side of the box.
The y position of the top of the box.
The z position of the front of the box.
The x position of the right hand side of the box.
The y position of the bottom of the box.
The z position of the back of the box.
Describes a sampler state.
+These are the default values for sampler state.
State | Default Value |
---|---|
Filter | Min_Mag_Mip_Point |
AddressU | Clamp |
AddressV | Clamp |
AddressW | Clamp |
MinLOD | 0.0f |
MaxLOD | 3.402823466e+38F (FLT_MAX) |
MipMapLODBias | 0.0f |
MaxAnisotropy | 16 |
ComparisonFunc | Never |
BorderColor | float4(0.0f, 0.0f, 0.0f, 0.0f) |
Texture | N/A |
?
+Filtering method to use when sampling a texture (see
Method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see
Method to use for resolving a v texture coordinate that is outside the 0 to 1 range.
Method to use for resolving a w texture coordinate that is outside the 0 to 1 range.
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.
Clamping value used if
A function that compares sampled data against existing sampled data. The function options are listed in
Border color to use if
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.
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.
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.
+The name of the buffer.
The intended use of the constant data. See D3D10_CBUFFER_TYPE.
The number of unique variables.
Buffer size (in bytes).
Shader buffer properties. See D3D10_SHADER_CBUFFER_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
Get a shader-signature from a shader or an effect by calling APIs such as ID3D10ShaderReflection::GetInputParameterDesc or
A per-parameter string that identifies how the data will be used. See Semantics (DirectX HLSL).
Semantic index that modifies the semantic. Used to differentiate different parameters that use the same semantic.
The register that will contain this variable's data.
A predefined string that determines the functionality of certain pipeline stages. See D3D10_NAME.
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.
Mask which indicates which components of a register are used.
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.
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
Create a shader-resource-view description by calling
Specifies the elements in a buffer resource to use in a shader-resource view.
+The
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
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
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
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
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
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
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
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
The viewing format. See remarks.
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.
View the resource as a buffer using information from a shader-resource view (see
View the resource as a 1D texture using information from a shader-resource view (see
View the resource as a 1D-texture array using information from a shader-resource view (see
View the resource as a 2D-texture using information from a shader-resource view (see
View the resource as a 2D-texture array using information from a shader-resource view (see
View the resource as a 2D-multisampled texture using information from a shader-resource view (see
View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see
View the resource as a 3D texture using information from a shader-resource view (see
View the resource as a 3D-cube texture using information from a shader-resource view (see
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
Create a shader-resource-view description by calling
This structure requires Windows Vista Service Pack 1.
+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.
+The viewing format. See remarks.
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.
View the resource as a buffer using information from a shader-resource view (see
View the resource as a 1D texture using information from a shader-resource view (see
View the resource as a 1D-texture array using information from a shader-resource view (see
View the resource as a 2D-texture using information from a shader-resource view (see
View the resource as a 2D-texture array using information from a shader-resource view (see
View the resource as a 2D-multisampled texture using information from a shader-resource view (see
View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see
View the resource as a 3D texture using information from a shader-resource view (see
View the resource as a 3D-cube texture using information from a shader-resource view (see
View the resource as an array of cube textures using information from a shader-resource view (see
The member of the vertex decl to do the software skinning on. This is used with the
Defines position, texture, and color information about a sprite.
+The sprite's model-world transformation. This defines the position and orientation of the sprite in world space.
Offset from the upper-left corner of the texture indicating where the sprite image should start in the texture. TexCoord is in texture coordinates.
A vector containing the width and height of the sprite in texture coordinates.
A color that will be multiplied with the pixel color before rendering.
Pointer to a shader-resource view representing the sprite's texture. See
The index of the texture. If pTexture does not represent a texture array, then this should be 0.
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
Boolean value indicating whether to save the vertex shader state.
Array of vertex-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of vertex-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of vertex-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.
Boolean value indicating whether to save the geometry shader state.
Array of geometry-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of geometry-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of geometry-shader constant buffers. The array is a multi-byte bitmask where each bit represents one buffer slot.
Boolean value indicating whether to save the pixel shader state.
Array of pixel-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of pixel-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of pixel-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.
Array of vertex buffers. The array is a multi-byte bitmask where each bit represents one resource slot.
Boolean value indicating whether to save the index buffer state.
Boolean value indicating whether to save the input layout state.
Boolean value indicating whether to save the primitive topology state.
Boolean value indicating whether to save the render targets states.
Boolean value indicating whether to save the depth-stencil state.
Boolean value indicating whether to save the blend state.
Boolean value indicating whether to save the viewports states.
Boolean value indicating whether to save the scissor rectangles states.
Boolean value indicating whether to save the rasterizer state.
Boolean value indicating whether to save the stream-out buffers states.
Boolean value indicating whether to save the predication state.
Description of a vertex element in a vertex buffer in an output slot.
+Type of output element. Possible values: "POSITION", "NORMAL", or "TEXCOORD0".
Output element's zero-based index. Should be used if, for example, you have more than one texture coordinate stored in each vertex.
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.
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.
The output slot that contains the vertex buffer that contains this output entry.
Query information about the amount of data streamed out to the stream-output buffers in between
Describes a 1D texture.
+This structure is used in a call to
Describes a 2D texture.
+This structure is used in a call to
The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.
+Describes a 3D texture.
+This structure is used in a call to
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.
+Describes parameters used to load a texture from another texture.
+This structure is used in a call to
Source texture box (see
Destination texture box (see
Source texture mipmap level, see D3D10CalcSubresource for more detail.
Destination texture mipmap level, see D3D10CalcSubresource for more detail.
Number of mipmap levels in the source texture.
First element of the source texture.
First element of the destination texture.
Number of elements to load.
Filtering options during resampling (see
Filtering options when generating mip levels (see
Creates an effect from a binary effect or file.
+Blob of compiled effect data.
Length of the data blob.
No effect flags exist. Set to zero.
Pointer to the
Address of the newly created
The return value is one of the values listed in Direct3D 11 Return Codes.
Note??You must use Effects 11 source to build your effects-type application. For more info about using Effects 11 source, see Differences Between Effects 10 and Effects 11.
+An
An effect is created by calling D3DX11CreateEffectFromMemory.
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.
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.?Note??If you call QueryInterface on an
? +* pIUnknown = ( *)pEffect; pIUnknown->AddRef(); +
Test an effect to see if it contains valid syntax.
+Get the device that created the effect.
+An effect is created for a specific device, by calling a function such as D3DX11CreateEffectFromMemory.
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.? +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.
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.? +Gets a class linkage interface.
+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
Test an effect to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
Get the device that created the effect.
+A reference to an
Returns one of the following Direct3D 11 Return Codes.
An effect is created for a specific device, by calling a function such as D3DX11CreateEffectFromMemory.
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.? +Get an effect description.
+A reference to an effect description (see
Returns one of the following Direct3D 11 Return Codes.
An effect description contains basic information about an effect such as the techniques it contains and the constant buffer resources it requires.
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.? +Get a constant buffer by index.
+A zero-based index.
A reference to a
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.
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.? +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.
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.? +Get a variable by index.
+A zero-based index.
A reference to a
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
Get a variable by name.
+The variable name.
A reference to an
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 whether or not a variable is found.
Get a variable by semantic.
+The semantic name.
A reference to the effect variable indicated by the Semantic. See
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
Gets an effect group by index.
+Index of the effect group.
A reference to an
Gets an effect group by name.
+Name of the effect group.
A reference to an
Get a technique by index.
+A zero-based index.
A reference to an
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.
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.? +Get a technique by name.
+The name of the technique.
A reference to an
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.
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.? +Gets a class linkage interface.
+Returns a reference to an
Creates a copy of an effect interface.
+Flags affecting the creation of the cloned effect. Can be 0 or one of the following values.
Flag | Description |
---|---|
D3DX11_EFFECT_CLONE_FORCE_NONSINGLE | Ignore all "single" qualifiers on cbuffers. All cbuffers will have their own |
?
Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Minimize the amount of memory required for an effect.
+Returns one of the following Direct3D 11 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
The following methods will fail after Optimize has been called on an effect.
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
The blend-variable interface accesses blend state.
+An
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.
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.? +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
Returns one of the following Direct3D 11 Return Codes.
Sets an effect's blend-state.
+Index into an array of blend-state interfaces. If there is only one blend-state interface, use 0.
A reference to an
Returns one of the following Direct3D 11 Return Codes.
Reverts a previously set blend-state.
+Index into an array of blend-state interfaces. If there is only one blend-state interface, use 0.
Returns one of the following Direct3D 11 Return Codes.
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 11 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.
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.? +A depth-stencil-variable interface accesses depth-stencil state.
+An
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.
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.? +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
Returns one of the following Direct3D 11 Return Codes.
Sets the depth stencil state.
+Index into an array of depth-stencil interfaces. If there is only one depth-stencil interface, use 0.
Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Reverts a previously set depth stencil state.
+Index into an array of depth-stencil interfaces. If there is only one depth-stencil interface, use 0.
Returns one of the following Direct3D 11 Return Codes.
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
Returns one of the following Direct3D 11 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.
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.? +A depth-stencil-view-variable interface accesses a depth-stencil view.
+Set a depth-stencil-view resource.
+A reference to a depth-stencil-view interface. See
Returns one of the following Direct3D 11 Return Codes.
Get a depth-stencil-view resource.
+The address of a reference to a depth-stencil-view interface. See
Set an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
The zero-based array index to set the first interface.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Set an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
The zero-based array index to set the first interface.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Set an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
The zero-based array index to set the first interface.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Get an array of depth-stencil-view resources.
+A reference to an array of depth-stencil-view interfaces. See
The zero-based array index to get the first interface.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
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).
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.? +Set a floating-point matrix.
+A reference to the first element in the matrix.
Returns one of the following Direct3D 11 Return Codes.
Get a matrix.
+A reference to the first element in a matrix.
Returns one of the following Direct3D 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
Transpose and set a floating-point matrix.
+A reference to the first element of a matrix.
Returns one of the following Direct3D 11 Return Codes.
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.? +Transpose and get a floating-point matrix.
+A reference to the first element of a transposed matrix.
Returns one of the following Direct3D 11 Return Codes.
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.? +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 11 Return Codes.
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.? +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 11 Return Codes.
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.? +An
The lifetime of an
A pass is a block of code that sets render-state objects and shaders. A pass is declared within a technique.
To get an effect-pass interface, call a method like
Test a pass to see if it contains valid syntax.
+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.
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.? +Get a vertex-shader description.
+An effect pass can contain render state assignments and shader object assignments.
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.? +Get a geometry-shader description.
+An effect pass can contain render state assignments and shader object assignments.
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.? +Get a pixel-shader description.
+An effect pass can contain render state assignments and shader object assignments.
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.? +Get hull-shader description.
+Get a domain-shader description.
+Get a compute-shader description.
+Test a pass to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
Get a pass description.
+A reference to a pass description (see
Returns one of the following Direct3D 11 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.
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.? +Get a vertex-shader description.
+A reference to a vertex-shader description (see
Returns one of the following Direct3D 11 Return Codes.
An effect pass can contain render state assignments and shader object assignments.
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.? +Get a geometry-shader description.
+A reference to a geometry-shader description (see
Returns one of the following Direct3D 11 Return Codes.
An effect pass can contain render state assignments and shader object assignments.
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.? +Get a pixel-shader description.
+A reference to a pixel-shader description (see
Returns one of the following Direct3D 11 Return Codes.
An effect pass can contain render state assignments and shader object assignments.
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.? +Get hull-shader description.
+A reference to a hull-shader description (see
Returns one of the following Direct3D 11 Return Codes.
Get a domain-shader description.
+A reference to a domain-shader description (see
Returns one of the following Direct3D 11 Return Codes.
Get a compute-shader description.
+A reference to a compute-shader description (see
Returns one of the following Direct3D 11 Return Codes.
Get an annotation by index.
+A zero-based index.
A reference to an
Get an annotation by name.
+The name of the annotation.
A reference to an
Set the state contained in a pass to the device.
+Unused.
The
Returns one of the following Direct3D 11 Return Codes.
Generate a mask for allowing/preventing state changes.
+A reference to a state-block mask (see
Returns one of the following Direct3D 11 Return Codes.
Describes an effect pass, which contains pipeline state.
+Name of this pass (
Number of annotations on this pass.
Signature from the vertex shader or geometry shader (if there is no vertex shader) or
Singature size in bytes.
The stencil-reference value used in the depth-stencil state.
The sample mask for the blend state.
The per-component blend factors (RGBA) for the blend state.
Describes an effect pass.
+If this is an inline shader assignment, the returned interface will be an anonymous shader variable, which is not retrievable any other way. It's name in the variable description will be "$Anonymous". If there is no assignment of this type in the pass block, pShaderVariable !=
The variable that this shader came from.
The element of pShaderVariable (if an array) or 0 if not applicable.
Reverts a previously set rasterizer state.
+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
Returns one of the following Direct3D 11 Return Codes.
Sets the rasterizer state.
+Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0.
Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Reverts a previously set rasterizer state.
+Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0.
Returns one of the following Direct3D 11 Return Codes.
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 11 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.
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.? +Set a render-target.
+Set a render-target.
+A reference to a render-target-view interface. See
Returns one of the following Direct3D 11 Return Codes.
Get a render-target.
+The address of a reference to a render-target-view interface. See
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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Get an array of render-targets.
+A reference to an array of render-target-view interfaces. See
The zero-based array index to get the first interface.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
A sampler interface accesses sampler state.
+An
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.
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.? +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
Set sampler state.
+Index into an array of sampler interfaces. If there is only one sampler interface, use 0.
Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Revert a previously set sampler state.
+Index into an array of sampler interfaces. If there is only one sampler interface, use 0.
Returns one of the following Direct3D 11 Return Codes.
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 11 Return Codes.
Set an array of boolean variables.
+Set a floating-point variable.
+A reference to the variable.
Returns one of the following Direct3D 11 Return Codes.
Get a floating-point variable.
+A reference to the variable.
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 11 Return Codes.
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 11 Return Codes.
Set an integer variable.
+A reference to the variable.
Returns one of the following Direct3D 11 Return Codes.
Get an integer variable.
+A reference to the variable.
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 11 Return Codes.
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 11 Return Codes.
Set a boolean variable.
+A reference to the variable.
Returns one of the following Direct3D 11 Return Codes.
Get a boolean variable.
+A reference to the variable.
Returns one of the following Direct3D 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
Describes an effect shader.
+Passed into CreateInputLayout. Only valid on a vertex shader or geometry shader. See
TRUE is the shader is defined inline; otherwise
Shader bytecode.
The length of pBytecode.
Stream out declaration string (for geometry shader with SO).
Indicates which stream is rasterized. D3D11 geometry shaders can output up to four streams of data, one of which can be rasterized.
Number of entries in the input signature.
Number of entries in the output signature.
Number of entries in the patch constant signature.
Set a shader resource.
+Set a shader resource.
+The address of a reference to a shader-resource-view interface. See
Returns one of the following Direct3D 11 Return Codes.
Get a shader resource.
+The address of a reference to a shader-resource-view interface. See
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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Get 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.
The number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
A string-variable interface accesses a string variable.
+Get the string.
+A reference to the string.
Returns one of the following Direct3D 11 Return Codes.
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 11 Return Codes.
Accesses an unordered access view.
+Set an unordered-access-view.
+Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Get an unordered-access-view.
+Pointer to an
Set an array of unordered-access-views.
+An array of
Index of the first unordered-access-view.
Number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Set an array of unordered-access-views.
+An array of
Index of the first unordered-access-view.
Number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Set an array of unordered-access-views.
+An array of
Index of the first unordered-access-view.
Number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
Get an array of unordered-access-views.
+Pointer to an
Index of the first interface.
Number of elements in the array.
Returns one of the following Direct3D 11 Return Codes.
The
The lifetime of an
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).
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.? +Get type information.
+Get a description.
+Get a constant buffer.
+Effect variables are read-from or written-to a constant buffer.
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.? +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).
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.? +Get type information.
+A reference to an
Get a description.
+A reference to an effect-variable description (see
Returns one of the following Direct3D 11 Return Codes.
Get an annotation by index.
+A zero-based index.
A reference to an
Annonations can be attached to a technique, a pass, or a global variable.
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.? +Get an annotation by name.
+The annotation name.
A reference to an
Annonations can be attached to a technique, a pass, or a global variable.
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.? +Get a structure member by index.
+A zero-based index.
A reference to an
If the effect variable is an structure, use this method to look up a member by index.
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.? +Get a structure member by name.
+Member name.
A reference to an
If the effect variable is an structure, use this method to look up a member by name.
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.? +Get a structure member by semantic.
+The semantic.
A reference to an
If the effect variable is an structure, use this method to look up a member by attached semantic.
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.? +Get an array element.
+A zero-based index; otherwise 0.
A reference to an
If the effect variable is an array, use this method to return one of the elements.
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.? +Get a constant buffer.
+A reference to a
Effect variables are read-from or written-to a constant buffer.
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.? +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.
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.? +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.
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.? +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.
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.? +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.
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.? +Get a class-instance variable.
+A reference to class-instance variable. See
Get an interface variable.
+A reference to an interface variable. See
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.
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.? +Get an unordered-access-view variable.
+A reference to an unordered-access-view variable. See
Get a render-target-view variable.
+A reference to a render-target-view variable. See
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.
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.? +Get a depth-stencil-view variable.
+A reference to a depth-stencil-view variable. See
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.
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.? +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.
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.? +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.
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.? +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.
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.? +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.
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.? +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.
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.? +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.
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.? +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 11 Return Codes.
This method does no conversion or type checking; it is therefore a very quick way to access array items.
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.? +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 11 Return Codes.
This method does no conversion or type checking; it is therefore a very quick way to access array items.
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.? +A vector-variable interface accesses a four-component vector.
+Set a four-component vector that contains boolean data.
+A reference to the first component.
Returns one of the following Direct3D 11 Return Codes.
Set a four-component vector that contains integer data.
+A reference to the first component.
Returns one of the following Direct3D 11 Return Codes.
Set a four-component vector that contains floating-point data.
+A reference to the first component.
Returns one of the following Direct3D 11 Return Codes.
Get a four-component vector that contains boolean data.
+A reference to the first component.
Returns one of the following Direct3D 11 Return Codes.
Get a four-component vector that contains integer data.
+A reference to the first component.
Returns one of the following Direct3D 11 Return Codes.
Get a four-component vector that contains floating-point data.
+A reference to the first component.
Returns one of the following Direct3D 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
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 11 Return Codes.
Gets a class instance.
+Gets a class instance.
+Gets a class instance.
+Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Reverts a previously set texture buffer.
+Set a constant-buffer.
+A reference to a constant-buffer interface. See
Returns one of the following Direct3D 11 Return Codes.
Reverts a previously set constant buffer.
+Returns one of the following Direct3D 11 Return Codes.
Get a constant-buffer.
+The address of a reference to a constant-buffer interface. See
Set a texture-buffer.
+A reference to a shader-resource-view interface for accessing a texture buffer.
Returns one of the following Direct3D 11 Return Codes.
Reverts a previously set texture buffer.
+Returns one of the following Direct3D 11 Return Codes.
Get a texture-buffer.
+The address of a reference to a shader-resource-view interface for accessing a texture buffer. See
The
The lifetime of an
To get an
Test an effect to see if it contains valid syntax.
+Gets a group description.
+Test an effect to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
Gets a group description.
+A reference to a
Returns one of the following Direct3D 11 Return Codes.
Get an annotation by index.
+Index of the annotation.
Pointer to an
Get an annotation by name.
+The name of the annotation.
A reference to an
Get a technique by index.
+A zero-based index.
A reference to an
Get a technique by name.
+The name of the technique.
A reference to an
Accesses an interface variable.
+Get or sets a class instance.
+Sets a class instance.
+Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Get a class instance.
+Pointer to an
Returns one of the following Direct3D 11 Return Codes.
A shader-variable interface accesses a shader variable.
+Get a shader description.
+A zero-based index.
A reference to a shader description (see
Get a vertex shader.
+A zero-based index.
A reference to an
Get a geometry shader.
+A zero-based index.
A reference to an
Get a pixel shader.
+A zero-based index.
A reference to an
Get a hull shader.
+Index of the shader.
A reference to an
Returns one of the following Direct3D 11 Return Codes.
Get a domain shader.
+Index of the domain shader.
Pointer to an
Returns one of the following Direct3D 11 Return Codes.
Get a compute shader.
+Index of the compute shader.
Pointer to an
Returns one of the following Direct3D 11 Return Codes.
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.
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.? +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.
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.? +Get a patch constant signature description.
+A zero-based shader index.
A zero-based element index.
A reference to a parameter description (see
Returns one of the following Direct3D 11 Return Codes.
An
The lifetime of an
An effect contains one or more techniques; each technique contains one or more passes; each pass contains state assignments.
To get an effect-technique interface, call a method such as
Test a technique to see if it contains valid syntax.
+Get a technique description.
+Test a technique to see if it contains valid syntax.
+TRUE if the code syntax is valid; otherwise
Get a technique description.
+A reference to a technique description (see
Returns one of the following Direct3D 11 Return Codes.
Get an annotation by index.
+The zero-based index of the interface reference.
A reference to an
Use an annotation to attach a piece of metadata to a technique.
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.? +Get an annotation by name.
+Name of the annotation.
A reference to an
Use an annotation to attach a piece of metadata to a technique.
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.? +Get a pass by index.
+A zero-based index.
A reference to a
A technique contains one or more passes; get a pass using a name or an index.
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.? +Get a pass by name.
+The name of the pass.
A reference to an
A technique contains one or more passes; get a pass using a name or an index.
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.? +Compute a state-block mask to allow/prevent state changes.
+A reference to a state-block mask (see
Returns one of the following Direct3D 11 Return Codes.
Get the semantic attached to a member.
+Tests that the effect type is valid.
+Get an effect-type description.
+The effect-variable description contains data about the name, annotations, semantic, flags and buffer offset of the effect type.
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.? +Tests that the effect type is valid.
+TRUE if it is valid; otherwise
Get an effect-type description.
+A reference to an effect-type description. See
Returns one of the following Direct3D 11 Return Codes.
The effect-variable description contains data about the name, annotations, semantic, flags and buffer offset of the effect type.
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.? +Get a member type by index.
+A zero-based index.
A reference to an
Get an member type by name.
+A member's name.
A reference to an
Get a member type by semantic.
+A semantic.
A reference to an
Get the name of a member.
+A zero-based index.
The name of the member.
Get the semantic attached to a member.
+A zero-based index.
A string that contains the semantic.
Describes an effect.
+Number of constant buffers in this effect.
Number of global variables in this effect.
Number of global interfaces in this effect.
Number of techniques in this effect.
Number of groups in this effect.
Describes an effect group.
+Name of this group (only
Number of techniques contained in group.
Number of annotations on this group.
Describes an effect technique.
+Name of this technique (
Number of passes contained in the technique.
Number of annotations on this technique.
Describes an effect-variable type.
+Name of the type, for example "float4" or "MyStruct".
The variable class (see D3D10_SHADER_VARIABLE_CLASS).
The variable type (see D3D10_SHADER_VARIABLE_TYPE).
Number of elements in this type (0 if not an array).
Number of members (0 if not a structure).
Number of rows in this type (0 if not a numeric primitive).
Number of columns in this type (0 if not a numeric primitive).
Number of bytes required to represent this data type, when tightly packed.
Number of bytes occupied by this data type, when laid out in a constant buffer.
Number of bytes to seek between elements, when laid out in a constant buffer.
Describes an effect variable.
+Name of this variable, annotation, or structure member.
Semantic string of this variable or structure member (
Optional flags for effect variables.
Number of annotations on this variable (always 0 for annotations).
Offset into containing cbuffer or tbuffer (always 0 for annotations or variables not in constant buffers).
Used if the variable has been explicitly bound using the register keyword. Check Flags for
Indicates the device state.
+A state-block mask indicates the device states that a pass or a technique changes.
+Boolean value indicating whether to save the vertex shader state.
Array of vertex-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of vertex-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of vertex-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.
Array of vertex-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.
Boolean value indicating whether to save the hull shader state.
Array of hull-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of hull-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of hull-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.
Array of hull-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.
Boolean value indicating whether to save the domain shader state.
Array of domain-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of domain-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of domain-shader constant buffers. The array is a multi-byte bitmask where each bit represents one buffer slot.
Array of domain-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.
Boolean value indicating whether to save the geometry shader state.
Array of geometry-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of geometry-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of geometry-shader constant buffers. The array is a multi-byte bitmask where each bit represents one buffer slot.
Array of geometry-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.
Boolean value indicating whether to save the pixel shader state.
Array of pixel-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of pixel-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of pixel-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.
Array of pixel-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.
Boolean value indicating whether to save the pixel shader unordered access views.
Boolean value indicating whether to save the compute shader state.
Array of compute-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.
Array of compute-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.
Array of compute-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.
Array of compute-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.
Boolean value indicating whether to save the compute shader unordered access views.
Array of vertex buffers. The array is a multi-byte bitmask where each bit represents one resource slot.
Boolean value indicating whether to save the index buffer state.
Boolean value indicating whether to save the input layout state.
Boolean value indicating whether to save the primitive topology state.
Boolean value indicating whether to save the render targets states.
Boolean value indicating whether to save the depth-stencil state.
Boolean value indicating whether to save the blend state.
Boolean value indicating whether to save the viewports states.
Boolean value indicating whether to save the scissor rectangles states.
Boolean value indicating whether to save the rasterizer state.
Boolean value indicating whether to save the stream-out buffers states.
Boolean value indicating whether to save the predication state.
The blend-state interface holds a description for blending state that you can bind to the output-merger stage.
+Blending applies a simple function to combine output values from a pixel shader with data in a render target. You have control over how the pixels are blended by using a predefined set of blending operations and preblending operations.
To create a blend-state object, call
Gets the description for blending state that you used to create the blend-state object.
+You use the description for blending state in a call to the
Gets the description for blending state that you used to create the blend-state object.
+A reference to a
You use the description for blending state in a call to the
The blend-state interface holds a description for blending state that you can bind to the output-merger stage. This blend-state interface supports logical operations as well as blending operations.
+Blending applies a simple function to combine output values from a pixel shader with data in a render target. You have control over how the pixels are blended by using a predefined set of blending operations and preblending operations.
To create a blend-state object, call
Gets the description for blending state that you used to create the blend-state object.
+You use the description for blending state in a call to the
Gets the description for blending state that you used to create the blend-state object.
+A reference to a
You use the description for blending state in a call to the
Describes the blend state that you use in a call to
Here are the default values for blend state.
State | Default 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 |
?
Note?? If the driver type is set to
Describes the blend state that you use in a call to
Here are the default values for blend state.
State | Default Value |
---|---|
AlphaToCoverageEnable | |
IndependentBlendEnable | |
RenderTarget[0].BlendEnable | |
RenderTarget[0].LogicOpEnable | |
RenderTarget[0].SrcBlend | |
RenderTarget[0].DestBlend | |
RenderTarget[0].BlendOp | |
RenderTarget[0].SrcBlendAlpha | |
RenderTarget[0].DestBlendAlpha | |
RenderTarget[0].BlendOpAlpha | |
RenderTarget[0].LogicOp | |
RenderTarget[0].RenderTargetWriteMask |
?
If the driver type is set to
When you set the LogicOpEnable member of the first element of the RenderTarget array (RenderTarget[0]) to TRUE, you must also set the BlendEnable member of RenderTarget[0] to
A buffer interface accesses a buffer resource, which is unstructured memory. Buffers typically store vertex or index data.
+There are three types of buffers: vertex, index, or a shader-constant buffer. Create a buffer resource by calling
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
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.
+Get the properties of a buffer resource.
+Get the properties of a buffer resource.
+Pointer to a resource description (see
Describes a buffer resource.
+This structure is used by
In addition to this structure, you can also use the CD3D11_BUFFER_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a buffer description.
If the bind flag is
Size of the buffer in bytes.
Identify how the buffer is expected to be read from and written to. Frequency of update is a key factor. The most common value is typically
Identify how the buffer will be bound to the pipeline. Flags (see
CPU access flags (see
Miscellaneous flags (see
The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer. For more info about structured buffers, see Structured Buffer.
The size value in StructureByteStride must match the size of the format that you use for views of the buffer. For example, if you use a shader resource view (SRV) to read a buffer in a pixel shader, the SRV format size must match the size value in StructureByteStride.
This interface encapsulates an HLSL class.
+This interface is created by calling
Gets the
For more information about using the
Windows?Phone?8: This API is supported.
+Gets a description of the current HLSL class.
+ For more information about using the
An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated.
An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name.
Windows?Phone?8: This API is supported.
+ Gets the
For more information about using the
Windows?Phone?8: This API is supported.
+Gets a description of the current HLSL class.
+ A reference to a
For more information about using the
An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated.
An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name.
Windows?Phone?8: This API is supported.
+Gets the instance name of the current HLSL class.
+The instance name of the current HLSL class.
The length of the pInstanceName parameter.
GetInstanceName will return a valid name only for instances acquired using
For more information about using the
Windows?Phone?8: This API is supported.
+Gets the type of the current HLSL class.
+Type of the current HLSL class.
The length of the pTypeName parameter.
GetTypeName will return a valid name only for instances acquired using
For more information about using the
Windows?Phone?8: This API is supported.
+This interface encapsulates an HLSL dynamic linkage.
+A class linkage object can hold up to 64K gotten instances. A gotten instance is a handle that references a variable name in any shader that is created with that linkage object. When you create a shader with a class linkage object, the runtime gathers these instances and stores them in the class linkage object. For more information about how a class linkage object is used, see Storing Variables and Types for Shaders to Share.
An
Gets the class-instance object that represents the specified HLSL class.
+The name of a class for which to get the class instance.
The index of the class instance.
The address of a reference to an
For more information about using the
A class instance must have at least 1 data member in order to be available for the runtime to use with
Windows?Phone?8: This API is supported.
+Initializes a class-instance object that represents an HLSL class instance.
+The type name of a class to initialize.
Identifies the constant buffer that contains the class data.
The four-component vector offset from the start of the constant buffer where the class data will begin. Consequently, this is not a byte offset.
The texture slot for the first texture; there may be multiple textures following the offset.
The sampler slot for the first sampler; there may be multiple samplers following the offset.
The address of a reference to an
Returns
Instances can be created (or gotten) before or after a shader is created. Use the same shader linkage object to acquire a class instance and create the shader the instance is going to be used in.
For more information about using the
Windows?Phone?8: This API is supported.
+A compute-shader interface manages an executable program (a compute shader) that controls the compute-shader stage.
+The compute-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a compute-shader interface, call
This interface is defined in D3D11.h.
+This interface encapsulates methods for measuring GPU performance.
+A counter can be created with
This is a derived class of
Counter data is gathered by issuing an
Counters are best suited for profiling.
For a list of the types of performance counters, see
Get a counter description.
+Get a counter description.
+Pointer to a counter description (see
The depth-stencil-state interface holds a description for depth-stencil state that you can bind to the output-merger stage.
+To create a depth-stencil-state object, call
Gets the description for depth-stencil state that you used to create the depth-stencil-state object.
+You use the description for depth-stencil state in a call to the
Gets the description for depth-stencil state that you used to create the depth-stencil-state object.
+A reference to a
You use the description for depth-stencil state in a call to the
Describes depth-stencil state.
+Pass a reference to
Depth-stencil state controls how depth-stencil testing is performed by the output-merger stage.
The following table shows the default values of depth-stencil states.
State | Default Value |
---|---|
DepthEnable | TRUE |
DepthWriteMask | |
DepthFunc | |
StencilEnable | |
StencilReadMask | D3D11_DEFAULT_STENCIL_READ_MASK |
StencilWriteMask | D3D11_DEFAULT_STENCIL_WRITE_MASK |
FrontFace.StencilFunc and BackFace.StencilFunc | |
FrontFace.StencilDepthFailOp and BackFace.StencilDepthFailOp | |
FrontFace.StencilPassOp and BackFace.StencilPassOp | |
FrontFace.StencilFailOp and BackFace.StencilFailOp |
?
The formats that support stenciling are
Enable depth testing.
Identify a portion of the depth-stencil buffer that can be modified by depth data (see
A function that compares depth data against existing depth data. The function options are listed in
Enable stencil testing.
Identify a portion of the depth-stencil buffer for reading stencil data.
Identify a portion of the depth-stencil buffer for writing stencil data.
Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera (see
Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera (see
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
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
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
The device interface represents a virtual adapter; it is used to create resources.
+ A device is created using
Windows?Phone?8: This API is supported.
+ 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 Gets information about the features
Gets information about the features
Gets information about whether the driver supports the nonpowers-of-2-unconditionally feature. TRUE for hardware at Direct3D 10 and higher feature levels.
+Gets information about whether a rendering device batches rendering commands and performs multipass rendering into tiles or bins over a render area. Certain API usage patterns that are fine TileBasedDefferredRenderers (TBDRs) can perform worse on non-TBDRs and vice versa. Applications that are careful about rendering can be friendly to both TBDR and non-TBDR architectures.
+Creates a device that uses Direct3D 11 functionality in Direct3D 12, specifying a pre-existing D3D12 device to use for D3D11 interop.
+ Specifies a pre-existing D3D12 device to use for D3D11 interop. May not be
Any of those documented for D3D11CreateDeviceAndSwapChain. Specifies which runtime layers to enable (see the
An array of any of the following:
The first feature level which is less than or equal to the D3D12 device's feature level will be used to perform D3D11 validation. Creation will fail if no acceptable feature levels are provided. Providing
An array of unique queues for D3D11On12 to use. Valid queue types: 3D command queue.
The function signature PFN_D3D11ON12_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.
+Gets the feature level of the hardware device.
+Feature levels determine the capabilities of your device.
+Get the flags used during the call to create the device with
Get the reason why the device was removed.
+Gets an immediate context, which can play back command lists.
+The GetImmediateContext method returns an
The GetImmediateContext method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Get or sets the exception-mode flags.
+An exception-mode flag is used to elevate an error condition to a non-continuable exception.
+Creates a buffer (vertex buffer, index buffer, or shader-constant buffer).
+ A reference to a
A reference to a
If you don't pass anything to pInitialData, the initial content of the memory for the buffer is undefined. In this case, you need to write the buffer content some other way before the resource is read.
Address of a reference to the
This method returns E_OUTOFMEMORY if there is insufficient memory to create the buffer. See Direct3D 11 Return Codes for other possible return values.
For example code, see How to: Create a Vertex Buffer, How to: Create an Index Buffer or How to: Create a Constant Buffer.
For a constant buffer (BindFlags of
The Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems, provides the following new functionality for CreateBuffer:
You can create a constant buffer that is larger than the maximum constant buffer size that a shader can access (4096 32-bit*4-component constants ? 64KB). When you bind the constant buffer to the pipeline (for example, via PSSetConstantBuffers or PSSetConstantBuffers1), you can define a range of the buffer that the shader can access that fits within the 4096 constant limit.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher. On existing drivers that are implemented to feature level 10 and higher, a call to CreateBuffer to request a constant buffer that is larger than 4096 fails.
+Creates an array of 1D textures.
+If the method succeeds, the return code is
CreateTexture1D creates a 1D texture resource, which can contain a number of 1D subresources. 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 can supply the data initially as an array of
For a 32 width texture with a full mipmap chain, the pInitialData array has the following 6 elements: +
Create an array of 2D textures.
+If the method succeeds, the return code is
CreateTexture2D creates a 2D texture resource, which can contain a number of 2D subresources. 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 can supply the data initially as an array of
For a 32 x 32 texture with a full mipmap chain, the pInitialData array has the following 6 elements: +
Create a single 3D texture.
+If the method succeeds, the return code is
CreateTexture3D creates a 3D texture resource, which can contain a number of 3D subresources. 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 can supply the data initially as an array of
Each element of pInitialData provides all of the slices that are defined for a given miplevel. For example, for a 32 x 32 x 4 volume texture with a full mipmap chain, the array has the following 6 elements:
Create a shader-resource view for accessing data in a resource.
+ Pointer to the resource that will serve as input to a shader. This resource must have been created with the
Pointer to a shader-resource view description (see
Address of a reference to an
This method returns one of the following Direct3D 11 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:
Because a view is fully typed, this means that typeless resources become fully typed when bound to the pipeline.
Note?? To successfully create a shader-resource view from a typeless buffer (for example,The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use CreateShaderResourceView for the following new purpose.
You can create shader-resource views of video resources so that Direct3D shaders can process those shader-resource views. These video resources are either Texture2D or Texture2DArray. The value in the ViewDimension member of the
The runtime read+write conflict prevention logic (which stops a resource from being bound as an SRV and RTV or UAV at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.
Windows?Phone?8: This API is supported.
+Creates a view for accessing an unordered access resource.
+This method returns one of the Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use CreateUnorderedAccessView for the following new purpose.
You can create unordered-access views of video resources so that Direct3D shaders can process those unordered-access views. These video resources are either Texture2D or Texture2DArray. The value in the ViewDimension member of the
The runtime read+write conflict prevention logic (which stops a resource from being bound as an SRV and RTV or UAV at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.
+Creates a render-target view for accessing resource data.
+Pointer to a
Pointer to a
Address of a reference to an
This method returns one of the Direct3D 11 Return Codes.
A render-target view can be bound to the output-merger stage by calling
The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use CreateRenderTargetView for the following new purpose.
You can create render-target views of video resources so that Direct3D shaders can process those render-target views. These video resources are either Texture2D or Texture2DArray. The value in the ViewDimension member of the
The runtime read+write conflict prevention logic (which stops a resource from being bound as an SRV and RTV or UAV at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.
+Create a depth-stencil view for accessing resource data.
+Pointer to the resource that will serve as the depth-stencil surface. This resource must have been created with the
Pointer to a depth-stencil-view description (see
Address of a reference to an
This method returns one of the following Direct3D 11 Return Codes.
A depth-stencil view can be bound to the output-merger stage by calling
Create an input-layout object to describe the input-buffer data for the input-assembler stage.
+ An array of the input-assembler stage input data types; each type is described by an element description (see
The number of input-data types in the array of input-elements.
A reference to the compiled shader. The compiled shader code contains a input signature which is validated against the array of elements. See remarks.
Size of the compiled shader.
A reference to the input-layout object created (see
If the method succeeds, the return code is
After creating an input layout object, it must be bound to the input-assembler stage before calling a draw API.
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.
Windows?Phone?8: This API is supported.
+Create a vertex-shader object from a compiled shader.
+A reference to the compiled shader.
Size of the compiled vertex shader.
A reference to a class linkage interface (see
Address of a reference to a
This method returns one of the Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateVertexShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a vertex shader, you can successfully pass the compiled vertex shader to pShaderBytecode. That is, the call to CreateVertexShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateVertexShader fails. CreateVertexShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Create a geometry shader.
+A reference to the compiled shader.
Size of the compiled geometry shader.
A reference to a class linkage interface (see
Address of a reference to a
This method returns one of the following Direct3D 11 Return Codes.
After it is created, the shader can be set to the device by calling
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateGeometryShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a geometry shader, you can successfully pass the compiled geometry shader to pShaderBytecode. That is, the call to CreateGeometryShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateGeometryShader fails. CreateGeometryShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
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
Size of the compiled geometry shader.
Pointer to a
The number of entries in the stream output declaration ( ranges from 0 to
An array of buffer strides; each stride is the size of an element for that buffer.
The number of strides (or buffers) in pBufferStrides (ranges from 0 to
The index number of the stream to be sent to the rasterizer stage (ranges from 0 to
A reference to a class linkage interface (see
Address of a reference to an
This method returns one of the Direct3D 11 Return Codes.
For more info about using CreateGeometryShaderWithStreamOutput, see Create a Geometry-Shader Object with Stream Output.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateGeometryShaderWithStreamOutput.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a geometry shader, you can successfully pass the compiled geometry shader to pShaderBytecode. That is, the call to CreateGeometryShaderWithStreamOutput succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateGeometryShaderWithStreamOutput fails. CreateGeometryShaderWithStreamOutput also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Windows?Phone?8: This API is supported.
+Create a pixel shader.
+A reference to the compiled shader.
Size of the compiled pixel shader.
A reference to a class linkage interface (see
Address of a reference to a
This method returns one of the following Direct3D 11 Return Codes.
After creating the pixel shader, you can set it to the device using
Create a hull shader.
+This method returns one of the Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateHullShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a hull shader, you can successfully pass the compiled hull shader to pShaderBytecode. That is, the call to CreateHullShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateHullShader fails. CreateHullShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Create a domain shader .
+This method returns one of the following Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateDomainShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a domain shader, you can successfully pass the compiled domain shader to pShaderBytecode. That is, the call to CreateDomainShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateDomainShader fails. CreateDomainShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Create a compute shader.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the compute shader. See Direct3D 11 Return Codes for other possible return values.
For an example, see How To: Create a Compute Shader and HDRToneMappingCS11 Sample.
+Creates class linkage libraries to enable dynamic shader linkage.
+A reference to a class-linkage interface reference (see
This method returns one of the following Direct3D 11 Return Codes.
The
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
This method returns E_OUTOFMEMORY if there is insufficient memory to create the blend-state object. See Direct3D 11 Return Codes for other possible return values.
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.
Windows?Phone?8: This API is supported.
+Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.
+Pointer to a depth-stencil state description (see
Address of a reference to the depth-stencil state object created (see
This method returns one of the following Direct3D 11 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 interface with the same state as an existing interface, the same interface will be returned and the total number of unique depth-stencil state objects will stay the same.
+Create a rasterizer state object that tells the rasterizer stage how to behave.
+Pointer to a rasterizer state description (see
Address of a reference to the rasterizer state object created (see
This method returns E_OUTOFMEMORY if there is insufficient memory to create the compute shader. See Direct3D 11 Return Codes for other possible return values.
4096 unique rasterizer state objects can be created on a device at a time.
If an application attempts to create a rasterizer-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique rasterizer state objects will stay the same.
+Create a sampler-state object that encapsulates sampling information for a texture.
+Pointer to a sampler state description (see
Address of a reference to the sampler state object created (see
This method returns one of the following Direct3D 11 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 interface with the same state as an existing interface, the same interface will be returned and the total number of unique sampler state objects will stay the same.
+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.
Creates a predicate.
+Pointer to a query description where the type of query must be a
Address of a reference to a predicate (see
This method returns one of the following Direct3D 11 Return Codes.
Create a counter object for measuring GPU performance.
+Pointer to a counter description (see
Address of a reference to a counter (see
If this function succeeds, it will return
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.
Creates a deferred context, which can record command lists.
+Reserved for future use. Pass 0.
Upon completion of the method, the passed reference to an
Returns
A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. Using a deferred context, you can record graphics commands into a command list that is encapsulated by the
You can create multiple deferred contexts.
Note?? If you use theFor more information about deferred contexts, see Immediate and Deferred Rendering.
Windows?Phone?8: This API is supported.
+Give a device access to a shared resource created on a different device.
+A resource handle. See remarks.
The globally unique identifier (
Address of a reference to the resource we are gaining access to.
This method returns one of the following Direct3D 11 Return Codes.
The REFIID, or
The unique handle of the resource is obtained differently depending on the type of device that originally created the resource.
To share a resource between two Direct3D 11 devices the resource must have been created with the
The REFIID, or
When sharing a resource between two Direct3D 10/11 devices the unique handle of the resource can be obtained by querying the resource for the
* 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 11 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 tonull to create, can use a valid handle here to open in D3D9 + pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle); + ... + pDevice11->OpenSharedResource(sharedHandle, __uuidof(), (void**)(&tempResource11)); + tempResource11->QueryInterface(__uuidof( ), (void**)(&pTex2D_11)); + tempResource11->Release(); + // now use pTex2D_11 with pDevice11
Textures being shared from D3D9 to D3D11 have the following restrictions.
If a shared texture is updated on one device
Get the support of a given format on the installed video device.
+A
A bitfield of
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 number of quality levels is defined by
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.
Note that FEATURE_LEVEL_10_1 devices are required to support 4x MSAA for all render targets except R32G32B32A32 and R32G32B32. FEATURE_LEVEL_11_0 devices are required to support 4x MSAA for all render target formats, and 8x MSAA for all render target formats except R32G32B32A32 formats.
+Get a counter's information.
+Get the type, name, units of measure, and a description of an existing counter.
+ Pointer to a counter description (see
Pointer to the data type of a counter (see
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
Length of the string returned to szName. Can be
Name of the units a counter measures, provided the memory the reference points to has enough room to hold the string. Can be
Length of the string returned to szUnits. Can be
A description of the counter, provided the memory the reference points to has enough room to hold the string. Can be
Length of the string returned to szDescription. Can be
This method returns one of the following Direct3D 11 Return Codes.
Length parameters can be
Windows?Phone?8: This API is supported.
+Gets information about the features that are supported by the current graphics driver.
+A member of the
Upon completion of the method, the passed structure is filled with data that describes the feature support.
The size of the structure passed to the pFeatureSupportData parameter.
Returns
To query for multi-threading support, pass the
Calling CheckFeatureSupport with Feature set to
Get application-defined data from a device.
+Guid associated with the data.
A reference to a variable that on input contains the size, in bytes, of the buffer that pData points to, and on output contains the size, in bytes, of the amount of data that GetPrivateData retrieved.
A reference to a buffer that GetPrivateData fills with data from the device if pDataSize points to a value that specifies a buffer large enough to hold the data.
This method returns one of the codes described in the topic Direct3D 11 Return Codes.
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
This method returns one of the following Direct3D 11 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.
The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the
static const char c_szName[] = "My name"; + hr = pContext->SetPrivateData(+, sizeof( c_szName ) - 1, c_szName ); +
Associate an
Guid associated with the interface.
Pointer to an
This method returns one of the following Direct3D 11 Return Codes.
Gets the feature level of the hardware device.
+A member of the
Feature levels determine the capabilities of your device.
+Get the flags used during the call to create the device with
A bitfield containing the flags used to create the device. See
Get the reason why the device was removed.
+Possible return values include:
For more detail on these return codes, see DXGI_ERROR.
Gets an immediate context, which can play back command lists.
+Upon completion of the method, the passed reference to an
The GetImmediateContext method returns an
The GetImmediateContext method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+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 D3D11_RAISE_FLAG. A default value of 0 means there are no flags.
This method returns one of the following Direct3D 11 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.
+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 D3D11_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.
+The device interface represents a virtual adapter; it is used to create resources.
{ , , , , , , ,};
+ Gets an immediate context, which can play back command lists.
+GetImmediateContext1 returns an
GetImmediateContext1 increments the reference count of the immediate context by one. So, call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Gets an immediate context, which can play back command lists.
+Upon completion of the method, the passed reference to an
GetImmediateContext1 returns an
GetImmediateContext1 increments the reference count of the immediate context by one. So, call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a deferred context, which can record command lists.
+Reserved for future use. Pass 0.
Upon completion of the method, the passed reference to an
Returns
A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. By using a deferred context, you can record graphics commands into a command list that is encapsulated by the
You can create multiple deferred contexts.
Note?? If you use theFor more information about deferred contexts, see Immediate and Deferred Rendering.
Windows?Phone?8: This API is supported.
+Creates a blend-state object that encapsulates blend state for the output-merger stage and allows the configuration of logic operations.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the blend-state object. See Direct3D 11 Return Codes for other possible return values.
The logical operations (those that enable bitwise logical operations between pixel shader output and render target contents, refer to
An app 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.
+Creates a rasterizer state object that informs the rasterizer stage how to behave and forces the sample count while UAV rendering or rasterizing.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the rasterizer state object. See Direct3D 11 Return Codes for other possible return values.
An app can create up to 4096 unique rasterizer 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.
+Creates a context state object that holds all Microsoft Direct3D state and some Direct3D behavior.
+ A combination of
If you set the single-threaded flag for both the context state object and the device, you guarantee that you will call the whole set of context methods and device methods only from one thread. You therefore do not need to use critical sections to synchronize access to the device context, and the runtime can avoid working with those processor-intensive critical sections.
A reference to an array of
{, , , , , , ,};
The number of elements in pFeatureLevels. Unlike
The SDK version. You must set this parameter to
The globally unique identifier (
A reference to a variable that receives a
The address of a reference to an
This method returns one of the Direct3D 11 Return Codes.
The REFIID value of the emulated interface is a __uuidof(
gets the
Call the
When a context state object is active, the runtime disables certain methods on the device and context interfaces. For example, a context state object that is created with __uuidof(
will cause the runtime to turn off most of the Microsoft Direct3D?10 device interfaces, and a context state object that is created with __uuidof(ID3D10Device1)
or __uuidof(ID3D10Device)
will cause the runtime to turn off most of the
For example, suppose the tessellation stage is made active through the
The following table shows the methods that are active and inactive for each emulated interface.
Emulated interface | Active device or immediate context interfaces | Inactive device or immediate context interfaces |
---|---|---|
| | ID3D10Device |
ID3D10Device1 or ID3D10Device | ID3D10Device ID3D10Device1 | |
?
The following table shows the immediate context methods that the runtime disables when the indicated context state objects are active.
Methods of __uuidof(ID3D10Device1) or __uuidof(ID3D10Device) is active | Methods of ID3D10Device when __uuidof( is active |
---|---|
ClearDepthStencilView | ClearDepthStencilView |
ClearRenderTargetView | ClearRenderTargetView |
ClearState | ClearState |
ClearUnorderedAccessViewUint | |
ClearUnorderedAccessViewFloat | |
CopyResource | CopyResource |
CopyStructureCount | |
CopySubresourceRegion | CopySubresourceRegion |
CSGetConstantBuffers | |
CSGetSamplers | |
CSGetShader | |
CSGetShaderResources | |
CSGetUnorderedAccessViews | |
CSSetConstantBuffers | |
CSSetSamplers | |
CSSetShader | |
CSSetShaderResources | |
CSSetUnorderedAccessViews | |
Dispatch | |
DispatchIndirect | |
CreateBlendState | |
Draw | Draw |
DrawAuto | DrawAuto |
DrawIndexed | DrawIndexed |
DrawIndexedInstanced | DrawIndexedInstanced |
DrawIndexedInstancedIndirect | |
DrawInstanced | DrawInstanced |
DrawInstancedIndirect | |
DSGetConstantBuffers | |
DSGetSamplers | |
DSGetShader | |
DSGetShaderResources | |
DSSetConstantBuffers | |
DSSetSamplers | |
DSSetShader | |
DSSetShaderResources | |
ExecuteCommandList | |
FinishCommandList | |
Flush | Flush |
GenerateMips | GenerateMips |
GetPredication | GetPredication |
GetResourceMinLOD | |
GetType | |
GetTextFilterSize | |
GSGetConstantBuffers | GSGetConstantBuffers |
GSGetSamplers | GSGetSamplers |
GSGetShader | GSGetShader |
GSGetShaderResources | GSGetShaderResources |
GSSetConstantBuffers | GSSetConstantBuffers |
GSSetSamplers | GSSetSamplers |
GSSetShader | GSSetShader |
GSSetShaderResources | GSSetShaderResources |
HSGetConstantBuffers | |
HSGetSamplers | |
HSGetShader | |
HSGetShaderResources | |
HSSetConstantBuffers | |
HSSetSamplers | |
HSSetShader | |
HSSetShaderResources | |
IAGetIndexBuffer | IAGetIndexBuffer |
IAGetInputLayout | IAGetInputLayout |
IAGetPrimitiveTopology | IAGetPrimitiveTopology |
IAGetVertexBuffers | IAGetVertexBuffers |
IASetIndexBuffer | IASetIndexBuffer |
IASetInputLayout | IASetInputLayout |
IASetPrimitiveTopology | IASetPrimitiveTopology |
IASetVertexBuffers | IASetVertexBuffers |
OMGetBlendState | OMGetBlendState |
OMGetDepthStencilState | OMGetDepthStencilState |
OMGetRenderTargets | OMGetRenderTargets |
OMGetRenderTargetsAndUnorderedAccessViews | |
OMSetBlendState | OMSetBlendState |
OMSetDepthStencilState | OMSetDepthStencilState |
OMSetRenderTargets | OMSetRenderTargets |
OMSetRenderTargetsAndUnorderedAccessViews | |
PSGetConstantBuffers | PSGetConstantBuffers |
PSGetSamplers | PSGetSamplers |
PSGetShader | PSGetShader |
PSGetShaderResources | PSGetShaderResources |
PSSetConstantBuffers | PSSetConstantBuffers |
PSSetSamplers | PSSetSamplers |
PSSetShader | PSSetShader |
PSSetShaderResources | PSSetShaderResources |
ResolveSubresource | ResolveSubresource |
RSGetScissorRects | RSGetScissorRects |
RSGetState | RSGetState |
RSGetViewports | RSGetViewports |
RSSetScissorRects | RSSetScissorRects |
RSSetState | RSSetState |
RSSetViewports | RSSetViewports |
SetPredication | SetPredication |
SetResourceMinLOD | |
SetTextFilterSize | |
SOGetTargets | SOGetTargets |
SOSetTargets | SOSetTargets |
UpdateSubresource | UpdateSubresource |
VSGetConstantBuffers | VSGetConstantBuffers |
VSGetSamplers | VSGetSamplers |
VSGetShader | VSGetShader |
VSGetShaderResources | VSGetShaderResources |
VSSetConstantBuffers | VSSetConstantBuffers |
VSSetSamplers | VSSetSamplers |
VSSetShader | VSSetShader |
VSSetShaderResources | VSSetShaderResources |
?
The following table shows the immediate context methods that the runtime does not disable when the indicated context state objects are active.
Methods of __uuidof(ID3D10Device1) or __uuidof(ID3D10Device) is active | Methods of ID3D10Device when __uuidof( is active |
---|---|
Begin | |
End | |
GetCreationFlags | |
GetPrivateData | |
GetContextFlags | |
GetData | |
Map | |
Unmap |
?
The following table shows the ID3D10Device interface methods that the runtime does not disable because they are not immediate context methods.
Methods of ID3D10Device |
---|
CheckCounter |
CheckCounterInfo |
Create*, like CreateQuery |
GetDeviceRemovedReason |
GetExceptionMode |
OpenSharedResource |
SetExceptionMode |
SetPrivateData |
SetPrivateDataInterface |
?
Windows?Phone?8: This API is supported.
+Give a device access to a shared resource created on a different device.
+A resource handle. See remarks.
The globally unique identifier (
Address of a reference to the resource we are gaining access to.
This method returns one of the following Direct3D 11 Return Codes.
The REFIID, or
The unique handle of the resource is obtained differently depending on the type of device that originally created the resource.
To share a resource between two Direct3D 11 devices the resource must have been created with the
The REFIID, or
When sharing a resource between two Direct3D 10/11 devices the unique handle of the resource can be obtained by querying the resource for the
* 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 11 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 tonull to create, can use a valid handle here to open in D3D9 + pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle); + ... + pDevice11->OpenSharedResource(sharedHandle, __uuidof(), (void**)(&tempResource11)); + tempResource11->QueryInterface(__uuidof( ), (void**)(&pTex2D_11)); + tempResource11->Release(); + // now use pTex2D_11 with pDevice11
Textures being shared from D3D9 to D3D11 have the following restrictions.
If a shared texture is updated on one device
Gives a device access to a shared resource that is referenced by name and that was created on a different device. You must have previously created the resource as shared and specified that it uses NT handles (that is, you set the
This method returns one of the Direct3D 11 return codes. This method also returns E_ACCESSDENIED if the permissions to access the resource aren't valid.
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, OpenSharedResourceByName fails with E_NOTIMPL because NTHANDLES are used. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
The behavior of OpenSharedResourceByName is similar to the behavior of the
To share a resource between two devices
The device interface represents a virtual adapter; it is used to create resources.
Gets an immediate context, which can play back command lists.
+The GetImmediateContext2 method returns an
The GetImmediateContext2 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Gets an immediate context, which can play back command lists.
+The GetImmediateContext2 method returns an
The GetImmediateContext2 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a deferred context, which can record command lists.
+ Returns
A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. By using a deferred context, you can record graphics commands into a command list that is encapsulated by the
You can create multiple deferred contexts.
Note?? If you use theFor more information about deferred contexts, see Immediate and Deferred Rendering.
+Gets info about how a tiled resource is broken into tiles.
+A reference to the tiled resource to get info about.
A reference to a variable that receives the number of tiles needed to store the entire tiled resource.
A reference to a
A reference to a
A reference to a variable that contains the number of tiles in the subresource. On input, this is the number of subresources to query tilings for; on output, this is the number that was actually retrieved at pSubresourceTilingsForNonPackedMips (clamped to what's available).
The number of the first subresource tile to get. GetResourceTiling ignores this parameter if the number that pNumSubresourceTilings points to is 0.
A reference to a
If subresource tiles are part of packed mipmaps, GetResourceTiling sets the members of
For more info about tiled resources, see Tiled resources.
+Get the number of quality levels available during multisampling.
+The texture format during multisampling.
The number of samples during multisampling.
A combination of D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAGS values that are combined by using a bitwise OR operation. Currently, only
A reference to a variable the receives the number of quality levels supported by the adapter. See Remarks.
When you multisample a texture, the number of quality levels available for an adapter is dependent on the texture format that you use and the number of samples that you request. The maximum number of quality levels is defined by
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.
Note that FEATURE_LEVEL_10_1 devices are required to support 4x MSAA for all render targets except R32G32B32A32 and R32G32B32. FEATURE_LEVEL_11_0 devices are required to support 4x MSAA for all render target formats, and 8x MSAA for all render target formats except R32G32B32A32 formats.
+The device interface represents a virtual adapter; it is used to create resources.
Gets an immediate context, which can play back command lists.
+ The GetImmediateContext3 method outputs an
The GetImmediateContext3 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a 2D texture.
+If the method succeeds, the return code is
CreateTexture2D1 creates a 2D texture resource, which can contain a number of 2D subresources. The number of subresources 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 can supply the data initially as an array of
For a 32 x 32 texture with a full mipmap chain, the pInitialData array has the following 6 elements: +
Creates a 3D texture.
+If the method succeeds, the return code is
CreateTexture3D1 creates a 3D texture resource, which can contain a number of 3D subresources. 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 can supply the data initially as an array of
Each element of pInitialData provides all of the slices that are defined for a given miplevel. For example, for a 32 x 32 x 4 volume texture with a full mipmap chain, the array has the following 6 elements:
Creates a rasterizer state object that informs the rasterizer stage how to behave and forces the sample count while UAV rendering or rasterizing.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the rasterizer state object. See Direct3D 11 Return Codes for other possible return values.
Creates a shader-resource view for accessing data in a resource.
+Pointer to the resource that will serve as input to a shader. This resource must have been created with the
A reference to a
A reference to a memory block that receives a reference to a
This method returns E_OUTOFMEMORY if there is insufficient memory to create the shader-resource view. See Direct3D 11 Return Codes for other possible return values.
Creates a view for accessing an unordered access resource.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the unordered-access view. See Direct3D 11 Return Codes for other possible return values.
Creates a render-target view for accessing resource data.
+Pointer to a
Pointer to a
A reference to a memory block that receives a reference to a
This method returns one of the Direct3D 11 Return Codes.
A render-target view can be bound to the output-merger stage by calling
Creates a query object for querying information from the graphics processing unit (GPU).
+Pointer to a
A reference to a memory block that receives a reference to a
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.
Gets an immediate context, which can play back command lists.
+ The GetImmediateContext3 method outputs an
The GetImmediateContext3 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a deferred context, which can record command lists.
+ Returns
Copies data into a
The provided resource must be a
This API is intended for calling at high frequency. Callers can reduce memory by making iterative calls that update progressive regions of the texture, while provide a small buffer during each call. It is most efficient to specify large enough regions, though, because this enables D3D to fill whole cache lines in the texture before returning.
For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned.
When writing to sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offsetting which can interfere with alignment to cache lines.
+ Copies data from a
The provided resource must be a
This API is intended for calling at high frequency. Callers can reduce memory by making iterative calls that update progressive regions of the texture, while provide a small buffer during each call. It is most efficient to specify large enough regions, though, because this enables D3D to fill whole cache lines in the texture before returning.
For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [Bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned.
When reading from sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offseting which can interfere with alignment to cache lines.
+The device interface represents a virtual adapter; it is used to create resources.
Note??The latest version of this interface is A device is created using
Windows?Phone?8: This API is supported.
+The device interface represents a virtual adapter; it is used to create resources.
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.
Windows?Phone?8: This API is supported.
+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.
+Get a reference to the device that created this interface.
+Address of a reference to a device (see
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.
+Get application-defined data from a device child.
+Guid associated with the data.
A reference to a variable that on input contains the size, in bytes, of the buffer that pData points to, and on output contains the size, in bytes, of the amount of data that GetPrivateData retrieved.
A reference to a buffer that GetPrivateData fills with data from the device child if pDataSize points to a value that specifies a buffer large enough to hold the data.
This method returns one of the Direct3D 11 Return Codes.
The data stored in the device child is set by calling
Windows?Phone?8: This API is supported.
+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
This method returns one of the following Direct3D 11 Return Codes.
The data stored in the device child with this method can be retrieved with
The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the
static const char c_szName[] = "My name"; + hr = pContext->SetPrivateData(+, sizeof( c_szName ) - 1, c_szName ); +
Associate an
Guid associated with the interface.
Pointer to an
This method returns one of the following Direct3D 11 Return Codes.
When this method is called ::addref() will be called on the
The
Bind an array of shader resources to the compute-shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
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. +
+Sets an array of views for an unordered resource.
+Index of the first element in the zero-based array to begin setting (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - 1). D3D11_1_UAV_SLOT_COUNT is defined as 64.
Number of views to set (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - StartSlot).
A reference to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is only relevant for UAVs that were created with either
Windows?Phone?8: This API is supported.
+Set a compute shader to the device.
+Pointer to a compute shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a compute shader to the device.
+Pointer to a compute shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a compute shader to the device.
+Pointer to a compute shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set an array of sampler states to the compute-shader stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the constant buffers used by the compute-shader stage.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the CSSetConstantBuffers1 method instead.
+Get the compute-shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
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
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.
+Gets an array of views for an unordered resource.
+Index of the first element in the zero-based array to return (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - 1).
Number of views to get (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - StartSlot).
A reference to an array of interface references (see
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.
+Get the compute shader currently set on the device.
+Address of a reference to a Compute shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
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.
+Get an array of sampler state interfaces from the compute-shader stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
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.
+Get the constant buffers used by the compute-shader stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
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.
+The
D3D11_BOX sourceRegion;
+ sourceRegion.left = 120;
+ sourceRegion.right = 200;
+ sourceRegion.top = 100;
+ sourceRegion.bottom = 220;
+ sourceRegion.front = 0;
+ sourceRegion.back = 1; pd3dDeviceContext->CopySubresourceRegion( pDestTexture, 0, 10, 20, 0, pSourceTexture, 0, &sourceRegion );
+
+ Notice, that for a 2D texture, front and back are set to 0 and 1 respectively.
+ Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+A reference to a
Index number of the subresource.
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.
A reference to the mapped subresource (see
This method also throws an exception with the code
For more information about these error codes, see DXGI_ERROR.
If you call Map on a deferred context, you can only pass
The Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, can map shader resource views (SRVs) of dynamic buffers with
Gets the type of device context.
+Gets the initialization flags associated with the current deferred context.
+The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of
Draw indexed, non-instanced primitives.
+Number of indices to draw.
The location of the first index read by the GPU from the index buffer.
A value added to each index before reading a vertex from the vertex buffer.
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.
+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.
Draw 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.
Even without any vertex buffer bound to the pipeline, you can generate your own vertex data in your vertex shader by using the SV_VertexID system-value semantic to determine the current vertex that the runtime is processing.
+Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+This method returns one of the Direct3D 11 Return Codes.
This method also returns
This method also returns
For more information about these error codes, see DXGI_ERROR.
If you call Map on a deferred context, you can only pass
For info about how to use Map, see How to: Use dynamic resources.
+Invalidate the reference to a resource and reenable the GPU's access to that resource.
+ A reference to a
A subresource to be unmapped.
For info about how to use Unmap, see How to: Use dynamic resources.
Windows?Phone?8: This API is supported.
+Draw indexed, instanced primitives.
+Number of indices read from the index buffer for each instance.
Number of instances to draw.
The location of the first index read by the GPU from the index buffer.
A value added to each index before reading a vertex from the vertex buffer.
A value added to each index before reading per-instance data from a vertex buffer.
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. Instancing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.
+Draw non-indexed, instanced primitives.
+Number of vertices to draw.
Number of instances to draw.
Index of the first vertex.
A value added to each index before reading per-instance data from a vertex buffer.
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.
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).
+Mark the beginning of a series of commands.
+A reference to an
Use
Mark the end of a series of commands.
+A reference to an
Use
Get data from the graphics processing unit (GPU) asynchronously.
+A reference to an
Address of memory that will receive the data. If
Size of the data to retrieve or 0. Must be 0 when pData is
Optional flags. Can be 0 or any combination of the flags enumerated by
This method returns one of the Direct3D 11 Return Codes. A return value of
Queries in a deferred context are limited to predicated drawing. That is, you cannot call
GetData retrieves the data that the runtime collected between calls to
If DataSize is 0, GetData is only used to check status.
An application gathers counter data by calling
Set a rendering predicate.
+A reference to the
If TRUE, rendering will be affected by when the predicate's conditions are met. If
The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to
Use this method 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 rendering and resource manipulation commands without taking the performance hit of spinning, waiting for
Rendering and resource manipulation commands for Direct3D?11 include these Draw, Dispatch, Copy, Update, Clear, Generate, and Resolve operations.
You can set a rendering predicate on an immediate or a deferred context. For info about immediate and deferred contexts, see Immediate and Deferred Rendering.
+Draw geometry of an unknown size.
+A draw API submits work to the rendering pipeline. This API submits work of an unknown size that was processed by the input assembler, vertex shader, and stream-output stages; the work may or may not have gone through the geometry-shader stage.
After data has been streamed out to stream-output 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,
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
Draw indexed, instanced, GPU-generated primitives.
+ A reference to an
Offset in pBufferForArgs to the start of the GPU generated primitives.
When an application creates a buffer that is associated with the
Windows?Phone?8: This API is supported.
+Draw instanced, GPU-generated primitives.
+A reference to an
Offset in pBufferForArgs to the start of the GPU generated primitives.
When an application creates a buffer that is associated with the
Execute a command list from a thread group.
+The number of groups dispatched in the x direction. ThreadGroupCountX must be less than or equal to
The number of groups dispatched in the y direction. ThreadGroupCountY must be less than or equal to
The number of groups dispatched in the z direction. ThreadGroupCountZ must be less than or equal to
You call the Dispatch method to execute commands in a compute shader. A compute shader can be run on many threads in parallel, within a thread group. Index a particular thread, within a thread group using a 3D vector given by (x,y,z).
In the following illustration, assume a thread group with 50 threads where the size of the group is given by (5,5,2). A single thread is identified from a thread group with 50 threads in it, using the vector (4,1,1).
The following illustration shows the relationship between the parameters passed to
Execute a command list over one or more thread groups.
+A reference to an
A byte-aligned offset between the start of the buffer and the arguments.
You call the DispatchIndirect method to execute commands in a compute shader.
When an application creates a buffer that is associated with the
Copy a region from a source resource to a destination resource.
+A reference to the destination resource (see
Destination subresource index.
The x-coordinate of the upper left corner of the destination region.
The y-coordinate of the upper left corner of the destination region. For a 1D subresource, this must be zero.
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
Source subresource index.
A reference to a 3D box (see
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 offsets, (x, y, and z), allow the source box to be offset when writing into the destination resource; however, the dimensions of the source box and the offsets must be within the size of the resource. If you try and copy outside the destination resource or specify a source box that is larger than the source resource, the behavior of CopySubresourceRegion is undefined. If you created a device that supports the debug layer, the debug output reports an error on this invalid CopySubresourceRegion call. Invalid parameters to CopySubresourceRegion cause undefined behavior and might result in incorrect rendering, clipping, no copy, or even the removal of the rendering device.
If the resources are buffers, all coordinates are in bytes; if the resources are textures, all coordinates are in texels. D3D11CalcSubresource 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:
CopySubresourceRegion only supports copy; it does not support any stretch, color key, or blend. 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
CopySubresourceRegion 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. For more information about pipeline stalls, see performance considerations.
Note??Applies only to feature level 9_x hardware If you useCopy the entire contents of the source resource to the destination resource using the GPU.
+A reference to the
A reference to the
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:
CopyResource only supports copy; it doesn't support any stretch, color key, or blend. CopyResource can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.
You can't use an Immutable resource as a destination. You can use a depth-stencil resource as either a source or a destination provided that the feature level is
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. For more info, see performance considerations.
We recommend to use
The CPU copies data from memory to a subresource created in non-mappable memory.
+A reference to the destination resource (see
A zero-based index, that identifies the destination subresource. See D3D11CalcSubresource for more details.
A reference to a box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. If
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, UpdateSubresource doesn't perform an update operation.
A reference to the source data in memory.
The size of one row of the source data.
The size of one depth slice of source data.
For a shader-constant buffer; set pDstBox to
A resource cannot be used as a destination if:
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.
To better understand the source row pitch and source depth pitch parameters, the following illustration shows 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
To calculate the source row pitch and source depth pitch for a given resource, use the following formulas:
In the case of this example 3D volume texture where the size of each element is 16 bytes, the formulas are as follows:
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; pd3dDeviceContext->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; pd3dDeviceContext->UpdateSubresource( pDestTexture, 0, &destRegion, pData, rowPitch, 0 ); +
For info about various resource types and how UpdateSubresource might work with each resource type, see Introduction to a Resource in Direct3D 11.
+Copies data from a buffer holding variable length data.
+Pointer to
Offset from the start of pDstBuffer to write 32-bit UINT structure (vertex) count from pSrcView.
Pointer to an
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 11/10: Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied. |
?
When using D3D_FEATURE_LEVEL_9_x, 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.
+Clears an unordered access resource with bit-precise values.
+This API copies the lower ni bits from each array element i to the corresponding channel, where ni is the number of bits in the ith channel of the resource format (for example, R8G8B8_FLOAT has 8 bits for the first 3 channels). This works on any UAV with no format conversion. For a raw or structured buffer view, only the first array element value is used.
+Clears an unordered access resource with a float value.
+This API works on FLOAT, UNORM, and SNORM unordered access views (UAVs), with format conversion from FLOAT to *NORM where appropriate. On other UAVs, the operation is invalid and the call will not reach the driver.
+Clears the depth-stencil resource.
+Pointer to the depth stencil to be cleared.
Identify the type of data 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 11/10: Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied. |
?
+Generates mipmaps for the given shader resource.
+A reference to an
You can call GenerateMips on any shader-resource view to generate the lower mipmap levels for the shader resource. GenerateMips uses the largest mipmap level of the view to recursively generate the lower levels of the mip and stops with the smallest level that is specified by the view. If the base resource wasn't created with
Feature levels 9.1, 9.2, and 9.3 can't support automatic generation of mipmaps for 3D (volume) textures.
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, GenerateMips will silently fail.
+Sets the minimum level-of-detail (LOD) for a resource.
+A reference to an
The level-of-detail, which ranges between 0 and the maximum number of mipmap levels of the resource. For example, the maximum number of mipmap levels of a 1D texture is specified in the MipLevels member of the
To use a resource with SetResourceMinLOD, you must set the
For Direct3D 10 and Direct3D 10.1, when sampling from a texture resource in a shader, the sampler can define a minimum LOD clamp to force sampling from less detailed mip levels. For Direct3D 11, this functionality is extended from the sampler to the entire resource. Therefore, the application can specify the highest-resolution mip level of a resource that is available for access. This restricts the set of mip levels that are required to be resident in GPU memory, thereby saving memory.
The set of mip levels resident per-resource in GPU memory can be specified by the user.
Minimum LOD affects all of the resident mip levels. Therefore, only the resident mip levels can be updated and read from.
All methods that access texture resources must adhere to minimum LOD clamps.
Empty-set accesses are handled as out-of-bounds cases.
+Gets the minimum level-of-detail (LOD).
+A reference to an
Returns the minimum LOD.
Copy a multisampled resource into a non-multisampled resource.
+Destination resource. Must be a created with the
A zero-based index, that identifies the destination subresource. Use D3D11CalcSubresource to calculate the index.
Source resource. Must be multisampled.
The source subresource of the source resource.
A
This API is most useful when re-using the resulting rendertarget of one render pass as an input to a second render pass.
The source and destination resources must be the same resource type and have the same dimensions. In addition, they must have compatible formats. There are three scenarios for this:
Scenario | Requirements |
---|---|
Source and destination are prestructured and typed | Both 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 typeless | The typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is |
Source and destination are prestructured and typeless | Both the source and desintation must have the same typeless format (i.e. both must have For example, given the
|
?
+Queues commands from a command list onto a device.
+ A reference to an
A Boolean flag that determines whether the target context state is saved prior to and restored after the execution of a command list. Use TRUE to indicate that the runtime needs to save and restore the state. Use
Use this method to play back a command list that was recorded by a deferred context on any thread.
A call to ExecuteCommandList of a command list from a deferred context onto the immediate context is required for the recorded commands to be executed on the graphics processing unit (GPU). A call to ExecuteCommandList of a command list from a deferred context onto another deferred context can be used to merge recorded lists. But to run the commands from the merged deferred command list on the GPU, you need to execute them on the immediate context.
This method performs some runtime validation related to queries. Queries that are begun in a device context cannot be manipulated indirectly by executing a command list (that is, Begin or End was invoked against the same query by the deferred context which generated the command list). If such a condition occurs, the ExecuteCommandList method does not execute the command list. However, the state of the device context is still maintained, as would be expected (
Windows?Phone?8: This API is supported.
+Get the rendering predicate state.
+Address of a boolean to fill with the predicate comparison value.
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.
+Restore all default settings.
+This method resets any device context to the default settings. This sets all input/output resource slots, shaders, input layouts, predications, scissor rectangles, depth-stencil state, rasterizer state, blend state, sampler state, and viewports to
For a scenario where you would like to clear a list of commands recorded so far, call
Sends queued-up commands in the command buffer to the graphics processing unit (GPU).
+Most applications don't need to call this method. If an application calls this method when not necessary, it incurs a performance penalty. Each call to Flush incurs a significant amount of overhead.
When Microsoft 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. Typically, the Direct3D runtime sends these commands to the GPU automatically whenever the runtime determines that they need to be sent, such as when the command buffer is full or when an application maps a resource. Flush sends the commands manually.
We recommend that you use Flush when the CPU waits for an arbitrary amount of time (such as when you call the Sleep function).
Because Flush operates asynchronously, it can return either before or after the GPU finishes executing the queued graphics commands. However, the graphics commands eventually always complete. You can call the
Microsoft Direct3D?11 defers the destruction of objects. Therefore, an application can't rely upon objects immediately being destroyed. By calling Flush, you destroy any objects whose destruction was deferred. If an application requires synchronous destruction of an object, we recommend that the application release all its references, call
Gets the type of device context.
+A member of
Gets the initialization flags associated with the current deferred context.
+The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of
Create a command list and record graphics commands into it.
+ A Boolean flag that determines whether the runtime saves deferred context state before it executes FinishCommandList and restores it afterwards. Use TRUE to indicate that the runtime needs to save and restore the state. Use
Upon completion of the method, the passed reference to an
Returns
Create a command list from a deferred context and record commands into it by calling FinishCommandList. Play back a command list with an immediate context by calling
Immediate context state is cleared before and after a command list is executed. A command list has no concept of inheritance. Each call to FinishCommandList will record only the state set since any previous call to FinishCommandList.
For example, the state of a device context is its render state or pipeline state. To retrieve device context state, an application can call
For more information about how to use FinishCommandList, see How to: Record a Command List.
Windows?Phone?8: This API is supported.
+The
Bind a single vertex buffer to the input-assembler stage.
+The first input slot 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. The maximum of 16 or 32 input slots (ranges from 0 to
A
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
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of vertex buffers to the input-assembler stage.
+The first input slot 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. The maximum of 16 or 32 input slots (ranges from 0 to
A reference to an array of
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
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of vertex buffers to the input-assembler stage.
+The first input slot 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. The maximum of 16 or 32 input slots (ranges from 0 to
A reference to an array of vertex buffers (see
Pointer to an array of stride values; one stride value for each buffer in the vertex-buffer array. Each stride is the size (in bytes) of the elements that are to be used from that vertex buffer.
Pointer to an array of offset values; one offset value for each buffer in the vertex-buffer array. Each offset is the number of bytes between the first element of a vertex buffer and the first element that will be used.
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
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+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.
+Get or sets information about the primitive type, and data order that describes input data for the input assembler stage.
+Bind an input-layout object to the input-assembler stage.
+A reference to the input-layout object (see
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of vertex buffers to the input-assembler stage.
+For info about creating vertex buffers, see How to: Create a Vertex Buffer.
Calling this method using a buffer that is currently bound for writing (that is, bound to the stream output pipeline stage) will effectively bind
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Windows?Phone?8: This API is supported.
+Bind an index buffer to the input-assembler stage.
+ A reference to an
A
Offset (in bytes) from the start of the index buffer to the first index to use.
For information about creating index buffers, see How to: 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
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Windows?Phone?8: This API is supported.
+Bind information about the primitive type, and data order that describes input data for the input assembler stage.
+The type of primitive and ordering of the primitive data (see D3D11_PRIMITIVE_TOPOLOGY).
Windows?Phone?8: This API is supported.
+Get a reference to the input-layout object that is bound to the input-assembler stage.
+A reference to the input-layout object (see
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.
+Get the vertex buffers bound to the input-assembler stage.
+The input slot of the first vertex buffer to get. 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. The maximum of 16 or 32 input slots (ranges from 0 to
The number of vertex buffers to get starting at the offset. The number of buffers (plus the starting slot) cannot exceed the total number of IA-stage input slots.
A reference to an array of vertex buffers returned by the method (see
Pointer to an array of stride values returned by the method; one stride value for each buffer in the vertex-buffer array. Each stride value is the size (in bytes) of the elements that are to be used from that vertex buffer.
Pointer to an array of offset values returned by the method; one offset value for each buffer in the vertex-buffer array. Each offset is the number of bytes between the first element of a vertex buffer and the first element that will be used.
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.
+Get a reference to the index buffer that is bound to the input-assembler stage.
+A reference to an index buffer returned by the method (see
Specifies format of the data in the index buffer (see
Offset (in bytes) from the start of the index buffer, to the first index to use.
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.
+Get information about the primitive type, and data order that describes input data for the input assembler stage.
+A reference to the type of primitive, and ordering of the primitive data (see D3D11_PRIMITIVE_TOPOLOGY).
The
Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+Binds resources to the output-merger stage.
+Number of render-target views (ppRenderTargetViews) and depth-stencil view (ppDepthStencilView) to bind. If you set NumViews to D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL (0xffffffff), this method does not modify the currently bound render-target views (RTVs) and also does not modify depth-stencil view (DSV).
Pointer to an array of
Pointer to a
Index into a zero-based array to begin setting unordered-access views (ranges from 0 to
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - 1. D3D11_1_UAV_SLOT_COUNT is defined as 64.
For pixel shaders, UAVStartSlot should be equal to the number of render-target views being bound.
Number of unordered-access views (UAVs) in ppUnorderedAccessView. If you set NumUAVs to D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff), this method does not modify the currently bound unordered-access views.
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - UAVStartSlot.
Pointer to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is relevant only for UAVs that were created with either
For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that UAVs must be given an offset so that they are placed in the slots after the render target views that are being bound.
Note??RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.
Two RTVs conflict if they share a subresource (and therefore share the same resource).
Two UAVs conflict if they share a subresource (and therefore share the same resource).
An RTV conflicts with a UAV if they share a subresource or share a bind point.
OMSetRenderTargetsAndUnorderedAccessViews operates properly in the following situations:
NumViews != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL and NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews performs the following tasks:
NumViews == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppUnorderedAccessView.
OMSetRenderTargetsAndUnorderedAccessViews ignores ppDepthStencilView, and the current depth-stencil view remains bound.
NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only RTVs and DSV.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppRenderTargetViews and ppDepthStencilView.
OMSetRenderTargetsAndUnorderedAccessViews ignores UAVStartSlot.
Binds resources to the output-merger stage.
+Number of render-target views (ppRenderTargetViews) and depth-stencil view (ppDepthStencilView) to bind. If you set NumViews to D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL (0xffffffff), this method does not modify the currently bound render-target views (RTVs) and also does not modify depth-stencil view (DSV).
Pointer to an array of
Pointer to a
Index into a zero-based array to begin setting unordered-access views (ranges from 0 to
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - 1. D3D11_1_UAV_SLOT_COUNT is defined as 64.
For pixel shaders, UAVStartSlot should be equal to the number of render-target views being bound.
Number of unordered-access views (UAVs) in ppUnorderedAccessView. If you set NumUAVs to D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff), this method does not modify the currently bound unordered-access views.
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - UAVStartSlot.
Pointer to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is relevant only for UAVs that were created with either
For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that UAVs must be given an offset so that they are placed in the slots after the render target views that are being bound.
Note??RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.
Two RTVs conflict if they share a subresource (and therefore share the same resource).
Two UAVs conflict if they share a subresource (and therefore share the same resource).
An RTV conflicts with a UAV if they share a subresource or share a bind point.
OMSetRenderTargetsAndUnorderedAccessViews operates properly in the following situations:
NumViews != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL and NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews performs the following tasks:
NumViews == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppUnorderedAccessView.
OMSetRenderTargetsAndUnorderedAccessViews ignores ppDepthStencilView, and the current depth-stencil view remains bound.
NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only RTVs and DSV.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppRenderTargetViews and ppDepthStencilView.
OMSetRenderTargetsAndUnorderedAccessViews ignores UAVStartSlot.
Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
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.
+Binds resources to the output-merger stage.
+ Number of render targets to bind (ranges between 0 and
Pointer to an array of
Pointer to a
Index into a zero-based array to begin setting unordered-access views (ranges from 0 to
For the Direct3D 11.1 runtime, which is available starting with Windows?8, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - 1. D3D11_1_UAV_SLOT_COUNT is defined as 64.
For pixel shaders, UAVStartSlot should be equal to the number of render-target views being bound.
Number of unordered-access views (UAVs) in ppUnorderedAccessViews. If you set NumUAVs to D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff), this method does not modify the currently bound unordered-access views.
For the Direct3D 11.1 runtime, which is available starting with Windows?8, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - UAVStartSlot.
Pointer to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is relevant only for UAVs that were created with either
For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that UAVs must be given an offset so that they are placed in the slots after the render target views that are being bound.
Note??RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.?Two RTVs conflict if they share a subresource (and therefore share the same resource).
Two UAVs conflict if they share a subresource (and therefore share the same resource).
An RTV conflicts with a UAV if they share a subresource or share a bind point.
OMSetRenderTargetsAndUnorderedAccessViews operates properly in the following situations:
NumRTVs != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL and NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews performs the following tasks:
NumRTVs == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppUnorderedAccessViews.
OMSetRenderTargetsAndUnorderedAccessViews ignores ppDepthStencilView, and the current depth-stencil view remains bound.
NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only RTVs and DSV.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppRenderTargetViews and ppDepthStencilView.
OMSetRenderTargetsAndUnorderedAccessViews ignores UAVStartSlot.
Windows?Phone?8: This API is supported.
+Set the blend state of the output-merger stage.
+Pointer to a blend-state interface (see
Array of blend factors, one for each RGBA component. The blend factors modulate values for the pixel shader, render target, or both. If you created the blend-state object with
32-bit sample coverage. The default value is 0xffffffff. See remarks.
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
State | Default 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 |
?
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the depth-stencil state of the output-merger stage.
+Pointer to a depth-stencil state interface (see
Reference value to perform against when doing a depth-stencil test. See remarks.
To create a depth-stencil state interface, call
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get references to the resources bound to the output-merger stage.
+Number of render targets to retrieve.
Pointer to an array of
Pointer to a
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.
+Get references to the resources bound to the output-merger stage.
+The number of render-target views to retrieve.
Pointer to an array of
Pointer to a
Index into a zero-based array to begin retrieving unordered-access views (ranges from 0 to
Number of unordered-access views to return in ppUnorderedAccessViews. This number ranges from 0 to
Pointer to an array of
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.
Windows?Phone?8: This API is supported.
+Set the blend state of the output-merger stage.
+Pointer to a blend-state interface (see
Array of blend factors, one for each RGBA component. The blend factors modulate values for the pixel shader, render target, or both. If you created the blend-state object with
32-bit sample coverage. The default value is 0xffffffff. See remarks.
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
State | Default 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 |
?
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Gets the depth-stencil state of the output-merger stage.
+ Address of a reference to a depth-stencil state interface (see
Pointer to the stencil reference value used in the depth-stencil test.
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.
Windows?Phone?8: This API is supported.
+The
All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.
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
All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.
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
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; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
+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; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
+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; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
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; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
Gets or sets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+ If you call Map on a deferred context, you can only pass
For info about how to use Map, see How to: Use dynamic resources.
+Set the rasterizer state for the rasterizer stage of the pipeline.
+To create a rasterizer state interface, call
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of viewports to the rasterizer stage of the pipeline.
+Number of viewports to bind.
An array of
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; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
Note??Even though you specify float values to the members of theBind an array of scissor rectangles to the rasterizer stage.
+Number of scissor rectangles to bind.
An array of scissor rectangles (see D3D11_RECT).
All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.
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
Windows?Phone?8: This API is supported.
+Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+ If you call Map on a deferred context, you can only pass
For info about how to use Map, see How to: Use dynamic resources.
+Gets the array of viewports bound to the rasterizer stage.
+ A reference to a variable that, on input, specifies the number of viewports (ranges from 0 to D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) in the pViewports array; on output, the variable contains the actual number of viewports that are bound to the rasterizer stage. If pViewports is
An array of
Windows?Phone?8: This API is supported.
+Get the array of scissor rectangles bound to the rasterizer stage.
+The number of scissor rectangles (ranges between 0 and D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) bound; set pRects to
An array of scissor rectangles (see D3D11_RECT). If NumRects is greater than the number of scissor rects currently bound, then unused members of the array will contain 0.
The
Set the target output buffers for the stream-output stage of the pipeline.
+The number of buffer to bind to the device. A maximum of four output buffers can be set. If less than four are defined by the call, the remaining buffer slots are set to
The array of output buffers (see
Array of offsets to the output buffers from ppSOTargets, one offset for each buffer. The offset values must be in bytes.
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
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set the target output buffers for the stream-output stage of the pipeline.
+ The number of buffer to bind to the device. A maximum of four output buffers can be set. If less than four are defined by the call, the remaining buffer slots are set to
The array of output buffers (see
Array of offsets to the output buffers from ppSOTargets, one offset for each buffer. The offset values must be in bytes.
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
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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Windows?Phone?8: This API is supported.
+Get the target output buffers for the stream-output stage of the pipeline.
+Number of buffers to get.
An array of output buffers (see
A maximum of four output buffers can be retrieved.
The offsets to the output buffers pointed to in the returned ppSOTargets array may be assumed to be -1 (append), as defined for use in
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.
Windows?Phone?8: This API is supported.
+The device context interface represents a device context; it is used to render commands.
Copies a region from a source resource to a destination resource.
+A reference to the destination resource.
Destination subresource index.
The x-coordinate of the upper-left corner of the destination region.
The y-coordinate of the upper-left corner of the destination region. For a 1D subresource, this must be zero.
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.
Source subresource index.
A reference to a 3D box that defines the region of the source subresource that CopySubresourceRegion1 can copy. If
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, CopySubresourceRegion1 doesn't perform a copy operation.
A
If the display driver supports overlapping, the source and destination subresources can be identical, and the source and destination regions can overlap each other. For existing display drivers that don?t support overlapping, the runtime drops calls with identical source and destination subresources, regardless of whether the regions overlap. To determine whether the display driver supports overlapping, check the CopyWithOverlap member of
The CPU copies data from memory to a subresource created in non-mappable memory.
+A reference to the destination resource.
A zero-based index that identifies the destination subresource. See D3D11CalcSubresource for more details.
A reference to a box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. If
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, UpdateSubresource1 doesn't perform an update operation.
A reference to the source data in memory.
The size of one row of the source data.
The size of one depth slice of source data.
A
If you call UpdateSubresource1 to update a constant buffer, pass any region, and the driver has not been implemented to Windows?8, the runtime drops the call (except feature level 9.1, 9.2, and 9.3 where the runtime emulates support). The runtime also drops the call if you update a constant buffer with a partial region whose extent is not aligned to 16-byte granularity (16 bytes being a full constant). When the runtime drops the call, the runtime doesn't call the corresponding device driver interface (DDI).
When you record a call to UpdateSubresource with an offset pDstBox in a software command list, the offset in pDstBox is incorrectly applied to pSrcData when you play back the command list. The new-for-Windows?8UpdateSubresource1 fixes this issue. In a call to UpdateSubresource1, pDstBox does not affect pSrcData.
For info about various resource types and how UpdateSubresource1 might work with each resource type, see Introduction to a Resource in Direct3D 11.
Note??Applies only to feature level 9_x hardware If you use UpdateSubresource1 orDiscards a resource from the device context.
+A reference to the
DiscardResource informs the graphics processing unit (GPU) that the existing content in the resource that pResource points to is no longer needed.
+Discards a resource view from the device context.
+A reference to the
DiscardView informs the graphics processing unit (GPU) that the existing content in the resource view that pResourceView points to is no longer needed. The view can be an SRV, RTV, UAV, or DSV. DiscardView is a variation on the DiscardResource method. DiscardView allows you to discard a subset of a resource that is in a view (such as a single miplevel). More importantly, DiscardView provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, DiscardResource can do the job for any resource.
+Sets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to VSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to VSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to VSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to VSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to VSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to VSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the hull-shader stage of the pipeline uses.
+The runtime drops the call to HSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to HSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If the pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the hull-shader stage of the pipeline uses.
+The runtime drops the call to HSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to HSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If the pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the hull-shader stage of the pipeline uses.
+The runtime drops the call to HSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to HSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If the pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the domain-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to DSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to DSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the domain-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to DSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to DSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the domain-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to DSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to DSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to GSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to GSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to GSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to GSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to GSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to GSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
The runtime drops the call to PSSetConstantBuffers1 if the numbers of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components.
The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range):
[value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]
That is, the window is the range is from (value in an element of pFirstConstant) to (value in an element of pFirstConstant + value in an element of pNumConstants).
The runtime also drops the call to PSSetConstantBuffers1 on existing drivers that do not support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
The runtime drops the call to PSSetConstantBuffers1 if the numbers of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components.
The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range):
[value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]
That is, the window is the range is from (value in an element of pFirstConstant) to (value in an element of pFirstConstant + value in an element of pNumConstants).
The runtime also drops the call to PSSetConstantBuffers1 on existing drivers that do not support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
The runtime drops the call to PSSetConstantBuffers1 if the numbers of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components.
The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range):
[value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]
That is, the window is the range is from (value in an element of pFirstConstant) to (value in an element of pFirstConstant + value in an element of pNumConstants).
The runtime also drops the call to PSSetConstantBuffers1 on existing drivers that do not support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the compute-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to CSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to CSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the compute-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to CSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to CSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the compute-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to CSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to CSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Gets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the hull-shader stage uses.
+If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the domain-shader stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the pixel shader pipeline stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the compute-shader stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Activates the given context state object and changes the current device behavior to Direct3D?11, Direct3D?10.1, or Direct3D?10.
+A reference to the
A reference to a variable that receives a reference to the
SwapDeviceContextState changes device behavior. This device behavior depends on the emulated interface that you passed to the EmulatedInterface parameter of the
SwapDeviceContextState is not supported on a deferred context.
SwapDeviceContextState disables the incompatible device interfaces ID3D10Device, ID3D10Device1, __uuidof(
or __uuidof(
turns off most of the Direct3D?10 device interfaces. A context state object that is created with __uuidof(ID3D10Device1)
or __uuidof(ID3D10Device)
turns off most of the
SwapDeviceContextState activates the context state object specified by pState. This means that the device behaviors that are associated with the context state object's feature level and compatible interface are activated on the Direct3D device until the next call to SwapDeviceContextState. In addition, any state that was saved when this context state object was last active is now reactivated, so that the previous state is replaced.
SwapDeviceContextState sets ppPreviousState to the most recently activated context state object. The object allows the caller to save and then later restore the previous device state. This behavior is useful in a plug-in architecture such as Direct2D that shares a Direct3D device with its plug-ins. A Direct2D interface can use context state objects to save and restore the application's state.
If the caller did not previously call the
The feature level that is specified by the application, and that is chosen by the context state object from the acceptable list that the application supplies to
The feature level of the context state object controls the functionality available from the immediate context. However, to maintain the free-threaded contract of the Direct3D?11 device methods?the resource-creation methods in particular?the upper-bound feature level of all created context state objects controls the set of resources that the device creates.
Because the context state object interface is published by the immediate context, the interface requires the same threading model as the immediate context. Specifically, SwapDeviceContextState is single-threaded with respect to the other immediate context methods and with respect to the equivalent methods of ID3D10Device.
Crucially, because only one of the Direct3D?10 or Direct3D?11 ref-count behaviors can be available at a time, one of the Direct3D?10 and Direct3D?11 interfaces must break its ref-count contract. To avoid this situation, the activation of a context state object turns off the incompatible version interface. Also, if you call a method of an incompatible version interface, the call silently fails if the method has return type void, returns an
When you switch from Direct3D?11 mode to either Direct3D?10 mode or Direct3D?10.1 mode, the binding behavior of the device changes. Specifically, the final release of a resource induces unbind in Direct3D?10 mode or Direct3D?10.1 mode. During final release an application releases all of the resource's references, including indirect references such as the linkage from view to resource, and the linkage from context state object to any of the context state object's bound resources. Any bound resource to which the application has no reference is unbound and destroyed, in order to maintain the Direct3D?10 behavior.
SwapDeviceContextState does not affect any state that
Command lists that are generated by deferred contexts do not hold a reference to context state objects and are not affected by future updates to context state objects.
No asynchronous objects are affected by SwapDeviceContextState. For example, if a query is active before a call to SwapDeviceContextState, it is still active after the call.
+Sets all the elements in a resource view to one value.
+A reference to the
A 4-component array that represents the color to use to clear the resource view.
An array of D3D11_RECT structures for the rectangles in the resource view to clear. If
Number of rectangles in the array that the pRect parameter specifies.
ClearView works only on render-target views (RTVs), depth/stencil views (DSVs) on depth-only resources (resources with no stencil component), unordered-access views (UAVs), or any video view of a Texture2D surface. The runtime drops invalid calls. Empty rectangles in the pRect array are a no-op. A rectangle is empty if the top value equals the bottom value or the left value equals the right value.
ClearView doesn?t support 3D textures.
ClearView applies the same color value to all array slices in a view; all rectangles in the pRect array correspond to each array slice. The pRect array of rectangles is a set of areas to clear on a single surface. If the view is an array, ClearView clears all the rectangles on each array slice individually.
When you apply rectangles to buffers, set the top value to 0 and the bottom value to 1 and set the left value and right value to describe the extent within the buffer. When the top value equals the bottom value or the left value equals the right value, the rectangle is empty and a no-op is achieved.
The driver converts and clamps color values to the destination format as appropriate per Direct3D conversion rules. For example, if the format of the view is
If the format is integer, such as
Here are the color mappings:
For video views with YUV or YCbBr formats, ClearView doesn't convert color values. In situations where the format name doesn?t indicate _UNORM, _UINT, and so on, ClearView assumes _UINT. Therefore, 235.0f maps to 235 (rounds to zero, out of range/INF values clamp to target range, and NaN to 0).
+Discards the specified elements in a resource view from the device context.
+ A reference to the
An array of D3D11_RECT structures for the rectangles in the resource view to discard. If
Number of rectangles in the array that the pRects parameter specifies.
DiscardView1 informs the graphics processing unit (GPU) that the existing content in the specified elements in the resource view that pResourceView points to is no longer needed. The view can be an SRV, RTV, UAV, or DSV. DiscardView1 is a variation on the DiscardResource method. DiscardView1 allows you to discard elements of a subset of a resource that is in a view (such as elements of a single miplevel). More importantly, DiscardView1 provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, DiscardResource can do the job for any resource.
+The device context interface represents a device context; it is used to render commands.
Allows apps to determine when either a capture or profiling request is enabled.
+Returns TRUE if the capture tool is present and capturing or the app is being profiled such that SetMarkerInt or BeginEventInt will be logged to ETW. Otherwise, it returns
If apps detect that capture is being performed, they can prevent the Direct3D debugging tools, such as Microsoft Visual Studio?2013, from capturing them. The purpose of the
Updates mappings of tile locations in tiled resources to memory locations in a tile pool.
+A reference to the tiled resource.
The number of tiled resource regions.
An array of
An array of
A reference to the tile pool.
The number of tile-pool ranges.
An array of
An array of offsets into the tile pool. These are 0-based tile offsets, counting in tiles (not bytes).
An array of tiles.
An array of values that specify the number of tiles in each tile-pool range. The NumRanges parameter specifies the number of values in the array.
A combination of D3D11_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation.
Returns
The debug layer will emit an error.
If out of memory occurs when this is called in a commandlist and the commandlist is being executed, the device will be removed. Apps can avoid this situation by only doing update calls that change existing mappings from tiled resources within commandlists (so drivers will not have to allocate page table memory, only change the mapping).
In a single call to UpdateTileMappings, you can map one or more ranges of resource tiles to one or more ranges of tile-pool tiles.
You can organize the parameters of UpdateTileMappings in these ways to perform an update:
If pTiledResourceRegionStartCoordinates isn't
The updates are applied from first region to last; so, if regions overlap in a single call, the updates later in the list overwrite the areas that overlap with previous updates.
NumRanges specifies the number of tile ranges, where the total tiles identified across all ranges must match the total number of tiles in the tile regions from the previously described tiled resource. Mappings are defined by iterating through the tiles in the tile regions in sequential order - x then y then z order for box regions - while walking through the set of tile ranges in sequential order. The breakdown of tile regions doesn't have to line up with the breakdown of tile ranges, but the total number of tiles on both sides must be equal so that each tiled resource tile specified has a mapping specified.
pRangeFlags, pTilePoolStartOffsets, and pRangeTileCounts are all arrays, of size NumRanges, that describe the tile ranges. If pRangeFlags is
If tile mappings have changed on a tiled resource that the app will render via RenderTargetView or DepthStencilView, the app must clear, by using the fixed function Clear APIs, the tiles that have changed within the area being rendered (mapped or not). If an app doesn't clear in these situations, the app receives undefined values when it reads from the tiled resource. +
Note??In Direct3D 11.2, hardware can now support ClearView on depth-only formats. For more info, seeIf an app needs to preserve existing memory contents of areas in a tiled resource where mappings have changed, the app can first save the contents where tile mappings have changed, by copying them to a temporary surface, for example using CopyTiles, issuing the required Clear, and then copying the contents back. +
Suppose a tile is mapped into multiple tiled resources at the same time and tile contents are manipulated by any means (render, copy, and so on) via one of the tiled resources. Then, if the same tile is to be rendered via any other tiled resource, the tile must be cleared first as previously described. +
For more info about tiled resources, see Tiled resources.
Here are some examples of common UpdateTileMappings cases:
+Copies mappings from a source tiled resource to a destination tiled resource.
+A reference to the destination tiled resource.
A reference to a
A reference to the source tiled resource.
A reference to a
A reference to a
A combination of D3D11_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation. The only valid value is
Returns
The dest and the source regions must each entirely fit in their resource or behavior is undefined (debug layer will emit an error).
If out of memory occurs when this is called in a commandlist and the commandlist is being executed, the device will be removed. Applications can avoid this situation by only doing update calls that change existing mappings from Tiled Resources within commandlists (so drivers will not have to allocate page table memory, only change the mapping).
CopyTileMappings helps with tasks such as shifting mappings around within and across tiled resources, for example, scrolling tiles. The source and destination regions can overlap; the result of the copy in this situation is as if the source was saved to a temp location and then from there written to the destination.
For more info about tiled resources, see Tiled resources.
+Copies tiles from buffer to tiled resource or vice versa.
+A reference to a tiled resource.
A reference to a
A reference to a
A reference to an
The offset in bytes into the buffer at pBuffer to start the operation.
A combination of
CopyTiles drops write operations to unmapped areas and handles read operations from unmapped areas (except on Tier_1 tiled resources, where reading and writing unmapped areas is invalid).
If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation.
The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy and update APIs (like
The memory layout of the tiles in the non-tiled buffer resource side of the copy operation is linear in memory within 64 KB tiles, which the hardware and driver swizzle and deswizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing (MSAA) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use CopyTiles or
For more info about tiled resources, see Tiled resources.
+Updates tiles by copying from app memory to the tiled resource.
+A reference to a tiled resource to update.
A reference to a
A reference to a
A reference to memory that contains the source tile data that UpdateTiles uses to update the tiled resource.
A combination of
UpdateTiles drops write operations to unmapped areas (except on Tier_1 tiled resources, where writing to unmapped areas is invalid).
If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation.
The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy and update APIs (like
The memory layout of the data on the source side of the copy operation is linear in memory within 64 KB tiles, which the hardware and driver swizzle and deswizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing (MSAA) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use
For more info about tiled resources, see Tiled resources.
+Resizes a tile pool.
+A reference to an
The new size in bytes of the tile pool. The size must be a multiple of 64 KB or 0.
Returns
For E_INVALIDARG or E_OUTOFMEMORY, the existing tile pool remains unchanged, which includes existing mappings.
ResizeTilePool increases or decreases the size of the tile pool depending on whether the app needs more or less working set for the tiled resources that are mapped into it. An app can allocate additional tile pools for new tiled resources, but if any single tiled resource needs more space than initially available in its tile pool, the app can increase the size of the resource's tile pool. A tiled resource can't have mappings into multiple tile pools simultaneously.
When you increase the size of a tile pool, additional tiles are added to the end of the tile pool via one or more new allocations by the driver; your app can't detect the breakdown into the new allocations. Existing memory in the tile pool is left untouched, and existing tiled resource mappings into that memory remain intact.
When you decrease the size of a tile pool, tiles are removed from the end (this is allowed even below the initial allocation size, down to 0). This means that new mappings can't be made past the new size. But, existing mappings past the end of the new size remain intact and useable. The memory is kept active as long as mappings to any part of the allocations that are being used for the tile pool memory remains. If after decreasing, some memory has been kept active because tile mappings are pointing to it and the tile pool is increased again (by any amount), the existing memory is reused first before any additional allocations occur to service the size of the increase.
To be able to save memory, an app has to not only decrease a tile pool but also remove and remap existing mappings past the end of the new smaller tile pool size.
The act of decreasing (and removing mappings) doesn't necessarily produce immediate memory savings. Freeing of memory depends on how granular the driver's underlying allocations for the tile pool are. When a decrease in the size of a tile pool happens to be enough to make a driver allocation unused, the driver can free the allocation. If a tile pool was increased and if you then decrease to previous sizes (and remove and remap tile mappings correspondingly), you will most likely yield memory savings. But, this scenario isn't guaranteed in the case that the sizes don't exactly align with the underlying allocation sizes chosen by the driver.
For more info about tiled resources, see Tiled resources.
+Specifies a data access ordering constraint between multiple tiled resources. For more info about this constraint, see Remarks.
+A reference to an
A reference to an
Apps can use tiled resources to reuse tiles in different resources. But, a device and driver might not be able to determine whether some memory in a tile pool that was just rendered to is now being used for reading. +
For example, an app can render to some tiles in a tile pool with one tiled resource but then read from the same tiles by using a different tiled resource. These tiled-resource operations are different from using one resource and then just switching from writing with
When an app transitions from accessing (reading or writing) some location in a tile pool with one resource to accessing the same memory (read or write) via another tiled resource (with mappings to the same memory), the app must call TiledResourceBarrier after the first use of the resource and before the second. The parameters are the pTiledResourceOrViewAccessBeforeBarrier for accesses before the barrier (via rendering, copying), and the pTiledResourceOrViewAccessAfterBarrier for accesses after the barrier by using the same tile pool memory. If the resources are identical, the app doesn't need to call TiledResourceBarrier because this kind of hazard is already tracked and handled. +
The barrier call informs the driver that operations issued to the resource before the call must complete before any accesses that occur after the call via a different tiled resource that shares the same memory. +
Either or both of the parameters (before or after the barrier) can be
An app can pass a view reference, a resource, or
For more info about tiled resources, see Tiled resources.
+Allows apps to determine when either a capture or profiling request is enabled.
+Returns TRUE if capture or profiling is enabled and
Returns TRUE if the capture tool is present and capturing or the app is being profiled such that SetMarkerInt or BeginEventInt will be logged to ETW. Otherwise, it returns
If apps detect that capture is being performed, they can prevent the Direct3D debugging tools, such as Microsoft Visual Studio?2013, from capturing them. The purpose of the
Allows applications to annotate graphics commands.
+An optional string that will be logged to ETW when ETW logging is active. If ?#d? appears in the string, it will be replaced by the value of the Data parameter similar to the way printf works.
A signed data value that will be logged to ETW when ETW logging is active.
SetMarkerInt allows applications to annotate graphics commands, in order to provide more context to what the GPU is executing. When ETW logging or a support tool is enabled, an additional marker is correlated between the CPU and GPU timelines. The pLabel and Data value are logged to ETW. When the appropriate ETW logging is not enabled, this method does nothing.
+Allows applications to annotate the beginning of a range of graphics commands.
+An optional string that will be logged to ETW when ETW logging is active. If ?#d? appears in the string, it will be replaced by the value of the Data parameter similar to the way printf works.
A signed data value that will be logged to ETW when ETW logging is active.
BeginEventInt allows applications to annotate the beginning of a range of graphics commands, in order to provide more context to what the GPU is executing. When ETW logging (or a supported tool) is enabled, an additional marker is correlated between the CPU and GPU timelines. The pLabel and Data value are logged to ETW. When the appropriate ETW logging is not enabled, this method does nothing.
+Allows applications to annotate the end of a range of graphics commands.
+EndEvent allows applications to annotate the end of a range of graphics commands, in order to provide more context to what the GPU is executing. When the appropriate ETW logging is not enabled, this method does nothing. When ETW logging is enabled, an additional marker is correlated between the CPU and GPU timelines.
+ The device context interface represents a device context; it is used to render commands.
Gets or sets whether hardware protection is enabled.
+Sends queued-up commands in the command buffer to the graphics processing unit (GPU), with a specified context type and an optional event handle to create an event query.
+ A
An optional event handle. When specified, this method creates an event query.
Flush1 operates asynchronously, therefore it can return either before or after the GPU finishes executing the queued graphics commands, which will eventually complete. To create an event query, you can call
Flush1 has parameters. For more information, see
Sets the hardware protection state.
+Specifies whether to enable hardware protection.
Gets whether hardware protection is enabled.
+ After this method returns, points to a
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
For more information about the debug layer, see Debug Layer.
Windows?Phone?8: This API is supported.
+Get or sets the number of milliseconds to sleep after
Value is set with
Get or sets the swap chain that the runtime will use for automatically calling
The swap chain retrieved by this method will only be used if
Set a bit field of flags that will turn debug features on and off.
+A combination of feature-mask flags that are combined by using a bitwise OR operation. If a flag is present, that feature will be set to on, otherwise the feature will be set to off. For descriptions of the feature-mask flags, see Remarks.
This method returns one of the Direct3D 11 Return Codes.
Setting one of the following feature-mask flags will cause a rendering-operation method (listed below) to do some extra task when called.
Application will wait for the GPU to finish processing the rendering operation before continuing. | |
Runtime will additionally call | |
Runtime will call |
?
These feature-mask flags apply to the following rendering-operation methods:
By setting one of the following feature-mask flags, you can control the behavior of the
When you call | |
When you call |
?
The behavior of the
The following flag is supported by the Direct3D 11.1 runtime.
Disables the following default debugging behavior. |
?
When the debug layer is enabled, it performs certain actions to reveal application problems. By setting the
The following flag is supported by the Direct3D 11.2 runtime.
Disables the following default debugging behavior. |
?
By default (that is, without
If
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
Set the number of milliseconds to sleep after
This method returns one of the following Direct3D 11 Return Codes.
The application will only sleep if
Get the number of milliseconds to sleep after
Number of milliseconds to sleep after Present is called.
Value is set with
Sets a swap chain that the runtime will use for automatically calling
This method returns one of the following Direct3D 11 Return Codes.
The swap chain set by this method will only be used if
Get the swap chain that the runtime will use for automatically calling
This method returns one of the following Direct3D 11 Return Codes.
The swap chain retrieved by this method will only be used if
Check to see if the draw pipeline state is valid.
+A reference to the
This method returns one of the following Direct3D 11 Return Codes.
Use validate prior to calling a draw method (for example,
Report information about a device object's lifetime.
+A value from the
This method returns one of the following Direct3D 11 Return Codes.
ReportLiveDeviceObjects uses the value in Flags to determine the amount of information to report about a device object's lifetime.
+Verifies whether the dispatch pipeline state is valid.
+A reference to the
This method returns one of the return codes described in the topic Direct3D 11 Return Codes.
Use this method before you call a dispatch method (for example,
A domain-shader interface manages an executable program (a domain shader) that controls the domain-shader stage.
+The domain-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a domain-shader interface, call
This interface is defined in D3D11.h.
+The device context interface represents a device context; it is used to render commands.
Optional flags that control the behavior of
Specifies the type of Microsoft Direct3D authenticated channel.
+Direct3D?11 channel. This channel provides communication with the Direct3D runtime.
Software driver channel. This channel provides communication with a driver that implements content protection mechanisms in software.
Hardware driver channel. This channel provides communication with a driver that implements content protection mechanisms in the GPU hardware.
Specifies the type of process that is identified in the
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:
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
Bind a buffer as a vertex buffer to the input-assembler stage.
Bind a buffer as an index buffer to the input-assembler stage.
Bind a buffer as a constant buffer to a shader stage; this flag may NOT be combined with any other bind flag.
Bind a buffer or texture to a shader stage; this flag cannot be used with the
Bind an output buffer for the stream-output stage.
Bind a texture as a render target for the output-merger stage.
Bind a texture as a depth-stencil target for the output-merger stage.
Bind an unordered access resource.
Set this flag to indicate that a 2D texture is used to receive output from the decoder API. The common way to create resources for a decoder output is by calling the
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that a 2D texture is used to receive input from the video encoder API. The common way to create resources for a video encoder is by calling the
Direct3D 11:??This value is not supported until Direct3D 11.1.
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.
+Add source 1 and source 2.
Subtract source 1 from source 2.
Subtract source 2 from source 1.
Find the minimum of source 1 and source 2.
Find the maximum of source 1 and source 2.
Blend factors, which modulate values for the pixel shader and render target.
+Blend operations are specified in a blend description.
+The blend factor is (0, 0, 0, 0). No pre-blend operation.
The blend factor is (1, 1, 1, 1). No pre-blend operation.
The blend factor is (R?, G?, B?, A?), that is color data (RGB) from a pixel shader. No pre-blend operation.
The blend factor is (1 - R?, 1 - G?, 1 - B?, 1 - A?), that is color data (RGB) from a pixel shader. The pre-blend operation inverts the data, generating 1 - RGB.
The blend factor is (A?, A?, A?, A?), that is alpha data (A) from a pixel shader. No pre-blend operation.
The blend factor is ( 1 - A?, 1 - A?, 1 - A?, 1 - A?), that is alpha data (A) from a pixel shader. The pre-blend operation inverts the data, generating 1 - A.
The blend factor is (Ad Ad Ad Ad), that is alpha data from a render target. No pre-blend operation.
The blend factor is (1 - Ad 1 - Ad 1 - Ad 1 - Ad), that is alpha data from a render target. The pre-blend operation inverts the data, generating 1 - A.
The blend factor is (Rd, Gd, Bd, Ad), that is color data from a render target. No pre-blend operation.
The blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad), that is color data from a render target. The pre-blend operation inverts the data, generating 1 - RGB.
The blend factor is (f, f, f, 1); where f = min(A?, 1 - Ad). The pre-blend operation clamps the data to 1 or less. +
The blend factor is the blend factor set with
The blend factor is the blend factor set with
The blend factor is data sources both as color data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.
The blend factor is data sources both as color data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - RGB. This blend factor supports dual-source color blending.
The blend factor is data sources as alpha data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.
The blend factor is data sources as alpha data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - A. This blend factor supports dual-source color blending.
Specifies the type of I/O bus that is used by the graphics adapter.
+Indicates a type of bus other than the types listed here. +
PCI bus. +
PCI-X bus. +
PCI Express bus. +
Accelerated Graphics Port (AGP) bus. +
The implementation for the graphics adapter is in a motherboard chipset's north bridge. This flag implies that data never goes over an expansion bus (such as PCI or AGP) when it is transferred from main memory to the graphics adapter.
Indicates that the graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are soldered to the motherboard. This flag implies that data never goes over an expansion bus (such as PCI or AGP) when it is transferred from main memory to the graphics adapter.
The graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are connected through sockets to the motherboard. +
The graphics adapter is connected to the motherboard through a daughterboard connector. +
The graphics adapter is connected to the motherboard through a daughterboard connector, and the graphics adapter is inside an enclosure that is not user accessible. +
One of the D3D11_BUS_IMPL_MODIFIER_Xxx flags is set. +
Identifies how to check multisample quality levels.
+Indicates to check the multisample quality levels of a tiled resource.
Identify which components of each pixel of a render target are writable during blending.
+These flags can be combined with a bitwise OR.
+Allow data to be stored in the red component.
Allow data to be stored in the green component.
Allow data to be stored in the blue component.
Allow data to be stored in the alpha component.
Allow data to be stored in all components.
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
Never pass the comparison.
If the source data is less than the destination data, the comparison passes.
If the source data is equal to the destination data, the comparison passes.
If the source data is less than or equal to the destination data, the comparison passes.
If the source data is greater than the destination data, the comparison passes.
If the source data is not equal to the destination data, the comparison passes.
If the source data is greater than or equal to the destination data, the comparison passes.
Always pass the comparison.
Unordered resource support options for a compute shader resource (see
Identifies whether conservative rasterization is on or off.
+Conservative rasterization is off.
Conservative rasterization is on.
Specifies if the hardware and driver support conservative rasterization and at what tier level.
+Conservative rasterization isn't supported.
Tier_1 conservative rasterization is supported.
Tier_2 conservative rasterization is supported.
Tier_3 conservative rasterization is supported.
Contains flags that describe content-protection capabilities.
+The content protection is implemented in software by the driver.
The content protection is implemented in hardware by the GPU. +
Content protection is always applied to a protected surface, regardless of whether the application explicitly enables protection.
The driver can use partially encrypted buffers. If this capability is not present, the entire buffer must be either encrypted or clear.
The driver can encrypt data using a separate content key that is encrypted using the session key.
The driver can refresh the session key without renegotiating the key.
The driver can read back encrypted data from a protected surface. For more information, see
The driver requires a separate key to read encrypted data from a protected surface.
If the encryption type is D3DCRYPTOTYPE_AES128_CTR, the application must use a sequential count in the
The driver supports encrypted slice data, but does not support any other encrypted data in the compressed buffer. The caller should not encrypt any data within the buffer other than the slice data.
Note??The driver should only report this flag for the specific profiles that have this limitation. ?The driver can copy encrypted data from one resource to another, decrypting the data as part of the process.
The hardware supports the protection of specific resources. This means that:
Note??This enumeration value is supported starting with Windows?10.
Physical pages of a protected resource can be evicted and potentially paged to disk in low memory conditions without losing the contents of the resource when paged back in.
Note??This enumeration value is supported starting with Windows?10.
The hardware supports an automatic teardown mechanism that could trigger hardware keys or protected content to become lost in some conditions. The application can register to be notified when these events occur.
Note??This enumeration value is supported starting with Windows?10.
The secure environment is tightly coupled with the GPU and an
Note??This enumeration value is supported starting with Windows?10.
Specifies the context in which a query occurs.
+This enum is used by the following:
The query can occur in all contexts.
The query occurs in the context of a 3D command queue.
The query occurs in the context of a 3D compute queue.
The query occurs in the context of a 3D copy queue.
The query occurs in the context of video.
Specifies how to handle the existing contents of a resource during a copy or update operation of a region within that resource.
+The existing contents of the resource cannot be overwritten.
The existing contents of the resource are undefined and can be discarded.
Options for performance counters.
+Independent hardware vendors may define their own set of performance counters for their devices, by giving the enumeration value a number that is greater than the value for
This enumeration is used by
Define a performance counter that is dependent on the hardware device.
Data type of a performance counter.
+These flags are an output parameter in
32-bit floating point.
16-bit unsigned integer.
32-bit unsigned integer.
64-bit unsigned integer.
Specifies the types of CPU access allowed for a resource.
+This enumeration is used in
Applications may combine one or more of these flags with a logical OR. When possible, create resources with no CPU access flags, as this enables better resource optimization.
The
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
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
Describes flags that are used to create a device context state object (
Represents the status of an
Indicates triangles facing a particular direction are not drawn.
+This enumeration is part of a rasterizer-state object description (see
Always draw all triangles.
Do not draw triangles that are front-facing.
Do not draw triangles that are back-facing.
Specifies the parts of the depth stencil to clear.
+ These flags are used when calling
Clear the depth buffer, using fast clear if possible, then place the resource in a compressed state.
Clear the stencil buffer, using fast clear if possible, then place the resource in a compressed state.
Specifies how to access a resource used in a depth-stencil view.
+This enumeration is used in
The resource will be accessed as a 1D texture.
The resource will be accessed as an array of 1D textures.
The resource will be accessed as a 2D texture.
The resource will be accessed as an array of 2D textures.
The resource will be accessed as a 2D texture with multisampling.
The resource will be accessed as an array of 2D textures with multisampling.
Depth-stencil view options.
+This enumeration is used by
Limiting a depth-stencil buffer to read-only access allows more than one depth-stencil view to be bound to the pipeline simultaneously, since it is not possible to have a read/write conflicts between separate views.
+Indicates that depth values are read only.
Indicates that stencil values are read only.
Identify the portion of a depth-stencil buffer for writing depth data.
+Turn off writes to the depth-stencil buffer.
Turn on writes to the depth-stencil buffer.
Device context options.
+This enumeration is used by
The device context is an immediate context.
The device context is a deferred context.
Describes parameters that are used to create a device.
+Device creation flags are used by
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
Use this flag if your application will only call methods of Direct3D?11 interfaces from a single thread. By default, the
Creates a device that supports the debug layer.
To use this flag, you must have D3D11*SDKLayers.dll installed; otherwise, device creation fails. To get D3D11_1SDKLayers.dll, install the SDK for Windows?8.
Prevents multiple threads from being created. When this flag is used with a Windows Advanced Rasterization Platform (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.
Creates a device that supports BGRA formats (
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, install the SDK for Windows?8.
If you use this flag and the current driver does not support shader debugging, device creation fails. Shader debugging requires a driver that is implemented to the WDDM for Windows?8 (WDDM 1.2).
Direct3D 11:??This value is not supported until Direct3D 11.1.
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; instead use
Direct3D 11:??This value is not supported until Direct3D 11.1.
Use this flag if the device will produce GPU workloads that take more than two seconds to complete, and you want the operating system to allow them to successfully finish. If this flag is not set, the operating system performs timeout detection and recovery when it detects a GPU packet that took more than two seconds to execute. If this flag is set, the operating system allows such a long running packet to execute without resetting the GPU. We recommend not to set this flag if your device needs to be highly responsive so that the operating system can detect and recover from GPU timeouts. We recommend to set this flag if your device needs to perform time consuming background tasks such as compute, image recognition, and video encoding to allow such tasks to successfully finish.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Forces the creation of the Direct3D device to fail if the display driver is not implemented to the WDDM for Windows?8 (WDDM 1.2). When the display driver is not implemented to WDDM 1.2, only a Direct3D device that is created with feature level 9.1, 9.2, or 9.3 supports video; therefore, if this flag is set, the runtime creates the Direct3D device only for feature level 9.1, 9.2, or 9.3. We recommend not to specify this flag for applications that want to favor Direct3D capability over video. If feature level 10 and higher is available, the runtime will use that feature level regardless of video support.
If this flag is set, device creation on the Basic Render Device (BRD) will succeed regardless of the BRD's missing support for video decode. This is because the Media Foundation video stack operates in software mode on BRD. In this situation, if you force the video stack to create the Direct3D device twice (create the device once with this flag, next discover BRD, then again create the device without the flag), you actually degrade performance.
If you attempt to create a Direct3D device with driver type
Direct3D 11:??This value is not supported until Direct3D 11.1.
Direct3D 11 feature options.
+ This enumeration is used when querying a driver about support for these features by calling
The driver supports multithreading. To see an example of testing a driver for multithread support, see How To: Check for Driver Support. Refer to
Supports the use of the double-precision shaders in HLSL. Refer to
Supports the formats in
Supports the formats in
Supports compute shaders and raw and structured buffers. Refer to
Supports Direct3D 11.1 feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports specific adapter architecture. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports Direct3D?9 feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports minimum precision of shaders. For more info about HLSL minimum precision, see using HLSL minimum precision. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports Direct3D?9 shadowing feature. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports Direct3D 11.2 feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D 11.2 instancing options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D 11.2 marker options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D?9 feature options, which includes the Direct3D?9 shadowing feature and instancing support. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D 11.3 conservative rasterization feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.3.
Supports Direct3D 11.4 conservative rasterization feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.4.
Supports GPU virtual addresses. Refer to
Supports a single boolean for NV12 shared textures. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.4.
Device context options.
+This enumeration is used by
The device context is an immediate context.
The device context is a deferred context.
Determines the fill mode to use when rendering triangles.
+This enumeration is part of a rasterizer-state object description (see
Draw lines connecting the vertices. Adjacent vertices are not drawn.
Fill the triangles formed by the vertices. Adjacent vertices are not drawn.
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 Function | Texture Sampling Function with Comparison Filtering |
---|---|
sample | samplecmp or samplecmplevelzero |
?
Comparison filters only work with textures that have the following DXGI formats: R32_FLOAT_X8X24_TYPELESS, R32_FLOAT, R24_UNORM_X8_TYPELESS, R16_UNORM.
+Use point sampling for minification, magnification, and mip-level sampling.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.
Use linear interpolation for minification, magnification, and mip-level sampling.
Use anisotropic interpolation for minification, magnification, and mip-level sampling.
Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Specifies the type of sampler filter reduction.
+ This enum is used by the
Indicates standard (default) filter reduction.
Indicates a comparison filter reduction.
Indicates minimum filter reduction.
Indicates maximum filter reduction.
Types of magnification or minification sampler filters.
+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.
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.
Which resources are supported for a given format and given device (see
Type of data contained in an input slot.
+Use these values to specify the type of data for a particular input element (see
Input data is per-vertex data.
Input data is per-instance data.
Specifies logical operations to configure for a render target.
+Clears the render target.
Sets the render target.
Copys the render target.
Performs an inverted-copy of the render target.
No operation is performed on the render target.
Inverts the render target.
Performs a logical AND operation on the render target.
Performs a logical NAND operation on the render target.
Performs a logical OR operation on the render target.
Performs a logical NOR operation on the render target.
Performs a logical XOR operation on the render target.
Performs a logical equal operation on the render target.
Performs a logical AND and reverse operation on the render target.
Performs a logical AND and invert operation on the render target.
Performs a logical OR and reverse operation on the render target.
Performs a logical OR and invert operation on the render target.
Specifies how the CPU should respond when an application calls the
This enumeration is used by
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
These remarks are divided into the following topics:
Resource is mapped for reading. The resource must have been created with read access (see
Resource is mapped for writing. The resource must have been created with write access (see
Resource is mapped for reading and writing. The resource must have been created with read and write access (see
Resource is mapped for writing; the previous contents of the resource will be undefined. The resource must have been created with write access and dynamic usage (See
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
Categories of debug messages. This will identify the category of a message when retrieving a message with
This is part of the Information Queue feature. See
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
Defines some type of corruption which has occurred.
Defines an error message.
Defines a warning message.
Defines an information message.
Defines a message other than corruption, error, warning, or information.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Flags that describe miscellaneous query behavior.
+This flag is part of a query description (see
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
Query types.
+ Create a query with
Determines whether or not the GPU is finished processing commands. When the GPU is finished processing commands
Get the number of samples that passed the depth and stencil tests in between
Get a timestamp value where
Determines whether or not a
Get pipeline statistics, such as the number of pixel shader invocations in between
Similar to
Get streaming output statistics, such as the number of primitives streamed out in between
Determines whether or not any of the streaming output buffers overflowed in between
Get streaming output statistics for stream 0, such as the number of primitives streamed out in between
Determines whether or not the stream 0 output buffers overflowed in between
Get streaming output statistics for stream 1, such as the number of primitives streamed out in between
Determines whether or not the stream 1 output buffers overflowed in between
Get streaming output statistics for stream 2, such as the number of primitives streamed out in between
Determines whether or not the stream 2 output buffers overflowed in between
Get streaming output statistics for stream 3, such as the number of primitives streamed out in between
Determines whether or not the stream 3 output buffers overflowed in between
These flags identify the type of resource that will be viewed as a render target.
+This enumeration is used in
Do not use this value, as it will cause
The resource will be accessed as a buffer.
The resource will be accessed as a 1D texture.
The resource will be accessed as an array of 1D textures.
The resource will be accessed as a 2D texture.
The resource will be accessed as an array of 2D textures.
The resource will be accessed as a 2D texture with multisampling.
The resource will be accessed as an array of 2D textures with multisampling.
The resource will be accessed as a 3D texture.
Options for the amount of information to report about a device object's lifetime.
+ This enumeration is used by
Several inline functions exist to combine the options using operators, see the D3D11SDKLayers.h header file for details.
+Specifies to obtain a summary about a device object's lifetime.
Specifies to obtain detailed information about a device object's lifetime.
Do not use this enumeration constant. It is for internal use only.
Identifies the type of resource being used.
+This enumeration is used in
Resource is of unknown type.
Resource is a buffer.
Resource is a 1D texture.
Resource is a 2D texture.
Resource is a 3D texture.
Identifies options for resources.
+ This enumeration is used in
These flags can be combined by bitwise OR.
The
Enables MIP map generation by using
Enables resource data sharing 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. If you try to create a resource with this flag on either a WARP or REF device, the create method will return an E_OUTOFMEMORY error code.
Note?? Starting with Windows?8, WARP devices fully support shared resources. ? Note?? Starting with Windows?8, we recommend that you enable resource data sharing between two or more Direct3D devices by using a combination of theSets a resource to be a cube texture created from a Texture2DArray that contains 6 textures.
Enables instancing of GPU-generated content.
Enables a resource as a byte address buffer.
Enables a resource as a structured buffer.
Enables a resource with MIP map clamping for use with
Enables the resource to be synchronized by using the
If you call any of these methods with the
WARP and REF devices do not support shared resources. If you try to create a resource with this flag on either a WARP or REF device, the create method will return an E_OUTOFMEMORY error code.
Note?? Starting with Windows?8, WARP devices fully support shared resources. ? Enables a resource compatible with GDI. You must set the
Consider the following programming tips for using
You must set the texture format to one of the following types.
Set this flag to enable the use of NT HANDLE values when you create a shared resource. By enabling this flag, you deprecate the use of existing HANDLE values.
When you use this flag, you must combine it with the
Without this flag set, the runtime does not strictly validate shared resource parameters (that is, formats, flags, usage, and so on). When the runtime does not validate shared resource parameters, behavior of much of the Direct3D API might be undefined and might vary from driver to driver.
Direct3D 11 and earlier:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the resource might contain protected content; therefore, the operating system should use the resource only when the driver and hardware support content protection. If the driver and hardware do not support content protection and you try to create a resource with this flag, the resource creation fails.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the operating system restricts access to the shared surface. You can use this flag together with the
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the driver restricts access to the shared surface. You can use this flag in conjunction with the
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the resource is guarded. Such a resource is returned by the
A guarded resource automatically restricts all writes to the region that is related to one of the preceding APIs. Additionally, the resource enforces access to the ROI with these restrictions:
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the resource is a tile pool.
Direct3D 11:??This value is not supported until Direct3D 11.2.
Set this flag to indicate that the resource is a tiled resource.
Direct3D 11:??This value is not supported until Direct3D 11.2.
Set this flag to indicate that the resource should be created such that it will be protected by the hardware. Resource creation will fail if hardware content protection is not supported.
This flag has the following restrictions:
Creating a texture using this flag does not automatically guarantee that hardware protection will be enabled for the underlying allocation. Some implementations require that the DRM components are first initialized prior to any guarantees of protection.
?Note?? This enumeration value is supported starting with Windows?10.
Identifies expected resource use during rendering. The usage directly reflects whether a resource is accessible by the CPU and/or the graphics processing unit (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:
Differences between Direct3D 9 and Direct3D 10/11: 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/11, 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. |
?
+A resource that requires read and write access by the GPU. This is likely to be the most common usage choice.
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.
A resource that is accessible by both the GPU (read only) 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 update a dynamic resource, use a Map method.
For info about how to use dynamic resources, see How to: Use dynamic resources.
A resource that supports data transfer (copy) from the GPU to the CPU.
Describes the level of support for shader caching in the current graphics driver.
+This enum is used by the D3D_FEATURE_DATA_SHADER_CACHE structure.
+Indicates that the driver does not support shader caching.
Indicates that the driver supports an OS-managed shader cache that stores compiled shaders in memory during the current run of the application.
Indicates that the driver supports an OS-managed shader cache that stores compiled shaders on disk to accelerate future runs of the application.
Values that specify minimum precision levels at shader stages.
+Minimum precision level is 10-bit.
Minimum precision level is 16-bit.
Identifies how to view a buffer resource.
+This enumeration is used by
View the buffer as raw. For more info about raw viewing of buffers, see Raw Views of Buffers.
Options that specify how to perform shader debug tracking.
+This enumeration is used by the following methods:
No debug tracking is performed.
Track the reading of uninitialized data.
Track read-after-write hazards.
Track write-after-read hazards.
Track write-after-write hazards.
Track that hazards are allowed in which data is written but the value does not change.
Track that only one type of atomic operation is used on an address.
Track read-after-write hazards across thread groups.
Track write-after-read hazards across thread groups.
Track write-after-write hazards across thread groups.
Track that only one type of atomic operation is used on an address across thread groups.
Track hazards that are specific to unordered access views (UAVs).
Track all hazards.
Track all hazards and track that hazards are allowed in which data is written but the value does not change.
All of the preceding tracking options are set except
Indicates which resource types to track.
+The
No resource types are tracked.
Track device memory that is created with unordered access view (UAV) bind flags.
Track device memory that is created without UAV bind flags.
Track all device memory.
Track all shaders that use group shared memory.
Track all device memory except device memory that is created without UAV bind flags.
Track all device memory except device memory that is created with UAV bind flags.
Track all memory on the device.
Specifies a multi-sample pattern type.
+An app calls
The runtime defines the following standard sample patterns for 1(trivial), 2, 4, 8, and 16 sample counts. Hardware must support 1, 4, and 8 sample counts. Hardware vendors can expose more sample counts beyond these. However, if vendors support 2, 4(required), 8(required), or 16, they must also support the corresponding standard pattern or center pattern for each of those sample counts.
+Pre-defined multi-sample patterns required for Direct3D?11 and Direct3D?10.1 hardware.
Pattern where all of the samples are located at the pixel center.
The stencil operations that can be performed during depth-stencil testing.
+Keep the existing stencil data.
Set the stencil data to 0.
Set the stencil data to the reference value set by calling
Increment the stencil value by 1, and clamp the result.
Decrement the stencil value by 1, and clamp the result.
Invert the stencil data.
Increment the stencil value by 1, and wrap the result if necessary.
Decrement the stencil value by 1, and wrap the result if necessary.
Identify a technique for resolving texture coordinates that are outside of the boundaries of a texture.
+Tile the texture at every (u,v) integer junction. For example, for u values between 0 and 3, the texture is repeated three times.
Flip the texture at every (u,v) 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.
Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in
Similar to
The different faces of a cube texture.
+Positive X face.
Negative X face.
Positive Y face.
Negative Y face.
Positive Z face.
Negative Z face.
Specifies texture layout options.
+This enumeration controls the swizzle pattern of default textures and enable map support on default textures. Callers must query
The standard swizzle formats applies within each page-sized chunk, and pages are laid out in linear order with respect to one another. A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location.
To demonstrate, consider the 32bpp swizzle format above. This is represented by the following interleave masks, where bits on the left are most-significant.
UINT xBytesMask = 1010 1010 1000 1111
+ UINT yMask = 0101 0101 0111 0000
+
To compute the swizzled address, the following code could be used (where the _pdep_u32 instruction is supported):
UINT swizzledOffset = resourceBaseOffset + _pdep_u32(xOffset, xBytesMask) + _pdep_u32(yOffset, yBytesMask);
+
+ The texture layout is undefined, and is selected by the driver.
Data for the texture is stored in row major (sometimes called pitch-linear) order.
A default texture uses the standardized swizzle pattern.
Identifies how to copy a tile.
+Indicates that the GPU isn't currently referencing any of the portions of destination memory being written. +
Indicates that the
Indicates that the
Indicates the tier level at which tiled resources are supported.
+Tiled resources are not supported.
Tier_1 tiled resources are supported.
The device supports calls to CreateTexture2D and so on with the
The device supports calls to CreateBuffer with the
If you access tiles (read or write) that are
Tier_2 tiled resources are supported.
Superset of Tier_1 functionality, which includes this additional support:
Tier_3 tiled resources are supported.
Superset of Tier_2 functionality, Tier 3 is essentially Tier 2 but with the additional support of Texture3D for Tiled Resources.
Identifies how to perform a tile-mapping operation.
+Indicates that no overwriting of tiles occurs in the tile-mapping operation.
Specifies a range of tile mappings to use with
Identifies unordered-access view options for a buffer resource.
+Resource contains raw, unstructured data. Requires the UAV format to be
Allow data to be appended to the end of the buffer.
Adds a counter to the unordered-access-view buffer.
Unordered-access view options.
+ This enumeration is used by a unordered access-view description (see
The view type is unknown.
View the resource as a buffer.
View the resource as a 1D texture.
View the resource as a 1D texture array.
View the resource as a 2D texture.
View the resource as a 2D texture array.
View the resource as a 3D texture array.
Specifies how to access a resource that is used in a video decoding output view.
+This enumeration is used with the
Not a valid value.
The resource will be accessed as a 2D texture. +
Specifies a type of compressed buffer for decoding.
+Picture decoding parameter buffer. +
Macroblock control command buffer. +
Residual difference block data buffer. +
Deblocking filter control command buffer. +
Inverse quantization matrix buffer. +
Slice-control buffer. +
Bitstream data buffer. +
Motion vector buffer. +
Film grain synthesis data buffer. +
Specifies capabilities of the video decoder.
+Indicates that the graphics driver supports at least a subset of downsampling operations.
Indicates that the decoding hardware cannot support the decode operation in real-time. Decoding is still supported for transcoding scenarios. With this capability, it is possible that decoding can occur in real-time if downsampling is enabled. +
Indicates that the driver supports changing down sample parameters after the initial down sample parameters have been applied. For more information, see
Describes how a video stream is interlaced.
+Frames are progressive.
Frames are interlaced. The top field of each frame is displayed first.
Frame are interlaced. The bottom field of each frame is displayed first.
Specifies the alpha fill mode for video processing.
+Alpha values inside the target rectangle are set to opaque.
Alpha values inside the target rectangle are set to the alpha value specified in the background color. To set the background color, call the
Existing alpha values remain unchanged in the output surface.
Alpha values are taken from an input stream, scaled, and copied to the corresponding destination rectangle for that stream. The input stream is specified in the StreamIndex parameter of the
If the input stream does not have alpha data, the video processor sets the alpha values in the target rectangle to opaque. If the input stream is disabled or the source rectangle is empty, the alpha values in the target rectangle are not modified.
Specifies the automatic image processing capabilities of the video processor.
+Denoise.
Deringing.
Edge enhancement.
Color correction.
Flesh-tone mapping.
Image stabilization.
Enhanced image resolution.
Anamorphic scaling.
Specifies flags that indicate the most efficient methods for performing video processing operations.
+Multi-plane overlay hardware can perform the rotation operation more efficiently than the
Multi-plane overlay hardware can perform the scaling operation more efficiently than the
Multi-plane overlay hardware can perform the colorspace conversion operation more efficiently than the
The video processor output data should be at least triple buffered for optimal performance.
Defines video processing capabilities for a Microsoft Direct3D?11 video processor.
+The video processor can blend video content in linear color space. Most video content is gamma corrected, resulting in nonlinear values. This capability flag means that the video processor converts colors to linear space before blending, which produces better results.
The video processor supports the xvYCC color space for YCbCr data.
The video processor can perform range conversion when the input and output are both RGB but use different color ranges (0-255 or 16-235, for 8-bit RGB).
The video processor can apply a matrix conversion to YCbCr values when the input and output are both YCbCr. For example, the driver can convert colors from BT.601 to BT.709.
The video processor supports YUV nominal range .
Supported in Windows?8.1 and later.
Defines features that a Microsoft Direct3D?11 video processor can support.
+The video processor can set alpha values on the output pixels. For more information, see
The video processor can downsample the video output. For more information, see
The video processor can perform luma keying. For more information, see
The video processor can apply alpha values from color palette entries.
The driver does not support full video processing capabilities. If this capability flag is set, the video processor has the following limitations:
The video processor can support 3D stereo video. For more information, see
All drivers setting this caps must support the following stereo formats:
The driver can rotate the input data either 90, 180, or 270 degrees clockwise as part of the video processing operation.
The driver supports the VideoProcessorSetStreamAlpha call.
The driver supports the VideoProcessorSetStreamPixelAspectRatio call.
Identifies a video processor filter.
+Brightness filter.
Contrast filter.
Hue filter.
Saturation filter.
Noise reduction filter.
Edge enhancement filter.
Anamorphic scaling filter.
Stereo adjustment filter. When stereo 3D video is enabled, this filter adjusts the offset between the left and right views, allowing the user to reduce potential eye strain.
The filter value indicates the amount by which the left and right views are adjusted. A positive value shifts the images away from each other: the left image toward the left, and the right image toward the right. A negative value shifts the images in the opposite directions, closer to each other.
Defines image filter capabilities for a Microsoft Direct3D?11 video processor.
+These capability flags indicate support for the image filters defined by the
The video processor can adjust the brightness level.
The video processor can adjust the contrast level.
The video processor can adjust hue.
The video processor can adjust the saturation level.
The video processor can perform noise reduction.
The video processor can perform edge enhancement.
The video processor can perform anamorphic scaling. Anamorphic scaling can be used to stretch 4:3 content to a widescreen 16:9 aspect ratio.
For stereo 3D video, the video processor can adjust the offset between the left and right views, allowing the user to reduce potential eye strain.
Defines capabilities related to input formats for a Microsoft Direct3D?11 video processor.
+These flags define video processing capabilities that usually are not needed, and that video devices are therefore not required to support.
The first three flags relate to RGB support for functions that are normally applied to YCbCr video: deinterlacing, color adjustment, and luma keying. A device that supports these functions for YCbCr is not required to support them for RGB input. Supporting RGB input for these functions is an additional capability, reflected by these constants. Note that the driver might convert the input to another color space, perform the indicated function, and then convert the result back to RGB.
Similarly, a device that supports deinterlacing is not required to support deinterlacing of palettized formats. This capability is indicated by the
The video processor can deinterlace an input stream that contains interlaced RGB video.
The video processor can perform color adjustment on RGB video.
The video processor can perform luma keying on RGB video.
The video processor can deinterlace input streams with palettized color formats.
Specifies how a video format can be used for video processing.
+The format can be used as the input to the video processor.
The format can be used as the output from the video processor.
Specifies the inverse telecine (IVTC) capabilities of a video processor.
+The video processor can reverse 3:2 pulldown.
The video processor can reverse 2:2 pulldown.
The video processor can reverse 2:2:2:4 pulldown.
The video processor can reverse 2:3:3:2 pulldown.
The video processor can reverse 3:2:3:2:2 pulldown.
The video processor can reverse 5:5 pulldown.
The video processor can reverse 6:4 pulldown.
The video processor can reverse 8:7 pulldown.
The video processor can reverse 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.
The video processor can reverse other telecine modes not listed here.
Specifies values for the luminance range of YUV data.
+Driver defaults are used, which should be Studio luminance range [16-235],
Studio luminance range [16-235]
Full luminance range [0-255]
Specifies the rate at which the video processor produces output frames from an input stream.
+The output is the normal frame rate.
The output is half the frame rate.
The output is a custom frame rate.
Specifies video processing capabilities that relate to deinterlacing, inverse telecine (IVTC), and frame-rate conversion.
+The video processor can perform blend deinterlacing.
In blend deinterlacing, the two fields from an interlaced frame are blended into a single progressive frame. A video processor uses blend deinterlacing when it deinterlaces at half rate, as when converting 60i to 30p. Blend deinterlacing does not require reference frames.
The video processor can perform bob deinterlacing.
In bob deinterlacing, missing field lines are interpolated from the lines above and below. Bob deinterlacing does not require reference frames.
The video processor can perform adaptive deinterlacing.
Adaptive deinterlacing uses spatial or temporal interpolation, and switches between the two on a field-by-field basis, depending on the amount of motion. If the video processor does not receive enough reference frames to perform adaptive deinterlacing, it falls back to bob deinterlacing.
The video processor can perform motion-compensated deinterlacing.
Motion-compensated deinterlacing uses motion vectors to recreate missing lines. If the video processor does not receive enough reference frames to perform motion-compensated deinterlacing, it falls back to bob deinterlacing.
The video processor can perform inverse telecine (IVTC).
If the video processor supports this capability, the ITelecineCaps member of the
The video processor can convert the frame rate by interpolating frames.
Specifies the video rotation states.
+The video is not rotated.
The video is rotated 90 degrees clockwise.
The video is rotated 180 degrees clockwise.
The video is rotated 270 degrees clockwise.
Defines stereo 3D capabilities for a Microsoft Direct3D?11 video processor.
+The video processor supports the
The video processor supports the
The video processor supports the
The video processor supports the
The video processor can flip one or both views. For more information, see
For stereo 3D video, specifies whether the data in frame 0 or frame 1 is flipped, either horizontally or vertically.
+Neither frame is flipped.
The data in frame 0 is flipped.
The data in frame 1 is flipped.
Specifies the layout in memory of a stereo 3D video frame.
+This enumeration designates the two stereo views as "frame 0" and "frame 1". The LeftViewFrame0 parameter of the VideoProcessorSetStreamStereoFormat method specifies which view is the left view, and which is the right view.
For packed formats, if the source rectangle clips part of the surface, the driver interprets the rectangle in logical coordinates relative to the stereo view, rather than absolute pixel coordinates. The result is that frame 0 and frame 1 are clipped proportionately.
To query whether the device supports stereo 3D video, call
The sample does not contain stereo data. If the stereo format is not specified, this value is the default.
Frame 0 and frame 1 are packed side-by-side, as shown in the following diagram.
All drivers that support stereo video must support this format.
Frame 0 and frame 1 are packed top-to-bottom, as shown in the following diagram.
All drivers that support stereo video must support this format.
Frame 0 and frame 1 are placed in separate resources or in separate texture array elements within the same resource.
All drivers that support stereo video must support this format.
The sample contains non-stereo data. However, the driver should create a left/right output of this sample using a specified offset. The offset is specified in the MonoOffset parameter of the
This format is primarily intended for subtitles and other subpicture data, where the entire sample is presented on the same plane.
Support for this stereo format is optional.
Frame 0 and frame 1 are packed into interleaved rows, as shown in the following diagram.
Support for this stereo format is optional.
Frame 0 and frame 1 are packed into interleaved columns, as shown in the following diagram.
Support for this stereo format is optional.
Frame 0 and frame 1 are packed in a checkerboard format, as shown in the following diagram.
Support for this stereo format is optional.
Specifies the intended use for a video processor.
+Normal video playback. The graphics driver should expose a set of capabilities that are appropriate for real-time video playback.
Optimal speed. The graphics driver should expose a minimal set of capabilities that are optimized for performance.
Use this setting if you want better performance and can accept some reduction in video quality. For example, you might use this setting in power-saving mode or to play video thumbnails.
Optimal quality. The grahics driver should expose its maximum set of capabilities.
Specify this setting to get the best video quality possible. It is appropriate for tasks such as video editing, when quality is more important than speed. It is not appropriate for real-time playback.
Specifies how to access a resource that is used in a video processor input view.
+This enumeration is used with the
Not a valid value.
The resource will be accessed as a 2D texture.
Specifies how to access a resource that is used in a video processor output view.
+This enumeration is used with the
Not a valid value.
The resource will be accessed as a 2D texture.
The resource will be accessed as an array of 2D textures.
Creates a device that represents the display adapter.
+ A reference to the video adapter to use when creating a device. Pass
The
A handle to a DLL that implements a software rasterizer. If DriverType is
The runtime layers to enable (see
A reference to an array of
{Note?? If the Direct3D 11.1 runtime is present on the computer and pFeatureLevels is set to, , , , , ,};
The number of elements in pFeatureLevels.
The SDK version; use
Returns the address of a reference to an
If successful, returns the first
Returns the address of a reference to an
This method can return one of the Direct3D 11 Return Codes.
This method returns E_INVALIDARG if you set the pAdapter parameter to a non-
This method returns
This entry-point is supported by the Direct3D 11 runtime, which is available on Windows 7, Windows Server 2008 R2, and as an update to Windows Vista (KB971644).
To create a Direct3D 11.1 device (
To create a Direct3D 11.2 device (
Set ppDevice and ppImmediateContext to
For an example, see How To: Create a Device and Immediate Context; to create a device and a swap chain at the same time, use D3D11CreateDeviceAndSwapChain.
If you set the pAdapter parameter to a non-
Differences between Direct3D 10 and Direct3D 11: In Direct3D 10, the presence of pAdapter dictated which adapter to use and the DriverType could mismatch what the adapter was. In Direct3D 11, if you are trying to create a hardware or a software device, set pAdapter !=
On the other hand, if pAdapter ==
|
?
The function signature PFN_D3D11_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.
Windows?Phone?8: This API is supported.
Windows Phone 8.1: This API is supported.
+Creates a device that uses Direct3D 11 functionality in Direct3D 12, specifying a pre-existing D3D12 device to use for D3D11 interop.
+ Specifies a pre-existing D3D12 device to use for D3D11 interop. May not be
One or more bitwise OR'ed flags from
An array of any of the following:
The first feature level which is less than or equal to the D3D12 device's feature level will be used to perform D3D11 validation. Creation will fail if no acceptable feature levels are provided. Providing
The size of the feature levels array, in bytes.
An array of unique queues for D3D11On12 to use. Valid queue types: 3D command queue.
The size of the command queue array, in bytes.
Which node of the D3D12 device to use. Only 1 bit may be set.
Pointer to the returned
A reference to the returned
A reference to the returned feature level. May be
This method returns one of the Direct3D 12 Return Codes that are documented for
This method returns
The function signature PFN_D3D11ON12_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.
+This interface encapsulates methods for retrieving data from the GPU asynchronously.
+There are three types of asynchronous interfaces, all of which inherit this interface:
Get the size of the data (in bytes) that is output when calling
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.
Provides a communication channel with the graphics driver or the Microsoft Direct3D runtime.
+To get a reference to this interface, call
Gets the size of the driver's certificate chain.
+Gets a handle to the authenticated channel.
+Gets the size of the driver's certificate chain.
+Receives the size of the certificate chain, in bytes.
If this method succeeds, it returns
Gets the driver's certificate chain.
+The size of the pCertificate array, in bytes. To get the size of the certificate chain, call
A reference to a byte array that receives the driver's certificate chain. The caller must allocate the array.
If this method succeeds, it returns
Gets a handle to the authenticated channel.
+Receives a handle to the channel.
The
There is no explicit creation method, simply declare an
Gets the initialization flags associated with the deferred context that created the command list.
+The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of
Gets the initialization flags associated with the deferred context that created the command list.
+The context flag is reserved for future use and is always 0.
The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of
Represents a cryptographic session.
+To get a reference to this interface, call
Gets the type of encryption that is supported by this session.
+The application specifies the encryption type when it creates the session.
+Gets the decoding profile of the session.
+The application specifies the profile when it creates the session.
+Gets the size of the driver's certificate chain.
+To get the certificate, call
Gets a handle to the cryptographic session.
+You can use this handle to associate the session with a decoder. This enables the decoder to decrypt data that is encrypted using this session.
+Gets the type of encryption that is supported by this session.
+Receives a
Value | Meaning |
---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
The application specifies the encryption type when it creates the session.
+Gets the decoding profile of the session.
+Receives the decoding profile. For a list of possible values, see
The application specifies the profile when it creates the session.
+Gets the size of the driver's certificate chain.
+Receives the size of the certificate chain, in bytes.
If this method succeeds, it returns
To get the certificate, call
Gets the driver's certificate chain.
+The size of the pCertificate array, in bytes. To get the size of the certificate chain, call
A reference to a byte array that receives the driver's certificate chain. The caller must allocate the array.
If this method succeeds, it returns
Gets a handle to the cryptographic session.
+Receives a handle to the session.
You can use this handle to associate the session with a decoder. This enables the decoder to decrypt data that is encrypted using this session.
+Handles the creation, wrapping and releasing of D3D11 resources for Direct3D 11on12.
+This method creates D3D11 resources for use with D3D 11on12.
+A reference to an already-created D3D12 resource or heap.
A
The use of the resource on input, as a bitwise-OR'd combination of
The use of the resource on output, as a bitwise-OR'd combination of
The globally unique identifier (
After the method returns, points to the newly created wrapped D3D11 resource or heap.
This method returns one of the Direct3D 12 Return Codes.
Releases D3D11 resources that were wrapped for D3D 11on12.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until
Keyed mutex resources cannot be provided to this method; use
Releases D3D11 resources that were wrapped for D3D 11on12.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until
Keyed mutex resources cannot be provided to this method; use
Releases D3D11 resources that were wrapped for D3D 11on12.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until
Keyed mutex resources cannot be provided to this method; use
Acquires D3D11 resources for use with D3D 11on12. Indicates that rendering to the wrapped resources can begin again.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
This method marks the resources as "acquired" in hazard tracking.
Keyed mutex resources cannot be provided to this method; use
Acquires D3D11 resources for use with D3D 11on12. Indicates that rendering to the wrapped resources can begin again.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
This method marks the resources as "acquired" in hazard tracking.
Keyed mutex resources cannot be provided to this method; use
Acquires D3D11 resources for use with D3D 11on12. Indicates that rendering to the wrapped resources can begin again.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
This method marks the resources as "acquired" in hazard tracking.
Keyed mutex resources cannot be provided to this method; use
The device interface represents a virtual adapter; it is used to create resources.
Registers the "device removed" event and indicates when a Direct3D device has become removed for any reason, using an asynchronous notification mechanism.
+The handle to the "device removed" event.
A reference to information about the "device removed" event, which can be used in UnregisterDeviceRemoved to unregister the event.
Indicates when a Direct3D device has become removed for any reason, using an asynchronous notification mechanism, rather than as an
Applications register and un-register a Win32 event handle with a particular device. That event handle will be signaled when the device becomes removed. A poll into the device's
ISignalableNotifier or SetThreadpoolWait can be used by UWP apps.
When the graphics device is lost, the app or title will receive the graphics event, so that the app or title knows that its graphics device is no longer valid and it is safe for the app or title to re-create its DirectX devices. In response to this event, the app or title needs to re-create its rendering device and pass it into a SetRenderingDevice call on the composition graphics device objects.
After setting this new rendering device, the app or title needs to redraw content of all the pre-existing surfaces after the composition graphics device's OnRenderingDeviceReplaced event is fired.
This method supports Composition for device loss.
The event is not signaled when it is most ideal to re-create. So, instead, we recommend iterating through the adapter ordinals and creating the first ordinal that will succeed.
The application can register an event with the device. The application will be signaled when the device becomes removed.
If the device is already removed, calls to RegisterDeviceRemovedEvent will signal the event immediately. No device-removed error code will be returned from RegisterDeviceRemovedEvent.
Each "device removed" event is never signaled, or is signaled only once. These events are not signaled during device destruction. These events are unregistered during destruction.
The semantics of RegisterDeviceRemovedEvent are similar to
Unregisters the "device removed" event.
+Information about the "device removed" event, retrieved during a successful RegisterDeviceRemovedEvent call.
See RegisterDeviceRemovedEvent.
+The
The
The
Bind an array of shader resources to the domain-shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
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.
+Set a domain shader to the device.
+ Pointer to a domain shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Windows?Phone?8: This API is supported.
+Set a domain shader to the device.
+ Pointer to a domain shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Windows?Phone?8: This API is supported.
+Set a domain shader to the device.
+ Pointer to a domain shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Windows?Phone?8: This API is supported.
+Set an array of sampler states to the domain-shader stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the constant buffers used by the domain-shader stage.
+ Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the DSSetConstantBuffers1 method instead.
Windows?Phone?8: This API is supported.
+Get the domain-shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
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
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.
+Get the domain shader currently set on the device.
+Address of a reference to a domain shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
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.
+Get an array of sampler state interfaces from the domain-shader stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
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.
+Get the constant buffers used by the domain-shader stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
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 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 are implemented from a common set of features referred to as the common-shader core..
To create a geometry shader interface, call either
This interface is defined in D3D11.h.
+The
Sets the constant buffers used by the geometry shader pipeline stage.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
You can't use the
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the GSSetConstantBuffers1 method instead.
+Set a geometry shader to the device.
+Pointer to a geometry shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a geometry shader to the device.
+Pointer to a geometry shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a geometry shader to the device.
+Pointer to a geometry shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Bind an array of shader resources to the geometry shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
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.
+Set an array of sampler states to the geometry shader pipeline stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get the constant buffers used by the geometry shader pipeline stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
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.
+Get the geometry shader currently set on the device.
+Address of a reference to a geometry shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
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.
+Get the geometry shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
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
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.
+Get an array of sampler state interfaces from the geometry shader pipeline stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
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 hull-shader interface manages an executable program (a hull shader) that controls the hull-shader stage.
+The hull-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a hull-shader interface, call
This interface is defined in D3D11.h.
+The
Bind an array of shader resources to the hull-shader stage.
+If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
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.
+Set a hull shader to the device.
+Pointer to a hull shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a hull shader to the device.
+Pointer to a hull shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a hull shader to the device.
+Pointer to a hull shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set an array of sampler states to the hull-shader stage.
+Any sampler may be set to
//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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set the constant buffers used by the hull-shader stage.
+The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the HSSetConstantBuffers1 method instead.
+Get the hull-shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
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
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.
+Get the hull shader currently set on the device.
+Address of a reference to a hull shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
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.
+Get an array of sampler state interfaces from the hull-shader 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.
+Get the constant buffers used by the hull-shader 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.
+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.
+ To get this interface, turn on debug layer and use IUnknown::QueryInterface from the
Windows?Phone?8: This API is supported.
+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.
+Get the number of messages that were allowed to pass through a storage filter.
+Get the number of messages that were denied passage through a storage filter.
+Get the number of messages currently stored in the message queue.
+Get the number of messages that are able to pass through a retrieval filter.
+Get the number of messages that were discarded due to the message count limit.
+Get and set the message count limit with
Get the size of the storage-filter stack in bytes.
+Get the size of the retrieval-filter stack in bytes.
+Get or sets a boolean that turns the debug output on or off.
+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 11 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.
+Clear all messages from the message queue.
+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
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 11 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.
+Get the number of messages that were allowed to pass through a storage filter.
+Number of messages allowed by a storage filter.
Get the number of messages that were denied passage through a storage filter.
+Number of messages denied by a storage filter.
Get the number of messages currently stored in the message queue.
+Number of messages currently stored in the message queue.
Get the number of messages that are able to pass through a retrieval filter.
+Number of messages allowed by a retrieval filter.
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
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.
+Add storage filters to the top of the storage-filter stack.
+Array of storage filters (see
This method returns one of the following Direct3D 11 Return Codes.
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
This method returns one of the following Direct3D 11 Return Codes.
Remove a storage filter from the top of the storage-filter stack.
+Push an empty storage filter onto the storage-filter stack.
+This method returns one of the following Direct3D 11 Return Codes.
An empty storage filter allows all messages to pass through.
+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 11 Return Codes.
Push a storage filter onto the storage-filter stack.
+Pointer to a storage filter (see
This method returns one of the following Direct3D 11 Return Codes.
Pop a storage filter from the top of the storage-filter stack.
+Get the size of the storage-filter stack in bytes.
+Size of the storage-filter stack in bytes.
Add storage filters to the top of the retrieval-filter stack.
+Array of retrieval filters (see
This method returns one of the following Direct3D 11 Return Codes.
The following code example shows how to use
+cats[] = { ..., ..., ... }; + sevs[] = { ..., ..., ... }; + UINT ids[] = { ..., ..., ... }; filter; + memset( &filter, 0, sizeof(filter) ); // To set the type of messages to allow, + // set filter.AllowList as follows: + filter.AllowList.NumCategories = sizeof(cats / sizeof( )); + filter.AllowList.pCategoryList = cats; + filter.AllowList.NumSeverities = sizeof(sevs / sizeof( )); + filter.AllowList.pSeverityList = sevs; + filter.AllowList.NumIDs = sizeof(ids) / sizeof(UINT); + filter.AllowList.pIDList = ids; // To set the type of messages to deny, set filter.DenyList + // similarly to the preceding filter.AllowList. // The following single call sets all of the preceding information. + hr = infoQueue->AddRetrievalFilterEntries( &filter ); +
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
This method returns one of the following Direct3D 11 Return Codes.
Remove a retrieval filter from the top of the retrieval-filter stack.
+Push an empty retrieval filter onto the retrieval-filter stack.
+This method returns one of the following Direct3D 11 Return Codes.
An empty retrieval filter allows all messages to pass through.
+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 11 Return Codes.
Push a retrieval filter onto the retrieval-filter stack.
+Pointer to a retrieval filter (see
This method returns one of the following Direct3D 11 Return Codes.
Pop a retrieval filter from the top of the retrieval-filter stack.
+Get the size of the retrieval-filter stack in bytes.
+Size of the retrieval-filter stack in bytes.
Add a 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 11 Return Codes.
This method is used by the runtime's internal mechanisms to add 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
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 11 Return Codes.
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 11 Return Codes.
Set a message severity level to break on when a message with that severity level passes through the storage filter.
+A
Turns this breaking condition on or off (true for on, false for off).
This method returns one of the following Direct3D 11 Return Codes.
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 11 Return Codes.
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).
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).
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).
Set a boolean that turns the debug output on or off.
+Disable/Enable the debug output (TRUE to disable or mute 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.
+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).
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
Get the storage filter at the top of the storage-filter stack.
+Get the retrieval filter at the top of the retrieval-filter stack.
+An input-layout interface holds a definition of how to feed vertex data that is laid out in memory into the input-assembler stage of the graphics pipeline.
+To create an input-layout object, call
Provides threading protection for critical sections of a multi-threaded application.
+This interface is obtained by querying it from an immediate device context created with the
Unlike D3D10, there is no multithreaded layer in D3D11. By default, multithread protection is turned off. Use SetMultithreadProtected to turn it on, then Enter and Leave to encapsulate graphics commands that must be executed in a specific order.
By default in D3D11, applications can only use one thread with the immediate context at a time. But, applications can use this interface to change that restriction. The interface can turn on threading protection for the immediate context, which will increase the overhead of each immediate context call in order to share one context with multiple threads.
+Find out if multithread protection is turned on or not.
+Enter a device's critical section.
+If SetMultithreadProtected is set to true, then entering a device's critical section prevents other threads from simultaneously calling that device's methods, calling DXGI methods, and calling the methods of all resource, view, shader, state, and asynchronous interfaces.
This function should be used in multithreaded applications when there is a series of graphics commands that must happen in order. This function is typically called at the beginning of the series of graphics commands, and Leave is typically called after those graphics commands.
+Leave a device's critical section.
+This function is typically used in multithreaded applications when there is a series of graphics commands that must happen in order. Enter is typically called at the beginning of a series of graphics commands, and this function is typically called after those graphics commands.
+Turns multithread protection on or off.
+Set to true to turn multithread protection on, false to turn it off.
True if multithread protection was already turned on prior to calling this method, false otherwise.
Find out if multithread protection is turned on or not.
+Returns true if multithread protection is turned on, false otherwise.
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 are implemented from a common set of features referred to as the common-shader core..
To create a pixel shader interface, call
This interface is defined in D3D11.h.
+The
Bind an array of shader resources to the pixel shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this API will fill the destination shader resource slot with
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.
+Sets a pixel shader to the device.
+ Pointer to a pixel shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Set ppClassInstances to
Windows?Phone?8: This API is supported.
+Sets a pixel shader to the device.
+ Pointer to a pixel shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Set ppClassInstances to
Windows?Phone?8: This API is supported.
+Sets a pixel shader to the device.
+ Pointer to a pixel shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Set ppClassInstances to
Windows?Phone?8: This API is supported.
+Set an array of sampler states to the pixel shader pipeline stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
State | Default Value |
---|---|
Filter | |
AddressU | |
AddressV | |
AddressW | |
MipLODBias | 0 |
MaxAnisotropy | 1 |
ComparisonFunc | |
BorderColor[0] | 1.0f |
BorderColor[1] | 1.0f |
BorderColor[2] | 1.0f |
BorderColor[3] | 1.0f |
MinLOD | -FLT_MAX |
MaxLOD | FLT_MAX |
?
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the constant buffers used by the pixel shader pipeline stage.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems, can bind a larger number of
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
+Bind an array of shader resources to the pixel shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this API will fill the destination shader resource slot with
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.
+Get the pixel shader currently set on the device.
+ Address of a reference to a pixel shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
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.
Windows?Phone?8: This API is supported.
+Get an array of sampler states from the pixel shader pipeline stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Arry of sampler-state interface references (see
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.
+Get the constant buffers used by the pixel shader pipeline stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
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 predicate interface determines whether geometry should be processed depending on the results of a previous draw call.
+To create a predicate object, call
There are two types of predicates: stream-output-overflow predicates and occlusion predicates. Stream-output-overflow predicates cause any geometry residing in stream-output buffers that were overflowed to not be processed. Occlusion predicates cause any geometry that did not have a single sample pass the depth/stencil tests to not be processed.
+A query interface queries information from the GPU.
+A query can be created with
Query data is typically gathered by issuing an
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); + pDeviceContext->Begin(pQuery); ... // Issue graphics commands pDeviceContext->End(pQuery); + UINT64 queryData; // This data type is different depending on the query type while( != pDeviceContext->GetData(pQuery, &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.
+Get a query description.
+Get a query description.
+Pointer to a query description (see
Represents a query object for querying information from the graphics processing unit (GPU).
+A query can be created with
Query data is typically gathered by issuing an
There are, however, some queries that do not require calls to Begin. For a list of possible queries see
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.
+Gets a query description.
+Gets a query description.
+A reference to a
The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage.
+To create a rasterizer-state object, call
Gets the description for rasterizer state that you used to create the rasterizer-state object.
+You use the description for rasterizer state in a call to the
Gets the description for rasterizer state that you used to create the rasterizer-state object.
+A reference to a
You use the description for rasterizer state in a call to the
Create a rasterizer state object that tells the rasterizer stage how to behave.
+4096 unique rasterizer state objects can be created on a device at a time.
If an application attempts to create a rasterizer-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique rasterizer state objects will stay the same.
+The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage. This rasterizer-state interface supports forced sample count.
+To create a rasterizer-state object, call
Gets the description for rasterizer state that you used to create the rasterizer-state object.
+You use the description for rasterizer state in a call to the
Gets the description for rasterizer state that you used to create the rasterizer-state object.
+A reference to a
You use the description for rasterizer state in a call to the
The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage. This rasterizer-state interface supports forced sample count and conservative rasterization mode.
+To create a rasterizer-state object, call
Gets the description for rasterizer state that you used to create the rasterizer-state object.
+You use the description for rasterizer state in a call to the
Gets the description for rasterizer state that you used to create the rasterizer-state object.
+ A reference to a
You use the description for rasterizer state in a call to the
Sets graphics processing unit (GPU) debug reference default tracking options for specific resource types.
+This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets graphics processing unit (GPU) debug reference default tracking options for specific resource types.
+ A
A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets graphics processing unit (GPU) debug reference tracking options.
+This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets graphics processing unit (GPU) debug reference tracking options.
+This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets graphics processing unit (GPU) debug reference tracking options.
+A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+A render-target-view interface identifies the render-target subresources that can be accessed during rendering.
+To create a render-target view, 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.
+Get the properties of a render target view.
+Get the properties of a render target view.
+Pointer to the description of a render target view (see
A render-target-view interface represents the render-target subresources that can be accessed during rendering.
+To create a render-target view, call
A render target is a resource that can be written by the output-merger stage at the end of a render pass. Each render target can also have a corresponding depth-stencil view.
+Gets the properties of a render-target view.
+Gets the properties of a render-target view.
+A reference to a
A resource interface provides common actions on all resources.
+You don't directly create a resource interface; instead, you create buffers and textures that inherit from a resource interface. For more info, see How to: Create a Vertex Buffer, How to: Create an Index Buffer, How to: Create a Constant Buffer, and How to: Create a Texture.
+Get the type of the resource.
+Windows?Phone?8: This API is supported.
+Get or sets the eviction priority of a resource.
+Get the type of the resource.
+ Pointer to the resource type (see
Windows?Phone?8: This API is supported.
+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,
Changing the priorities of resources should be done carefully. The wrong eviction priorities could be a detriment to performance rather than an improvement.
+Get the eviction priority of a resource.
+One of the following values, which specifies the eviction priority for the resource:
A view interface specifies the parts of a resource the pipeline can access during rendering.
+A view interface is the base interface for all views. There are four types of views; a depth-stencil view, a render-target view, a shader-resource view, and an unordered-access view.
All resources must be bound to the pipeline before they can be accessed.
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.
+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.
+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 Dispose 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.
+The sampler-state interface holds a description for sampler state that you can bind to any shader stage of the pipeline for reference by texture sample operations.
+To create a sampler-state object, call
To bind a sampler-state object to any pipeline shader stage, call the following methods:
You can bind the same sampler-state object to multiple shader stages simultaneously.
+Gets the description for sampler state that you used to create the sampler-state object.
+You use the description for sampler state in a call to the
Gets the description for sampler state that you used to create the sampler-state object.
+A reference to a
You use the description for sampler state in a call to the
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, and a texture.
+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
Get the shader resource view's description.
+Get the shader resource view's description.
+A reference to a
A shader-resource-view interface represents the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, and a texture.
+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
Gets the shader-resource view's description.
+Gets the shader-resource view's description.
+A reference to a
Reserved.
Reserved.
A 1D texture interface accesses texel data, which is structured memory.
+To create an empty 1D texture, call
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
Get the properties of the texture resource.
+Get the properties of the texture resource.
+Pointer to a resource description (see
A 2D texture interface manages texel data, which is structured memory.
+To create an empty Texture2D resource, call
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
Get the properties of the texture resource.
+Get the properties of the texture resource.
+Pointer to a resource description (see
A 2D texture interface represents texel data, which is structured memory.
+To create an empty Texture2D resource, call
Textures can't 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
Gets the properties of the texture resource.
+Gets the properties of the texture resource.
+A reference to a
A 3D texture interface accesses texel data, which is structured memory.
+To create an empty Texture3D resource, call
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
Get the properties of the texture resource.
+Get the properties of the texture resource.
+Pointer to a resource description (see
A 3D texture interface represents texel data, which is structured memory.
+To create an empty Texture3D resource, call
Textures can't 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
Gets the properties of the texture resource.
+Gets the properties of the texture resource.
+A reference to a
The tracing device interface sets shader tracking information, which enables accurate logging and playback of shader execution.
+To get this interface, turn on the debug layer and use IUnknown::QueryInterface from the
Sets the reference rasterizer's default race-condition tracking options for the specified resource types.
+A
A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on," otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets the reference rasterizer's race-condition tracking options for a specific shader.
+A reference to the
A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
A view interface specifies the parts of a resource the pipeline can access during rendering.
+To create a view for an unordered access resource, call
All resources must be bound to the pipeline before they can be accessed. Call
Get a description of the resource.
+Get a description of the resource.
+Pointer to a resource description (see
An unordered-access-view interface represents the parts of a resource the pipeline can access during rendering.
+To create a view for an unordered access resource, call
All resources must be bound to the pipeline before they can be accessed. Call
Gets a description of the resource.
+Gets a description of the resource.
+A reference to a
The
The methods of
The
The
You must call the BeginEvent and EndEvent methods in pairs; pairs of calls to these methods can nest within pairs of calls to these methods at a higher level in the application's call stack. In other words, a "Draw World" section can entirely contain another section named "Draw Trees," which can in turn entirely contain a section called "Draw Oaks." You can only associate an EndEvent method with the most recent BeginEvent method, that is, pairs cannot overlap. You cannot call an EndEvent for any BeginEvent that preceded the most recent BeginEvent. In fact, the runtime interprets the first EndEvent as ending the second BeginEvent.
+Determines whether the calling application is running under a Microsoft Direct3D profiling tool.
+You can call GetStatus to determine whether your application is running under a Direct3D profiling tool before you make further calls to other methods of the
Marks the beginning of a section of event code.
+A
Returns the number of previous calls to BeginEvent that have not yet been finalized by calls to the
The return value is ?1 if the calling application is not running under a Direct3D profiling tool.
You call the EndEvent method to mark the end of the section of event code.
A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
BeginEvent has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Marks the end of a section of event code.
+Returns the number of previous calls to the
The return value is ?1 if the calling application is not running under a Direct3D profiling tool.
You call the BeginEvent method to mark the beginning of the section of event code.
A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
EndEvent has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Marks a single point of execution in code.
+A
A user can visualize the marker when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
SetMarker has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Determines whether the calling application is running under a Microsoft Direct3D profiling tool.
+The return value is nonzero if the calling application is running under a Direct3D profiling tool such as Visual Studio Ultimate?2012, and zero otherwise.
You can call GetStatus to determine whether your application is running under a Direct3D profiling tool before you make further calls to other methods of the
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 are implemented from a common set of features referred to as the common-shader core..
To create a vertex shader interface, call
This interface is defined in D3D11.h.
+The
Sets the constant buffers used by the vertex shader pipeline stage.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the VSSetConstantBuffers1 method instead.
Windows?Phone?8: This API is supported.
+Set a vertex shader to the device.
+Pointer to a vertex shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a vertex shader to the device.
+Pointer to a vertex shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a vertex shader to the device.
+Pointer to a vertex shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Bind an array of shader resources to the vertex-shader stage.
+Index into the device's zero-based array to begin setting shader resources to (range is from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (range is from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this API will fill the destination shader resource slot with
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.
+Set an array of sampler states to the vertex shader pipeline stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//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 hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get the constant buffers used by the vertex shader pipeline stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
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.
+Get the vertex shader currently set on the device.
+Address of a reference to a vertex shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
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.
+Get the vertex shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
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
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.
+Get an array of sampler states from the vertex shader pipeline stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Arry of sampler-state interface references (see
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.
+Provides the video functionality of a Microsoft Direct3D?11 device.
+To get a reference to this interface, call QueryInterface with an
This interface provides access to several areas of Microsoft Direct3D video functionality:
In Microsoft Direct3D?9, the equivalent functions were distributed across several interfaces:
[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Gets a reference to a DirectX Video Acceleration (DXVA) decoder buffer.
+The graphics driver allocates the buffers that are used for DXVA decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call
Gets a reference to a decoder buffer.
+A reference to the
The type of buffer to retrieve, specified as a member of the
Receives the size of the buffer, in bytes.
Receives a reference to the start of the memory buffer.
If this method succeeds, it returns
The graphics driver allocates the buffers that are used for decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call
Releases a buffer that was obtained by calling the
If this method succeeds, it returns
Starts a decoding operation to decode a video frame.
+A reference to the
A reference to the
The size of the content key that is specified in pContentKey. If pContentKey is
An optional reference to a content key that was used to encrypt the frame data. If no content key was used, set this parameter to
If this method succeeds, it returns
After this method is called, call
Each call to DecoderBeginFrame must have a matching call to DecoderEndFrame. In most cases you cannot nest DecoderBeginFrame calls, but some codecs, such as like VC-1, can have nested DecoderBeginFrame calls for special operations like post processing.
The following encryption scenarios are supported through the content key:
Signals the end of a decoding operation.
+A reference to the
If this method succeeds, it returns
Submits one or more buffers for decoding.
+A reference to the
The number of buffers submitted for decoding.
A reference to an array of
If this method succeeds, it returns
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with
When using feature levels 9_x, all partially encrypted buffers must use the same EncryptedBlockInfo, and partial encryption cannot be turned off on a per frame basis.
+Performs an extended function for decoding. This method enables extensions to the basic decoder functionality.
+A reference to the
A reference to a
If this method succeeds, it returns
Sets the target rectangle for the video processor.
+A reference to the
Specifies whether to apply the target rectangle.
A reference to a
The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.
If this method is never called, or if the Enable parameter is
Sets the background color for the video processor.
+A reference to the
If TRUE, the color is specified as a YCbCr value. Otherwise, the color is specified as an RGB value.
A reference to a
The video processor uses the background color to fill areas of the target rectangle that do not contain a video image. Areas outside the target rectangle are not affected.
+Sets the output color space for the video processor.
+A reference to the
A reference to a
Sets the alpha fill mode for data that the video processor writes to the render target.
+A reference to the
The alpha fill mode, specified as a
The zero-based index of an input stream. This parameter is used if AlphaFillMode is
To find out which fill modes the device supports, call the
The default fill mode is
Sets the amount of downsampling to perform on the output.
+A reference to the
If TRUE, downsampling is enabled. Otherwise, downsampling is disabled and the Size member is ignored.
The sampling size.
Downsampling is sometimes used to reduce the quality of premium content when other forms of content protection are not available. By default, downsampling is disabled.
If the Enable parameter is TRUE, the driver downsamples the composed image to the specified size, and then scales it back to the size of the target rectangle.
The width and height of Size must be greater than zero. If the size is larger than the target rectangle, downsampling does not occur.
To use this feature, the driver must support downsampling, indicated by the
Specifies whether the video processor produces stereo video frames.
+A reference to the
If TRUE, stereo output is enabled. Otherwise, the video processor produces mono video frames.
By default, the video processor produces mono video frames.
To use this feature, the driver must support stereo video, indicated by the
Sets a driver-specific video processing state.
+A reference to the
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that contains private state data. The method passes this buffer directly to the driver without validation. It is the responsibility of the driver to validate the data.
If this method succeeds, it returns
Gets the current target rectangle for the video processor.
+A reference to the
Receives the value TRUE if the target rectangle was explicitly set using the
If Enabled receives the value TRUE, this parameter receives the target rectangle. Otherwise, this parameter is ignored.
Gets the current background color for the video processor.
+A reference to the
Receives the value TRUE if the background color is a YCbCr color, or
A reference to a
Gets the current output color space for the video processor.
+A reference to the
A reference to a
Gets the current alpha fill mode for the video processor.
+A reference to the
Receives the alpha fill mode, as a
If the alpha fill mode is
Gets the current level of downsampling that is performed by the video processor.
+A reference to the
Receives the value TRUE if downsampling was explicitly enabled using the
If Enabled receives the value TRUE, this parameter receives the downsampling size. Otherwise, this parameter is ignored.
Queries whether the video processor produces stereo video frames.
+A reference to the
Receives the value TRUE if stereo output is enabled, or
Gets private state data from the video processor.
+A reference to the
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that receives the private state data.
If this method succeeds, it returns
Specifies whether an input stream on the video processor contains interlaced or progressive frames.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
A
Sets the color space for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
A reference to a
Sets the rate at which the video processor produces output frames for an input stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
The output rate, specified as a
Specifies how the driver performs frame-rate conversion, if required.
Value | Meaning |
---|---|
| Repeat frames. |
Interpolate frames. |
?
A reference to a
The standard output rates are normal frame-rate (
Depending on the output rate, the driver might need to convert the frame rate. If so, the value of RepeatFrame controls whether the driver creates interpolated frames or simply repeats input frames.
+Sets the source rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies whether to apply the source rectangle.
A reference to a
The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.
If this method is never called, or if the Enable parameter is
Sets the destination rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies whether to apply the destination rectangle.
A reference to a
The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.
The default destination rectangle is an empty rectangle (0, 0, 0, 0). If this method is never called, or if the Enable parameter is
Sets the planar alpha for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies whether alpha blending is enabled.
The planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque). If Enable is
To use this feature, the driver must support stereo video, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALHPA_STREAM capability flag. To query for this capability, call
Alpha blending is disabled by default.
For each pixel, the destination color value is computed as follows:
Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)
where:
Cd
= The color value of the destination pixelCs
= The color value of the source pixelAs
= The per-pixel source alphaAp
= The planar alpha valueAe
= The palette-entry alpha value, or 1.0 (see Note)The destination alpha value is computed according to the alpha fill mode. For more information, see
Sets the color-palette entries for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
The number of elements in the pEntries array.
A reference to an array of palette entries. For RGB streams, the palette entries use the DXGI_FORMAT_B8G8R8A8 representation. For YCbCr streams, the palette entries use the
This method applies only to input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use the first 16 entries in the list. Formats with 8 bpp use the first 256 entries.
If a pixel has a palette index greater than the number of entries, the device treats the pixel as white with opaque alpha. For full-range RGB, this value is (255, 255, 255, 255); for YCbCr the value is (255, 235, 128, 128).
If the driver does not report the
Sets the pixel aspect ratio for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies whether the pSourceAspectRatio and pDestinationAspectRatio parameters contain valid values. Otherwise, the pixel aspect ratios are unspecified.
A reference to a
A reference to a
This function can only be called if the driver reports the
Pixel aspect ratios of the form 0/n and n/0 are not valid.
The default pixel aspect ratio is 1:1 (square pixels).
+Sets the luma key for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies whether luma keying is enabled.
The lower bound for the luma key. The valid range is [0?1]. If Enable is
The upper bound for the luma key. The valid range is [0?1]. If Enable is
To use this feature, the driver must support luma keying, indicated by the
The values of Lower and Upper give the lower and upper bounds of the luma key, using a nominal range of [0...1]. Given a format with n bits per channel, these values are converted to luma values as follows:
val = f * ((1 << n)-1)
Any pixel whose luma value falls within the upper and lower bounds (inclusive) is treated as transparent.
For example, if the pixel format uses 8-bit luma, the upper bound is calculated as follows:
BYTE Y = BYTE(max(min(1.0, Upper), 0.0) * 255.0)
Note that the value is clamped to the range [0...1] before multiplying by 255.
+Enables or disables stereo 3D video for an input stream on the video processor. In addition, this method specifies the layout of the video frames in memory.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies whether stereo 3D is enabled for this stream. If the value is
Specifies the layout of the two stereo views in memory, as a
If TRUE, frame 0 contains the left view. Otherwise, frame 0 contains the right view.
This parameter is ignored for the following stereo formats:
If TRUE, frame 0 contains the base view. Otherwise, frame 1 contains the base view.
This parameter is ignored for the following stereo formats:
A flag from the
For
If Format is not
Enables or disables automatic processing features on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
If TRUE, automatic processing features are enabled. If
By default, the driver might perform certain processing tasks automatically during the video processor blit. This method enables the application to disable these extra video processing features. For example, if you provide your own pixel shader for the video processor, you might want to disable the driver's automatic processing.
+Enables or disables an image filter for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
The filter, specified as a
To query which filters the driver supports, call
Specifies whether to enable the filter.
The filter level. If Enable is
To find the valid range of levels for a specified filter, call
Sets a driver-specific state on a video processing stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that contains private state data. The method passes this buffer directly to the driver without validation. It is the responsibility of the driver to validate the data.
If this method succeeds, it returns
Gets the format of an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives a
Gets the color space for an input stream of the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives a
Gets the rate at which the video processor produces output frames for an input stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives a
Receives a Boolean value that specifies how the driver performs frame-rate conversion, if required.
Value | Meaning |
---|---|
| Repeat frames. |
Interpolate frames. |
?
A reference to a
Gets the source rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if the source rectangle is enabled, or
A reference to a
Gets the destination rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if the destination rectangle is enabled, or
A reference to a
Gets the planar alpha for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if planar alpha is enabled, or
Receives the planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque).
Gets the color-palette entries for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
The number of entries in the pEntries array.
A reference to a UINT array allocated by the caller. The method fills the array with the palette entries. For RGB streams, the palette entries use the DXGI_FORMAT_B8G8R8A8 representation. For YCbCr streams, the palette entries use the
This method applies only to input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use 16 palette entries. Formats with 8 bpp use 256 entries.
+Gets the pixel aspect ratio for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if the pixel aspect ratio is specified. Otherwise, receives the value
A reference to a
A reference to a
When the method returns, if *pEnabled is TRUE, the pSourceAspectRatio and pDestinationAspectRatio parameters contain the pixel aspect ratios. Otherwise, the default pixel aspect ratio is 1:1 (square pixels).
+Gets the luma key for an input stream of the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if luma keying is enabled, or
Receives the lower bound for the luma key. The valid range is [0?1].
Receives the upper bound for the luma key. The valid range is [0?1].
Gets the stereo 3D format for an input stream on the video processor
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if stereo 3D is enabled for this stream, or
Receives a
Receives a Boolean value.
Value | Meaning |
---|---|
| Frame 0 contains the left view. |
Frame 0 contains the right view. |
?
Receives a Boolean value.
Value | Meaning |
---|---|
| Frame 0 contains the base view. |
Frame 1 contains the base view. |
?
Receives a
Receives the pixel offset used for
Queries whether automatic processing features of the video processor are enabled.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Receives the value TRUE if automatic processing features are enabled, or
Automatic processing refers to additional image processing that drivers might have performed on the image data prior to the application receiving the data.
+Gets the image filter settings for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
The filter to query, specified as a
Receives the value TRUE if the image filter is enabled, or
Receives the filter level.
Gets a driver-specific state for a video processing stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that receives the private state data.
If this method succeeds, it returns
Performs a video processing operation on one or more input samples and writes the result to a Direct3D surface.
+A reference to the
A reference to the
The frame number of the output video frame, indexed from zero.
The number of input streams to process.
A reference to an array of
If this method succeeds, it returns
The maximum value of StreamCount is given in the MaxStreamStates member of the
If the output stereo mode is TRUE:
Otherwise:
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with
Establishes the session key for a cryptographic session.
+A reference to the
The size of the pData byte array, in bytes.
A reference to a byte array that contains the encrypted session key.
If this method succeeds, it returns
The key exchange mechanism depends on the type of cryptographic session.
For RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP), the software decoder generates the secret key, encrypts the secret key by using the public key with RSAES-OAEP, and places the cipher text in the pData parameter. The actual size of the buffer for RSAES-OAEP is 256 bytes.
+Reads encrypted data from a protected surface.
+A reference to the
A reference to the
A reference to the
The size of the pIV buffer, in bytes.
A reference to a buffer that receives the initialization vector (IV). The caller allocates this buffer, but the driver generates the IV.
For 128-bit AES-CTR encryption, pIV points to a
Not all drivers support this method. To query the driver capabilities, call
Some drivers might require a separate key to decrypt the data that is read back. To check for this requirement, call GetContentProtectionCaps and check for the
This method has the following limitations:
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with
Writes encrypted data to a protected surface.
+A reference to the
A reference to the surface that contains the source data.
A reference to the protected surface where the encrypted data is written.
A reference to a
If the driver supports partially encrypted buffers, pEncryptedBlockInfo indicates which portions of the buffer are encrypted. If the entire surface is encrypted, set this parameter to
To check whether the driver supports partially encrypted buffers, call
The size of the encrypted content key, in bytes.
A reference to a buffer that contains a content encryption key, or
If the driver supports content keys, use the content key to encrypt the surface. Encrypt the content key using the session key, and place the resulting cipher text in pContentKey. If the driver does not support content keys, use the session key to encrypt the surface and set pContentKey to
The size of the pIV buffer, in bytes.
A reference to a buffer that contains the initialization vector (IV).
For 128-bit AES-CTR encryption, pIV points to a
For other encryption types, a different structure might be used, or the encryption might not use an IV.
Not all hardware or drivers support this functionality for all cryptographic types. This function can only be called when the
This method does not support writing to sub-rectangles of the surface.
If the hardware and driver support a content key:
Otherwise, the data is encrypted by the caller using the session key and
If the driver and hardware support partially encrypted buffers, pEncryptedBlockInfo indicates which portions of the buffer are encrypted and which is not. If the entire buffer is encrypted, pEncryptedBlockinfo should be
The
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with
Gets a random number that can be used to refresh the session key.
+A reference to the
The size of the pRandomNumber array, in bytes. The size should match the size of the session key.
A reference to a byte array that receives a random number.
To generate a new session key, perform a bitwise XOR between the previous session key and the random number. The new session key does not take affect until the application calls
To query whether the driver supports this method, call
Switches to a new session key.
+A reference to the
This function can only be called when the
Before calling this method, call
Gets the cryptographic key to decrypt the data returned by the
If this method succeeds, it returns
This method applies only when the driver requires a separate content key for the EncryptionBlt method. For more information, see the Remarks for EncryptionBlt.
Each time this method is called, the driver generates a new key.
The KeySize should match the size of the session key.
The read back key is encrypted by the driver/hardware using the session key.
+Establishes a session key for an authenticated channel.
+A reference to the
The size of the data in the pData array, in bytes.
A reference to a byte array that contains the encrypted session key. The buffer must contain 256 bytes of data, encrypted using RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP).
If this method succeeds, it returns
This method will fail if the channel type is
Sends a query to an authenticated channel.
+A reference to the
The size of the pInput array, in bytes.
A reference to a byte array that contains input data for the query. This array always starts with a
The size of the pOutput array, in bytes.
A reference to a byte array that receives the result of the query. This array always starts with a
If this method succeeds, it returns
Sends a configuration command to an authenticated channel.
+A reference to the
The size of the pInput array, in bytes.
A reference to a byte array that contains input data for the command. This buffer always starts with a
A reference to a
If this method succeeds, it returns
Sets the stream rotation for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies if the stream is to be rotated in a clockwise orientation.
Specifies the rotation of the stream.
This is an optional state and the application should only use it if
The stream source rectangle will be specified in the pre-rotation coordinates (typically landscape) and the stream destination rectangle will be specified in the post-rotation coordinates (typically portrait). The application must update the stream destination rectangle correctly when using a rotation value other than 0? and 180?.
+Gets the stream rotation for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call
Specifies if the stream is rotated.
Specifies the rotation of the stream in a clockwise orientation.
[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Gets a reference to a DirectX Video Acceleration (DXVA) decoder buffer.
+A reference to the
The type of buffer to retrieve, specified as a member of the
The graphics driver allocates the buffers that are used for DXVA decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Provides the video functionality of a Microsoft Direct3D?11 device.
+To get a reference to this interface, call QueryInterface with an
Submits one or more buffers for decoding.
+A reference to the
The number of buffers submitted for decoding.
A reference to an array of
If this method succeeds, it returns
This function does not honor any D3D11 predicate that may have been set.
Allows the driver to return IHV specific information used when initializing the new hardware key.
+A reference to the
The size of the memory referenced by the pPrivateInputData parameter.
The private input data. The contents of this parameter is defined by the implementation of the secure execution environment. It may contain data about the license or about the stream properties.
A reference to the private output data. The return data is defined by the implementation of the secure execution environment. It may contain graphics-specific data to be associated with the underlying hardware key.
This method returns one of the following error codes.
The operation completed successfully. | |
E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
Checks the status of a crypto session.
+Specifies a
A
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
Indicates that decoder downsampling will be used and that the driver should allocate the appropriate reference frames.
+A reference to the
The color space information of the reference frame data.
The resolution, format, and colorspace of the output/display frames. This is the destination resolution and format of the downsample operation.
The number of reference frames to be used in the operation.
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
This function can only be called once for a specific
Updates the decoder downsampling parameters.
+A reference to the
The resolution, format, and colorspace of the output/display frames. This is the destination resolution and format of the downsample operation.
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
This method can only be called after decode downsampling is enabled by calling DecoderEnableDownsampling. This method is only supported if the
Sets the color space information for the video processor output surface.
+A reference to the
A
Sets a value indicating whether the output surface from a call to
Gets the color space information for the video processor output surface.
+A reference to the
A reference to a
Gets a value indicating whether the output surface from a call to
Sets the color space information for the video processor input stream.
+A reference to the
An index identifying the input stream.
A
Specifies whether the video processor input stream should be flipped vertically or horizontally.
+A reference to the
An index identifying the input stream.
True if mirroring should be enabled; otherwise, false.
True if the stream should be flipped horizontally; otherwise, false.
True if the stream should be flipped vertically; otherwise, false.
When used in combination, transformations on the processor input stream should be applied in the following order:
Gets the color space information for the video processor input stream.
+A reference to the
An index identifying the input stream.
A reference to a
Gets values that indicate whether the video processor input stream is being flipped vertically or horizontally.
+A reference to the
An index identifying the input stream.
A reference to a boolean value indicating whether mirroring is enabled. True if mirroring is enabled; otherwise, false.
A reference to a boolean value indicating whether the stream is being flipped horizontally. True if the stream is being flipped horizontally; otherwise, false.
A reference to a boolean value indicating whether the stream is being flipped vertically. True if the stream is being flipped vertically; otherwise, false.
Returns driver hints that indicate which of the video processor operations are best performed using multi-plane overlay hardware rather than
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
This method computes the behavior hints using the current state of the video processor as set by the "SetOutput" and "SetStream" methods of
Provides the video functionality of a Microsoft Direct3D?11 device.
+To get a reference to this interface, call QueryInterface with an
This interface provides access to several areas of Microsoft Direct3D video functionality:
In Microsoft Direct3D?9, the equivalent functions were distributed across several interfaces:
Represents a hardware-accelerated video decoder for Microsoft Direct3D?11.
+To get a reference to this interface, call
Gets a handle to the driver.
+The driver handle can be used to configure content protection.
+Gets the parameters that were used to create the decoder.
+A reference to a
A reference to a
If this method succeeds, it returns
Gets a handle to the driver.
+Receives a handle to the driver.
If this method succeeds, it returns
The driver handle can be used to configure content protection.
+Identifies the output surfaces that can be accessed during video decoding.
+To get a reference to this interface, call
Gets the properties of the video decoder output view. +
+Gets the properties of the video decoder output view. +
+A reference to a
Provides the video decoding and video processing capabilities of a Microsoft Direct3D?11 device.
+The Direct3D?11 device supports this interface. To get a reference to this interface, call QueryInterface with an
If you query an
Gets the number of profiles that are supported by the driver.
+To enumerate the profiles, call
Creates a video decoder device for Microsoft Direct3D?11.
+A reference to a
A reference to a
Receives a reference to the
If this method succeeds, it returns
This method allocates the necessary decoder buffers.
The
Creates a video processor device for Microsoft Direct3D?11.
+A reference to the
Specifies the frame-rate conversion capabilities for the video processor. The value is a zero-based index that corresponds to the TypeIndex parameter of the
Receives a reference to the
If this method succeeds, it returns
The
Creates a channel to communicate with the Microsoft Direct3D device or the graphics driver. The channel can be used to send commands and queries for content protection.
+Specifies the type of channel, as a member of the
Receives a reference to the
If this method succeeds, it returns
If the ChannelType parameter is
If ChannelType is
Creates a cryptographic session to encrypt video content that is sent to the graphics driver.
+A reference to a
Value | Meaning |
---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
A reference to a
A reference to a
Value | Meaning |
---|---|
| The caller will create the session key, encrypt it with RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP) by using the driver's public key, and pass the session key to the driver. |
?
Receives a reference to the
If this method succeeds, it returns
The
Creates a resource view for a video decoder, describing the output sample for the decoding operation.
+A reference to the
A reference to a
Receives a reference to the
If this method succeeds, it returns
Set the ppVDOVView parameter to
Creates a resource view for a video processor, describing the input sample for the video processing operation.
+A reference to the
A reference to the
A reference to a
Receives a reference to the
If this method succeeds, it returns
Set the ppVPIView parameter to
The surface format is given in the FourCC member of the
Resources used for video processor input views must use the following bind flag combinations:
Creates a resource view for a video processor, describing the output sample for the video processing operation.
+A reference to the
A reference to the
A reference to a
Receives a reference to the
If this method succeeds, it returns
Set the ppVPOView parameter to
Resources used for video processor output views must use the following
If stereo output is enabled, the output view must have 2 array elements. Otherwise, it must only have a single array element.
+Enumerates the video processor capabilities of the driver.
+A reference to a
Receives a reference to the
If this method succeeds, it returns
To create the video processor device, pass the
Gets the number of profiles that are supported by the driver.
+Returns the number of profiles.
To enumerate the profiles, call
Gets a profile that is supported by the driver.
+The zero-based index of the profile. To get the number of profiles that the driver supports, call
Receives a
If this method succeeds, it returns
Given aprofile, checks whether the driver supports a specified output format.
+A reference to a
A
Receives the value TRUE if the format is supported, or
If this method succeeds, it returns
If the driver does not support the profile given in pDecoderProfile, the method returns E_INVALIDARG. If the driver supports the profile, but the DXGI format is not compatible with the profile, the method succeeds but returns the value
Gets the number of decoder configurations that the driver supports for a specified video description.
+A reference to a
Receives the number of decoder configurations.
If this method succeeds, it returns
To enumerate the decoder configurations, call
Gets a decoder configuration that is supported by the driver.
+A reference to a
The zero-based index of the decoder configuration. To get the number of configurations that the driver supports, call
A reference to a
If this method succeeds, it returns
Queries the driver for its content protection capabilities.
+A reference to a
Value | Meaning |
---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
If no encryption will be used, set this parameter to
A reference to a
The driver might disallow some combinations of encryption type and profile.
A reference to a
If this method succeeds, it returns
Gets a cryptographic key-exchange mechanism that is supported by the driver.
+A reference to a
Value | Meaning |
---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
A reference to a
The zero-based index of the key-exchange type. The driver reports the number of types in the KeyExchangeTypeCount member of the
Receives a
If this method succeeds, it returns
Sets private data on the video device and associates that data with a
The
The size of the data, in bytes.
A reference to the data.
If this method succeeds, it returns
Sets a private
If this method succeeds, it returns
Provides the video decoding and video processing capabilities of a Microsoft Direct3D?11 device.
+The Direct3D?11 device supports this interface. To get a reference to this interface, call QueryInterface with an
Retrieves optional sizes for private driver data.
+Indicates the crypto type for which the private input and output size is queried.
Indicates the decoder profile for which the private input and output size is queried.
Indicates the key exchange type for which the private input and output size is queried.
Returns the size of private data that the driver needs for input commands.
Returns the size of private data that the driver needs for output commands.
If this method succeeds, it returns
When pKeyExchangeType is D3D11_KEY_EXCHANGE_HW_PROTECTION, the following behavior is expected in the
Retrieves capabilities and limitations of the video decoder.
+The decode profile for which the capabilities are queried.
The video width for which the capabilities are queried.
The video height for which the capabilities are queried.
The frame rate of the video content. This information is used by the driver to determine whether the video can be decoded in real-time.
The bit rate of the video stream. A value of zero indicates that the bit rate can be ignored.
The type of cryptography used to encrypt the video stream. A value of
A reference to a bitwise OR combination of
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
Indicates whether the video decoder supports downsampling with the specified input format, and whether real-time downsampling is supported.
+An object describing the decoding profile, the resolution, and format of the input stream. This is the resolution and format to be downsampled.
A
The configuration data associated with the decode profile.
The frame rate of the video content. This is used by the driver to determine whether the video can be decoded in real-time.
An object describing the resolution, format, and colorspace of the output frames. This is the destination resolution and format of the downsample operation.
Pointer to a boolean value set by the driver that indicates if downsampling is supported with the specified input data. True if the driver supports the requested downsampling; otherwise, false.
Pointer to a boolean value set by the driver that indicates if real-time decoding is supported with the specified input data. True if the driver supports the requested real-time decoding; otherwise, false. Note that the returned value is based on the current configuration of the video decoder and does not guarantee that real-time decoding will be supported for future downsampling operations.
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
You should call GetVideoDecoderCaps to determine whether decoder downsampling is supported before checking support for a specific configuration.
+Allows the driver to recommend optimal output downsample parameters from the input parameters.
+A
A
The configuration data associated with the decode profile.
The frame rate of the video content. This is used by the driver to determine whether the video can be decoded in real-time.
Pointer to a
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
You should call GetVideoDecoderCaps to determine whether decoder downsampling is supported before checking support for a specific configuration.
+Represents a video processor for Microsoft Direct3D?11.
+To get a reference to this interface, call
Gets the content description that was used to create the video processor.
+Gets the rate conversion capabilities of the video processor.
+Gets the content description that was used to create the video processor.
+A reference to a
Gets the rate conversion capabilities of the video processor.
+A reference to a
Gets the content description that was used to create this enumerator.
+Gets the content description that was used to create this enumerator.
+Gets the capabilities of the video processor.
+Gets the content description that was used to create this enumerator.
+A reference to a
If this method succeeds, it returns
Queries whether the video processor supports a specified video format.
+The video format to query, specified as a
Receives a bitwise OR of zero or more flags from the
If this method succeeds, it returns
Gets the capabilities of the video processor.
+A reference to a
If this method succeeds, it returns
Returns a group of video processor capabilities that are associated with frame-rate conversion, including deinterlacing and inverse telecine.
+The zero-based index of the group to retrieve. To get the maximum index, call
A reference to a
If this method succeeds, it returns
The capabilities defined in the
Gets a list of custom frame rates that a video processor supports.
+The zero-based index of the frame-rate capability group. To get the maxmum index, call
The zero-based index of the custom rate to retrieve. To get the maximum index, call
This index value is always relative to the capability group specified in the TypeIndex parameter.
A reference to a
If this method succeeds, it returns
Gets the range of values for an image filter.
+The type of image filter, specified as a
A reference to a
If this method succeeds, it returns
Enumerates the video processor capabilities of a Microsoft Direct3D?11 device.
+To get a reference to this interface, call
Indicates whether the driver supports the specified combination of format and colorspace conversions.
+The format of the video processor input.
The colorspace of the video processor input.
The format of the video processor output.
The colorspace of the video processor output.
Pointer to a boolean that is set by the driver to indicate if the specified combination of format and colorspace conversions is supported. True if the conversion is supported; otherwise, false.
This method returns one of the following error codes.
The operation completed successfully. | |
E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
Identifies the input surfaces that can be accessed during video processing.
+To get a reference to this interface, call
Gets the properties of the video processor input view.
+Gets the properties of the video processor input view.
+A reference to a
Identifies the output surfaces that can be accessed during video processing.
+To get a reference to this interface, call
Gets the properties of the video processor output view.
+Gets the properties of the video processor output view.
+A reference to a
Contains an initialization vector (IV) for 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher encryption.
+The IV, in big-endian format.
The block count, in big-endian format.
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE command.
+A
A
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION command.
+A
A handle to the decoder device. Get this from
A handle to the cryptographic session. Get this from
A handle to the Direct3D device. Get this from D3D11VideoContext::QueryAuthenticatedChannel using D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE. +
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE command.
+A
The initial sequence number for queries.
The initial sequence number for commands.
Contains input data for the
Contains the response from the
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_PROTECTION command.
+A
A
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE command.
+A
A
A process handle. If the ProcessType member equals
If TRUE, the specified process has access to restricted shared resources.
Specifies the protection level for video content.
+If 1, video content protection is enabled.
If 1, the application requires video to be displayed using either a hardware overlay or full-screen exclusive mode.
Reserved. Set all bits to zero.
Use this member to access all of the bits in the union.
Contains the response to a D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT query.
+A
The number of encryption GUIDs.
Contains input data for a D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID query.
+A
The index of the encryption
Contains the response to a D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID query.
+A
The index of the encryption
A
Contains the response to a D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE query.
+A
A
Contains input data for a D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION query.
+A
A handle to a decoder device.
Contains the response to a D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION query.
+A
A handle to a decoder device.
A handle to the cryptographic session that is associated with the decoder device.
A handle to the Direct3D device that is associated with the decoder device.
Contains the response to a D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE query.
+A
A
Contains the response to a D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE query.
+A
A handle to the device.
Contains input data for the
Contains a response from the
Contains input data for a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT query.
+A
A handle to the device.
A handle to the cryptographic session.
Contains the response to a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT query.
+A
A handle to the device.
A handle to the cryptographic session.
The number of output IDs associated with the specified device and cryptographic session.
Contains input data for a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID query.
+A
A handle to the device.
A handle to the cryptographic session.
The index of the output ID.
Contains the response to a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID query.
+A
A handle to the device.
A handle to the cryptographic session.
The index of the output ID.
An output ID that is associated with the specified device and cryptographic session.
Contains the response to a D3D11_AUTHENTICATED_QUERY_PROTECTION query.
+A
A
Contains the response to a D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT query.
+A
The number of processes that are allowed to open shared resources that have restricted access. A process cannot open such a resource unless the process has been granted access.
Contains input data for a D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS query.
+A
The index of the process.
Contains the response to a D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS query.
+The Desktop Window Manager (DWM) process is identified by setting ProcessIdentifier equal to
A
The index of the process in the list of processes.
A
A process handle. If the ProcessIdentifier member equals
Contains the response to a D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT query.
+A
The number of protected, shared resources that can be opened by any process without restrictions.
Describes an HLSL class instance.
+The
The members of this structure except InstanceIndex are valid (non default values) if they describe a class instance aquired using
The instance ID of an HLSL class; the default value is 0.
The instance index of an HLSL class; the default value is 0.
The type ID of an HLSL class; the default value is 0.
Describes the constant buffer associated with an HLSL class; the default value is 0.
The base constant buffer offset associated with an HLSL class; the default value is 0.
The base texture associated with an HLSL class; the default value is 127.
The base sampler associated with an HLSL class; the default value is 15.
True if the class was created; the default value is false.
Information about the video card's performance counter capabilities.
+This structure is returned by
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
Number of counters that can be simultaneously supported.
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.
Describes a counter.
+This structure is used by
Type of counter (see
Reserved.
Used with
Use this structure with CreateWrappedResource.
+Stencil operations that can be performed based on the results of stencil test.
+All stencil operations are specified as a
This structure is a member of a depth-stencil description.
+The stencil operation to perform when stencil testing fails.
The stencil operation to perform when stencil testing passes and depth testing fails.
The stencil operation to perform when stencil testing and depth testing both pass.
A function that compares stencil data against existing stencil data. The function options are listed in
Specifies the subresources of a texture that are accessible from 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
A depth-stencil-view description is needed when calling
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
The index of the first mipmap level to use.
Specifies the subresources 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
The index of the first mipmap level to use.
The index of the first texture to use in an array of textures.
Number of textures to use.
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
The index of the first mipmap level to use.
Specifies the subresources 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
The index of the first mipmap level to use.
The index of the first texture to use in an array of textures.
Number of textures to use.
Specifies the subresource from a multisampled 2D texture that is accessible to a depth-stencil view.
+Because 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.
+Unused.
Specifies the subresources from an array of multisampled 2D textures for a depth-stencil view.
+This structure is one member of a depth-stencil-view description (see
The index of the first texture to use in an array of textures.
Number of textures to use.
Resource data format (see
Type of resource (see
A value that describes whether the texture is read only. Pass 0 to specify that it is not read only; otherwise, pass one of the members of the
Specifies a 1D texture subresource (see
Specifies an array of 1D texture subresources (see
Specifies a 2D texture subresource (see
Specifies an array of 2D texture subresources (see
Specifies a multisampled 2D texture (see
Specifies an array of multisampled 2D textures (see
Arguments for draw indexed instanced indirect.
+ The members of this structure serve the same purpose as the parameters of
The number of indices read from the index buffer for each instance.
The number of instances to draw.
The location of the first index read by the GPU from the index buffer.
A value added to each index before reading a vertex from the vertex buffer.
A value added to each index before reading per-instance data from a vertex buffer.
Arguments for draw instanced indirect.
+ The members of this structure serve the same purpose as the parameters of
The number of vertices to draw.
The number of instances to draw.
The index of the first vertex.
A value added to each index before reading per-instance data from a vertex buffer.
Specifies which bytes in a video surface are encrypted.
+The number of bytes that are encrypted at the start of the buffer.
The number of bytes that are skipped after the first NumEncryptedBytesAtBeginning bytes, and then after each block of NumBytesInEncryptPattern bytes. Skipped bytes are not encrypted.
The number of bytes that are encrypted after each block of skipped bytes.
Describes information about Direct3D 11.1 adapter architecture.
+Specifies whether a rendering device batches rendering commands and performs multipass rendering into tiles or bins over a render area. Certain API usage patterns that are fine for TileBasedDefferredRenderers (TBDRs) can perform worse on non-TBDRs and vice versa. Applications that are careful about rendering can be friendly to both TBDR and non-TBDR architectures. TRUE if the rendering device batches rendering commands and
Describes compute shader and raw and structured buffer support in the current graphics driver.
+Direct3D 11 devices (
TRUE if compute shaders and raw and structured buffers are supported; otherwise
Describes Direct3D 11.1 feature options in the current graphics driver.
+If a Microsoft Direct3D device supports feature level 11.1 (
Feature level 11.1 provides the following additional features:
The runtime always sets the following groupings of members identically. That is, all the values in a grouping are TRUE or
Specifies whether logic operations are available in blend state. The runtime sets this member to TRUE if logic operations are available in blend state and
Specifies whether the driver can render with no render target views (RTVs) or depth stencil views (DSVs), and only unordered access views (UAVs) bound. The runtime sets this member to TRUE if the driver can render with no RTVs or DSVs and only UAVs bound and
Specifies whether the driver supports the
Specifies whether the driver supports new semantics for copy and update that are exposed by the
Specifies whether the driver supports the
Specifies whether you can call
Specifies whether the driver supports partial updates of constant buffers. The runtime sets this member to TRUE if the driver supports partial updates of constant buffers and
Specifies whether the driver supports new semantics for setting offsets in constant buffers for a shader. The runtime sets this member to TRUE if the driver supports allowing you to specify offsets when you call new methods like the
Specifies whether you can call
Specifies whether you can call
Specifies whether the driver supports multisample rendering when you render with RTVs bound. If TRUE, you can set the ForcedSampleCount member of
Specifies whether the hardware and driver support the msad4 intrinsic function in shaders. The runtime sets this member to TRUE if the hardware and driver support calls to msad4 intrinsic functions in shaders. If
Specifies whether the hardware and driver support the fma intrinsic function and other extended doubles instructions (DDIV and DRCP) in shaders. The fma intrinsic function emits an extended doubles DFMA instruction. The runtime sets this member to TRUE if the hardware and driver support extended doubles instructions in shaders (shader model 5 and higher). Support of this option implies support of basic double-precision shader instructions as well. You can use the
Specifies whether the hardware and driver support sharing a greater variety of Texture2D resource types and formats. The runtime sets this member to TRUE if the hardware and driver support extended Texture2D resource sharing.
Describes Direct3D 11.2 feature options in the current graphics driver.
+ If the Direct3D API is the Direct3D 11.2 runtime and can support 11.2 features,
Specifies whether the hardware and driver support tiled resources. The runtime sets this member to a
Specifies whether the hardware and driver support the filtering options (
Specifies whether the hardware and driver also support the
Specifies support for creating
Describes Direct3D 11.3 feature options in the current graphics driver.
+Whether to use the VP and RT array index from any shader feeding the rasterizer.
Describes Direct3D 11.4 feature options in the current graphics driver.
+Use this structure with the
Refer to the section on NV12 in Direct3D 11.4 Features.
+Specifies a
Describes Direct3D 9 feature options in the current graphics driver.
+Specifies whether the driver supports the nonpowers-of-2-unconditionally feature. For more information about this feature, see feature level. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to
Describes Direct3D 9 feature options in the current graphics driver.
+You can use the
Specifies whether the driver supports the nonpowers-of-2-unconditionally feature. For more info about this feature, see feature level. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to
Specifies whether the driver supports the shadowing feature with the comparison-filtering mode set to less than or equal to. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to TRUE only if the hardware and driver support the shadowing feature; otherwise
Specifies whether the hardware and driver support simple instancing. The runtime sets this member to TRUE if the hardware and driver support simple instancing.
Specifies whether the hardware and driver support setting a single face of a TextureCube as a render target while the depth stencil surface that is bound alongside can be a Texture2D (as opposed to TextureCube). The runtime sets this member to TRUE if the hardware and driver support this feature; otherwise
If the hardware and driver don't support this feature, the app must match the render target surface type with the depth stencil surface type. Because hardware at Direct3D 9.3 and lower feature levels doesn't allow TextureCube depth surfaces, the only way to render a scene into a TextureCube while having depth buffering enabled is to render each TextureCube face separately to a Texture2D render target first (because that can be matched with a Texture2D depth), and then copy the results into the TextureCube. If the hardware and driver support this feature, the app can just render to the TextureCube faces directly while getting depth buffering out of a Texture2D depth buffer.
You only need to query this feature from hardware at Direct3D 9.3 and lower feature levels because hardware at Direct3D 10.0 and higher feature levels allow TextureCube depth surfaces.
Describes Direct3D?9 shadow support in the current graphics driver.
+Shadows are an important element in realistic 3D scenes. You can use the shadow buffer technique to render shadows. The basic principle of the technique is to use a depth buffer to store the scene depth info from the perspective of the light source, and then compare each point rendered in the scene with that buffer to determine if it is in shadow.
To render objects into the scene with shadows on them, you create sampler state objects with comparison filtering set and the comparison mode (ComparisonFunc) to LessEqual. You can also set BorderColor addressing on this depth sampler, even though BorderColor isn't typically allowed on feature levels 9.1 and 9.2. By using the border color and picking 0.0 or 1.0 as the border color value, you can control whether the regions off the edge of the shadow map appear to be always in shadow or never in shadow respectively. + You can control the shadow filter quality by the Mag and Min filter settings in the comparison sampler. Point sampling will produce shadows with non-anti-aliased edges. Linear filter sampler settings will result in higher quality shadow edges, but might affect performance on some power-optimized devices.
Note??If you use a separate setting for Mag versus Min filter options, you produce an undefined result. Anisotropic filtering is not supported. The Mip filter choice is not relevant because feature level 9.x does not allow mipmapped depth buffers.?Note??On feature level 9.x, you can't compile a shader with the SampleCmp and SampleCmpLevelZero intrinsic functions by using older versions of the compiler. For example, you can't use the fxc.exe compiler that ships with the DirectX SDK or use theSpecifies whether the driver supports the shadowing feature with the comparison-filtering mode set to less than or equal to. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to TRUE only if the hardware and driver support the shadowing feature; otherwise
Describes whether simple instancing is supported.
+ If the Direct3D API is the Direct3D 11.2 runtime and can support 11.2 features,
Simple instancing means that instancing is supported with the caveat that the InstanceDataStepRate member of the
Specifies whether the hardware and driver support simple instancing. The runtime sets this member to TRUE if the hardware and driver support simple instancing.
Describes double data type support in the current graphics driver.
+If the runtime sets DoublePrecisionFloatShaderOps to TRUE, the hardware and driver support the following Shader Model 5 instructions:
Specifies whether double types are allowed. If TRUE, double types are allowed; otherwise
Describes which resources are supported by the current graphics driver for a given format.
+
Combination of
Describes which unordered resource options are supported by the current graphics driver for a given format.
+
Combination of
Describes feature data GPU virtual address support, including maximum address bits per resource and per process.
+ See
The maximum GPU virtual address bits per resource.
The maximum GPU virtual address bits per process.
Describes whether a GPU profiling technique is supported.
+If the Direct3D API is the Direct3D 11.2 runtime and can support 11.2 features,
Specifies whether the hardware and driver support a GPU profiling technique that can be used with development tools. The runtime sets this member to TRUE if the hardware and driver support data marking.
Stencil operations that can be performed based on the results of stencil test.
+All stencil operations are specified as a
This structure is a member of a depth-stencil description.
+The stencil operation to perform when stencil testing fails.
Describes precision support options for shaders in the current graphics driver.
+For hardware at Direct3D 10 and higher feature levels, the runtime sets both members identically. For hardware at Direct3D 9.3 and lower feature levels, the runtime can set a lower precision support in the PixelShaderMinPrecision member than the AllOtherShaderStagesMinPrecision member; for 9.3 and lower, all other shader stages represent only the vertex shader.
For more info about HLSL minimum precision, see using HLSL minimum precision.
+A combination of
A combination of
Describes the multi-threading features that are supported by the current graphics driver.
+Use the
TRUE means resources can be created concurrently on multiple threads while drawing;
TRUE means command lists are supported by the current driver;
Allow or deny certain types of messages to pass through a filter.
+Number of message categories to allow or deny.
Array of message categories to allow or deny. Array must have at least NumCategories members (see
Allow or deny certain types of messages to pass through a filter.
+Number of message categories to allow or deny.
Array of message categories to allow or deny. Array must have at least NumCategories members (see
Number of message severity levels to allow or deny.
Array of message severity levels to allow or deny. Array must have at least NumSeverities members (see
Number of message IDs to allow or deny.
Array of message IDs to allow or deny. Array must have at least NumIDs members (see
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
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. See
An integer value that identifies the input-assembler (see input slot). Valid values are between 0 and 15, defined in D3D11.h.
Optional. Offset (in bytes) between each element. Use D3D11_APPEND_ALIGNED_ELEMENT for convenience to define the current element directly after the previous one, including any packing if necessary.
Identifies the input data class for a single input slot (see
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 (the slot class is set to
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Represents key exchange data for hardware content protection.
+A reference to this structure is passed in the pData parameter of
The function ID of the DRM command. The values and meanings of the function ID are defined by the DRM specification.
Pointer to a buffer containing a
Pointer to a buffer containing a
The result of the hardware DRM command.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Represents key exchange input data for hardware content protection.
+The size of the private data reserved for IHV usage. This size is determined from the pPrivateInputSize parameter returned by the
The size of the DRM command data.
If PrivateDataSize is greater than 0, pbInput[0] ? pbInput[PrivateDataSize - 1] is reserved for IHV use.
pbInput[PrivateDataSize] ? pbInput[HWProtectionDataSize + PrivateDataSize - 1] contains the input data for the DRM command. The format and size of the DRM command is defined by the DRM specification.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Represents key exchange output data for hardware content protection.
+The size of the private data reserved for IHV usage. This size is determined from the pPrivateOutputSize parameter returned by the
The maximum size of data that the driver can return in the output buffer. The last byte that it can write to is pbOuput[PrivateDataSize + MaxHWProtectionDataSize ? 1].
The size of the output data written by the driver.
The number of 100 nanosecond units spent transporting the data.
The number of 100 nanosecond units spent executing the content protection command.
If PrivateDataSize is greater than 0, pbInput[0] ? pbOutput[PrivateDataSize - 1] is reserved for IHV use.
pbOutput[PrivateDataSize] ? pbOutput[HWProtectionDataSize + PrivateDataSize - 1] contains the input data for the DRM command. The format and size of the DRM command is defined by the DRM specification.
A debug message in the Information Queue.
+This structure is returned from
The category of the message. See
The severity of the message. See
The ID of the message. See
The message string.
The length of pDescription in bytes.
Contains a Message Authentication Code (MAC).
+A byte array that contains the cryptographic MAC value of the message.
Describes the tile structure of a tiled resource with mipmaps.
+Number of standard mipmaps in the tiled resource.
Number of packed mipmaps in the tiled resource.
This number starts from the least detailed mipmap (either sharing tiles or using non standard tile layout). This number is 0 if no + such packing is in the resource. For array surfaces, this value is the number of mipmaps that are packed for a given array slice where each array slice repeats the same + packing. +
On Tier_2 tiled resources hardware, mipmaps that fill at least one standard shaped tile in all dimensions + are not allowed to be included in the set of packed mipmaps. On Tier_1 hardware, mipmaps that are an integer multiple of one standard shaped tile in all dimensions are not allowed to be included in the set of packed mipmaps. Mipmaps with at least one + dimension less than the standard tile shape may or may not be packed. When a given mipmap needs to be packed, all coarser + mipmaps for a given array slice are considered packed as well. +
Number of tiles for the packed mipmaps in the tiled resource.
If there is no packing, this value is meaningless and is set to 0. + Otherwise, it is set to the number of tiles + that are needed to represent the set of packed mipmaps. + The pixel layout within the packed mipmaps is hardware specific. + If apps define only partial mappings for the set of tiles in packed mipmaps, read and write behavior is vendor specific and undefined. + For arrays, this value is only the count of packed mipmaps within + the subresources for each array slice.
Offset of the first packed tile for the resource + in the overall range of tiles. If NumPackedMips is 0, this + value is meaningless and is 0. Otherwise, it is the + offset of the first packed tile for the resource in the overall + range of tiles for the resource. A value of 0 for + StartTileIndexInOverallResource means the entire resource is packed. + For array surfaces, this is the offset for the tiles that contain the packed + mipmaps for the first array slice. Packed mipmaps for each array slice in arrayed surfaces are at this offset + past the beginning of the tiles for each array slice.
Note??The + number of overall tiles, packed or not, for a given array slice is + simply the total number of tiles for the resource divided by the + resource's array size, so it is easy to locate the range of tiles for + any given array slice, out of which StartTileIndexInOverallResource identifies + which of those are packed. ?Query information about graphics-pipeline activity in between calls to
Query information about the reliability of a timestamp query.
+For a list of query types see
How frequently the GPU counter increments in Hz.
If this is TRUE, something occurred in between the query's
Describes a query.
+Type of query (see
Miscellaneous flags (see
Describes a query.
+A
A combination of
A
Describes rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call
If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.
State | Default Value |
---|---|
FillMode | Solid |
CullMode | Back |
FrontCounterClockwise | |
DepthBias | 0 |
SlopeScaledDepthBias | 0.0f |
DepthBiasClamp | 0.0f |
DepthClipEnable | TRUE |
ScissorEnable | |
MultisampleEnable | |
AntialiasedLineEnable |
?
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
---|---|---|
Aliased | ||
Alpha antialiased | TRUE | |
Quadrilateral | TRUE | |
Quadrilateral | TRUE | TRUE |
?
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.
+Determines the fill mode to use when rendering (see
Indicates triangles facing the specified direction are not drawn (see
Determines if a triangle is front- or back-facing. If this parameter is TRUE, a triangle will be 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
Depth value added to a given pixel. For info about depth bias, see Depth Bias.
Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.
Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.
Enable clipping based on distance.
The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default?TRUE, 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
Enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to
Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is
Describes rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call
If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.
State | Default Value |
---|---|
FillMode | Solid |
CullMode | Back |
FrontCounterClockwise | |
DepthBias | 0 |
SlopeScaledDepthBias | 0.0f |
DepthBiasClamp | 0.0f |
DepthClipEnable | TRUE |
ScissorEnable | |
MultisampleEnable | |
AntialiasedLineEnable | |
ForcedSampleCount | 0 |
?
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
---|---|---|
Aliased | ||
Alpha antialiased | TRUE | |
Quadrilateral | TRUE | |
Quadrilateral | TRUE | TRUE |
?
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.
+Determines the fill mode to use when rendering.
Indicates that triangles facing the specified direction are not drawn.
Specifies whether a triangle is front- or back-facing. If TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If
Depth value added to a given pixel. For info about depth bias, see Depth Bias.
Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.
Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.
Specifies whether to enable clipping based on distance.
The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default?TRUE, 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
Specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to
Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is
The sample count that is forced while UAV rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced.
Note??If you want to render with ForcedSampleCount set to 1 or greater, you must follow these guidelines:
Describes rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call
If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.
State | Default Value |
---|---|
FillMode | Solid |
CullMode | Back |
FrontCounterClockwise | |
DepthBias | 0 |
SlopeScaledDepthBias | 0.0f |
DepthBiasClamp | 0.0f |
DepthClipEnable | TRUE |
ScissorEnable | |
MultisampleEnable | |
AntialiasedLineEnable | |
ForcedSampleCount | 0 |
ConservativeRaster |
?
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
---|---|---|
Aliased | ||
Alpha antialiased | TRUE | |
Quadrilateral | TRUE | |
Quadrilateral | TRUE | TRUE |
?
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.
+A
A
Specifies whether a triangle is front- or back-facing. If TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If
Depth value added to a given pixel. For info about depth bias, see Depth Bias.
Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.
Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.
Specifies whether to enable clipping based on distance.
The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default?TRUE, 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
Specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to
Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is
The sample count that is forced while UAV rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced.
Note??If you want to render with ForcedSampleCount set to 1 or greater, you must follow these guidelines:
A
Describes the blend state for a render target.
+You specify an array of
For info about how blending is done, see the output-merger stage.
Here are the default values for blend state.
State | Default Value |
---|---|
BlendEnable | |
SrcBlend | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
RenderTargetWriteMask |
?
+Enable (or disable) blending.
This blend option specifies the operation to perform on the RGB value that the pixel shader outputs. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the current RGB value in the render target. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend operation defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend option specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend operation defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
A write mask.
Describes the blend state for a render target.
+You specify an array of
For info about how blending is done, see the output-merger stage.
Here are the default values for blend state.
State | Default Value |
---|---|
BlendEnable | |
LogicOpEnable | |
SrcBlend | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
LogicOp | |
RenderTargetWriteMask |
?
+Enable (or disable) blending.
Enable (or disable) a logical operation.
This blend option specifies the operation to perform on the RGB value that the pixel shader outputs. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the current RGB value in the render target. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend operation defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend option specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend operation defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
A
A write mask.
Specifies the subresources from a resource that are accessible using a render-target view.
+A render-target-view description is passed into
A render-target-view cannot use the following formats:
If the format is set to
Specifies the elements in a buffer resource to use in a render-target view.
+ A render-target view is a member of a render-target-view description (see
Number of bytes between the beginning of the buffer and the first element to access.
The offset of the first element in the view to access, relative to element 0.
The total number of elements in the view.
The width of each element (in bytes). This can be determined from the format stored in the render-target-view description.
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
The index of the mipmap level to use mip slice.
Specifies the subresources 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
The index of the mipmap level to use mip slice.
The index of the first texture to use in an array of textures.
Number of textures to use.
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
The index of the mipmap level to use mip slice.
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
Integer of any value. See remarks.
Specifies the subresources 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
The index of the mipmap level to use mip slice.
The index of the first texture to use in an array of textures.
Number of textures in the array to use in the render target view, starting from FirstArraySlice.
Specifies the subresources 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
The index of the first texture to use in an array of textures.
Number of textures to use.
Specifies the subresources from a 3D texture to use in a render-target view.
+This structure is one member of a render target view. See
The index of the mipmap level to use mip slice.
First depth level to use.
Number of depth levels to use in the render-target view, starting from FirstWSlice. A value of -1 indicates all of the slices along the w axis, starting from FirstWSlice.
The data format (see
The resource type (see
Specifies which buffer elements can be accessed (see
Specifies the subresources in a 1D texture that can be accessed (see
Specifies the subresources in a 1D texture array that can be accessed (see
Specifies the subresources in a 2D texture that can be accessed (see
Specifies the subresources in a 2D texture array that can be accessed (see
Specifies a single subresource because a multisampled 2D texture only contains one subresource (see
Specifies the subresources in a multisampled 2D texture array that can be accessed (see
Specifies subresources in a 3D texture that can be accessed (see
Describes the subresources from a resource that are accessible using a render-target view.
+A render-target-view description is passed into
A render-target-view can't use the following formats:
If the format is set to
Describes the subresource from a 2D texture to use in a render-target view.
+The index of the mipmap level to use mip slice.
The index (plane slice number) of the plane to use in the texture.
Describes the subresources from an array of 2D textures to use in a render-target view.
+The index of the mipmap level to use mip slice.
The index of the first texture to use in an array of textures.
Number of textures in the array to use in the render-target view, starting from FirstArraySlice.
The index (plane slice number) of the plane to use in an array of textures.
A
A
A
A
A
A
A
A
A
A
Defines a 3D box.
+The following diagram shows a 3D box, where the origin is the left, front, top corner.
The values for right, bottom, and back are each one pixel past the end of the pixels that are included in the box region. That is, the values for left, top, and front are included in the box region while the values for right, bottom, and back are excluded from the box region. For example, for a box that is one pixel wide, (right - left) == 1; the box region includes the left pixel but not the right pixel.
Coordinates of a box are in bytes for buffers and in texels for textures.
+The x position of the left hand side of the box.
The y position of the top of the box.
The z position of the front of the box.
The x position of the right hand side of the box.
The y position of the bottom of the box.
The z position of the back of the box.
Describes a sampler state.
+These are the default values for sampler state.
State | Default Value |
---|---|
Filter | |
AddressU | |
AddressV | |
AddressW | |
MinLOD | -3.402823466e+38F (-FLT_MAX) |
MaxLOD | 3.402823466e+38F (FLT_MAX) |
MipMapLODBias | 0.0f |
MaxAnisotropy | 1 |
ComparisonFunc | |
BorderColor | float4(1.0f,1.0f,1.0f,1.0f) |
Texture | N/A |
?
+ Filtering method to use when sampling a texture (see
Method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see
Method to use for resolving a v texture coordinate that is outside the 0 to 1 range.
Method to use for resolving a w texture coordinate that is outside the 0 to 1 range.
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.
Clamping value used if
A function that compares sampled data against existing sampled data. The function options are listed in
Border color to use if
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.
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 D3D11_FLOAT32_MAX.
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.
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
Create a shader-resource-view description by calling
Specifies the elements in a buffer resource to use in a shader-resource view.
+ The
Number of bytes between the beginning of the buffer and the first element to access.
The offset of the first element in the view to access, relative to element 0.
The total number of elements in the view.
The width of each element (in bytes). This can be determined from the format stored in the shader-resource-view description.
Describes the elements in a raw buffer resource to use in a shader-resource view.
+This structure is used by
The index of the first element to be accessed by the view.
The number of elements in the resource.
A
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
As an example, assuming MostDetailedMip = 6 and MipLevels = 2, the view will have access to 2 mipmap levels, 6 and 7, of the original texture for which
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture1D for which
The maximum number of mipmap levels for the view of the texture. See the remarks.
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresources 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
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture1D for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index of the first texture to use in an array of textures.
Number of textures in the array.
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
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture2D for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresources 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
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture2D for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index of the first texture to use in an array of textures.
Number of textures in the array.
Specifies the subresources from a 3D texture to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture3D for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
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
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original TextureCube for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresources 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
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original TextureCube for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Index of the first 2D texture to use.
Number of cube textures in the array.
Specifies the subresources 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
Integer of any value. See remarks.
Specifies the subresources 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
The index of the first texture to use in an array of textures.
Number of textures to use.
A
The resource type of the view. See D3D11_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.
View the resource as a buffer using information from a shader-resource view (see
View the resource as a 1D texture using information from a shader-resource view (see
View the resource as a 1D-texture array using information from a shader-resource view (see
View the resource as a 2D-texture using information from a shader-resource view (see
View the resource as a 2D-texture array using information from a shader-resource view (see
View the resource as a 2D-multisampled texture using information from a shader-resource view (see
View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see
View the resource as a 3D texture using information from a shader-resource view (see
View the resource as a 3D-cube texture using information from a shader-resource view (see
View the resource as a 3D-cube-texture array using information from a shader-resource view (see
View the resource as a raw buffer using information from a shader-resource view (see
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.
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
Create a shader-resource-view description by calling
Describes the subresource from a 2D texture to use in a shader-resource view.
+ Index of the most detailed mipmap level to use; this number is between 0 and (MipLevels (from the original Texture2D for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index (plane slice number) of the plane to use in the texture.
Describes the subresources from an array of 2D textures to use in a shader-resource view.
+ Index of the most detailed mipmap level to use; this number is between 0 and ( MipLevels (from the original Texture2D for which
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index of the first texture to use in an array of textures.
Number of textures in the array.
The index (plane slice number) of the plane to use in an array of textures.
A
A D3D11_SRV_DIMENSION-typed value that specifies the resource type of the view. This type is the same as the resource type of the underlying resource. This member also determines which _SRV to use in the union below.
A
A
A
A
A
A
A
A
A
A
A
Description of a vertex element in a vertex buffer in an output slot.
+Zero-based, stream number.
Type of output element; possible values include: "POSITION", "NORMAL", or "TEXCOORD0". Note that if SemanticName is
Output element's zero-based index. Should be used if, for example, you have more than one texture coordinate stored in each vertex.
Which component of the entry to begin writing out to. Valid values are 0 to 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.
The number of components of the entry to write out to. Valid values are 1 to 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. Note that if SemanticName is
The associated stream output buffer that is bound to the pipeline (see
Query information about the amount of data streamed out to the stream-output buffers in between
Describes a tiled subresource volume.
+Each packed mipmap is individually reported as 0 for WidthInTiles, HeightInTiles and DepthInTiles. +
The total number of tiles in subresources is WidthInTiles*HeightInTiles*DepthInTiles.
+The width in tiles of the subresource.
The height in tiles of the subresource.
The depth in tiles of the subresource.
The index of the tile in the overall tiled subresource to start with.
GetResourceTiling sets StartTileIndexInOverallResource to D3D11_PACKED_TILE (0xffffffff) to indicate that the whole
+
Describes a 1D texture.
+This structure is used in a call to
In addition to this structure, you can also use the CD3D11_TEXTURE1D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a texture description.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (
Texture width (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Number of textures in the array. The range is from 1 to
Texture format (see
Value that identifies how the texture is to be read from and written to. The most common value is
Flags (see
Flags (see
Flags (see
Identifies a texture resource for a video processor output view.
+The zero-based index into the array of subtextures.
The index of the first texture to use.
The number of textures in the array.
Describes a 2D texture.
+This structure is used in a call to
In addition to this structure, you can also use the CD3D11_TEXTURE2D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, 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.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Number of textures in the texture array. The range is from 1 to
Texture format (see
Structure that specifies multisampling parameters for the texture. See
Value that identifies how the texture is to be read from and written to. The most common value is
Flags (see
Flags (see
Flags (see
Describes a 2D texture.
+This structure is used in a call to
In addition to this structure, you can also use the CD3D11_TEXTURE2D_DESC1 derived structure, which is defined in D3D11_3.h and behaves like an inherited class, 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.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Number of textures in the texture array. The range is from 1 to
Texture format (see
Structure that specifies multisampling parameters for the texture. See
Value that identifies how the texture is to be read from and written to. The most common value is
Flags (see
Flags (see
Flags (see
A
The TextureLayout parameter selects both the actual layout of the texture in memory and the layout visible to the application while the texture is mapped. These flags may not be requested without CPU access also requested.
It is illegal to set CPU access flags on default textures without also setting TextureLayout to a value other than
Identifies the texture resource for a video decoder output view.
+The zero-based index of the texture.
Identifies the texture resource for a video processor input view.
+The zero-based index into the array of subtextures.
The zero-based index of the texture.
Identifies a texture resource for a video processor output view.
+The zero-based index into the array of subtextures.
Describes a 3D texture.
+This structure is used in a call to
In addition to this structure, you can also use the CD3D11_TEXTURE3D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a texture description.
The device restricts the size of subsampled, block compressed, and bit format resources to be multiples of sizes specific to each format.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
Texture depth (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Texture format (see
Value that identifies how the texture is to be read from and written to. The most common value is
Flags (see
Flags (see
Flags (see
Describes a 3D texture.
+This structure is used in a call to
In addition to this structure, you can also use the CD3D11_TEXTURE3D_DESC1 derived structure, which is defined in D3D11_3.h and behaves like an inherited class, to help create a texture description.
The device restricts the size of subsampled, block compressed, and bit format resources to be multiples of sizes specific to each format.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
Texture depth (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Texture format (see
Value that identifies how the texture is to be read from and written to. The most common value is
Flags (see
Flags (see
Flags (see
A
The TextureLayout parameter selects both the actual layout of the texture in memory and the layout visible to the application while the texture is mapped. These flags may not be requested without CPU access also requested.
It is illegal to set CPU access flags on default textures without also setting Layout to a value other than
Describes the coordinates of a tiled resource.
+The x position of a tiled resource. Used for buffer and 1D, 2D, and 3D textures.
The y position of a tiled resource. Used for 2D and 3D textures.
The z position of a tiled resource. Used for 3D textures.
A subresource index value into mipmaps and arrays. Used for 1D, 2D, and 3D textures.
For mipmaps that use nonstandard tiling, or are packed, or both use nonstandard tiling and are packed, any subresource value that indicates any of the packed mipmaps all refer to the same tile.
Describes the size of a tiled region.
+The number of tiles in the tiled region.
Specifies whether the runtime uses the Width, Height, and Depth members to define the region.
If TRUE, the runtime uses the Width, Height, and Depth members to define the region.
If
Regardless of whether you specify TRUE or
When the region includes mipmaps that are packed with nonstandard tiling, bUseBox must be
The width of the tiled region, in tiles. Used for buffer and 1D, 2D, and 3D textures.
The height of the tiled region, in tiles. Used for 2D and 3D textures.
The depth of the tiled region, in tiles. Used for 3D textures or arrays. For arrays, used for advancing in depth jumps to next slice of same mipmap size, which isn't contiguous in the subresource counting space if there are multiple mipmaps.
Describes the shape of a tile by specifying its dimensions.
+Texels are equivalent to pixels. For untyped buffer resources, a texel is just a byte. For multisample antialiasing (MSAA) surfaces, the numbers are still in terms of pixels/texels. + The values here are independent of the surface dimensions. Even if the surface is smaller than what would fit in a tile, the full tile dimensions are reported here. +
+The width in texels of the tile.
The height in texels of the tile.
The depth in texels of the tile.
Specifies the subresources from a resource that are accessible using an unordered-access view.
+An unordered-access-view description is passed into
Describes the elements in a buffer to use in a unordered-access view.
+This structure is used by a
The zero-based index of the first element to be accessed.
The number of elements in the resource. For structured buffers, this is the number of structures in the buffer.
View options for the resource (see
Describes a unordered-access 1D texture resource.
+This structure is used by a
The mipmap slice index.
Describes an array of unordered-access 1D texture resources.
+This structure is used by a
The mipmap slice index.
The zero-based index of the first array slice to be accessed.
The number of slices in the array.
Describes a unordered-access 2D texture resource.
+This structure is used by a
The mipmap slice index.
Describes an array of unordered-access 2D texture resources.
+This structure is used by a
The mipmap slice index.
The zero-based index of the first array slice to be accessed.
The number of slices in the array.
Describes a unordered-access 3D texture resource.
+This structure is used by a
The mipmap slice index.
The zero-based index of the first depth slice to be accessed.
The number of depth slices.
The data format (see
The resource type (see
Specifies which buffer elements can be accessed (see
Specifies the subresources in a 1D texture that can be accessed (see
Specifies the subresources in a 1D texture array that can be accessed (see
Specifies the subresources in a 2D texture that can be accessed (see
Specifies the subresources in a 2D texture array that can be accessed (see
Specifies subresources in a 3D texture that can be accessed (see
Describes the subresources from a resource that are accessible using an unordered-access view.
+An unordered-access-view description is passed into
Describes a unordered-access 2D texture resource.
+The mipmap slice index.
The index (plane slice number) of the plane to use in the texture.
Describes an array of unordered-access 2D texture resources.
+The mipmap slice index.
The zero-based index of the first array slice to be accessed.
The number of slices in the array.
The index (plane slice number) of the plane to use in an array of textures.
A
A
A
A
A
A
A
A
Defines a color value for Microsoft Direct3D?11 video.
+The anonymous union can represent both RGB and YCbCr colors. The interpretation of the union depends on the context.
+A
A
Specifies an RGB color value.
+The RGB values have a nominal range of [0...1]. For an RGB format with n bits per channel, the value of each color component is calculated as follows:
val = f * ((1 << n)-1)
For example, for RGB-32 (8 bits per channel), val = BYTE(f * 255.0)
.
The red value.
The green value.
The blue value.
The alpha value. Values range from 0 (transparent) to 1 (opaque). +
Describes the content-protection capabilities of a graphics driver.
+A bitwise OR of zero or more flags from the
The number of cryptographic key-exchange types that are supported by the driver. To get the list of key-exchange types, call the
The encyrption block size, in bytes. The size of data to be encrypted must be a multiple of this value.
The total amount of memory, in bytes, that can be used to hold protected surfaces.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Provides data to the
This structure is passed in the pContentKey parameter of the
Describes a compressed buffer for decoding.
+The type of buffer, specified as a member of the
Reserved.
The offset of the relevant data from the beginning of the buffer, in bytes. This value must be zero. +
The macroblock address of the first macroblock in the buffer. The macroblock address is given in raster scan order. +
The macroblock address of the first macroblock in the buffer. The macroblock address is given in raster scan order. +
The number of macroblocks of data in the buffer. This count includes skipped macroblocks.
Reserved. Set to zero.
Reserved. Set to zero.
Reserved. Set to zero.
Reserved. Set to zero.
A reference to a buffer that contains an initialization vector (IV) for encrypted data. If the decode buffer does not contain encrypted data, set this member to
The size of the buffer specified in the pIV parameter. If pIV is
If TRUE, the video surfaces are partially encrypted.
A
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Describes a compressed buffer for decoding.
+The type of buffer.
The offset of the relevant data from the beginning of the buffer, in bytes. This value must be zero.
Size of the relevant data.
A reference to a buffer that contains an initialization vector (IV) for encrypted data. If the decode buffer does not contain encrypted data, set this member to
The size of the buffer specified in the pIV parameter. If pIV is
A reference to an array of
Values in the sub sample mapping blocks are relative to the start of the decode buffer.
The number of
Describes the configuration of a Microsoft Direct3D?11 decoder device for DirectX Video Acceleration (DXVA).
+If the bitstream data buffers are encrypted using the D3D11CryptoSession mechanism, this
If the macroblock control data buffers are encrypted using the D3D11CryptoSession mechanism, this
If the residual difference decoding data buffers are encrypted using the D3D11CryptoSession mechanism, this
Indicates whether the host-decoder sends raw bit-stream data. If the value is 1, the data for the pictures will be sent in bit-stream buffers as raw bit-stream content. If the value is 0, picture data will be sent using macroblock control command buffers. If either ConfigResidDiffHost or ConfigResidDiffAccelerator is 1, the value must be 0.
Specifies whether macroblock control commands are in raster scan order or in arbitrary order. If the value is 1, the macroblock control commands within each macroblock control command buffer are in raster-scan order. If the value is 0, the order is arbitrary. For some types of bit streams, forcing raster order either greatly increases the number of required macroblock control buffers that must be processed, or requires host reordering of the control information. Therefore, supporting arbitrary order can be more efficient.
Contains the host residual difference configuration. If the value is 1, some residual difference decoding data may be sent as blocks in the spatial domain from the host. If the value is 0, spatial domain data will not be sent.
Indicates the word size used to represent residual difference spatial-domain blocks for predicted (non-intra) pictures when using host-based residual difference decoding.
If ConfigResidDiffHost is 1 and ConfigSpatialResid8 is 1, the host will send residual difference spatial-domain blocks for non-intra macroblocks using 8-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of ConfigIntraResidUnsigned:
If ConfigResidDiffHost is 1 and ConfigSpatialResid8 is 0, the host will send residual difference spatial-domain blocks of data for non-intra macroblocks using 16-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of ConfigIntraResidUnsigned:
If ConfigResidDiffHost is 0, ConfigSpatialResid8 must be 0.
For intra pictures, spatial-domain blocks must be sent using 8-bit samples if bits-per-pixel (BPP) is 8, and using 16-bit samples if BPP > 8. If ConfigIntraResidUnsigned is 0, these samples are sent as signed integer values relative to a constant reference value of 2^(BPP?1), and if ConfigIntraResidUnsigned is 1, these samples are sent as unsigned integer values relative to a constant reference value of 0.
If the value is 1, 8-bit difference overflow blocks are subtracted rather than added. The value must be 0 unless ConfigSpatialResid8 is 1.
The ability to subtract differences rather than add them enables 8-bit difference decoding to be fully compliant with the full ?255 range of values required in video decoder specifications, because +255 cannot be represented as the addition of two signed 8-bit numbers, but any number in the range ?255 can be represented as the difference between two signed 8-bit numbers (+255 = +127 minus ?128).
If the value is 1, spatial-domain blocks for intra macroblocks must be clipped to an 8-bit range on the host and spatial-domain blocks for non-intra macroblocks must be clipped to a 9-bit range on the host. If the value is 0, no such clipping is necessary by the host.
The value must be 0 unless ConfigSpatialResid8 is 0 and ConfigResidDiffHost is 1.
If the value is 1, any spatial-domain residual difference data must be sent in a chrominance-interleaved form matching the YUV format chrominance interleaving pattern. The value must be 0 unless ConfigResidDiffHost is 1 and the YUV format is NV12 or NV21.
Indicates the method of representation of spatial-domain blocks of residual difference data for intra blocks when using host-based difference decoding.
If ConfigResidDiffHost is 1 and ConfigIntraResidUnsigned is 0, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows:
If ConfigResidDiffHost is 1 and ConfigIntraResidUnsigned is 1, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows:
The value of the member must be 0 unless ConfigResidDiffHost is 1.
If the value is 1, transform-domain blocks of coefficient data may be sent from the host for accelerator-based IDCT. If the value is 0, accelerator-based IDCT will not be used. If both ConfigResidDiffHost and ConfigResidDiffAccelerator are 1, this indicates that some residual difference decoding will be done on the host and some on the accelerator, as indicated by macroblock-level control commands.
The value must be 0 if ConfigBitstreamRaw is 1.
If the value is 1, the inverse scan for transform-domain block processing will be performed on the host, and absolute indices will be sent instead for any transform coefficients. If the value is 0, the inverse scan will be performed on the accelerator.
The value must be 0 if ConfigResidDiffAccelerator is 0 or if Config4GroupedCoefs is 1.
If the value is 1, the IDCT specified in Annex W of ITU-T Recommendation H.263 is used. If the value is 0, any compliant IDCT can be used for off-host IDCT.
The H.263 annex does not comply with the IDCT requirements of MPEG-2 corrigendum 2, so the value must not be 1 for use with MPEG-2 video.
The value must be 0 if ConfigResidDiffAccelerator is 0, indicating purely host-based residual difference decoding.
If the value is 1, transform coefficients for off-host IDCT will be sent using the DXVA_TCoef4Group structure. If the value is 0, the DXVA_TCoefSingle structure is used. The value must be 0 if ConfigResidDiffAccelerator is 0 or if ConfigHostInverseScan is 1.
Specifies how many frames the decoder device processes at any one time.
Contains decoder-specific configuration information.
Describes a video stream for a Microsoft Direct3D?11 video decoder or video processor.
+The decoding profile. To get the list of profiles supported by the device, call the
The width of the video frame, in pixels.
The height of the video frame, in pixels.
The output surface format, specified as a
Contains driver-specific data for the
The exact meaning of each structure member depends on the value of Function.
+Describes a video decoder output view.
+The decoding profile. To get the list of profiles supported by the device, call the
The resource type of the view, specified as a member of the
A
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Describes a sub sample mapping block.
+Values in the sub sample mapping blocks are relative to the start of the decode buffer.
+The number of clear (non-encrypted) bytes at the start of the block.
The number of encrypted bytes following the clear bytes.
Describes the capabilities of a Microsoft Direct3D?11 video processor.
+The video processor stores state information for each input stream. These states persist between blits. With each blit, the application selects which streams to enable or disable. Disabling a stream does not affect the state information for that stream.
The MaxStreamStates member gives the maximum number of stream states that can be saved. The MaxInputStreams member gives the maximum number of streams that can be enabled during a blit. These two values can differ.
+A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the D3D11_VIDEO_PROCESSPR_FILTER_CAPS enumeration.
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
The number of frame-rate conversion capabilities. To enumerate the frame-rate conversion capabilities, call the
The maximum number of input streams that can be enabled at the same time.
The maximum number of input streams for which the device can store state data.
Specifies the color space for video processing.
+The RGB_Range member applies to RGB output, while the YCbCr_Matrix and YCbCr_xvYCC members apply to YCbCr output. If the driver performs color-space conversion on the background color, it uses the values that apply to both color spaces.
If the driver supports extended YCbCr (xvYCC), it returns the
If extended YCbCr is supported, it can be used with either transfer matrix. Extended YCbCr does not change the black point or white point?the black point is still 16 and the white point is still 235. However, extended YCbCr explicitly allows blacker-than-black values in the range 1?15, and whiter-than-white values in the range 236?254. When extended YCbCr is used, the driver should not clip the luma values to the nominal 16?235 range.
+Specifies whether the output is intended for playback or video processing (such as editing or authoring). The device can optimize the processing based on the type. The default state value is 0 (playback).
Value | Meaning |
---|---|
| Playback |
| Video processing |
?
Specifies the RGB color range. The default state value is 0 (full range).
Value | Meaning |
---|---|
| Full range (0-255) |
| Limited range (16-235) |
?
Specifies the YCbCr transfer matrix. The default state value is 0 (BT.601).
Value | Meaning |
---|---|
| ITU-R BT.601 |
| ITU-R BT.709 |
?
Specifies whether the output uses conventional YCbCr or extended YCbCr (xvYCC). The default state value is zero (conventional YCbCr).
Value | Meaning |
---|---|
| Conventional YCbCr |
| Extended YCbCr (xvYCC) |
?
Specifies the
Introduced in Windows?8.1.
Reserved. Set to zero.
Describes a video stream for a video processor.
+A member of the
The frame rate of the input video stream, specified as a
The width of the input frames, in pixels.
The height of the input frames, in pixels.
The frame rate of the output video stream, specified as a
The width of the output frames, in pixels.
The height of the output frames, in pixels.
A member of the
Specifies a custom rate for frame-rate conversion or inverse telecine (IVTC).
+The CustomRate member gives the rate conversion factor, while the remaining members define the pattern of input and output samples.
+The ratio of the output frame rate to the input frame rate, expressed as a
The number of output frames that will be generated for every N input samples, where N = InputFramesOrFields.
If TRUE, the input stream must be interlaced. Otherwise, the input stream must be progressive.
The number of input fields or frames for every N output frames that will be generated, where N = OutputFrames.
Defines the range of supported values for an image filter.
+The multiplier enables the filter range to have a fractional step value.
For example, a hue filter might have an actual range of [?180.0 ... +180.0] with a step size of 0.25. The device would report the following range and multiplier:
In this case, a filter value of 2 would be interpreted by the device as 0.50 (or 2 ? 0.25).
The device should use a multiplier that can be represented exactly as a base-2 fraction.
+The minimum value of the filter.
The maximum value of the filter.
The default value of the filter.
A multiplier. Use the following formula to translate the filter setting into the actual filter value: Actual Value = Set Value???Multiplier.
Describes a video processor input view.
+The surface format. If zero, the driver uses the DXGI format that was used to create the resource. If you are using feature level 9, the value must be zero.
The resource type of the view, specified as a member of the
A
Describes a video processor output view.
+The resource type of the view, specified as a member of the
A
Use this member of the union when ViewDimension equals
A
Use this member of the union when ViewDimension equals
Defines a group of video processor capabilities that are associated with frame-rate conversion, including deinterlacing and inverse telecine.
+The number of past reference frames required to perform the optimal video processing.
The number of future reference frames required to perform the optimal video processing.
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
The number of custom frame rates that the driver supports. To get the list of custom frame rates, call the
Contains stream-level data for the
If the stereo 3D format is
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Provides information about the input streams passed into the ID3DVideoContext1::VideoProcessorGetBehaviorHints method.
+[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Describes a video sample.
+The width of the video sample.
The height of the video sample.
The format of the video sample.
The colorspace of the sample.
Contains information identifying the adapter.
+The following pseudocode example illustrates the version format encoded in the DriverVersion, DriverVersionLowPart, and DriverVersionHighPart members.
Product = HIWORD(DriverVersion.HighPart) + Version = LOWORD(DriverVersion.HighPart) + SubVersion = HIWORD(DriverVersion.LowPart) + Build = LOWORD(DriverVersion.LowPart) +
See the Platform SDK for more information about the HIWORD macro, the LOWORD macro, and the
MAX_DEVICE_IDENTIFIER_STRING is a constant with the following definition.
#define MAX_DEVICE_IDENTIFIER_STRING 512
The VendorId, DeviceId, SubSysId, and Revision members can be used in tandem to identify particular chip sets. However, use these members with caution.
+Used for presentation to the user. This should not be used to identify particular drivers, because many different strings might be associated with the same device and driver from different vendors.
Used for presentation to the user.
Device name for GDI.
Identify the version of the Direct3D driver. It is legal to do less than and greater than comparisons on the 64-bit signed integer value. However, exercise caution if you use this element to identify problematic drivers. Instead, you should use DeviceIdentifier. See Remarks.
Can be used to help identify a particular chip set. Query this member to identify the manufacturer. The value can be zero if unknown.
Can be used to help identify a particular chip set. Query this member to identify the type of chip set. The value can be zero if unknown.
Can be used to help identify a particular chip set. Query this member to identify the subsystem, typically the particular board. The value can be zero if unknown.
Can be used to help identify a particular chip set. Query this member to identify the revision level of the chip set. The value can be zero if unknown.
Can be queried to check changes in the driver and chip set. This
Used to determine the Windows Hardware Quality Labs (WHQL) validation level for this driver and device pair. The DWORD is a packed date structure defining the date of the release of the most recent WHQL test passed by the driver. It is legal to perform < and > operations on this value. The following illustrates the date format.
Bits | |
31-16 | The year, a decimal number from 1999 upwards. |
15-8 | The month, a decimal number from 1 to 12. |
7-0 | The day, a decimal number from 1 to 31. |
?
The following values are also used.
0 | Not certified. |
1 | WHQL validated, but no date information is available. |
?
Differences between Direct3D 9 and Direct3D 9Ex:
For Direct3D9Ex running on Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 (or more current operating system),
Gets the effect description.
+Gets the effect description.
+Returns a description of the effect. See
If the method succeeds, the return value is
Gets a parameter or annotation description.
+Parameter or annotation handle. See Handles (Direct3D 9).
Returns a description of the specified parameter or annotation. See
Gets a technique description.
+Technique handle. See Handles (Direct3D 9).
Returns a description of the technique. See
Gets a pass description.
+Pass handle. See Handles (Direct3D 9).
Returns a description of the specified pass. See
Note??If an effect is created with
Gets a function description.
+Function handle. See Handles (Direct3D 9).
Returns a description of the function. See
Gets the handle of a top-level parameter or a structure member parameter.
+Handle of the parameter, or
Parameter index.
Returns the handle of the specified parameter, or
Gets the handle of a top-level parameter or a structure member parameter by looking up its name.
+Handle of the parameter, or
String containing the parameter name.
Returns the handle of the specified parameter, or
Gets the handle of a top-level parameter or a structure member parameter by looking up its semantic with a case-insensitive search.
+Handle of the parameter, or
String containing the semantic name.
Returns the handle of the first parameter that matches the specified semantic, or
Get the handle of an array element parameter.
+Handle of the array. See Handles (Direct3D 9).
Array element index.
Returns the handle of the specified parameter, or
This method is used to get an element of a parameter that is an array.
+Gets the handle of a technique.
+Technique index.
Returns the handle of the specified technique, or
Gets the handle of a technique by looking up its name.
+String containing the technique name.
Returns the handle of the first technique that has the specified name, or
Gets the handle of a pass.
+Handle of the parent technique. See Handles (Direct3D 9).
Index for the pass.
Returns the handle of the specified pass inside the specified technique, or
Gets the handle of a pass by looking up its name.
+Handle of the parent technique. See Handles (Direct3D 9).
String containing the pass name.
Returns the handle of the first pass inside the specified technique that has the specified name, or
Gets the handle of a function.
+Function index.
Returns the handle of the specified function, or
Gets the handle of a function by looking up its name.
+String containing the function name.
Returns the handle of the specified function, or
Gets the handle of an annotation.
+Handle of a technique, pass, or top-level parameter. See Handles (Direct3D 9).
Annotation index.
Returns the handle of the specified annotation, or
Annotations are user-specific data that can be attached to any technique, pass, or parameter. See Handles (Direct3D 9).
+Gets the handle of an annotation by looking up its name.
+Handle of a technique, pass, or top-level parameter. See Handles (Direct3D 9).
String containing the annotation name.
Returns the handle of the specified annotation, or
Set the value of an arbitrary parameter or annotation, including simple types, structs, arrays, strings, shaders and textures.
+Unique identifier. See Handles (Direct3D 9).
Pointer to a buffer containing data.
[in] Number of bytes in the buffer. Pass in D3DX_DEFAULT if you know your buffer is large enough to contain the entire parameter, and you want to skip size validation.
If the method succeeds, the return value is
This method can be used in place of nearly all the effect set API calls.
+Get the value of an arbitrary parameter or annotation, including simple types, structs, arrays, strings, shaders and textures. This method can be used in place of nearly all the Getxxx calls in
If the method succeeds, the return value is
Sets a
Unique identifier. See Handles (Direct3D 9).
Boolean value.
If the method succeeds, the return value is
Gets a
Unique identifier. See Handles (Direct3D 9).
Returns a Boolean value.
If the method succeeds, the return value is
Sets an array of Boolean values.
+Unique identifier. See Handles (Direct3D 9).
Array of Boolean values.
Number of Boolean values in the array.
If the method succeeds, the return value is
Gets an array of
Unique identifier. See Handles (Direct3D 9).
Returns an array of Boolean values.
Number of Boolean values in the array.
If the method succeeds, the return value is
Sets an integer.
+Unique identifier. See Handles (Direct3D 9).
Integer value.
If the method succeeds, the return value is
Gets an integer.
+Unique identifier. See Handles (Direct3D 9).
Returns an integer.
If the method succeeds, the return value is
Sets an array of integers.
+Unique identifier. See Handles (Direct3D 9).
Array of integers.
Number of integers in the array.
If the method succeeds, the return value is
Gets an array of integers.
+Unique identifier. See Handles (Direct3D 9).
Returns an array of integers.
Number of integers in the array.
If the method succeeds, the return value is
Sets a floating point value.
+Unique identifier. See Handles (Direct3D 9).
Floating point value.
If the method succeeds, the return value is
Gets a floating point value.
+Unique identifier. See Handles (Direct3D 9).
Returns a floating point value.
If the method succeeds, the return value is
Sets an array of floating point values.
+Unique identifier. See Handles (Direct3D 9).
Array of floating point values.
Number of floating point values in the array.
If the method succeeds, the return value is
Gets an array of floating point values.
+Unique identifier. See Handles (Direct3D 9).
Returns an array of floating point values.
Number of floating point values in the array.
If the method succeeds, the return value is
Sets a vector.
+Unique identifier. See Handles (Direct3D 9).
Pointer to a 4D vector.
If the method succeeds, the return value is
If the destination vector is smaller than the source vector, the additional components of the source vector will be ignored.
+Gets a vector.
+Unique identifier. See Handles (Direct3D 9).
Returns a 4D vector.
If the method succeeds, the return value is
If the destination vector is larger than the source vector, only the initial components of the destination vector will be filled, and the remaining components will be set to zero.
+Sets an array of vectors.
+Unique identifier. See Handles (Direct3D 9).
Array of 4D floating point vectors.
Number of vectors in the array.
If the method succeeds, the return value is
If the destination vectors are smaller than the source vectors, the additional components of the source vectors will be ignored.
+Gets an array of vectors.
+Unique identifier. See Handles (Direct3D 9).
Returns an array of 4D floating point vectors.
Number of vectors in the array.
If the method succeeds, the return value is
If the destination vectors are larger than the source vectors, only the initial components of each destination vector will be filled, and the remaining destination vector components will be set to zero.
+Sets a non-transposed matrix.
+Unique identifier. See Handles (Direct3D 9).
Pointer to a nontransposed matrix. See
If the method succeeds, the return value is
A non-transposed matrix contains row-major data. In other words, each vector is contained in a row.
If the destination matrix is smaller than the source matrix, the additional components of the source matrix will be ignored.
+Gets a nontransposed matrix.
+Unique identifier. See Handles (Direct3D 9).
Returns a nontransposed matrix. See
If the method succeeds, the return value is
A nontransposed matrix contains row-major data; that is, each vector is contained in a row.
If the destination matrix is larger than the source matrix, only the upper-left components of the destination matrix will be filled, and the remaining components will be set to zero.
+Sets an array of nontransposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Array of nontransposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A nontransposed matrix contains row-major data; that is, each vector is contained in a row.
If the destination matrices are smaller than the source matrices, the additional components of the source matrices will be ignored.
+Gets an array of nontransposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Returns an array of nontransposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A nontransposed matrix contains row-major data; that is, each vector is contained in a row.
If the destination matrices are larger than the source matrices, only the upper-left components of each destination matrix will be filled, and the remaining destination matrix components will be set to zero.
+Sets an array of references to nontransposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Array of references to nontransposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A nontransposed matrix contains row-major data; that is, each vector is contained in a row.
If the destination matrices are smaller than the source matrices, the additional components of the source matrices will be ignored.
+Gets an array of references to nontransposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Array of references to nontransposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A nontransposed matrix contains row-major data; that is, each vector is contained in a row.
If the destination matrices are larger than the source matrices, only the upper-left components of each destination matrix will be filled, and the remaining destination matrix components will be set to zero.
+Sets a transposed matrix.
+Unique identifier. See Handles (Direct3D 9).
Pointer to a transposed matrix. See
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
If the destination matrix is smaller than the source matrix, the additional components of the source matrix will be ignored.
+Gets a transposed matrix.
+Unique identifier. See Handles (Direct3D 9).
Returns a transposed matrix. See
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
If the destination matrix is larger than the source matrix, only the upper-left elements of the destination matrix will be filled, and the remaining destination matrix components will be set to zero.
+Sets an array of transposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Array of transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
If the destination matrices are smaller than the source matrices, the additional components of the source matrices will be ignored.
+Gets an array of transposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Returns an array of transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
If the destination matrices are larger than the source matrices, only the upper-left components of each destination matrix will be filled, and the remaining destination matrix components will be set to zero.
+Sets an array of references to transposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Array of references to transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
If the destination matrices are smaller than the source matrices, the additional components of the source matrices will be ignored.
+Gets an array of references to transposed matrices.
+Unique identifier. See Handles (Direct3D 9).
Array of references to transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
If the destination matrices are larger than the source matrices, only the upper-left components of each destination matrix will be filled, and the remaining destination matrix components will be set to zero.
+Sets a string.
+Unique identifier. See Handles (Direct3D 9).
String to set.
If the method succeeds, the return value is
Gets a string.
+Unique identifier. See Handles (Direct3D 9).
Returns a string identified by hParameter.
Sets a texture.
+Unique identifier. See Handles (Direct3D 9).
Texture object. See
If the method succeeds, the return value is
Gets a texture.
+Unique identifier. See Handles (Direct3D 9).
Returns a texture object. See
Gets a pixel shader.
+Unique identifier. See Handles (Direct3D 9).
Returns a pixel shader object. See
Gets a vertex shader.
+Unique identifier. See Handles (Direct3D 9).
Returns a vertex shader object. See
Set the range of an array to pass to the device.
+Unique identifier. See Handles (Direct3D 9).
Start index.
Stop index.
If the method succeeds, the return value is
Applications use the methods of the
The
The LPDIRECT3DBASETEXTURE9 and PDIRECT3DBASETEXTURE9 types are defined as references to the
typedef struct+*LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
Returns the number of texture levels in a multilevel texture.
+Warning??If you create a texture with
This method applies to the following interfaces, which inherit from
Get or sets the filter type that is used for automatically generated mipmap sublevels.
+Changing the filter type "dirties" the mipmap sublevels and causes them to be regenerated.
The (default) filter type set at texture creation time is
This method has no effect if the texture is not created with
Sets the most detailed level-of-detail for a managed texture.
+Most detailed level-of-detail value to set for the mipmap chain.
A DWORD value, clamped to the maximum level-of-detail value (one less than the total number of levels). Subsequent calls to this method will return the clamped value, not the level-of-detail value that was previously set.
This method applies to the following interfaces, which inherit from
SetLOD is used for level-of-detail control of managed textures. This method returns 0 on nonmanaged textures.
SetLOD communicates to the Direct3D texture manager the most detailed mipmap in the chain that should be loaded into local video memory. For example, in a five-level mipmap chain, setting LODNew to 2 indicates that the texture manager should load only mipmap levels 2 through 4 into local video memory at any given time.
More specifically, if the texture was created with the dimensions of 256x256, setting the most detailed level to 0 indicates that 256 x 256 is the largest mipmap available, setting the most detailed level to 1 indicates that 128 x 128 is the largest mipmap available, and so on, up to the most detailed mip level (the smallest texture size) for the chain.
+Returns a value clamped to the maximum level-of-detail set for a managed texture (this method is not supported for an unmanaged texture).
+A DWORD value, clamped to the maximum level-of-detail value (one less than the total number of levels). Calling GetLOD on an unmanaged texture is not supported and will result in a D3DERR error code being returned.
Returns the number of texture levels in a multilevel texture.
+A DWORD value that indicates the number of texture levels in a multilevel texture.
Warning??If you create a texture with
This method applies to the following interfaces, which inherit from
Set the filter type that is used for automatically generated mipmap sublevels.
+Filter type. See
If the method succeeds, the return value is
Changing the filter type "dirties" the mipmap sublevels and causes them to be regenerated.
The (default) filter type set at texture creation time is
This method has no effect if the texture is not created with
Get the filter type that is used for automatically generated mipmap sublevels.
+Filter type. See
Changing the filter type "dirties" the mipmap sublevels and causes them to be regenerated.
The (default) filter type set at texture creation time is
This method has no effect if the texture is not created with
Generate mipmap sublevels.
+An application can generate mipmap sublevels at any time by calling GenerateMipSubLevels. To have mipmap sublevels generated automatically at texture creation time (see Automatic Generation of Mipmaps (Direct3D 9)), specify
Represents the capabilities of the hardware exposed through the Direct3D object.
+The MaxTextureBlendStages and MaxSimultaneousTextures members might seem similar, but they contain different information. The MaxTextureBlendStages member contains the total number of texture-blending stages supported by the current device, and the MaxSimultaneousTextures member describes how many of those stages can have textures bound to them by using the SetTexture method.
When the driver fills this structure, it can set values for execute-buffer capabilities, even when the interface being used to retrieve the capabilities (such as
In general, performance problems may occur if you use a texture and then modify it during a scene. Ensure that no texture used in the current BeginScene and EndScene block is evicted unless absolutely necessary. In the case of extremely high texture usage within a scene, the results are undefined. This occurs when you modify a texture that you have used in the scene and there is no spare texture memory available. For such systems, the contents of the z-buffer become invalid at EndScene. Applications should not call UpdateSurface to or from the back buffer on this type of hardware inside a BeginScene/EndScene pair. In addition, applications should not try to access the z-buffer if the
The following flags concerning mipmapped textures are not supported in Direct3D 9.
Member of the
Adapter on which this Direct3D device was created. This ordinal is valid only to pass to methods of the
The following driver-specific capability.
Value | Meaning |
---|---|
Display hardware is capable of returning the current scan line. | |
The display driver supports an overlay DDI that allows for verification of overlay capabilities. For more information about the overlay DDI, see Overlay DDI. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? |
?
Driver-specific capabilities identified in
Driver-specific capabilities identified in
Bit mask of values representing what presentation swap intervals are available.
Value | Meaning |
---|---|
The driver supports an immediate presentation swap interval. | |
The driver supports a presentation swap interval of every screen refresh. | |
The driver supports a presentation swap interval of every second screen refresh. | |
The driver supports a presentation swap interval of every third screen refresh. | |
The driver supports a presentation swap interval of every fourth screen refresh. |
?
Bit mask indicating what hardware support is available for cursors. Direct3D 9 does not define alpha-blending cursor capabilities.
Value | Meaning |
---|---|
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports at least a hardware color cursor in high-resolution modes (with scan lines greater than or equal to 400). | |
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports a hardware color cursor in both high-resolution and low-resolution modes (with scan lines less than 400). |
?
Flags identifying the capabilities of the device.
Value | Meaning |
---|---|
Device supports blits from system-memory textures to nonlocal video-memory textures. | |
Device can queue rendering commands after a page flip. Applications do not change their behavior if this flag is set; this capability means that the device is relatively fast. | |
Device can support at least a DirectX 5-compliant driver. | |
Device can support at least a DirectX 7-compliant driver. | |
Device exports an | |
Device can use execute buffers from system memory. | |
Device can use execute buffers from video memory. | |
Device has hardware acceleration for scene rasterization. | |
Device can support transformation and lighting in hardware. | |
Device supports N patches. | |
Device can support rasterization, transform, lighting, and shading in hardware. | |
Device supports quintic B?zier curves and B-splines. | |
Device supports rectangular and triangular patches. | |
When this device capability is set, the hardware architecture does not require caching of any information, and uncached patches (handle zero) will be drawn as efficiently as cached ones. Note that setting | |
Device is texturing from separate memory pools. | |
Device can retrieve textures from non-local video memory. | |
Device can retrieve textures from system memory. | |
Device can retrieve textures from device memory. | |
Device can use buffers from system memory for transformed and lit vertices. | |
Device can use buffers from video memory for transformed and lit vertices. |
?
Miscellaneous driver primitive capabilities. See
Information on raster-drawing capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports anisotropic filtering. | |
Device iterates colors perspective correctly. | |
Device can dither to improve color resolution. | |
Device supports legacy depth bias. For true depth bias, see | |
Device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. | |
Device calculates the fog value by referring to a lookup table containing fog values that are indexed to the depth of a given pixel. | |
Device calculates the fog value during the lighting operation and interpolates the fog value during rasterization. | |
Device supports level-of-detail bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would. For more information about level-of-detail bias in mipmaps, see | |
Device supports toggling multisampling on and off between | |
Device supports scissor test. See Scissor Test (Direct3D 9). | |
Device performs true slope-scale based depth bias. This is in contrast to the legacy style depth bias. | |
Device supports depth buffering using w. | |
Device supports w-based fog. W-based fog is used when a perspective projection matrix is specified, but affine projections still use z-based fog. The system considers a projection matrix that contains a nonzero value in the [3][4] element to be a perspective projection matrix. | |
Device can perform hidden-surface removal (HSR) without requiring the application to sort polygons and without requiring the allocation of a depth-buffer. This leaves more video memory for textures. The method used to perform HSR is hardware-dependent and is transparent to the application. Z-bufferless HSR is performed if no depth-buffer surface is associated with the rendering-target surface and the depth-buffer comparison test is enabled (that is, when the state value associated with the | |
Device supports z-based fog. | |
Device can perform z-test operations. This effectively renders a primitive and indicates whether any z pixels have been rendered. |
?
Z-buffer comparison capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Always pass the z-test. | |
Pass the z-test if the new z equals the current z. | |
Pass the z-test if the new z is greater than the current z. | |
Pass the z-test if the new z is greater than or equal to the current z. | |
Pass the z-test if the new z is less than the current z. | |
Pass the z-test if the new z is less than or equal to the current z. | |
Always fail the z-test. | |
Pass the z-test if the new z does not equal the current z. |
?
Source-blending capabilities. This member can be one or more of the following flags. (The RGBA values of the source and destination are indicated by the subscripts s and d.)
Value | Meaning |
---|---|
The driver supports both | |
Source blend factor is (1 - As, 1 - As, 1 - As, 1 - As) and destination blend factor is (As, As, As, As); the destination blend selection is overridden. | |
The driver supports the | |
Blend factor is (Ad, Ad, Ad, Ad). | |
Blend factor is (Rd, Gd, Bd, Ad). | |
Blend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad). | |
Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad). | |
Blend factor is (1 - As, 1 - As, 1 - As, 1 - As). | |
Blend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As). | |
Blend factor is (1 - PSOutColor[1]r, 1 - PSOutColor[1]g, 1 - PSOutColor[1]b, not used)). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (1, 1, 1, 1). | |
Blend factor is (As, As, As, As). | |
Blend factor is (f, f, f, 1); f = min(As, 1 - Ad). | |
Blend factor is (Rs, Gs, Bs, As). | |
Blend factor is (PSOutColor[1]r, PSOutColor[1]g, PSOutColor[1]b, not used). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (0, 0, 0, 0). |
?
Destination-blending capabilities. This member can be the same capabilities that are defined for the SrcBlendCaps member.
Alpha-test comparison capabilities. This member can include the same capability flags defined for the ZCmpCaps member. If this member contains only the
Shading operations capabilities. It is assumed, in general, that if a device supports a given command at all, it supports the
The color, specular highlights, fog, and alpha interpolants of a triangle each have capability flags that an application can use to find out how they are implemented by the device driver.
This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device can support an alpha component for Gouraud-blended transparency (the | |
Device can support colored Gouraud shading. In this mode, the per-vertex color components (red, green, and blue) are interpolated across a triangle face. | |
Device can support fog in the Gouraud shading mode. | |
Device supports Gouraud shading of specular highlights. |
?
Miscellaneous texture-mapping capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Alpha in texture pixels is supported. | |
Device can draw alpha from texture palettes. | |
Supports cube textures. | |
Device requires that cube texture maps have dimensions specified as powers of two. | |
Device supports mipmapped cube textures. | |
Device supports mipmapped textures. | |
Device supports mipmapped volume textures. | |
If this flag is not set, and A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem - ps and texm3x3 - ps instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem - ps, texbeml - ps, and texm3x3spec - ps. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these types of textures. | |
Device does not support a projected bump-environment loopkup operation in programmable and fixed function shaders. | |
Perspective correction texturing is supported. | |
If If If this flag is not set, and | |
Supports the | |
All textures must be square. | |
Texture indices are not scaled by the texture size prior to interpolation. | |
Device supports volume textures. | |
Device requires that volume texture maps have dimensions specified as powers of two. |
?
Texture-filtering capabilities for a texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-filtering capabilities for a cube texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-filtering capabilities for a volume texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-addressing capabilities for texture objects. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports setting coordinates outside the range [0.0, 1.0] to the border color, as specified by the | |
Device can clamp textures to addresses. | |
Device can separate the texture-addressing modes of the u and v coordinates of the texture. This ability corresponds to the | |
Device can mirror textures to addresses. | |
Device can take the absolute value of the texture coordinate (thus, mirroring around 0) and then clamp to the maximum value. | |
Device can wrap textures to addresses. |
?
Texture-addressing capabilities for a volume texture. This member can be one or more of the flags defined for the TextureAddressCaps member.
Defines the capabilities for line-drawing primitives.
Value | Meaning |
---|---|
Supports alpha-test comparisons. | |
Antialiased lines are supported. | |
Supports source-blending. | |
Supports fog. | |
Supports texture-mapping. | |
Supports z-buffer comparisons. |
?
Maximum texture width for this device.
Maximum texture height for this device.
Maximum value for any of the three dimensions (width, height, and depth) of a volume texture.
This number represents the maximum range of the integer bits of the post-normalized texture coordinates. A texture coordinate is stored as a 32-bit signed integer using 27 bits to store the integer part and 5 bits for the floating point fraction. The maximum integer index, 227, is used to determine the maximum texture coordinate, depending on how the hardware does texture-coordinate scaling.
Some hardware reports the cap
Less desirably, on some hardware
For example, assume that MaxTextureRepeat is equal to 32k and the size of the texture is 4k. If the hardware sets
Maximum texture aspect ratio supported by the hardware, typically a power of 2.
Maximum valid value for the
Maximum W-based depth value that the device supports.
Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
Number of pixels to adjust the extents rectangle outward to accommodate antialiasing kernels.
Flags specifying supported stencil-buffer operations. Stencil operations are assumed to be valid for all three stencil-buffer operation render states (
For more information, see
Flexible vertex format capabilities.
Value | Meaning |
---|---|
It is preferable that vertex elements not be stripped. That is, if the vertex format contains elements that are not used with the current render states, there is no need to regenerate the vertices. If this capability flag is not present, stripping extraneous elements from the vertex format provides better performance. | |
Point size is determined by either the render state or the vertex data. If an FVF is used, point size can come from point size data in the vertex declaration. Otherwise, point size is determined by the render state | |
Masks the low WORD of FVFCaps. These bits, cast to the WORD data type, describe the total number of texture coordinate sets that the device can simultaneously use for multiple texture blending. (You can use up to eight texture coordinate sets for any vertex, but the device can blend using only the specified number of texture coordinate sets.) |
?
Combination of flags describing the texture operations supported by this device. The following flags are defined.
Value | Meaning |
---|---|
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The |
?
Maximum number of texture-blending stages supported in the fixed function pipeline. This value is the number of blenders available. In the programmable pixel pipeline, this corresponds to the number of unique texture registers used by pixel shader instructions.
Maximum number of textures that can be simultaneously bound to the fixed-function pipeline sampler stages. If the same texture is bound to two sampler stages, it counts as two textures.
This value has no meaning in the programmable pipeline where the number of sampler stages is determined by each pixel shader version. Each pixel shader version also determines the number of texture declaration instructions. See Pixel Shaders.
Vertex processing capabilities. For a given physical device, this capability might vary across Direct3D devices depending on the parameters supplied to CreateDevice. See
Maximum number of lights that can be active simultaneously. For a given physical device, this capability might vary across Direct3D devices depending on the parameters supplied to CreateDevice.
Maximum number of user-defined clipping planes supported. This member can be 0. For a given physical device, this capability may vary across Direct3D devices depending on the parameters supplied to CreateDevice.
Maximum number of matrices that this device can apply when performing multimatrix vertex blending. For a given physical device, this capability may vary across Direct3D devices depending on the parameters supplied to CreateDevice.
DWORD value that specifies the maximum matrix index that can be indexed into using the per-vertex indices. The number of matrices is MaxVertexBlendMatrixIndex + 1, which is the size of the matrix palette. If normals are present in the vertex data that needs to be blended for lighting, then the number of matrices is half the number specified by this capability flag. If MaxVertexBlendMatrixIndex is set to zero, the driver does not support indexed vertex blending. If this value is not zero then the valid range of indices is zero through MaxVertexBlendMatrixIndex.
A zero value for MaxVertexBlendMatrixIndex indicates that the driver does not support indexed matrices.
When software vertex processing is used, 256 matrices could be used for indexed vertex blending, with or without normal blending.
For a given physical device, this capability may vary across Direct3D devices depending on the parameters supplied to CreateDevice.
Maximum size of a point primitive. If set to 1.0f then device does not support point size control. The range is greater than or equal to 1.0f.
Maximum number of primitives for each DrawPrimitive call. There are two cases: +
Maximum size of indices supported for hardware vertex processing. It is possible to create 32-bit index buffers; however, you will not be able to render with the index buffer unless this value is greater than 0x0000FFFF.
Maximum number of concurrent data streams for SetStreamSource. The valid range is 1 to 16. Note that if this value is 0, then the driver is not a Direct3D 9 driver.
Maximum stride for SetStreamSource.
Two numbers that represent the vertex shader main and sub versions. For more information about the instructions supported for each vertex shader version, see Version 1_x, Version 2_0, Version 2_0 Extended, or Version 3_0.
The number of vertex shader Vertex Shader Registers that are reserved for constants.
Two numbers that represent the pixel shader main and sub versions. For more information about the instructions supported for each pixel shader version, see Version 1_x, Version 2_0, Version 2_0 Extended, or Version 3_0.
Maximum value of pixel shader arithmetic component. This value indicates the internal range of values supported for pixel color blending operations. Within the range that they report to, implementations must allow data to pass through pixel processing unmodified (unclamped). Normally, the value of this member is an absolute value. For example, a 1.0 indicates that the range is -1.0 to 1, and an 8.0 indicates that the range is -8.0 to 8.0. The value must be >= 1.0 for any hardware that supports pixel shaders.
Device driver capabilities for adaptive tessellation. For more information, see
This number indicates which device is the master for this subordinate. This number is taken from the same space as the adapter values.
For multihead support, one head will be denoted the master head, and all other heads on the same card will be denoted subordinate heads. If more than one multihead adapter is present in a system, the master and its subordinates from one multihead adapter are called a group.
This number indicates the order in which heads are referenced by the API. The value for the master adapter is always 0. These values do not correspond to the adapter ordinals. They apply only to heads within a group.
This number indicates which device is the master for this subordinate. This number is taken from the same space as the adapter values.
For multihead support, one head will be denoted the master head, and all other heads on the same card will be denoted subordinate heads. If more than one multihead adapter is present in a system, the master and its subordinates from one multihead adapter are called a group.
This number indicates the order in which heads are referenced by the API. The value for the master adapter is always 0. These values do not correspond to the adapter ordinals. They apply only to heads within a group.
Number of adapters in this adapter group (only if master). This will be 1 for conventional adapters. The value will be greater than 1 for the master adapter of a multihead card. The value will be 0 for a subordinate adapter of a multihead card. Each card can have at most one master, but may have many subordinates.
A combination of one or more data types contained in a vertex declaration. See
Number of simultaneous render targets. This number must be at least one.
Combination of constants that describe the operations supported by StretchRect. The flags that may be set in this field are:
Constant | Description |
---|---|
Device supports point-sample filtering for minifying rectangles. This filter type is requested by calling StretchRect using | |
Device supports point-sample filtering for magnifying rectangles. This filter type is requested by calling StretchRect using | |
Device supports bilinear interpolation filtering for minifying rectangles. This filter type is requested by calling StretchRect using | |
Device supports bilinear interpolation filtering for magnifying rectangles. This filter type is requested by calling StretchRect using |
?
For more information, see
Device supports vertex shader version 2_0 extended capability. See
Device supports pixel shader version 2_0 extended capability. See
Device supports vertex shader texture filter capability. See
Maximum number of vertex shader instructions that can be run when using flow control. The maximum number of instructions that can be programmed is MaxVertexShader30InstructionSlots.
Maximum number of pixel shader instructions that can be run when using flow control. The maximum number of instructions that can be programmed is MaxPixelShader30InstructionSlots.
Maximum number of vertex shader instruction slots supported. The maximum value that can be set on this cap is 32768. Devices that support vs_3_0 are required to support at least 512 instruction slots.
Maximum number of pixel shader instruction slots supported. The maximum value that can be set on this cap is 32768. Devices that support ps_3_0 are required to support at least 512 instruction slots.
The
The LPD3DXCONSTANTTABLE type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DXCONSTANTTABLE; +
Gets a reference to the buffer that contains the constant table.
+Gets the buffer size of the constant table.
+Gets a description of the constant table.
+Gets a reference to the buffer that contains the constant table.
+Returns a reference the buffer.
Gets the buffer size of the constant table.
+Returns the size of the buffer, in bytes.
Gets a description of the constant table.
+Description of the constant table. See
If the method succeeds, the return value is
Gets a reference to an array of constant descriptions in the constant table.
+Unique identifier to a constant. See
Returns a reference to an array of descriptions. See
The input supplied must be the maximum size of the array. The output is the number of elements that are filled in the array when the function returns.
If the method succeeds, the return value is
Because a sampler can appear more than once in a constant table, this method can return an array of descriptions, each one with a different register index.
+Returns the sampler index.
+The sampler handle.
Returns the sampler index number from the constant table.
Gets a constant by looking up its index.
+Unique identifier to the parent data structure. If the constant is a top-level parameter (there is no parent data structure), use
Zero-based index of the constant.
Returns a unique identifier to the constant.
To get a constant from an array of constants, use
Gets a constant by looking up its name.
+Unique identifier to the parent data structure. If the constant is a top-level parameter (there is no parent data structure), use
Name of the constant.
Returns a unique identifier to the constant.
Gets a constant from an array of constants. An array is made up of elements.
+Unique identifier to the array of constants. This value may not be
Zero-based index of the element in the array.
Returns a unique identifier to the element constant.
To get a constant that is not part of an array, use
Sets the constants to their default values. The default values are declared in the variable declarations in the shader.
+Pointer to an
If the method succeeds, the return value is
Sets the contents of the buffer to the constant table.
+Pointer to an
Unique identifier to a constant. See
Buffer containing data.
Size of the buffer, in bytes.
If the method succeeds, the return value is
Sets a Boolean value.
+Pointer to an
Unique identifier to the constant. See
Boolean value.
If the method succeeds, the return value is
Sets an array of Boolean values.
+Pointer to an
Unique identifier to the array of constants. See
Array of Boolean values.
Number of Boolean values in the array.
If the method succeeds, the return value is
Sets an integer value.
+Pointer to an
Unique identifier to the constant. See
Integer.
If the method succeeds, the return value is
Sets an array of integers.
+Pointer to an
Unique identifier to the array of constants. See
Array of integers.
Number of integers in the array.
If the method succeeds, the return value is
Sets a floating-point number.
+Pointer to an
Unique identifier to the constant. See
Floating-point number.
If the method succeeds, the return value is
Sets an array of floating-point numbers.
+Pointer to an
Unique identifier to the array of constants. See
Array of floating-point numbers.
Number of floating-point values in the array.
If the method succeeds, the return value is
Sets a 4D vector.
+Pointer to an
Unique identifier to the vector constant. See
Pointer to a 4D vector.
If the method succeeds, the return value is
Sets an array of 4D vectors.
+Pointer to an
Unique identifier to the array of vector constants. See
Array of 4D vectors.
Number of vectors in the array.
If the method succeeds, the return value is
Sets a nontransposed matrix.
+Pointer to an
Unique identifier to the matrix of constants. See
Pointer to a nontransposed matrix. See
If the method succeeds, the return value is
Sets an array of nontransposed matrices.
+Pointer to an
Unique identifier to the array of constant matrices. See
Array of nontransposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
Sets an array of references to nontransposed matrices.
+Pointer to an
Unique identifier to an array of constant matrices. See
Array of references to nontransposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A nontransposed matrix contains row-major data; that is, each vector is contained in a row.
+Sets a transposed matrix.
+Pointer to an
Unique identifier to the matrix of constants. See
Pointer to a transposed matrix. See
If the method succeeds, the return value is
Sets an array of transposed matrices.
+Pointer to an
Unique identifier to the array of matrix constants. See
Array of transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
Sets an array of references to transposed matrices.
+Pointer to an
Unique identifier to the array of matrix constants. See
Array of references to transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
+Applications use the methods of the
The
This interface inherits additional functionality from the
This interface, like all COM interfaces, inherits additional functionality from the
The LPDIRECT3DCUBETEXTURE9 and PDIRECT3DCubeTexture9 types are defined as references to the
typedef struct+*LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCubeTexture9; +
Retrieves a description of one face of the specified cube texture level.
+Specifies a level of a mipmapped cube texture.
Pointer to a
The
Retrieves a cube texture map surface.
+Member of the
Specifies a level of a mipmapped cube texture.
Address of a reference to an
Calling this method will increase the internal reference count on the
Locks a rectangle on a cube texture resource.
+Member of the
Specifies a level of a mipmapped cube texture.
Pointer to a
Pointer to a rectangle to lock. Specified by a reference to a
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
You may not specify a subrect when using
If the method succeeds, the return value is
For performance reasons, dirty regions are only recorded for level zero of a texture. Dirty regions are automatically recorded when
Cube textures created with
The only lockable format for a depth-stencil texture is
Unlocks a rectangle on a cube texture resource.
+Member of the
Specifies a level of a mipmapped cube texture.
If the method succeeds, the return value is
Adds a dirty region to a cube texture resource.
+Member of the
Pointer to a
If the method succeeds, the return value is
For performance reasons, dirty regions are only recorded for level zero of a texture. For sublevels, it is assumed that the corresponding (scaled) rectangle or box is also dirty. Dirty regions are automatically recorded when
Using
Applications use the methods of the
The
This interface, like all COM interfaces, inherits the
The LPDIRECT3DDEVICE9 and PDIRECT3DDEVICE9 types are defined as references to the
typedef struct+*LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9; +
Returns an interface to the instance of the Direct3D object that created the device.
+Calling
Retrieves the capabilities of the rendering device.
+Retrieves the creation parameters of the device.
+You can query the AdapterOrdinal member of the returned
Gets the number of implicit swap chains.
+Implicit swap chains are created by the device during
An application may create additional swap chains using
This method allows the use of GDI dialog boxes in full-screen mode applications.
+The GDI dialog boxes must be created as child to the device window. They should also be created within the same thread that created the device because this enables the parent window to manage redrawing the child window.
The method has no effect for windowed mode applications, but this setting will be respected if the application resets the device into full-screen mode. If SetDialogBoxMode succeeds in a windowed mode application, any subsequent reset to full-screen mode will be checked against the restrictions listed above. Also, SetDialogBoxMode causes all back buffers on the swap chain to be discarded, so an application is expected to refresh its content for all back buffers after this call.
+Gets or sets the depth-stencil surface owned by the Direct3DDevice object.
+Calling this method will increase the internal reference count on the
Retrieves or sets the viewport parameters currently set for the device.
+Typically, methods that return state will not work on a device that is created using
Retrieves or sets the current material properties for the device.
+This method will not return device state for a device that is created using
Retrieves or sets the clip status.
+When clipping is enabled during vertex processing (by
Clip status is not updated by
Clip status is used during software vertex processing. Therefore, this method is not supported on pure or nonpure hardware processing devices. For more information about pure devices, see
Retrieves or sets the current texture palette.
+Gets or sets the scissor rectangle.
+The scissor rectangle is used as a rectangular clipping region.
See Rectangles (Direct3D 9) for further information on the use of rectangles in DirectX.
+Gets or sets the vertex processing (hardware or software) mode.
+An application can create a mixed-mode device to use both the software vertex processing and the hardware vertex processing. To switch between the two vertex processing modes in DirectX 8.x, use
In Direct3D 9, use
Gets or sets the N-patch mode segments.
+Gets or sets a vertex shader declaration.
+Gets or sets the fixed vertex function declaration.
+The fixed vertex function declaration is a set of FVF flags that determine how vertices processed by the fixed function pipeline will be used.
+Retrieves or sets the currently set vertex shader.
+Typically, methods that return state will not work on a device that is created using
Retrieves or sets index data.
+ Calling this method will increase the internal reference count on the
Retrieves or sets the currently set pixel shader.
+This method will not work on a device that is created using
Reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.
+If the method succeeds, the return value is
If the device is lost but cannot be restored at the current time,
A call to
Returns an estimate of the amount of available texture memory.
+The function returns an estimate of the available texture memory.
The returned value is rounded to the nearest MB. This is done to reflect the fact that video memory estimates are never precise due to alignment and other issues that affect consumption by certain resources. Applications can use this value to make gross estimates of memory availability to make large-scale resource decisions such as how many levels of a mipmap to attempt to allocate, but applications cannot use this value to make small-scale decisions such as if there is enough memory left to allocate another resource.
+Evicts all managed resources, including both Direct3D and driver-managed resources.
+If the method succeeds, the return value is
This function causes only the
Returns an interface to the instance of the Direct3D object that created the device.
+Address of a reference to an
If the method succeeds, the return value is
Calling
Retrieves the capabilities of the rendering device.
+Pointer to a
If the method succeeds, the return value is
Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.
+An unsigned integer specifying the swap chain.
Pointer to a
Retrieves the creation parameters of the device.
+Pointer to a
If the method succeeds, the return value is
You can query the AdapterOrdinal member of the returned
Sets properties for the cursor.
+X-coordinate offset (in pixels) that marks the center of the cursor. The offset is relative to the upper-left corner of the cursor. When the cursor is given a new position, the image is drawn at an offset from this new position determined by subtracting the hot spot coordinates from the position.
Y-coordinate offset (in pixels) that marks the center of the cursor. The offset is relative to the upper-left corner of the cursor. When the cursor is given a new position, the image is drawn at an offset from this new position determined by subtracting the hot spot coordinates from the position.
Pointer to an
If the method succeeds, the return value is
An operating system cursor is created and used under either of these conditions:
Otherwise, DirectX uses an emulated cursor. An application uses
It is recommended for applications to always trap WM_MOUSEMOVE events and call DXSetCursorPosition.
Direct3D cursor functions use either GDI cursor or software emulation, depending on the hardware. Users typically want to respond to a WM_SETCURSOR message. For example, they might want to write the message handler as follows:
case WM_SETCURSOR: + // Turn off window cursor. + SetCursor(null ); + m_pd3dDevice->ShowCursor( TRUE ); + return TRUE; // Prevent Windows from setting cursor to window class cursor. + break; +
Or, users might want to call the
The application can determine what hardware support is available for cursors by examining appropriate members of the
The cursor does not survive when the device is lost. This method must be called after the device is reset.
+Sets the cursor position and update options.
+The new X-position of the cursor in virtual desktop coordinates. See Remarks.
The new Y-position of the cursor in virtual desktop coordinates. See Remarks.
Specifies the update options for the cursor. Currently, only one flag is defined.
Value | Meaning |
---|---|
| Update cursor at the refresh rate. If this flag is specified, the system guarantees that the cursor will be updated at a minimum of half the display refresh rate, but never more frequently than the display refresh rate. Otherwise, the method delays cursor updates until the next |
?
When running in full-screen mode, screen space coordinates are the back buffer coordinates appropriately scaled to the current display mode. When running in windowed mode, screen space coordinates are the desktop coordinates. The cursor image is drawn at the specified position minus the hotspot-offset specified by the SetCursorProperties method.
If the cursor has been hidden by ShowCursor, the cursor is not drawn.
+Displays or hides the cursor.
+If bShow is TRUE, the cursor is shown. If bShow is
Value indicating whether the cursor was previously visible. TRUE if the cursor was previously visible, or
Direct3D cursor functions use either GDI cursor or software emulation, depending on the hardware. Users usually want to respond to a WM_SETCURSOR message. For example, the users might want to write the message handler like this:
case WM_SETCURSOR: // Turn off window cursor SetCursor(null ); m_pd3dDevice->ShowCursor( TRUE ); return TRUE; // prevent Windows from setting cursor to window class cursor break; +
Or users might want to call the
Creates an additional swap chain for rendering multiple views.
+Pointer to a
Calling this method changes the value of members of the
Address of a reference to an
If the method succeeds, the return value is
There is always at least one swap chain (the implicit swap chain) for each device because Direct3D 9 has one swap chain as a property of the device.
Note that any given device can support only one full-screen swap chain.
Gets a reference to a swap chain.
+The swap chain ordinal value. For more information, see NumberOfAdaptersInGroup in
Pointer to an
Gets the number of implicit swap chains.
+Number of implicit swap chains. See Remarks.
Implicit swap chains are created by the device during
An application may create additional swap chains using
Resets the type, size, and format of the swap chain.
+Pointer to a
When switching to full-screen mode, Direct3D will try to find a desktop format that matches the back buffer format, so that back buffer and front buffer formats will be identical (to eliminate the need for color conversion).
When this method returns:
Possible return values include:
If a call to
Calling
There are two different types of swap chains: full-screen or windowed. If the new swap chain is full-screen, the adapter will be placed in the display mode that matches the new size.
Direct3D 9 applications can expect messages to be sent to them during this call (for example, before this call is returned); applications should take precautions not to call into Direct3D at this time. In addition, when
A call to
Pixel shaders and vertex shaders survive
When trying to reset more than one display adapter in a group, set pPresentationParameters to point to an array of
If a multihead device was created with
Presents the contents of the next buffer in the sequence of back buffers owned by the device.
+Pointer to a value that must be
Pointer to a value that must be
Pointer to a destination window whose client area is taken as the target for this presentation. If this value is
Value must be
Possible return values include:
If necessary, a stretch operation is applied to transfer the pixels within the source rectangle to the destination rectangle in the client area of the target window.
Present will fail, returning
Retrieves a back buffer from the device's swap chain.
+An unsigned integer specifying the swap chain.
Index of the back buffer object to return. Back buffers are numbered from 0 to the total number of back buffers minus one. A value of 0 returns the first back buffer, not the front buffer. The front buffer is not accessible through this method. Use
Stereo view is not supported in Direct3D 9, so the only valid value for this parameter is
Address of a reference to an
Calling this method will increase the internal reference count on the
Returns information describing the raster of the monitor on which the swap chain is presented.
+An unsigned integer specifying the swap chain.
Pointer to a
This method allows the use of GDI dialog boxes in full-screen mode applications.
+TRUE to enable GDI dialog boxes, and
If the method succeeds, the return value is
The GDI dialog boxes must be created as child to the device window. They should also be created within the same thread that created the device because this enables the parent window to manage redrawing the child window.
The method has no effect for windowed mode applications, but this setting will be respected if the application resets the device into full-screen mode. If SetDialogBoxMode succeeds in a windowed mode application, any subsequent reset to full-screen mode will be checked against the restrictions listed above. Also, SetDialogBoxMode causes all back buffers on the swap chain to be discarded, so an application is expected to refresh its content for all back buffers after this call.
+Sets the gamma correction ramp for the implicit swap chain. This method will affect the entire screen (not just the active window if you are running in windowed mode).
+Unsigned integer specifying the swap chain.
Indicates whether correction should be applied. Gamma correction results in a more consistent display, but can incur processing overhead and should not be used frequently. Short-duration effects, such as flashing the whole screen red, should not be calibrated, but long-duration gamma changes should be calibrated. One of the following values can be set:
Item | Description |
---|---|
D3DSGR_CALIBRATE | If a gamma calibrator is installed, the ramp will be modified before being sent to the device to account for the system and monitor response curves. If a calibrator is not installed, the ramp will be passed directly to the device. |
D3DSGR_NO_CALIBRATION | No gamma correction is applied. The supplied gamma table is transferred directly to the device. |
?
Pointer to a
There is always at least one swap chain (the implicit swap chain) for each device, because Direct3D 9 has one swap chain as a property of the device. The gamma ramp takes effect immediately; there is no wait for a vertical sync.
If the device does not support gamma ramps in the swap chain's current presentation mode (full-screen or windowed), no error return is given. Applications can check the
For windowed gamma correction presentation, use
Retrieves the gamma correction ramp for the swap chain.
+An unsigned integer specifying the swap chain.
Creates a texture resource.
+Width of the top-level of the texture, in pixels. The pixel dimensions of subsequent levels will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of 1 pixel. Thus, if the division by 2 results in 0, 1 will be taken instead.
Height of the top-level of the texture, in pixels. The pixel dimensions of subsequent levels will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of 1 pixel. Thus, if the division by 2 results in 0, 1 will be taken instead.
Number of levels in the texture. If this is zero, Direct3D will generate all texture sublevels down to 1 by 1 pixels for hardware that supports mipmapped textures. Call
Usage can be 0, which indicates no usage value. However, if usage is desired, use a combination of one or more
Member of the
Member of the
Pointer to an
Reserved. Set this parameter to
If the method succeeds, the return value is
An application can discover support for Automatic Generation of Mipmaps (Direct3D 9) in a particular format by calling
In Windows Vista CreateTexture can create a texture from a system memory reference allowing the application more flexibility over the use, allocation and deletion of the system memory. For example, an application could pass a GDI system memory bitmap reference and get a Direct3D texture interface around it. Using a system memory reference with CreateTexture has the following restrictions.
Creates a volume texture resource.
+Width of the top-level of the volume texture, in pixels. This value must be a power of two if the
Height of the top-level of the volume texture, in pixels. This value must be a power of two if the
Depth of the top-level of the volume texture, in pixels. This value must be a power of two if the
Number of levels in the texture. If this is zero, Direct3D will generate all texture sublevels down to 1x1 pixels for hardware that supports mipmapped volume textures. Call
Usage can be 0, which indicates no usage value. If usage is desired, use
Member of the
Member of the
Address of a reference to an
Reserved. Set this parameter to
If the method succeeds, the return value is
Creates a cube texture resource.
+Size of the edges of all the top-level faces of the cube texture. The pixel dimensions of subsequent levels of each face will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of 1 pixel. Thus, if the division by 2 results in 0 (zero), 1 will be taken instead.
Number of levels in each face of the cube texture. If this is zero, Direct3D will generate all cube texture sublevels down to 1x1 pixels for each face for hardware that supports mipmapped cube textures. Call
Usage can be 0, which indicates no usage value. However, if usage is desired, use a combination of one or more
Member of the
Member of the
Address of a reference to an
Reserved. Set this parameter to
If the method succeeds, the return value is
A mipmap (texture) is a collection of successively downsampled (mipmapped) surfaces. On the other hand, a cube texture (created by
An application can discover support for Automatic Generation of Mipmaps (Direct3D 9) in a particular format by calling
Creates a vertex buffer.
+Size of the vertex buffer, in bytes. For FVF vertex buffers, Length must be large enough to contain at least one vertex, but it need not be a multiple of the vertex size. Length is not validated for non-FVF buffers. See Remarks.
Usage can be 0, which indicates no usage value. However, if usage is desired, use a combination of one or more
Combination of
Member of the
Address of a reference to an
Reserved. Set this parameter to
If the method succeeds, the return value is
A vertex buffer can be used with either hardware or software vertex processing. This is determined by how the device and the vertex buffer are created.
When a device is created, CreateDevice uses the behavior flag to determine whether to process vertices in hardware or software. There are three possibilities:
Mixed-mode devices might need to switch between software and hardware processing (using
When a vertex buffer is created, CreateVertexBuffer uses the usage parameter to decide whether to process vertices in hardware or software.
To use a vertex buffer with a mixed mode device, create a single vertex buffer which can be used for both hardware or software processing. Use
The
When set to a nonzero value, which must be a valid FVF code, the FVF parameter indicates that the buffer content is to be characterized by an FVF code. A vertex buffer that is created with an FVF code is referred to as an FVF vertex buffer. For more information, see FVF Vertex Buffers (Direct3D 9).
Non-FVF buffers can be used to interleave data during multipass rendering or multitexture rendering in a single pass. To do this, one buffer contains geometry data and the others contain texture coordinates for each texture to be rendered. When rendering, the buffer containing the geometry data is interleaved with each of the buffers containing the texture coordinates. If FVF buffers were used instead, each of them would need to contain identical geometry data in addition to the texture coordinate data specific to each texture rendered. This would result in either a speed or memory penalty, depending on the strategy used. For more information about texture coordinates, see Texture Coordinates (Direct3D 9).
+Creates an index buffer.
+Size of the index buffer, in bytes.
Usage can be 0, which indicates no usage value. However, if usage is desired, use a combination of one or more
Member of the
Item | Description |
---|---|
| Indices are 16 bits each. |
| Indices are 32 bits each. |
?
Member of the
Address of a reference to an
This parameter can be used in Direct3D?9 for Windows?Vista to share resources; set it to
If the method succeeds, the return value is
Index buffers are memory resources used to hold indices, they are similar to both surfaces and vertex buffers. The use of index buffers enables Direct3D to avoid unnecessary data copying and to place the buffer in the optimal memory type for the expected usage.
To use index buffers, create an index buffer, lock it, fill it with indices, unlock it, pass it to
The MaxVertexIndex member of the
Creates a render-target surface.
+Width of the render-target surface, in pixels.
Height of the render-target surface, in pixels.
Member of the
Member of the
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by
Render targets are not lockable unless the application specifies TRUE for Lockable.
Note that lockable render targets reduce performance on some graphics hardware. The readback performance (moving data from video memory to system memory) depends on the type of hardware used (AGP vs. PCI Express) and is usually far lower than upload performance (moving data from system to video memory). If you need read access to render targets, use GetRenderTargetData instead of lockable render targets.
Reserved. Set this parameter to
Address of a reference to an
Render-target surfaces are placed in the
The creation of lockable, multisampled render targets is not supported.
+Creates a depth-stencil resource.
+Width of the depth-stencil surface, in pixels.
Height of the depth-stencil surface, in pixels.
Member of the
Member of the
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by
Set this flag to TRUE to enable z-buffer discarding, and
This flag has the same behavior as the constant,
Reserved. Set this parameter to
Address of a reference to an
The memory class of the depth-stencil buffer is always
Copies rectangular subsets of pixels from one surface to another.
+Pointer to an
Pointer to a rectangle on the source surface. Specifying
Pointer to an
Pointer to the upper left corner of the destination rectangle. Specifying
If the method succeeds, the return value is
This method is similar to CopyRects in DirectX 8.
This function has the following restrictions.
The following table shows the supported combinations.
Dest formats | |||||
---|---|---|---|---|---|
Texture | RT texture | RT | Off-screen plain | ||
Src formats | Texture | Yes | Yes | Yes* | Yes |
RT texture | No | No | No | No | |
RT | No | No | No | No | |
Off-screen plain | Yes | Yes | Yes | Yes |
?
* If the driver does not support the requested copy, it will be emulated using lock and copy.
If the application needs to copy data from a
Updates the dirty portions of a texture.
+Pointer to an
Pointer to an
If the method succeeds, the return value is
You can dirty a portion of a texture by locking it, or by calling one of the following methods.
For performance reasons, dirty regions are only recorded for level zero of a texture. For sublevels, it is assumed that the corresponding (scaled) rectangle or box is also dirty. Dirty regions are automatically recorded when LockRect or
This method fails if the textures are of different types, if their bottom-level buffers are of different sizes, or if their matching levels do not match. For example, consider a six-level source texture with the following dimensions.
32x16, 16x8, 8x4, 4x2, 2x1, 1x1 +
This six-level source texture could be the source for the following one-level destination.
1x1 +
For the following two-level destination.
2x1, 1x1 +
Or, for the following three-level destination.
4x2, 2x1, 1x1 +
In addition, this method will fail if the textures are of different formats. If the destination texture has fewer levels than the source, only the matching levels are copied. If the source texture has fewer levels than the destination, the method will fail.
If the source texture has dirty regions, the copy can be optimized by restricting the copy to only those regions. It is not guaranteed that only those bytes marked dirty will be copied.
Here are the possibilities for source and destination surface combinations:
Copies the render-target data from device memory to system memory.
+Pointer to an
Pointer to an
If the method succeeds, the return value is
The destination surface must be either an off-screen plain surface or a level of a texture (mipmap or cube texture) created with
The source surface must be a regular render target or a level of a render-target texture (mipmap or cube texture) created with POOL_DEFAULT.
This method will fail if:
Generates a copy of the device's front buffer and places that copy in a system memory buffer provided by the application.
+An unsigned integer specifying the swap chain.
Pointer to an
For windowed mode, the size of the destination surface should be the size of the desktop. For full-screen mode, the size of the destination surface should be the screen size.
If the method succeeds, the return value is
The buffer pointed to by pDestSurface will be filled with a representation of the front buffer, converted to the standard 32 bits per pixel format
This method is the only way to capture an antialiased screen shot.
This function is very slow, by design, and should not be used in any performance-critical path.
For more information, see Lost Devices and Retrieved Data.
+Copy the contents of the source rectangle to the destination rectangle. The source rectangle can be stretched and filtered by the copy. This function is often used to change the aspect ratio of a video stream.
+Pointer to the source surface. See
Pointer to the source rectangle. A
Pointer to the destination surface. See
Pointer to the destination rectangle. A
Filter type. Allowable values are
If the method succeeds, the return value is
StretchRect Restrictions
Additional Restrictions for Depth and Stencil Surfaces
Using StretchRect to downsample a Multisample Rendertarget
You can use StretchRect to copy from one rendertarget to another. If the source rendertarget is multisampled, this results in downsampling the source rendertarget. For instance you could:
Note that use of the extra surface involved in using StretchRect to downsample a Multisample Rendertarget will result in a performance hit.
Driver Support
There are many restrictions as to which surface combinations are valid for StretchRect. Factors include whether the driver is a Direct3D 9 driver or older, and whether the operation will result in stretching/shrinking. Since applications are not expected to recognize if the driver is a Direct3D 9 driver or not, the runtime will automatically set a new cap,
DirectX 8 Driver (no stretching) | |||||
---|---|---|---|---|---|
Dest formats | |||||
Texture | RT texture | RT | Off-screen plain | ||
Src formats | Texture | No | No | No | No |
RT texture | No | Yes | Yes | No | |
RT | No | Yes | Yes | No | |
Off-screen plain | Yes | Yes | Yes | Yes |
?
DirectX 8 Driver (stretching) | |||||
---|---|---|---|---|---|
Dest formats | |||||
Texture | RT texture | RT | Off-screen plain | ||
Src formats | Texture | No | No | No | No |
RT texture | No | No | No | No | |
RT | No | Yes | Yes | No | |
Off-screen plain | No | Yes | Yes | No |
?
Direct3D 9 Driver (no stretching) | |||||
---|---|---|---|---|---|
Dest formats | |||||
Texture | RT texture | RT | Off-screen plain | ||
Src formats | Texture | No | Yes | Yes | No |
RT texture | No | Yes | Yes | No | |
RT | No | Yes | Yes | No | |
Off-screen plain | No | Yes | Yes | Yes |
?
Direct3D 9 Driver (stretching) | |||||
---|---|---|---|---|---|
Dest formats | |||||
Texture | RT texture | RT | Off-screen plain | ||
Src formats | Texture | No | Yes | Yes | No |
RT texture | No | Yes | Yes | No | |
RT | No | Yes | Yes | No | |
Off-screen plain | No | Yes | Yes | No |
?
+Allows an application to fill a rectangular area of a
Pointer to the surface to be filled.
Pointer to the source rectangle. Using
Color used for filling.
If the method succeeds, the return value is
This method can only be applied to a render target, a render-target texture surface, or an off-screen plain surface with a pool type of
When using a DirectX 7 or DirectX 8.x driver, the only YUV formats supported are
Create an off-screen surface.
+Width of the surface.
Height of the surface.
Format of the surface. See
Surface pool type. See
Reserved. Set this parameter to
Pointer to the
Off-screen plain surfaces are always lockable, regardless of their pool types.
+Sets a new color buffer for the device.
+Index of the render target. See Remarks.
Pointer to a new color buffer. If
If the method succeeds, the return value is
The device can support multiple render targets. The number of render targets supported by a device is contained in the NumSimultaneousRTs member of
Setting a new render target will cause the viewport (see Viewports and Clipping (Direct3D 9)) to be set to the full size of the new render target.
Some hardware tests the compatibility of the depth stencil buffer with the color buffer. If this is done, it is only done in a debug build.
Restrictions for using this method include the following:
These restrictions are validated only when using the debug runtime when any of the
Cube textures differ from other surfaces in that they are collections of surfaces. To call
Retrieves a render-target surface.
+Index of the render target. See Remarks.
Address of a reference to an
Typically, methods that return state will not work on a device that is created using
The device can now support multiple render targets. The number of render targets supported by a device is contained in the NumSimultaneousRTs member of
Calling this method will increase the internal reference count on the
Sets the depth stencil surface.
+Address of a reference to an
If the method succeeds, the return value is
Restrictions for using this method include the following:
These restrictions are validated only when using the debug runtime when any of the
Cube textures differ from other surfaces in that they are collections of surfaces. To call
Gets the depth-stencil surface owned by the Direct3DDevice object.
+Address of a reference to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count on the
Begins a scene.
+If the method succeeds, the return value is
Applications must call
If
There should be one
Ends a scene that was begun by calling
If the method succeeds, the return value is
When this method succeeds, the scene has been queued up for rendering by the driver. This is not a synchronous method, so the scene is not guaranteed to have completed rendering when this method returns.
Applications must call
If
There should be at most one
Clears one or more surfaces such as a render target, multiple render targets, a stencil buffer, and a depth buffer.
+If the method succeeds, the return value is
Use this method to clear a surface including: a render target, all render targets in an MRT, a stencil buffer, or a depth buffer. Flags determines how many surfaces are cleared. Use pRects to clear a subset of a surface defined by an array of rectangles.
Sets a single device transformation-related state.
+Device-state variable that is being modified. This parameter can be any member of the
Pointer to a
If the method succeeds, the return value is
Retrieves a matrix describing a transformation state.
+Device state variable that is being modified. This parameter can be any member of the
Pointer to a
This method will not return device state for a device that is created using
Multiplies a device's world, view, or projection matrices by a specified matrix.
+Member of the
Pointer to a
If the method succeeds, the return value is
The multiplication order is pMatrix times State.
An application might use the
shoulder_transformation upper_arm geometry elbow transformation lower_arm geometry wrist transformation hand geometry +
An application might use the following series of calls to render this hierarchy. Not all the parameters are shown in this pseudocode.
+(D3DTS_WORLDMATRIX(0), shoulder_transform) + (upper_arm) + (D3DTS_WORLDMATRIX(0), elbow_transform) + (lower_arm) + (D3DTS_WORLDMATRIX(0), wrist_transform) + (hand)
Sets the viewport parameters for the device.
+Pointer to a
If the method succeeds, the return value is
Direct3D sets the following default values for the viewport.
vp; + vp.X = 0; + vp.Y = 0; + vp.Width = RenderTarget.Width; + vp.Height = RenderTarget.Height; + vp.MinZ = 0.0f; + vp.MaxZ = 1.0f; +
To draw multiple views within a scene, repeat the
Retrieves the viewport parameters currently set for the device.
+Pointer to a
If the method succeeds, the return value is
Typically, methods that return state will not work on a device that is created using
Sets the material properties for the device.
+Pointer to a
If the method succeeds, the return value is
Retrieves the current material properties for the device.
+Pointer to a
If the method succeeds, the return value is
This method will not return device state for a device that is created using
Assigns a set of lighting properties for this device.
+Zero-based index of the set of lighting properties to set. If a set of lighting properties exists at this index, it is overwritten by the new properties specified in pLight.
Pointer to a
If the method succeeds, the return value is
Set light properties by preparing a
The system allocates memory to accommodate a set of lighting properties each time you call the
The following example prepares and sets properties for a white point-light whose emitted light will not attenuate over distance.
// Assume d3dDevice is a valid reference to aninterface. + d3dLight; + hr; // Initialize the structure. + ZeroMemory(&d3dLight, sizeof(d3dLight)); // Set up a white point light. + d3dLight.Type = ; + d3dLight.Diffuse.r = 1.0f; + d3dLight.Diffuse.g = 1.0f; + d3dLight.Diffuse.b = 1.0f; + d3dLight.Ambient.r = 1.0f; + d3dLight.Ambient.g = 1.0f; + d3dLight.Ambient.b = 1.0f; + d3dLight.Specular.r = 1.0f; + d3dLight.Specular.g = 1.0f; + d3dLight.Specular.b = 1.0f; // Position it high in the scene and behind the user. + // Remember, these coordinates are in world space, so + // the user could be anywhere in world space, too. + // For the purposes of this example, assume the user + // is at the origin of world space. + d3dLight.Position.x = 0.0f; + d3dLight.Position.y = 1000.0f; + d3dLight.Position.z = -100.0f; // Don't attenuate. + d3dLight.Attenuation0 = 1.0f; + d3dLight.Range = 1000.0f; // Set the property information for the first light. + hr = d3dDevice->SetLight(0, &d3dLight); + if (SUCCEEDED(hr)) // Handle Success + else // Handle failure +
Enable a light source by calling the
Retrieves a set of lighting properties that this device uses.
+Zero-based index of the lighting property set to retrieve. This method will fail if a lighting property has not been set for this index by calling the
Pointer to a
This method will not return device state for a device that is created using
Retrieve all the properties for an existing light source by calling the
// Assume d3dDevice is a valid reference to aninterface. + hr; + D3DLight9 light; // Get the property information for the first light. + hr = pd3dDevice->GetLight(0, &light); + if (SUCCEEDED(hr)) // Handle Success + else // Handle failure +
If you supply an index outside the range of the light sources assigned in the device, the
When you assign a set of light properties for a light source in a scene, the light source can be activated by calling the
// Assume d3dDevice is a valid reference to aninterface. + hr; hr = pd3dDevice->LightEnable(0, TRUE); + if (SUCCEEDED(hr)) // Handle Success + else // Handle failure +
Check the MaxActiveLights member of the
If you enable or disable a light that has no properties that are set with
Enables or disables a set of lighting parameters within a device.
+Zero-based index of the set of lighting parameters that are the target of this method.
Value that indicates if the set of lighting parameters are being enabled or disabled. Set this parameter to TRUE to enable lighting with the parameters at the specified index, or
If the method succeeds, the return value is
If a value for LightIndex is outside the range of the light property sets assigned within the device, the
Member | Default |
---|---|
Type | |
Diffuse | (R:1, G:1, B:1, A:0) |
Specular | (R:0, G:0, B:0, A:0) |
Ambient | (R:0, G:0, B:0, A:0) |
Position | (0, 0, 0) |
Direction | (0, 0, 1) |
Range | 0 |
Falloff | 0 |
Attenuation0 | 0 |
Attenuation1 | 0 |
Attenuation2 | 0 |
Theta | 0 |
Phi | 0 |
?
+Retrieves the activity status - enabled or disabled - for a set of lighting parameters within a device.
+Zero-based index of the set of lighting parameters that are the target of this method.
Pointer to a variable to fill with the status of the specified lighting parameters. After the call, a nonzero value at this address indicates that the specified lighting parameters are enabled; a value of 0 indicates that they are disabled.
This method will not return device state for a device that is created using
Sets the coefficients of a user-defined clipping plane for the device.
+Index of the clipping plane for which the plane equation coefficients are to be set.
Pointer to an address of a four-element array of values that represent the clipping plane coefficients to be set, in the form of the general plane equation. See Remarks.
If the method succeeds, the return value is
The coefficients that this method sets take the form of the general plane equation. If the values in the array at pPlane were labeled A, B, C, and D in the order that they appear in the array, they would fit into the general plane equation so that Ax + By + Cz + Dw = 0. A point with homogeneous coordinates (x, y, z, w) is visible in the half space of the plane if Ax + By + Cz + Dw >= 0. Points that exist behind the clipping plane are clipped from the scene.
When the fixed function pipeline is used the plane equations are assumed to be in world space. When the programmable pipeline is used the plane equations are assumed to be in the clipping space (the same space as output vertices).
This method does not enable the clipping plane equation being set. To enable a clipping plane, set the corresponding bit in the DWORD value applied to the
Retrieves the coefficients of a user-defined clipping plane for the device.
+Index of the clipping plane for which the plane equation coefficients are retrieved.
Pointer to a four-element array of values that represent the coefficients of the clipping plane in the form of the general plane equation. See Remarks.
This method will not return device state for a device that is created using
The coefficients that this method reports take the form of the general plane equation. If the values in the array at pPlane were labeled A, B, C, and D in the order that they appear in the array, they would fit into the general plane equation so that Ax + By + Cz + Dw = 0. A point with homogeneous coordinates (x, y, z, w) is visible in the half space of the plane if Ax + By + Cz + Dw >= 0. Points that exist on or behind the clipping plane are clipped from the scene.
The plane equation used by this method exists in world space and is set by a previous call to the
Sets a single device render-state parameter.
+Device state variable that is being modified. This parameter can be any member of the
New value for the device render state to be set. The meaning of this parameter is dependent on the value specified for State. For example, if State were
If the method succeeds, the return value is
Retrieves a render-state value for a device.
+Device state variable that is being queried. This parameter can be any member of the
Pointer to a variable that receives the value of the queried render state variable when the method returns.
If the method succeeds, the return value is
This method will not return device state for a device that is created using
Creates a new state block that contains the values for all device states, vertex-related states, or pixel-related states.
+Type of state data that the method should capture. This parameter can be set to a value defined in the
Pointer to a state block interface. See
If the method succeeds, the return value is
Vertex-related device states typically refer to those states that affect how the system processes vertices. Pixel-related states generally refer to device states that affect how the system processes pixel or depth-buffer data during rasterization. Some states are contained in both groups.
Differences between Direct3D 9 and Direct3D 10: In Direct3D 9, a state block contains state data, for the states it was requested to capture, when the object is created. To change the value of the state block, call |
?
+Signals Direct3D to begin recording a device-state block.
+If the method succeeds, the return value is
Applications can ensure that all recorded states are valid by calling the
The following methods can be recorded in a state block, after calling
The ordering of state changes in a state block is not guaranteed. If the same state is specified multiple times in a state block, only the last value is used.
+Signals Direct3D to stop recording a device-state block and retrieve a reference to the state block interface.
+Pointer to a state block interface. See
Sets the clip status.
+Pointer to a
If the method succeeds, the return value is
Clip status is used during software vertex processing. Therefore, this method is not supported on pure or nonpure hardware processing devices. For more information about pure devices, see
When clipping is enabled during vertex processing (by
Clip status is not updated by
Retrieves the clip status.
+ Pointer to a
If the method succeeds, the return value is
When clipping is enabled during vertex processing (by
Clip status is not updated by
Clip status is used during software vertex processing. Therefore, this method is not supported on pure or nonpure hardware processing devices. For more information about pure devices, see
Retrieves a texture assigned to a stage for a device.
+Stage identifier of the texture to retrieve. Stage identifiers are zero-based.
Address of a reference to an
Typically, methods that return state will not work on a device that is created using
Calling this method will increase the internal reference count on the
Assigns a texture to a stage for a device.
+Zero based sampler number. Textures are bound to samplers; samplers define sampling state such as the filtering mode and the address wrapping mode. Textures are referenced differently by the programmable and the fixed function pipeline:
There are two other special cases for stage/sampler numbers.
Pointer to an
If the method succeeds, the return value is
SetTexture is not allowed if the texture is created with a pool type of
Retrieves a state value for an assigned texture.
+Stage identifier of the texture for which the state is retrieved. Stage identifiers are zero-based. Devices can have up to eight set textures, so the maximum value allowed for Stage is 7.
Texture state to retrieve. This parameter can be any member of the
Pointer a variable to fill with the retrieved state value. The meaning of the retrieved value is determined by the Type parameter.
If the method succeeds, the return value is
This method will not return device state for a device that is created using
Sets the state value for the currently assigned texture.
+Stage identifier of the texture for which the state value is set. Stage identifiers are zero-based. Devices can have up to eight set textures, so the maximum value allowed for Stage is 7.
Texture state to set. This parameter can be any member of the
State value to set. The meaning of this value is determined by the Type parameter.
If the method succeeds, the return value is
Gets the sampler state value.
+The sampler stage index.
This parameter can be any member of the
State value to get. The meaning of this value is determined by the Type parameter.
If the method succeeds, the return value is
This method will not return device state for a device that is created using
Sets the sampler state value.
+The sampler stage index. For more info about sampler stage, see Sampling Stage Registers in vs_3_0 (DirectX HLSL).
This parameter can be any member of the
State value to set. The meaning of this value is determined by the Type parameter.
If the method succeeds, the return value is
Reports the device's ability to render the current texture-blending operations and arguments in a single pass.
+Pointer to a DWORD value to fill with the number of rendering passes needed to complete the desired effect through multipass rendering.
If the method succeeds, the return value is
The
Current hardware does not necessarily implement all possible combinations of operations and arguments. You can determine whether a particular blending operation can be performed with given arguments by setting the desired blending operation, and then calling the
The
For best performance, call
Using diffuse iterated values, either as an argument or as an operation (D3DTA_DIFFUSED3DTOP_BLENDDIFFUSEALPHA) is rarely supported on current hardware. Most hardware can introduce iterated color data only at the last texture operation stage.
Try to specify the texture (
Many cards do not support use of diffuse or scalar values at arbitrary texture stages. Often, these are available only at the first or last texture-blending stage.
Many cards do not have a blending unit associated with the first texture that is capable of more than replicating alpha to color channels or inverting the input. Therefore, your application might need to use only the second texture stage, if possible. On such hardware, the first unit is presumed to be in its default state, which has the first color argument set to
Operations on the output alpha that are more intricate than or substantially different from the color operations are less likely to be supported.
Some hardware does not support simultaneous use of
Many cards do not support simultaneous use of multiple textures and mipmapped trilinear filtering. If trilinear filtering has been requested for a texture involved in multitexture blending operations and validation fails, turn off trilinear filtering and revalidate. In this case, you might want to perform multipass rendering instead.
+Sets palette entries.
+An ordinal value identifying the particular palette upon which the operation is to be performed.
Pointer to a
If the method succeeds, the return value is
For Direct3D 9 applications, any palette sent to this method must conform to the
A single logical palette is associated with the device, and is shared by all texture stages.
+Retrieves palette entries.
+An ordinal value identifying the particular palette to retrieve.
Pointer to a
If the method succeeds, the return value is
For more information about
Note??As of Direct3D 9, the peFlags member of the
Sets the current texture palette.
+Value that specifies the texture palette to set as the current texture palette.
If the method succeeds, the return value is
A single logical palette is associated with the device, and is shared by all texture stages.
+Retrieves the current texture palette.
+Pointer to a returned value that identifies the current texture palette.
If the method succeeds, the return value is
Sets the scissor rectangle.
+Pointer to a
If the method succeeds, the return value is
The scissor rectangle is used as a rectangular clipping region.
See Rectangles (Direct3D 9) for further information on the use of rectangles in DirectX.
+Gets the scissor rectangle.
+Returns a reference to a
If the method succeeds, the return value is
The scissor rectangle is used as a rectangular clipping region.
See Rectangles (Direct3D 9) for further information on the use of rectangles in DirectX.
+Use this method to switch between software and hardware vertex processing.
+TRUE to specify software vertex processing;
If the method succeeds, the return value is
The restrictions for changing modes are as follows:
An application can create a mixed-mode device to use both the software vertex processing and the hardware vertex processing. To switch between the two vertex processing modes in DirectX 8.x, use IDirect3DDevice8::SetRenderState with the render state D3DRS_SOFTWAREVERTEXPROCESSING and the appropriate DWORD argument. The drawback of the render state approach was the difficulty in defining the semantics for state blocks. Applications and the runtime had to do extra work and be careful while recording and playing back state blocks.
In Direct3D 9, use SetSoftwareVertexProcessing instead. This new API is not recorded by StateBlocks.
+Gets the vertex processing (hardware or software) mode.
+Returns TRUE if software vertex processing is set. Otherwise, it returns
An application can create a mixed-mode device to use both the software vertex processing and the hardware vertex processing. To switch between the two vertex processing modes in DirectX 8.x, use
In Direct3D 9, use
Enable or disable N-patches.
+Specifies the number of subdivision segments. If the number of segments is less than 1.0, N-patches are disabled. The default value is 0.0.
If the method succeeds, the return value is
Gets the N-patch mode segments.
+Specifies the number of subdivision segments. If the number of segments is less than 1.0, N-patches are disabled. The default value is 0.0.
Renders a sequence of nonindexed, geometric primitives of the specified type from the current set of data input streams.
+Member of the
Index of the first vertex to load. Beginning at StartVertex the correct number of vertices will be read out of the vertex buffer.
Number of primitives to render. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the
If the method succeeds, the return value is
When converting a legacy application to Direct3D 9, you must add a call to either
Based on indexing, renders the specified geometric primitive into an array of vertices.
+Member of the
Offset from the start of the vertex buffer to the first vertex. See Scenario 4.
Minimum vertex index for vertices used during this call. This is a zero based index relative to BaseVertexIndex.
Number of vertices used during this call. The first vertex is located at index: BaseVertexIndex + MinIndex.
Index of the first index to use when accesssing the vertex buffer. Beginning at StartIndex to index vertices from the vertex buffer.
Number of primitives to render. The number of vertices used is a function of the primitive count and the primitive type. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the
If the method succeeds, the return value is
This method draws indexed primitives from the current set of data input streams. MinIndex and all the indices in the index stream are relative to the BaseVertexIndex.
The MinIndex and NumVertices parameters specify the range of vertex indices used for each
The
When converting a legacy application to Direct3D 9, you must add a call to either
Renders data specified by a user memory reference as a sequence of geometric primitives of the specified type.
+Member of the
Number of primitives to render. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the
User memory reference to the vertex data.
The number of bytes of data for each vertex. This value may not be 0.
If the method succeeds, the return value is
This method is intended for use in applications that are unable to store their vertex data in vertex buffers. This method supports only a single vertex stream. The effect of this call is to use the provided vertex data reference and stride for vertex stream 0. It is invalid to have the declaration of the current vertex shader refer to vertex streams other than stream 0.
Following any
The vertex data passed to
When converting a legacy application to Direct3D 9, you must add a call to either
Renders the specified geometric primitive with data specified by a user memory reference.
+Member of the
Minimum vertex index. This is a zero-based index.
Number of vertices used during this call. The first vertex is located at index: MinVertexIndex.
Number of primitives to render. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the
User memory reference to the index data.
Member of the
User memory reference to the vertex data. The vertex data must be in stream 0.
The number of bytes of data for each vertex. This value may not be 0.
If the method succeeds, the return value is
This method is intended for use in applications that are unable to store their vertex data in vertex buffers. This method supports only a single vertex stream, which must be declared as stream 0.
Following any
The vertex data passed to
When converting a legacy application to Direct3D 9, you must add a call to either
Applies the vertex processing defined by the vertex shader to the set of input data streams, generating a single stream of interleaved vertex data to the destination vertex buffer.
+Index of first vertex to load.
Index of first vertex in the destination vertex buffer into which the results are placed.
Number of vertices to process.
Pointer to an
Pointer to an
Processing options. Set this parameter to 0 for default processing. Set to D3DPV_DONOTCOPYDATA to prevent the system from copying vertex data not affected by the vertex operation into the destination buffer. The D3DPV_DONOTCOPYDATA value may be combined with one or more
If the method succeeds, the return value is
The order of operations for this method is as follows:
The destination vertex buffer, pDestBuffer, must be created with a nonzero FVF parameter in
When Direct3D generates texture coordinates, or copies or transforms input texture coordinates, and the output texture coordinate format defines more texture coordinate components than Direct3D generates, Direct3D does not change these extra components.
+Create a vertex shader declaration from the device and the vertex elements.
+An array of
Pointer to an
If the method succeeds, the return value is
See the Vertex Declaration (Direct3D 9) page for a detailed description of how to map vertex declarations between different versions of DirectX.
+Sets a Vertex Declaration (Direct3D 9).
+If the method succeeds, the return value is
A vertex declaration is an
Gets a vertex shader declaration.
+Pointer to an
If the method succeeds, the return value is
Sets the current vertex stream declaration.
+DWORD containing the fixed function vertex type. For more information, see
If the method succeeds, the return value is
Here are the steps necessary to initialize and use vertices that have a position, diffuse and specular color, and texture coordinates:
struct LVertex + { FLOAT x, y, z;specular, diffuse; FLOAT tu, tv; + }; const DWORD VertexFVF = ( | | | ); +
g_d3dDevice->CreateVertexBuffer( 4*sizeof(LVertex),, VertexFVF, , &pBigSquareVB, null ); +
LVertex * v; + pBigSquareVB->Lock( 0, 0, (BYTE**)&v, 0 ); v[0].x = 0.0f; v[0].y = 10.0; v[0].z = 10.0f; + v[0].diffuse = 0xffff0000; + v[0].specular = 0xff00ff00; + v[0].tu = 0.0f; v[0].tv = 0.0f; v[1].x = 0.0f; v[1].y = 0.0f; v[1].z = 10.0f; + v[1].diffuse = 0xff00ff00; + v[1].specular = 0xff00ffff; + v[1].tu = 0.0f; v[1].tv = 0.0f; v[2].x = 10.0f; v[2].y = 10.0f; v[2].z = 10.0f; + v[2].diffuse = 0xffff00ff; + v[2].specular = 0xff000000; + v[2].tu = 0.0f; v[2].tv = 0.0f; v[3].x = 0.0f; v[3].y = 10.0f; v[3].z = 10.0f; + v[3].diffuse = 0xffffff00; + v[3].specular = 0xffff0000; + v[3].tu = 0.0f; v[3].tv = 0.0f; pBigSquareVB->Unlock(); +
g_d3dDevice->SetFVF(VertexFVF); + g_d3dDevice->SetStreamSource(0, pBigSquareVB, 0, sizeof(LVertex)); + g_d3dDevice->DrawPrimitive(, 0 ,2); +
Here are the steps necessary to initialize and use vertices that have a position, a normal, and texture coordinates:
struct Vertex + { FLOAT x, y, z; FLOAT nx, ny, nz; FLOAT tu, tv; + }; const DWORD VertexFVF = (| | ); +
Vertex * v; + pBigSquareVB->Lock(0, 0, (BYTE**)&v, 0); v[0].x = 0.0f; v[0].y = 10.0; v[0].z = 10.0f; + v[0].nx = 0.0f; v[0].ny = 1.0f; v[0].nz = 0.0f; + v[0].tu = 0.0f; v[0].tv = 0.0f; v[1].x = 0.0f; v[1].y = 0.0f; v[1].z = 10.0f; + v[1].nx = 0.0f; v[1].ny = 1.0f; v[1].nz = 0.0f; + v[1].tu = 0.0f; v[1].tv = 0.0f; v[2].x = 10.0f; v[2].y = 10.0f; v[2].z = 10.0f; + v[2].nx = 0.0f; v[2].ny = 1.0f; v[2].nz = 0.0f; + v[2].tu = 0.0f; v[2].tv = 0.0f; v[3].x = 0.0f; v[3].y = 10.0f; v[3].z = 10.0f; + v[3].nx = 0.0f; v[3].ny = 1.0f; v[3].nz = 0.0f; + v[3].tu = 0.0f; v[3].tv = 0.0f; pBigSquareVB->Unlock(); +
Gets the fixed vertex function declaration.
+A DWORD reference to the fixed function vertex type. For more information, see
If the method succeeds, the return value is
The fixed vertex function declaration is a set of FVF flags that determine how vertices processed by the fixed function pipeline will be used.
+Creates a vertex shader.
+Pointer to an array of tokens that represents the vertex shader, including any embedded debug and symbol table information.
Pointer to the returned vertex shader interface (see
If the method succeeds, the return value is
When a device is created,
For an example using
Sets the vertex shader.
+Vertex shader interface. For more information, see
If the method succeeds, the return value is
To set a fixed-function vertex shader (after having set a programmable vertex shader), call
Retrieves the currently set vertex shader.
+Pointer to a vertex shader interface.
If the method succeeds, the return value is
Typically, methods that return state will not work on a device that is created using
Sets a floating-point vertex shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four float vectors in the array of constants.
If the method succeeds, the return value is
Gets a floating-point vertex shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four float vectors in the array of constants.
If the method succeeds, the return value is
Sets an integer vertex shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four integer vectors in the array of constants.
If the method succeeds, the return value is
Gets an integer vertex shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four integer vectors in the array of constants.
If the method succeeds, the return value is
Sets a Boolean vertex shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of boolean values in the array of constants.
If the method succeeds, the return value is
Gets a Boolean vertex shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of Boolean values in the array of constants.
If the method succeeds, the return value is
Binds a vertex buffer to a device data stream. For more information, see Setting the Stream Source (Direct3D 9).
+If the method succeeds, the return value is
When a FVF vertex shader is used, the stride of the vertex stream must match the vertex size, computed from the FVF. When a declaration is used, the stride should be greater than or equal to the stream size computed from the declaration.
When calling SetStreamSource, the stride is normally required to be equal to the vertex size. However, there are times when you may want to draw multiple instances of the same or similar geometry (such as when using instancing to draw). For this case, use a zero stride to tell the runtime not to increment the vertex buffer offset (ie: use the same vertex data for all instances). For more information about instancing, see Efficiently Drawing Multiple Instances of Geometry (Direct3D 9).
+Retrieves a vertex buffer bound to the specified data stream.
+Specifies the data stream, in the range from 0 to the maximum number of streams minus one.
Address of a reference to an
Pointer containing the offset from the beginning of the stream to the beginning of the vertex data. The offset is measured in bytes. See Remarks.
Pointer to a returned stride of the component, in bytes. See Remarks.
If the method succeeds, the return value is
A stream is defined as a uniform array of component data, where each component consists of one or more elements representing a single entity such as position, normal, color, and so on.
When a FVF vertex shader is used, the stride of the vertex stream must match the vertex size, computed from the FVF. When a declaration is used, the stride should be greater than or equal to the stream size computed from the declaration.
Calling this method will increase the internal reference count on the
Sets the stream source frequency divider value. This may be used to draw several instances of geometry.
+Stream source number.
This parameter may have two different values. See remarks.
If the method succeeds, the return value is
There are two constants defined in d3d9types.h that are designed to use with SetStreamSourceFreq:
Gets the stream source frequency divider value.
+Stream source number.
Returns the frequency divider value.
If the method succeeds, the return value is
Vertex shaders can now be invoked more than once per vertex. See Drawing Non-Indexed Geometry.
+Sets index data.
+Pointer to an
If the method succeeds, the return value is
When an application no longer holds a references to this interface, the interface will automatically be freed.
The
Retrieves index data.
+Address of a reference to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count on the
Creates a pixel shader.
+Pointer to the pixel shader function token array, specifying the blending operations. This value cannot be
Pointer to the returned pixel shader interface. See
If the method succeeds, the return value is
Sets the current pixel shader to a previously created pixel shader.
+Pixel shader interface.
If the method succeeds, the return value is
Retrieves the currently set pixel shader.
+Pointer to a pixel shader interface.
If the method succeeds, the return value is
This method will not work on a device that is created using
Sets a floating-point shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four float vectors in the array of constants.
If the method succeeds, the return value is
Gets a floating-point shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four float vectors in the array of constants.
If the method succeeds, the return value is
Sets an integer shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four integer vectors in the array of constants.
If the method succeeds, the return value is
Gets an integer shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of four integer vectors in the array of constants.
If the method succeeds, the return value is
Sets a Boolean shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of boolean values in the array of constants.
If the method succeeds, the return value is
Gets a Boolean shader constant.
+Register number that will contain the first constant value.
Pointer to an array of constants.
Number of Boolean values in the array of constants.
If the method succeeds, the return value is
Draws a rectangular patch using the currently set streams.
+Handle to the rectangular patch to draw.
Pointer to an array of four floating-point values that identify the number of segments each edge of the rectangle patch should be divided into when tessellated. See
Pointer to a
If the method succeeds, the return value is
For static patches: Set the vertex shader, set the appropriate streams, supply patch information in the pRectPatchInfo parameter, and specify a handle so that Direct3D can capture and cache information. Call
Calling
For dynamic patches, the patch data changes for every rendering of the patch, so it is not efficient to cache information. The application can convey this to Direct3D by setting Handle to 0. In this case, Direct3D draws the patch using the currently set streams and the pNumSegs values, and does not cache any information. It is not valid to simultaneously set Handle to 0 and pRectPatchInfo to
Draws a triangular patch using the currently set streams.
+Handle to the triangular patch to draw.
Pointer to an array of three floating-point values that identify the number of segments each edge of the triangle patch should be divided into when tessellated. See
Pointer to a
If the method succeeds, the return value is
For static patches: Set the vertex shader, set the appropriate streams, supply patch information in the pTriPatchInfo parameter, and specify a handle so that Direct3D can capture and cache information. To efficiently draw the patch, call
Calling
For dynamic patches, the patch data changes for every rendering of the patch so it is not efficient to cache information. The application can convey this to Direct3D by setting Handle to 0. In this case, Direct3D draws the patch using the currently set streams and the pNumSegs values, and does not cache any information. It is not valid to simultaneously set Handle to 0 and pTriPatchInfo to
Frees a cached high-order patch.
+Handle of the cached high-order patch to delete.
If the method succeeds, the return value is
Creates a status query.
+Identifies the query type. For more information, see
Returns a reference to the query interface that manages the query object. See
This parameter can be set to
If the method succeeds, the return value is
This method is provided for both synchronous and asynchronous queries. It takes the place of GetInfo, which is no longer supported in Direct3D 9.
Synchronous and asynchronous queries are created with
Applications use the methods of the
The
The LPDIRECT3DDEVICE9EX and PDIRECT3DDEVICE9EX types are defined as references to the
typedef struct+*LPDIRECT3DDEVICE9EX, *PDIRECT3DDEVICE9EX; +
Get or sets the priority of the GPU thread.
+Use
This method will retrieve the priority of the thread stored with the Direct3D device even if it was created with the
Retrieves or sets the number of frames of data that the system is allowed to queue.
+Frame latency is the number of frames that are allowed to be stored in a queue, before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue.
It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Prepare the texture sampler for monochrome convolution filtering on a single-color texture.
+The width of the filter kernel; ranging from 1 - D3DCONVOLUTIONMONO_MAXWIDTH. The default value is 1.
The height of the filter kernel; ranging from 1 - D3DCONVOLUTIONMONO_MAXHEIGHT. The default value is 1.
An array of weights, one weight for each kernel sub-element in the width. This parameter must be
An array of weights, one weight for each kernel sub-element in the height. This parameter must be
If the method succeeds, the return value is
This method is designed to filter a single color texture. A monochrome convolution filter is a 2D box filter with all of the weights set to 1.0; the filter kernel resolution ranges from 1 x 1 to 7 x 7. When monochrome texture filtering is set to a texture sampler and texture sampling is performed at location, then Direct3D performs convolution.
Restrictions include:
Copy a text string to one surface using an alphabet of glyphs on another surface. Composition is done by the GPU using bitwise operations.
+A reference to a source surface (prepared by
A reference to the destination surface (prepared by
A reference to a vertex buffer (see
The number of rectangles or glyphs that are used in the operation. The number applies to both the source and destination surfaces. The range is 0 to D3DCOMPOSERECTS_MAXNUMRECTS.
A reference to a vertex buffer (see
Specifies how to combine the source and destination surfaces. See
A value added to the x coordinates of all destination rectangles. This value can be negative, which may cause the glyph to be rejected or clipped if the result is beyond the bounds of the surface.
A value added to the y coordinates of all destination rectangles. This value can be negative, which may cause the glyph to be rejected or clipped if the result is beyond the bounds of the surface.
If the method succeeds, the return value is
Glyphs from a one-bit source surface are put together into another one-bit texture surface with this method. The destination surface can then be used as the source for a normal texturing operation that will filter and scale the strings of text onto some other non-monochrome surface.
This method has several constraints (which are similar to StretchRect):
The method is not recorded in state blocks.
+Swap the swapchain's next buffer with the front buffer.
+Pointer to a
Pointer to
Pointer to a destination window whose client area is taken as the target for this presentation. If this value is
Note??If you create a swap chain with
Pointer to a
If this value is non-
Allows the application to request that the method return immediately when the driver reports that it cannot schedule a presentation. Valid values are 0, or any combination of
Possible return values include:
Differences between Direct3D 9 and Direct3D 9Ex: |
?
Similar to the
When the swapchain is created with
Get the priority of the GPU thread.
+Current GPU priority. Valid values range from -7 to 7.
Possible return values include:
Use
This method will retrieve the priority of the thread stored with the Direct3D device even if it was created with the
Set the priority on the GPU thread.
+The thread priority, ranging from -7 to 7.
Possible return values include:
GPU thread priority is not reset when a device is lost. The effects of calls to this method are not recorded in state blocks.
+Suspend execution of the calling thread until the next vertical blank signal.
+Swap chain index. This is an optional, zero-based index used to specify a swap chain on a multihead card.
This method will always return
This method allows applications to efficiently throttle their frame rate to that of the monitor associated with the device. Following a vertical blank, the amount of time it takes for the thread to wake up is typically very short.
In some scenarios the hardware may stop generating vertical blank signals when nothing is being displayed on the monitor. In this case, the method will wait approximately 100ms and return with
Checks an array of resources to determine if it is likely that they will cause a large stall at Draw time because the system must make the resources GPU-accessible.
+An array of
A value indicating the number of resources passed into the pResourceArray parameter up to a maximum of 65535.
If all the resources are in GPU-accessible memory, the method will return
If no allocation that comprises the resources is on disk, but at least one allocation is not in GPU-accessible memory, the method will return
If at least one allocation that comprises the resources is on disk, this method will return S_NOT_RESIDENT. The system may need to perform a copy to promote the resource.
This API is no more than a reasonable guess at residency, since resources may have been demoted by the time the application uses them.
The expected usage pattern is as follows. If the application determines that a set of resources are not resident, then the application will substitute a lower-LOD version of the resource and continue with rendering. The video memory manager API, offers a feature to allow the application to express that it would like these lower-LOD resources to be made more likely to stay resident in GPU-accessible memory. It is the app's responsibility to create, fill and destroy these lower-LOD versions, if it so chooses.
The application also needs to begin promotion of the higher-LOD versions when the residency check indicates that the resource is not resident in GPU-accessible memory. Since a per-process lock exists in kernel mode, a performant implementation will spawn a separate process whose sole job is to promote resources. The application communicates resource identity between the two process by means of the Sharing Resources shared surfaces API and promotes them by means of the SetPriority.
+Checks an array of resources to determine if it is likely that they will cause a large stall at Draw time because the system must make the resources GPU-accessible.
+An array of
A value indicating the number of resources passed into the pResourceArray parameter up to a maximum of 65535.
If all the resources are in GPU-accessible memory, the method will return
If no allocation that comprises the resources is on disk, but at least one allocation is not in GPU-accessible memory, the method will return
If at least one allocation that comprises the resources is on disk, this method will return S_NOT_RESIDENT. The system may need to perform a copy to promote the resource.
This API is no more than a reasonable guess at residency, since resources may have been demoted by the time the application uses them.
The expected usage pattern is as follows. If the application determines that a set of resources are not resident, then the application will substitute a lower-LOD version of the resource and continue with rendering. The video memory manager API, offers a feature to allow the application to express that it would like these lower-LOD resources to be made more likely to stay resident in GPU-accessible memory. It is the app's responsibility to create, fill and destroy these lower-LOD versions, if it so chooses.
The application also needs to begin promotion of the higher-LOD versions when the residency check indicates that the resource is not resident in GPU-accessible memory. Since a per-process lock exists in kernel mode, a performant implementation will spawn a separate process whose sole job is to promote resources. The application communicates resource identity between the two process by means of the Sharing Resources shared surfaces API and promotes them by means of the SetPriority.
+Checks an array of resources to determine if it is likely that they will cause a large stall at Draw time because the system must make the resources GPU-accessible.
+An array of
A value indicating the number of resources passed into the pResourceArray parameter up to a maximum of 65535.
If all the resources are in GPU-accessible memory, the method will return
If no allocation that comprises the resources is on disk, but at least one allocation is not in GPU-accessible memory, the method will return
If at least one allocation that comprises the resources is on disk, this method will return S_NOT_RESIDENT. The system may need to perform a copy to promote the resource.
This API is no more than a reasonable guess at residency, since resources may have been demoted by the time the application uses them.
The expected usage pattern is as follows. If the application determines that a set of resources are not resident, then the application will substitute a lower-LOD version of the resource and continue with rendering. The video memory manager API, offers a feature to allow the application to express that it would like these lower-LOD resources to be made more likely to stay resident in GPU-accessible memory. It is the app's responsibility to create, fill and destroy these lower-LOD versions, if it so chooses.
The application also needs to begin promotion of the higher-LOD versions when the residency check indicates that the resource is not resident in GPU-accessible memory. Since a per-process lock exists in kernel mode, a performant implementation will spawn a separate process whose sole job is to promote resources. The application communicates resource identity between the two process by means of the Sharing Resources shared surfaces API and promotes them by means of the SetPriority.
+Set the number of frames that the system is allowed to queue for rendering.
+The maximum number of back buffer frames that a driver can queue. The value is typically 3, but can range from 1 to 20. A value of 0 will reset latency to the default. For multi-head devices, MaxLatency is specified per-head.
Possible return values include:
Frame latency is the number of frames that are allowed to be stored in a queue, before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue.
It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Retrieves the number of frames of data that the system is allowed to queue.
+Returns the number of frames that can be queued for render. The value is typically 3, but can range from 1 to 20.
Possible return values include:
Frame latency is the number of frames that are allowed to be stored in a queue, before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue.
It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.
+The destination window handle to check for occlusion. When this parameter is
Possible return values include:
This method replaces
We recommend not to call CheckDeviceState every frame. Instead, call CheckDeviceState only if the
See Lost Device Behavior Changes for more information about lost, hung, and removed devices.
+Creates a render-target surface.
+Width of the render-target surface, in pixels.
Height of the render-target surface, in pixels.
Member of the
Member of the
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by
Render targets are not lockable unless the application specifies TRUE for Lockable.
Note that lockable render targets reduce performance on some graphics hardware. The readback performance (moving data from video memory to system memory) depends on the type of hardware used (AGP vs. PCI Express) and is usually far lower than upload performance (moving data from system to video memory). If you need read access to render targets, use GetRenderTargetData instead of lockable render targets.
Reserved. Set this parameter to
Combination of one or more
Address of a reference to an
Render-target surfaces are placed in the
The creation of lockable, multisampled render targets is not supported.
+Create an off-screen surface.
+Width of the surface.
Height of the surface.
Format of the surface. See
Surface pool type. See
Reserved. Set this parameter to
Combination of one or more
Pointer to the
Off-screen plain surfaces are always lockable, regardless of their pool types.
+Creates a depth-stencil surface.
+Width of the depth-stencil surface, in pixels.
Height of the depth-stencil surface, in pixels.
Member of the
Member of the
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by
Set this flag to TRUE to enable z-buffer discarding, and
This flag has the same behavior as the constant,
Reserved. Set this parameter to
Combination of one or more
Address of a reference to an
The memory class of the depth-stencil buffer is always
Resets the type, size, and format of the swap chain with all other surfaces persistent.
+Pointer to a
When switching to full-screen mode, Direct3D will try to find a desktop format that matches the back buffer format, so that back buffer and front buffer formats will be identical (to eliminate the need for color conversion).
When this method returns:
Pointer to a
The method can return:
If this method returns
If a call to
Unlike previous versions of DirectX, calling
Pixel shaders and vertex shaders survive
There are two different types of swap chains: full-screen or windowed. If the new swap chain is full-screen, the adapter will be placed in the display mode that matches the new size.
Applications can expect messages to be sent to them during this call (for example, before this call is returned); applications should take precautions not to call into Direct3D at this time.
A call to
When trying to reset more than one display adapter in a group, set pPresentationParameters to point to an array of
If a multihead device was created with
Retrieves the display mode's spatial resolution, color resolution, refresh frequency, and rotation settings.
+An unsigned integer specifying the swap chain.
Pointer to a
Pointer to a
Applications use the methods of the
The
The LPDIRECT3D9 and PDIRECT3D9 types are defined as references to the
typedef struct+*LPDIRECT3D9, *PDIRECT3D9;
LPDIRECT3D9 g_pD3D = NULL; if( NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) return E_FAIL;
+
+ The IDirect3D9 interface supports enumeration of active display adapters and allows the creation of Returns the number of adapters on the system.
+Registers a pluggable software device. Software devices provide software rasterization enabling applications to access a variety of software rasterizers.
+Pointer to the initialization function for the software device to be registered.
If the method succeeds, the return value is
If the user's computer provides no special hardware acceleration for 3D operations, your application might emulate 3D hardware in software. Software rasterization devices emulate the functions of color 3D hardware in software. A software device runs more slowly than a hal. However, software devices take advantage of any special instructions supported by the CPU to increase performance. Instruction sets include the AMD 3DNow! instruction set on some AMD processors and the MMX instruction set supported by many Intel processors. Direct3D uses the 3D-Now! instruction set to accelerate transformation and lighting operations and the MMX instruction set to accelerate rasterization.
Software devices communicate with Direct3D through an interface similar to the hardware device driver interface (DDI).
Software devices are loaded by the application and registered with the
The Direct3D Driver Development Kit (DDK) provides the documentation and headers for developing pluggable software devices.
+Returns the number of adapters on the system.
+A UINT value that denotes the number of adapters on the system at the time this
Describes the physical display adapters present in the system when the
Returns the number of display modes available on this adapter.
+Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.
Identifies the format of the surface type using
This method returns the number of display modes on this adapter or zero if Adapter is greater than or equal to the number of adapters on the system.
Queries the device to determine whether the specified adapter supports the requested format and display mode. This method could be used in a loop to enumerate all the available adapter modes.
+Ordinal number denoting the display adapter to enumerate. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns
Allowable pixel formats. See Remarks.
Represents the display-mode index which is an unsigned integer between zero and the value returned by GetAdapterModeCount minus one.
A reference to the available display mode of type
An application supplies a display mode and a format to EnumAdapterModes which returns a display mode. This method could be used in a loop to enumerate all available display modes.
The application specifies a format and the enumeration is restricted to those display modes that exactly match the format (alpha is ignored). Allowed formats (which are members of
In addition, EnumAdapterModes treats pixel formats 565 and 555 as equivalent, and returns the correct version. The difference comes into play only when the application locks the back buffer and there is an explicit flag that the application must set in order to accomplish this.
+Retrieves the current display mode of the adapter.
+Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter.
Pointer to a
GetAdapterDisplayMode will not return the correct format when the display is in an extended format, such as 2:10:10:10. Instead, it returns the format X8R8G8B8.
+Verifies whether a hardware accelerated device type can be used on this adapter.
+Ordinal number denoting the display adapter to enumerate. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns
Member of the
Member of the
Back buffer format. For more information about formats, see
Value indicating whether the device type will be used in full-screen or windowed mode. If set to TRUE, the query is performed for windowed applications; otherwise, this value should be set
If the device can be used on this adapter,
A hal device type requires hardware acceleration. Applications can use CheckDeviceType to determine if the needed hardware and drivers are present to support a hal device.
Full-screen applications should not specify a DisplayFormat that contains an alpha channel. This will result in a failed call. Note that an alpha channel can be present in the back buffer but the two display formats must be identical in all other respects. For example, if DisplayFormat =
The following code fragment shows how you could use CheckDeviceType to test whether a certain device type can be used on this adapter.
if(SUCCEEDED(pD3Device->CheckDeviceType(D3DADAPTER_DEFAULT,, DisplayFormat, BackBufferFormat, bIsWindowed))) return ; + // There is no HAL on this adapter using this render-target format. + // Try again, using another format. +
This code returns
Using CheckDeviceType to test for compatibility between a back buffer that differs from the display format will return appropriate values. This means that the call will reflect device capabilities. If the device cannot render to the requested back-buffer format, the call will still return
Determines whether a surface format is available as a specified resource type and can be used as a texture, depth-stencil buffer, or render target, or any combination of the three, on a device representing this adapter.
+Ordinal number denoting the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns
Member of the
Member of the
Requested usage options for the surface. Usage options are any combination of
Resource type requested for use with the queried format. Member of
Format of the surfaces which may be used, as defined by Usage. Member of
If the format is compatible with the specified device for the requested usage, this method returns
Here are some examples using CheckDeviceFormat to check for hardware support of:
IsDepthFormatExisting( DepthFormat, AdapterFormat ) + { hr = pD3D->CheckDeviceFormat( D3DADAPTER_DEFAULT, , AdapterFormat, , , DepthFormat); return SUCCEEDED( hr ); + }
See Selecting a Device (Direct3D 9) for more detail on the enumeration process.
IsTextureFormatOk( TextureFormat, AdapterFormat ) + { hr = pD3D->CheckDeviceFormat( D3DADAPTER_DEFAULT, , AdapterFormat, 0, , TextureFormat); return SUCCEEDED( hr ); + }
When migrating code from Direct3D 9 to Direct3D 10, the Direct3D 10 equivalent to CheckDeviceFormat is CheckFormatSupport.
+Determines if a multisampling technique is available on this device.
+Ordinal number denoting the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns
Member of the
Member of the
bool value. Specify TRUE to inquire about windowed multisampling, and specify
Member of the
pQualityLevels returns the number of device-specific sampling variations available with the given sample type. For example, if the returned value is 3, then quality levels 0, 1 and 2 can be used when creating resources with the given sample count. The meanings of these quality levels are defined by the device manufacturer and cannot be queried through D3D. For example, for a particular device different quality levels at a fixed sample count might refer to different spatial layouts of the sample locations or different methods of resolving. This can be
If the device can perform the specified multisampling method, this method returns
This method is intended for use with both render-target and depth-stencil surfaces because you must create both surfaces multisampled if you want to use them together.
The following code fragment shows how you could use CheckDeviceMultiSampleType to test for devices that support a specific multisampling method.
if( SUCCEEDED(pD3D->CheckDeviceMultiSampleType( pCaps->AdapterOrdinal, pCaps->DeviceType, BackBufferFormat,, , null ) ) && SUCCEEDED(pD3D->CheckDeviceMultiSampleType( pCaps->AdapterOrdinal, pCaps->DeviceType, DepthBufferFormat,, , null ) ) ) return; +
The preceding code will return
See the remarks in
Determines whether a depth-stencil format is compatible with a render-target format in a particular display mode.
+Ordinal number denoting the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter.
Member of the
Member of the
Member of the
Member of the
If the depth-stencil format is compatible with the render-target format in the display mode, this method returns
This method is provided to enable applications to work with hardware requiring that certain depth formats can only work with certain render-target formats.
The behavior of this method has been changed for DirectX 8.1. This method now pays attention to the D24x8 and D32 depth-stencil formats. The previous version assumed that these formats would always be usable with 32- or 16-bit render targets. This method will now return
The following code fragment shows how you could use CheckDeviceFormat to validate a depth stencil format.
IsDepthFormatOk( DepthFormat, AdapterFormat, BackBufferFormat) + { // Verify that the depth format exists hr = pD3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, , AdapterFormat, , , DepthFormat); if(FAILED(hr)) return ; // Verify that the depth format is compatible hr = pD3D->CheckDepthStencilMatch(D3DADAPTER_DEFAULT, , AdapterFormat, BackBufferFormat, DepthFormat); return SUCCEEDED(hr); } +
The preceding call will return
Tests the device to see if it supports conversion from one display format to another.
+Display adapter ordinal number. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns
Device type. Member of the
Source adapter format. Member of the
Target adapter format. Member of the
If the method succeeds, the return value is
Using CheckDeviceType to test for compatibility between a back buffer that differs from the display format will return appropriate values. This means that the call will reflect device capabilities. If the device cannot render to the requested back buffer format, the call will still return
CheckDeviceFormatConversion can also be used to determine which combinations of source surface formats and destination surface formats are permissible in calls to StretchRect.
Color conversion is restricted to the following source and target formats.
?
Retrieves device-specific information about a device.
+Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.
Member of the
Pointer to a
The application should not assume the persistence of vertex processing capabilities across Direct3D device objects. The particular capabilities that a physical device exposes may depend on parameters supplied to CreateDevice. For example, the capabilities may yield different vertex processing capabilities before and after creating a Direct3D Device Object with hardware vertex processing enabled. For more information see the description of
Returns the handle of the monitor associated with the Direct3D object.
+Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.
Handle of the monitor associated with the Direct3D object.
As shown in the following code fragment, which illustrates how to obtain a handle to the monitor associated with a given device, use GetDirect3D to return the Direct3D enumerator from the device and use GetCreationParameters to retrieve the value for Adapter.
if( FAILED( pDevice->GetCreationParameters( &Parameters ) ) ) return+; if( FAILED( pDevice->GetDirect3D(&pD3D) ) ) return ; hMonitor = pD3D->GetAdapterMonitor(Parameters.AdapterOrdinal); pD3D->Release(); +
Creates a device to represent the display adapter.
+Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.
Member of the
The focus window alerts Direct3D when an application switches from foreground mode to background mode. See Remarks.
Combination of one or more options that control device creation. For more information, see
Pointer to a
For Windows 2000 and Windows XP, the full-screen device display refresh rate is set in the following order:
An unsupported refresh rate will default to the closest supported refresh rate below it. For example, if the application specifies 63 hertz, 60 hertz will be used. There are no supported refresh rates below 57 hertz.
pPresentationParameters is both an input and an output parameter. Calling this method may change several members including:
Address of a reference to the returned
If the method succeeds, the return value is
This method returns a fully working device interface, set to the required display mode (or windowed), and allocated with the appropriate back buffers. To begin rendering, the application needs only to create and set a depth buffer (assuming EnableAutoDepthStencil is
When you create a Direct3D device, you supply two different window parameters: a focus window (hFocusWindow) and a device window (the hDeviceWindow in
This method should not be run during the handling of WM_CREATE. An application should never pass a window handle to Direct3D while handling WM_CREATE. Any call to create, release, or reset the device must be done using the same thread as the window procedure of the focus window.
Note that
Back buffers created as part of the device are only lockable if
The methods Reset,
If you attempt to create a device on a 0x0 sized window, CreateDevice will fail.
+Applications use the methods of the
The
The LPDIRECT3D9EX and PDIRECT3D9EX types are defined as references to the
typedef struct+*LPDIRECT3D9EX, *PDIRECT3D9EX; +
Returns the number of display modes available.
+Ordinal number denoting the display adapter from which to retrieve the display mode count.
Specifies the characteristics of the desired display mode. See
The number of display modes available. A return of value zero from this method is an indication that no such display mode is supported or simply this monitor is no longer available.
Events such as display mode changes on other heads of the same hardware, monitor change or its connection status change, and desktop extension/unextension could all affect the number of display mode available.
To fullscreen applications,
To increase the chance of setting a currently available display mode successfully, fullscreen applications should try to requery the available display mode list upon receiving
This method returns the actual display mode info based on the given mode index.
+Ordinal number denoting the display adapter to enumerate. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns
See
Represents the display-mode index which is an unsigned integer between zero and the value returned by GetAdapterModeCount minus one.
A reference to the available display mode of type
Retrieves the current display mode and rotation settings of the adapter.
+Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter.
Pointer to a
Pointer to a
GetAdapterDisplayModeEx does not return the correct format when the display is in an extended format, such as 2:10:10:10. Instead, it returns the format X8R8G8B8.
To windowed applications, a value of
Creates a device to represent the display adapter.
+Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.
Specifies the type of device. See
The focus window alerts Direct3D when an application switches from foreground mode to background mode. For full-screen mode, the window specified must be a top-level window. For windowed mode, this parameter may be
Combination of one or more options (see
Pointer to a
This parameter is both an input and an output parameter. Calling this method may change several members including:
The display mode for when the device is set to fullscreen. See
Address of a reference to the returned
This method returns
This method returns a unique identifier for the adapter that is specific to the adapter hardware. Applications can use this identifier to define robust mappings across various APIs (Direct3D 9, DXGI).
+Ordinal number denoting the display adapter from which to retrieve the
A unique identifier for the given adapter.
Describes the display mode.
+Screen width, in pixels.
Screen height, in pixels.
Refresh rate. The value of 0 indicates an adapter default.
Member of the
Information about the properties of a display mode.
+This structure is used in various methods to create and manage Direct3D 9Ex devices (
The size of this structure. This should always be set to sizeof(
Width of the display mode.
Height of the display mode.
Refresh rate of the display mode.
Format of the display mode. See
Indicates whether the scanline order is progressive or interlaced. See
Used to set and query effects, and to choose techniques. An effect object can contain multiple techniques to render the same effect.
+The
The LPD3DXEFFECT type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXEFFECT; +
Gets a reference to the pool of shared parameters.
+Pools contain shared parameters between effects. See Cloning and Sharing (Direct3D 9).
+Retrieves the device associated with the effect.
+Calling this method will increase the internal reference count for the
Get or sets the effect state manager.
+The
Gets a reference to the pool of shared parameters.
+Pointer to a
This method always returns the value
Pools contain shared parameters between effects. See Cloning and Sharing (Direct3D 9).
+Sets the active technique.
+Unique handle to the technique. See Handles (Direct3D 9).
If the method succeeds, the return value is
Gets the current technique.
+A unique identifier to the current technique. See Handles (Direct3D 9).
Validate a technique.
+Unique identifier. See Handles (Direct3D 9).
If the method succeeds, the return value is
Searches for the next valid technique, starting at the technique after the specified technique.
+Unique identifier to a technique. See Handles (Direct3D 9). Specify
Pointer to an identifier for the next technique.
Determines if a parameter is used by the technique.
+Unique identifier for the parameter. See Handles (Direct3D 9).
Unique identifier for the technique. See Handles (Direct3D 9).
Returns TRUE if the parameter is being used and returns
Starts an active technique.
+DWORD that determines if state modified by an effect is saved and restored. The default value 0 specifies that
Pointer to a value returned that indicates the number of passes needed to render the current technique.
An application sets one active technique in the effect system by calling
Within the
Begins a pass, within the active technique.
+A zero-based integer index into the technique.
If the method succeeds, the return value is
An application sets one active pass (within one active technique) in the effect system by calling
If the application changes any effect state using any of the Effect::Setx methods inside of a
Propagate state changes that occur inside of an active pass to the device before rendering.
+If the method succeeds, the return value is
If the application changes any effect state using any of the ID3DXEffect::Setx methods inside of an
This is slightly different for any shared parameters in a cloned effect. When a technique is active on a cloned effect (that is, when
End an active pass.
+This method always returns the value
An application signals the end of rendering an active pass by calling
Each matching pair of
If the application changes any effect state using any of the Effect::Setx methods inside of a
Ends an active technique.
+This method always returns the value
All rendering in an effect is done within a matching pair of
By default, the effect system takes care of saving state prior to a technique, and restoring state after a technique. If you choose to disable this save and restore functionality, see
Retrieves the device associated with the effect.
+Address of a reference to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count for the
Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost, or before resetting a device.
+If the method succeeds, the return value is
This method should be called whenever the device is lost or before the user calls
Use this method to re-acquire resources and save initial state.
+If the method succeeds, the return value is
Set the effect state manager.
+A reference to the state manager. See
If the method succeeds, the return value is
The
Get the effect state manager.
+Returns a reference to the state manager. See
If the method succeeds, the return value is
The
Start capturing state changes in a parameter block.
+If the method succeeds, the return value is
Capture effect parameter state changes until EndParameterBlock is called. Effect parameters include any state changes outside of a pass. Delete parameter blocks if they are no longer needed by calling DeleteParameterBlock.
+Stop capturing effect parameter state changes.
+Returns a handle to the parameter state block.
All effect parameters that change state (after calling BeginParameterBlock and before calling EndParameterBlock) will be saved in an effect parameter state block. Use ApplyParameterBlock to apply this block of state changes to the effect system. Once you are finished with a state block use DeleteParameterBlock to free the memory.
+Apply the values in a state block to the current effect system state.
+A handle to the parameter block. This is the handle returned by
If the method succeeds, the return value is
Capture effect parameter state changes in a parameter block by calling BeginParameterBlock; stop capturing state changes by calling EndParameterBlock. These state changes include any effect parameter changes that occur inside of a technique (including those outside of a pass). Once you are done with the parameter block, call DeleteParameterBlock to recover memory.
+Delete a parameter block.
+A handle to the parameter block. This is the handle returned by
If the method succeeds, the return value is
Parameter blocks are blocks of effect states. Use a parameter block to record state changes so that they can be applied later on with a single API call. When no longer needed, delete the parameter block to reduce memory usage.
+Creates a copy of an effect.
+Pointer to an
Pointer to an
Note??This function will not clone an effect if the user specifies
To update shared and non-shared parameters in an active technique of a cloned effect, see
Set a contiguous range of shader constants with a memory copy.
+Handle to the value to set, or the name of the value passed in as a string. Passing in a handle is more efficient. See Handles (Direct3D 9).
Pointer to a buffer containing the data to be set. SetRawValue checks for valid memory, but does not do any checking for valid data.
Number of bytes between the beginning of the effect data and the beginning of the effect constants you are going to set.
The size of the buffer to be set, in bytes.
If the method succeeds, the return value is
SetRawValue is a very fast way to set effect constants since it performs a memory copy without performing validation or any data conversion (like converting a row-major matrix to a column-major matrix). Use SetRawValue to set a series of contiguous effect constants. For instance, you could set an array of twenty matrices with 20 calls to
All values are expected to be either matrix4x4s or float4s and all matrices are expected to be in column-major order. Int or float values are cast into a float4; therefore, it is highly recommended that you use SetRawValue with only float4 or matrix4x4 data.
+The
The
The LPD3DXEFFECTCOMPILER type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXEFFECTCOMPILER; +
Toggles the literal status of a parameter. A literal parameter has a value that doesn't change during the lifetime of an effect.
+Unique identifier to a parameter. See Handles (Direct3D 9).
Set to TRUE to make the parameter a literal, and
If the method succeeds, the return value is
This methods only changes whether the parameter is a literal or not. To change the value of a parameter, use a method like
This function must be called before the effect is compiled. Here is an example of how one might use this function:
LPD3DXEFFECTCOMPILER pEffectCompiler; char errors[1000];+hr; hr = ("shader.fx", null ,null , 0, &pEffectCompiler, &errors); //In the fx file, literalInt is declared as an int. //By calling this function, the compiler will treat //it as a literal (i.e. #define) hr = pEffectCompiler->SetLiteral("literalInt", TRUE); //create ten different variations of the same effect LPD3DXBUFFER pEffects[10]; LPD3DXBUFFER pErrors; for(int i = 0; i < 10; ++i) { hr = pEffectCompiler->SetInt("literalInt", i); hr = pEffectCompiler->CompileEffect(0, &pEffects[i], &pErrors); } +
Gets a literal status of a parameter. A literal parameter has a value that doesn't change during the lifetime of an effect.
+Unique identifier to a parameter. See Handles (Direct3D 9).
Returns True if the parameter is a literal, and False otherwise.
This methods only changes whether the parameter is a literal or not. To change the value of a parameter, use a method like
Compile an effect.
+Compile options identified by various flags. The Direct3D 10 HLSL compiler is now the default. See
Buffer containing the compiled effect. For more information about accessing the buffer, see
Buffer containing at least the first compile error message that occurred. This includes effect compiler errors and high-level language compile errors. For more information about accessing the buffer, see
If the method succeeds, the return value is
If the arguments are invalid, the method will return
If the method fails, the return value will be E_FAIL.
Compiles a shader from an effect that contains one or more functions.
+Unique identifier to the function to be compiled. This value must not be
Pointer to a shader profile which determines the shader instruction set. See
Compile options identified by various flags. The Direct3D 10 HLSL compiler is now the default. See
Buffer containing the compiled shader. The compiler shader is an array of DWORDs. For more information about accessing the buffer, see
Buffer containing at least the first compile error message that occurred. This includes effect compiler errors and high-level language compile errors. For more information about accessing the buffer, see
Returns an
If the method succeeds, the return value is
If the arguments are invalid, the method will return
If the method fails, the return value will be E_FAIL.
Targets can be specified for vertex shaders, pixel shaders, and texture fill functions.
Vertex shader targets | vs_1_1, vs_2_0, vs_2_sw, vs_3_0 |
Pixel shader targets | ps_1_1, ps_1_2, ps_1_3, ps_1_4, ps_2_0, ps_2_sw, ps_3_0 |
Texture fill targets | tx_0, tx_1 |
?
This method compiles a shader from a function that is written in a C-like language. For more information, see HLSL.
+Data type for managing a set of default effect parameters.
+Name of the effect file.
Number of default parameters.
Pointer to an array of
Applications use the
The
The LPD3DXEFFECTPOOL type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXEFFECTPOOL; +
The
The
The LPD3DXFONT type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DXFONT; +
Retrieves the Direct3D device associated with the font object.
+Note??Calling this method will increase the internal reference count on the
Gets a description of the current font object. GetDescW and GetDescA are identical to this method, except that a reference is returned to a
This method describes Unicode font objects if UNICODE is defined. Otherwise GetDescA is called, which returns a reference to the D3DXFONT_DESCA structure.
+Returns a handle to a display device context (DC) that has the font set.
+Retrieves the Direct3D device associated with the font object.
+Address of a reference to an
If the method succeeds, the return value is
Note??Calling this method will increase the internal reference count on the
Gets a description of the current font object. GetDescW and GetDescA are identical to this method, except that a reference is returned to a
If the method succeeds, the return value is
This method describes Unicode font objects if UNICODE is defined. Otherwise GetDescA is called, which returns a reference to the D3DXFONT_DESCA structure.
+Retrieves font characteristics that are identified in a
Nonzero if the function is successful; otherwise 0.
The compiler setting also determines the structure type. If Unicode is defined, the function returns a
Returns a handle to a display device context (DC) that has the font set.
+Handle to a display DC.
Returns information about the placement and orientation of a glyph in a character cell.
+Glyph identifier.
Address of a reference to a
Pointer to the smallest rectangle object that completely encloses the glyph.
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
Loads 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
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; DrawText must still be called to render the characters. However, by pre-loading characters into video memory, DrawText will use substantially fewer CPU resources.
This method internally converts characters to glyphs using the GDI function GetCharacterPlacement.
+Loads 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
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; DrawText must still be called to render the glyphs. However, by pre-loading glyphs into video memory, DrawText will use substantially fewer CPU resources.
+Loads 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
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; DrawText must still be called to render the text. However, by preloading text into video memory, DrawText will use substantially fewer CPU resources.
This method internally converts characters to glyphs using the GDI function GetCharacterPlacement.
+Draws formatted text. This method supports ANSI and Unicode strings.
+Pointer to an
Pointer to a string to draw. If the Count parameter is -1, the string must be null-terminated.
Specifies the number of characters in the string. If Count is -1, then the pString parameter is assumed to be a reference to a null-terminated string and DrawText computes the character count automatically.
Pointer to a
Specifies the method of formatting the text. It can be any combination of the following values:
Value | Meaning |
---|---|
| Justifies the text to the bottom of the rectangle. This value must be combined with DT_SINGLELINE. |
| 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. |
| Centers text horizontally in the rectangle. |
| Expands tab characters. The default number of characters per tab is eight. |
| Aligns text to the left. |
| Draws without clipping. DrawText is somewhat faster when DT_NOCLIP is used. |
| Aligns text to the right. |
| 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. |
| Displays text on a single line only. Carriage returns and line feeds do not break the line. |
| Top-justifies text. |
| Centers text vertically (single line only). |
| 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. |
?
Color of the text. For more information, 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.
This method must be called inside a BeginScene ... EndScene block. The only exception is when an application calls DrawText with DT_CALCRECT to calculate the size of a given block of text.
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.
+Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost, or before resetting a device.
+If the method succeeds, the return value is
This method should be called whenever the device is lost or before the user calls Reset. Even if the device was not actually lost, OnLostDevice is responsible for freeing stateblocks and other resources that may need to be released before resetting the device. As a result, the font object cannot be used again before calling Reset and then OnResetDevice.
+Use this method to re-acquire resources and save initial state.
+If the method succeeds, the return value is
OnResetDevice should be called each time the device is reset (using Reset), before any other methods are called. This is a good place to re-acquire video-memory resources and capture state blocks.
+Defines constants that describe the type of back buffer.
+Direct3D 9 does not support stereo view, so Direct3D does not use the
Specifies a nonstereo swap chain.
Specifies the left side of a stereo pair in a swap chain.
Specifies the right side of a stereo pair in a swap chain.
Defines the basis type of a high-order patch surface.
+The members of
Input vertices are treated as a series of B?zier patches. The number of vertices specified must be divisible by 4. Portions of the mesh beyond this criterion will not be rendered. Full continuity is assumed between sub-patches in the interior of the surface rendered by each call. Only the vertices at the corners of each sub-patch are guaranteed to lie on the resulting surface.
Input vertices are treated as control points of a B-spline surface. The number of apertures rendered is two fewer than the number of apertures in that direction. In general, the generated surface does not contain the control vertices specified.
An interpolating basis defines the surface so that the surface goes through all the input vertices specified. In DirectX 8, this was D3DBASIS_INTERPOLATE.
Defines the supported blend mode.
+In the preceding member descriptions, the RGBA values of the source and destination are indicated by the s and d subscripts.
The values in this enumerated type are used by the following render states:
See
Blend factor is (0, 0, 0, 0).
Blend factor is (1, 1, 1, 1).
Blend factor is (Rs, Gs, Bs, As).
Blend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As).
Blend factor is (As, As, As, As).
Blend factor is ( 1 - As, 1 - As, 1 - As, 1 - As).
Blend factor is (Ad Ad Ad Ad).
Blend factor is (1 - Ad 1 - Ad 1 - Ad 1 - Ad).
Blend factor is (Rd, Gd, Bd, Ad).
Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad).
Blend factor is (f, f, f, 1); where f = min(As, 1 - Ad).
Obsolete. Starting with DirectX 6, you can achieve the same effect by setting the source and destination blend factors to
Obsolete. Source blend factor is (1 - As, 1 - As, 1 - As, 1 - As), and destination blend factor is (As, As, As, As); the destination blend selection is overridden. This blend mode is supported only for the
Constant color blending factor used by the frame-buffer blender. This blend mode is supported only if
Inverted constant color-blending factor used by the frame-buffer blender. This blend mode is supported only if the
Blend factor is (PSOutColor[1]r, PSOutColor[1]g, PSOutColor[1]b, not used). See Render.
Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. |
?
Blend factor is (1 - PSOutColor[1]r, 1 - PSOutColor[1]g, 1 - PSOutColor[1]b, not used)). See Render.
Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. |
?
Represents the capabilities of the hardware exposed through the Direct3D object.
+The MaxTextureBlendStages and MaxSimultaneousTextures members might seem similar, but they contain different information. The MaxTextureBlendStages member contains the total number of texture-blending stages supported by the current device, and the MaxSimultaneousTextures member describes how many of those stages can have textures bound to them by using the SetTexture method.
When the driver fills this structure, it can set values for execute-buffer capabilities, even when the interface being used to retrieve the capabilities (such as
In general, performance problems may occur if you use a texture and then modify it during a scene. Ensure that no texture used in the current BeginScene and EndScene block is evicted unless absolutely necessary. In the case of extremely high texture usage within a scene, the results are undefined. This occurs when you modify a texture that you have used in the scene and there is no spare texture memory available. For such systems, the contents of the z-buffer become invalid at EndScene. Applications should not call UpdateSurface to or from the back buffer on this type of hardware inside a BeginScene/EndScene pair. In addition, applications should not try to access the z-buffer if the
The following flags concerning mipmapped textures are not supported in Direct3D 9.
Member of the
Adapter on which this Direct3D device was created. This ordinal is valid only to pass to methods of the
The following driver-specific capability.
Value | Meaning |
---|---|
Display hardware is capable of returning the current scan line. | |
The display driver supports an overlay DDI that allows for verification of overlay capabilities. For more information about the overlay DDI, see Overlay DDI. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? |
?
Driver-specific capabilities identified in
Driver-specific capabilities identified in
Bit mask of values representing what presentation swap intervals are available.
Value | Meaning |
---|---|
The driver supports an immediate presentation swap interval. | |
The driver supports a presentation swap interval of every screen refresh. | |
The driver supports a presentation swap interval of every second screen refresh. | |
The driver supports a presentation swap interval of every third screen refresh. | |
The driver supports a presentation swap interval of every fourth screen refresh. |
?
Bit mask indicating what hardware support is available for cursors. Direct3D 9 does not define alpha-blending cursor capabilities.
Value | Meaning |
---|---|
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports at least a hardware color cursor in high-resolution modes (with scan lines greater than or equal to 400). | |
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports a hardware color cursor in both high-resolution and low-resolution modes (with scan lines less than 400). |
?
Flags identifying the capabilities of the device.
Value | Meaning |
---|---|
Device supports blits from system-memory textures to nonlocal video-memory textures. | |
Device can queue rendering commands after a page flip. Applications do not change their behavior if this flag is set; this capability means that the device is relatively fast. | |
Device can support at least a DirectX 5-compliant driver. | |
Device can support at least a DirectX 7-compliant driver. | |
Device exports an | |
Device can use execute buffers from system memory. | |
Device can use execute buffers from video memory. | |
Device has hardware acceleration for scene rasterization. | |
Device can support transformation and lighting in hardware. | |
Device supports N patches. | |
Device can support rasterization, transform, lighting, and shading in hardware. | |
Device supports quintic B?zier curves and B-splines. | |
Device supports rectangular and triangular patches. | |
When this device capability is set, the hardware architecture does not require caching of any information, and uncached patches (handle zero) will be drawn as efficiently as cached ones. Note that setting | |
Device is texturing from separate memory pools. | |
Device can retrieve textures from non-local video memory. | |
Device can retrieve textures from system memory. | |
Device can retrieve textures from device memory. | |
Device can use buffers from system memory for transformed and lit vertices. | |
Device can use buffers from video memory for transformed and lit vertices. |
?
Miscellaneous driver primitive capabilities. See
Information on raster-drawing capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports anisotropic filtering. | |
Device iterates colors perspective correctly. | |
Device can dither to improve color resolution. | |
Device supports legacy depth bias. For true depth bias, see | |
Device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. | |
Device calculates the fog value by referring to a lookup table containing fog values that are indexed to the depth of a given pixel. | |
Device calculates the fog value during the lighting operation and interpolates the fog value during rasterization. | |
Device supports level-of-detail bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would. For more information about level-of-detail bias in mipmaps, see | |
Device supports toggling multisampling on and off between | |
Device supports scissor test. See Scissor Test (Direct3D 9). | |
Device performs true slope-scale based depth bias. This is in contrast to the legacy style depth bias. | |
Device supports depth buffering using w. | |
Device supports w-based fog. W-based fog is used when a perspective projection matrix is specified, but affine projections still use z-based fog. The system considers a projection matrix that contains a nonzero value in the [3][4] element to be a perspective projection matrix. | |
Device can perform hidden-surface removal (HSR) without requiring the application to sort polygons and without requiring the allocation of a depth-buffer. This leaves more video memory for textures. The method used to perform HSR is hardware-dependent and is transparent to the application. Z-bufferless HSR is performed if no depth-buffer surface is associated with the rendering-target surface and the depth-buffer comparison test is enabled (that is, when the state value associated with the | |
Device supports z-based fog. | |
Device can perform z-test operations. This effectively renders a primitive and indicates whether any z pixels have been rendered. |
?
Z-buffer comparison capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Always pass the z-test. | |
Pass the z-test if the new z equals the current z. | |
Pass the z-test if the new z is greater than the current z. | |
Pass the z-test if the new z is greater than or equal to the current z. | |
Pass the z-test if the new z is less than the current z. | |
Pass the z-test if the new z is less than or equal to the current z. | |
Always fail the z-test. | |
Pass the z-test if the new z does not equal the current z. |
?
Source-blending capabilities. This member can be one or more of the following flags. (The RGBA values of the source and destination are indicated by the subscripts s and d.)
Value | Meaning |
---|---|
The driver supports both | |
Source blend factor is (1 - As, 1 - As, 1 - As, 1 - As) and destination blend factor is (As, As, As, As); the destination blend selection is overridden. | |
The driver supports the | |
Blend factor is (Ad, Ad, Ad, Ad). | |
Blend factor is (Rd, Gd, Bd, Ad). | |
Blend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad). | |
Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad). | |
Blend factor is (1 - As, 1 - As, 1 - As, 1 - As). | |
Blend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As). | |
Blend factor is (1 - PSOutColor[1]r, 1 - PSOutColor[1]g, 1 - PSOutColor[1]b, not used)). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (1, 1, 1, 1). | |
Blend factor is (As, As, As, As). | |
Blend factor is (f, f, f, 1); f = min(As, 1 - Ad). | |
Blend factor is (Rs, Gs, Bs, As). | |
Blend factor is (PSOutColor[1]r, PSOutColor[1]g, PSOutColor[1]b, not used). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (0, 0, 0, 0). |
?
Destination-blending capabilities. This member can be the same capabilities that are defined for the SrcBlendCaps member.
Alpha-test comparison capabilities. This member can include the same capability flags defined for the ZCmpCaps member. If this member contains only the
Shading operations capabilities. It is assumed, in general, that if a device supports a given command at all, it supports the
The color, specular highlights, fog, and alpha interpolants of a triangle each have capability flags that an application can use to find out how they are implemented by the device driver.
This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device can support an alpha component for Gouraud-blended transparency (the | |
Device can support colored Gouraud shading. In this mode, the per-vertex color components (red, green, and blue) are interpolated across a triangle face. | |
Device can support fog in the Gouraud shading mode. | |
Device supports Gouraud shading of specular highlights. |
?
Miscellaneous texture-mapping capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Alpha in texture pixels is supported. | |
Device can draw alpha from texture palettes. | |
Supports cube textures. | |
Device requires that cube texture maps have dimensions specified as powers of two. | |
Device supports mipmapped cube textures. | |
Device supports mipmapped textures. | |
Device supports mipmapped volume textures. | |
If this flag is not set, and A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem - ps and texm3x3 - ps instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem - ps, texbeml - ps, and texm3x3spec - ps. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these types of textures. | |
Device does not support a projected bump-environment loopkup operation in programmable and fixed function shaders. | |
Perspective correction texturing is supported. | |
If If If this flag is not set, and | |
Supports the | |
All textures must be square. | |
Texture indices are not scaled by the texture size prior to interpolation. | |
Device supports volume textures. | |
Device requires that volume texture maps have dimensions specified as powers of two. |
?
Defines the supported blend operations. See Remarks for definitions of terms.
+Source, Destination, and Result are defined as:
Term | Type | Description |
---|---|---|
Source | Input | Color of the source pixel before the operation. |
Destination | Input | Color of the pixel in the destination buffer before the operation. |
Result | Output | Returned value that is the blended color resulting from the operation. |
?
This enumerated type defines values used by the following render states:
The result is the destination added to the source. Result = Source + Destination
The result is the destination subtracted from to the source. Result = Source - Destination
The result is the source subtracted from the destination. Result = Destination - Source
The result is the minimum of the source and destination. Result = MIN(Source, Destination)
The result is the maximum of the source and destination. Result = MAX(Source, Destination)
Flags used to obtain callback information.
+Exclude callbacks located at the initial position from the search.
Reverse the callback search direction.
Obsolete in DirectX 8.0 and later versions; see Remarks.
The D3DLIGHTINGCAPS structure describes the lighting capabilities of a device.
+This structure has been replaced by D3DCAPS8 (see the DirectX 8.0 SDK documentation) for DirectX 8.0 and later runtimes, but is required for DirectX 7.0 and earlier runtime compatibility. See Reporting DirectX 8.0 Style Direct3D Capabilities for details.
This structure is a member of the D3DDEVICEDESC_V1 structure.
+Specifies the size, in bytes, of the D3DLIGHTINGCAPS structure.
Specifies flags describing the capabilities of the lighting module. The following flags are defined:
Value | Meaning |
---|---|
D3DLIGHTCAPS_DIRECTIONAL | Directional lights are supported. + |
D3DLIGHTCAPS_GLSPOT | OpenGL-style spotlights are supported. |
D3DLIGHTCAPS_PARALLELPOINT | Parallel-point lights are supported. |
D3DLIGHTCAPS_POINT | Point lights are supported. |
D3DLIGHTCAPS_SPOT | Spotlights are supported. + |
?
Driver capability flags.
+Driver capability flags.
+The following flags are used to specify which channels in a texture to operate on.
+Defines operations to perform on vertices in preparation for mesh cleaning.
+Merge triangles that share the same vertex indices but have face normals pointing in opposite directions (back-facing triangles). Unless the triangles are not split by adding a replicated vertex, mesh adjacency data from the two triangles may conflict.
If a vertex is the apex of two triangle fans (a bowtie) and mesh operations will affect one of the fans, then split the shared vertex into two new vertices. Bowties can cause problems for operations such as mesh simplification that remove vertices, because removing one vertex affects two distinct sets of triangles.
Use this flag to prevent infinite loops during skinning setup mesh operations.
Use this flag to prevent infinite loops during mesh optimization operations.
Use this flag to prevent infinite loops during mesh simplification operations.
These flags identify a surface to reset when calling Clear.
+Describes the current clip status.
+When clipping is enabled during vertex processing (by ProcessVertices, DrawPrimitive, or other drawing functions), Direct3D computes a clip code for every vertex. The clip code is a combination of D3DCS_* bits. When a vertex is outside a particular clipping plane, the corresponding bit is set in the clipping code. Direct3D maintains the clip status using
Clip status is not updated by DrawRectPatch and DrawTriPatch because there is no software emulation for them.
+Clip union flags that describe the current clip status. This member can be one or more of the following flags:
Value | Meaning |
---|---|
Combination of all clip flags. | |
All vertices are clipped by the left plane of the viewing frustum. | |
All vertices are clipped by the right plane of the viewing frustum. | |
All vertices are clipped by the top plane of the viewing frustum. | |
All vertices are clipped by the bottom plane of the viewing frustum. | |
All vertices are clipped by the front plane of the viewing frustum. | |
All vertices are clipped by the back plane of the viewing frustum. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. |
?
Clip intersection flags that describe the current clip status. This member can take the same flags as ClipUnion.
Render states define set-up states for all kinds of vertex and pixel processing. Some render states set up vertex processing, and some set up pixel processing (see Render States (Direct3D 9)). Render states can be saved and restored using stateblocks (see State Blocks Save and Restore State (Direct3D 9)).
+Render States | |
---|---|
ps_1_1 to ps_1_3 | 4 texture samplers |
?
Direct3D defines the D3DRENDERSTATE_WRAPBIAS constant as a convenience for applications to enable or disable texture wrapping, based on the zero-based integer of a texture coordinate set (rather than explicitly using one of the D3DRS_WRAP n state values). Add the D3DRENDERSTATE_WRAPBIAS value to the zero-based index of a texture coordinate set to calculate the D3DRS_WRAP n value that corresponds to that index, as shown in the following example.
// Enable U/V wrapping for textures that use the texture + // coordinate set at the index within the dwIndex variable+hr = pd3dDevice->SetRenderState( + dwIndex + D3DRENDERSTATE_WRAPBIAS, + | ); // If dwIndex is 3, the value that results from + // the addition equals (131) +
Defines the supported compare functions.
+The values in this enumerated type define the supported compare functions for the
Always fail the test.
Accept the new pixel if its value is less than the value of the current pixel.
Accept the new pixel if its value equals the value of the current pixel.
Accept the new pixel if its value is less than or equal to the value of the current pixel.
Accept the new pixel if its value is greater than the value of the current pixel.
Accept the new pixel if its value does not equal the value of the current pixel.
Accept the new pixel if its value is greater than or equal to the value of the current pixel.
Always pass the test.
C++ applications can use alpha testing to control when pixels are written to the render-target surface. By using the
The most common use for alpha testing is to improve performance when rasterizing objects that are nearly transparent. If the color data being rasterized is more opaque than the color at a given pixel (
// This code example assumes that pCaps is a + //structure that was filled with a + // previous call to . if (pCaps.AlphaCmpCaps & ) + { dev->SetRenderState( , (DWORD)0x00000001); dev->SetRenderState( , TRUE); dev->SetRenderState( , ); + } // If the comparison is not supported, render anyway. + // The only drawback is no performance gain. +
Not all hardware supports all alpha-testing features. You can check the device capabilities by calling the
?
?
+Specifies how to combine the glyph data from the source and destination surfaces in a call to ComposeRects.
+Defines the compression mode used for storing compressed animation set data.
+Implements fast compression.
A combination of one or more flags that control the device create behavior.
+Defines the faces of a cubemap.
+Positive x-face of the cubemap.
Negative x-face of the cubemap.
Positive y-face of the cubemap.
Negative y-face of the cubemap.
Positive z-face of the cubemap.
Negative z-face of the cubemap.
Defines the supported culling modes.
+The values in this enumerated type are used by the
Do not cull back faces.
Cull back faces with clockwise vertices.
Cull back faces with counterclockwise vertices.
Driver cursor capability flags.
+Defines the vertex declaration method which is a predefined operation performed by the tessellator (or any procedural geometry routine on the vertex data during tessellation).
+The tessellator looks at the method to determine what data to calculate from the vertex data during tessellation. Mesh data should use the default value. Patches can use any of the other implemented types.
Vertex data is declared with an array of
In addition to using
Default value. The tessellator copies the vertex data (spline data for patches) as is, with no additional calculations. When the tessellator is used, this element is interpolated. Otherwise vertex data is copied into the input register. The input and output type can be any value, but are always the same type.
Computes the tangent at a point on the rectangle or triangle patch in the U direction. The input type can be one of the following: +
The output type is always
Computes the tangent at a point on the rectangle or triangle patch in the V direction. The input type can be one of the following: +
The output type is always
Computes the normal at a point on the rectangle or triangle patch by taking the cross product of two tangents. The input type can be one of the following: +
The output type is always
Copy out the U, V values at a point on the rectangle or triangle patch. This results in a 2D float. The input type must be set to
Look up a displacement map. The input type can be one of the following: +
Only the .x and .y components are used for the texture map lookup. The output type is always
Look up a presampled displacement map. The input type must be set to
Defines a vertex declaration data type.
+Vertex data is declared with an array of
Use the DirectX Caps Viewer Tool tool to see which types are supported on your device.
+One-component float expanded to (float, 0, 0, 1).
Two-component float expanded to (float, float, 0, 1).
Three-component float expanded to (float, float, float, 1).
Four-component float expanded to (float, float, float, float).
Four-component, packed, unsigned bytes mapped to 0 to 1 range. Input is a
Four-component, unsigned byte.
Two-component, signed short expanded to (value, value, 0, 1).
Four-component, signed short expanded to (value, value, value, value).
Four-component byte with each byte normalized by dividing with 255.0f.
Normalized, two-component, signed short, expanded to (first short/32767.0, second short/32767.0, 0, 1).
Normalized, four-component, signed short, expanded to (first short/32767.0, second short/32767.0, third short/32767.0, fourth short/32767.0).
Normalized, two-component, unsigned short, expanded to (first short/65535.0, short short/65535.0, 0, 1).
Normalized, four-component, unsigned short, expanded to (first short/65535.0, second short/65535.0, third short/65535.0, fourth short/65535.0).
Three-component, unsigned, 10 10 10 format expanded to (value, value, value, 1).
Three-component, signed, 10 10 10 format normalized and expanded to (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1).
Two-component, 16-bit, floating point expanded to (value, value, 0, 1).
Four-component, 16-bit, floating point expanded to (value, value, value, value).
Type field in the declaration is unused. This is designed for use with
Constants describing the vertex data types supported by a device.
+Identifies the intended use of vertex data.
+Vertex data is declared with an array of
For more information about vertex declarations, see Vertex Declaration (Direct3D 9).
+Position data ranging from (-1,-1) to (1,1). Use
Blending weight data. Use
Blending indices data. Use
Vertex normal data. Use
Point size data. Use
Texture coordinate data. Use
Vertex tangent data.
Vertex binormal data.
Single positive floating point value. Use
Vertex data contains transformed position data ranging from (0,0) to (viewport width, viewport height). Use
Vertex data contains diffuse or specular color. Use
Vertex data contains fog data. Use
Vertex data contains depth data.
Vertex data contains sampler data. Use
Defines the degree of the variables in the equation that describes a curve.
+The values in this enumeration are used to describe the curves used by rectangle and triangle patches. For more information, see
Curve is described by variables of first order.
Curve is described by variables of second order.
Curve is described by variables of third order.
Curve is described by variables of fourth order.
Represents the capabilities of the hardware exposed through the Direct3D object.
+The MaxTextureBlendStages and MaxSimultaneousTextures members might seem similar, but they contain different information. The MaxTextureBlendStages member contains the total number of texture-blending stages supported by the current device, and the MaxSimultaneousTextures member describes how many of those stages can have textures bound to them by using the SetTexture method.
When the driver fills this structure, it can set values for execute-buffer capabilities, even when the interface being used to retrieve the capabilities (such as
In general, performance problems may occur if you use a texture and then modify it during a scene. Ensure that no texture used in the current BeginScene and EndScene block is evicted unless absolutely necessary. In the case of extremely high texture usage within a scene, the results are undefined. This occurs when you modify a texture that you have used in the scene and there is no spare texture memory available. For such systems, the contents of the z-buffer become invalid at EndScene. Applications should not call UpdateSurface to or from the back buffer on this type of hardware inside a BeginScene/EndScene pair. In addition, applications should not try to access the z-buffer if the
The following flags concerning mipmapped textures are not supported in Direct3D 9.
Member of the
Adapter on which this Direct3D device was created. This ordinal is valid only to pass to methods of the
The following driver-specific capability.
Value | Meaning |
---|---|
Display hardware is capable of returning the current scan line. | |
The display driver supports an overlay DDI that allows for verification of overlay capabilities. For more information about the overlay DDI, see Overlay DDI. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? |
?
Driver-specific capabilities identified in
Driver-specific capabilities identified in
Bit mask of values representing what presentation swap intervals are available.
Value | Meaning |
---|---|
The driver supports an immediate presentation swap interval. | |
The driver supports a presentation swap interval of every screen refresh. | |
The driver supports a presentation swap interval of every second screen refresh. | |
The driver supports a presentation swap interval of every third screen refresh. | |
The driver supports a presentation swap interval of every fourth screen refresh. |
?
Bit mask indicating what hardware support is available for cursors. Direct3D 9 does not define alpha-blending cursor capabilities.
Value | Meaning |
---|---|
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports at least a hardware color cursor in high-resolution modes (with scan lines greater than or equal to 400). | |
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports a hardware color cursor in both high-resolution and low-resolution modes (with scan lines less than 400). |
?
Flags identifying the capabilities of the device.
Value | Meaning |
---|---|
Device supports blits from system-memory textures to nonlocal video-memory textures. | |
Device can queue rendering commands after a page flip. Applications do not change their behavior if this flag is set; this capability means that the device is relatively fast. | |
Device can support at least a DirectX 5-compliant driver. | |
Device can support at least a DirectX 7-compliant driver. | |
Device exports an | |
Device can use execute buffers from system memory. | |
Device can use execute buffers from video memory. | |
Device has hardware acceleration for scene rasterization. | |
Device can support transformation and lighting in hardware. | |
Device supports N patches. | |
Device can support rasterization, transform, lighting, and shading in hardware. | |
Device supports quintic B?zier curves and B-splines. | |
Device supports rectangular and triangular patches. | |
When this device capability is set, the hardware architecture does not require caching of any information, and uncached patches (handle zero) will be drawn as efficiently as cached ones. Note that setting | |
Device is texturing from separate memory pools. | |
Device can retrieve textures from non-local video memory. | |
Device can retrieve textures from system memory. | |
Device can retrieve textures from device memory. | |
Device can use buffers from system memory for transformed and lit vertices. | |
Device can use buffers from video memory for transformed and lit vertices. |
?
Miscellaneous driver primitive capabilities. See
Information on raster-drawing capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports anisotropic filtering. | |
Device iterates colors perspective correctly. | |
Device can dither to improve color resolution. | |
Device supports legacy depth bias. For true depth bias, see | |
Device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. | |
Device calculates the fog value by referring to a lookup table containing fog values that are indexed to the depth of a given pixel. | |
Device calculates the fog value during the lighting operation and interpolates the fog value during rasterization. | |
Device supports level-of-detail bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would. For more information about level-of-detail bias in mipmaps, see | |
Device supports toggling multisampling on and off between | |
Device supports scissor test. See Scissor Test (Direct3D 9). | |
Device performs true slope-scale based depth bias. This is in contrast to the legacy style depth bias. | |
Device supports depth buffering using w. | |
Device supports w-based fog. W-based fog is used when a perspective projection matrix is specified, but affine projections still use z-based fog. The system considers a projection matrix that contains a nonzero value in the [3][4] element to be a perspective projection matrix. | |
Device can perform hidden-surface removal (HSR) without requiring the application to sort polygons and without requiring the allocation of a depth-buffer. This leaves more video memory for textures. The method used to perform HSR is hardware-dependent and is transparent to the application. Z-bufferless HSR is performed if no depth-buffer surface is associated with the rendering-target surface and the depth-buffer comparison test is enabled (that is, when the state value associated with the | |
Device supports z-based fog. | |
Device can perform z-test operations. This effectively renders a primitive and indicates whether any z pixels have been rendered. |
?
Z-buffer comparison capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Always pass the z-test. | |
Pass the z-test if the new z equals the current z. | |
Pass the z-test if the new z is greater than the current z. | |
Pass the z-test if the new z is greater than or equal to the current z. | |
Pass the z-test if the new z is less than the current z. | |
Pass the z-test if the new z is less than or equal to the current z. | |
Always fail the z-test. | |
Pass the z-test if the new z does not equal the current z. |
?
Source-blending capabilities. This member can be one or more of the following flags. (The RGBA values of the source and destination are indicated by the subscripts s and d.)
Value | Meaning |
---|---|
The driver supports both | |
Source blend factor is (1 - As, 1 - As, 1 - As, 1 - As) and destination blend factor is (As, As, As, As); the destination blend selection is overridden. | |
The driver supports the | |
Blend factor is (Ad, Ad, Ad, Ad). | |
Blend factor is (Rd, Gd, Bd, Ad). | |
Blend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad). | |
Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad). | |
Blend factor is (1 - As, 1 - As, 1 - As, 1 - As). | |
Blend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As). | |
Blend factor is (1 - PSOutColor[1]r, 1 - PSOutColor[1]g, 1 - PSOutColor[1]b, not used)). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (1, 1, 1, 1). | |
Blend factor is (As, As, As, As). | |
Blend factor is (f, f, f, 1); f = min(As, 1 - Ad). | |
Blend factor is (Rs, Gs, Bs, As). | |
Blend factor is (PSOutColor[1]r, PSOutColor[1]g, PSOutColor[1]b, not used). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (0, 0, 0, 0). |
?
Destination-blending capabilities. This member can be the same capabilities that are defined for the SrcBlendCaps member.
Alpha-test comparison capabilities. This member can include the same capability flags defined for the ZCmpCaps member. If this member contains only the
Shading operations capabilities. It is assumed, in general, that if a device supports a given command at all, it supports the
The color, specular highlights, fog, and alpha interpolants of a triangle each have capability flags that an application can use to find out how they are implemented by the device driver.
This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device can support an alpha component for Gouraud-blended transparency (the | |
Device can support colored Gouraud shading. In this mode, the per-vertex color components (red, green, and blue) are interpolated across a triangle face. | |
Device can support fog in the Gouraud shading mode. | |
Device supports Gouraud shading of specular highlights. |
?
Miscellaneous texture-mapping capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Alpha in texture pixels is supported. | |
Device can draw alpha from texture palettes. | |
Supports cube textures. | |
Device requires that cube texture maps have dimensions specified as powers of two. | |
Device supports mipmapped cube textures. | |
Device supports mipmapped textures. | |
Device supports mipmapped volume textures. | |
If this flag is not set, and A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem - ps and texm3x3 - ps instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem - ps, texbeml - ps, and texm3x3spec - ps. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these types of textures. | |
Device does not support a projected bump-environment loopkup operation in programmable and fixed function shaders. | |
Perspective correction texturing is supported. | |
If If If this flag is not set, and | |
Supports the | |
All textures must be square. | |
Texture indices are not scaled by the texture size prior to interpolation. | |
Device supports volume textures. | |
Device requires that volume texture maps have dimensions specified as powers of two. |
?
Texture-filtering capabilities for a texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-filtering capabilities for a cube texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-filtering capabilities for a volume texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-addressing capabilities for texture objects. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports setting coordinates outside the range [0.0, 1.0] to the border color, as specified by the | |
Device can clamp textures to addresses. | |
Device can separate the texture-addressing modes of the u and v coordinates of the texture. This ability corresponds to the | |
Device can mirror textures to addresses. | |
Device can take the absolute value of the texture coordinate (thus, mirroring around 0) and then clamp to the maximum value. | |
Device can wrap textures to addresses. |
?
Defines device types.
+All methods of the
A
If D3dref9.dll is installed, Direct3D will use the reference rasterizer to create a
Hardware rasterization. Shading is done with software, hardware, or mixed transform and lighting.
Direct3D features are implemented in software; however, the reference rasterizer does make use of special CPU instructions whenever it can.
The reference device is installed by the Windows SDK 8.0 or later and is intended as an aid in debugging for development only.
A pluggable software device that has been registered with
Initialize Direct3D on a computer that has neither hardware nor reference rasterization available, and enable resources for 3D content creation. See Remarks.
Specifies how the monitor being used to display a full-screen application is rotated.
+This enumeration is used in
Applications may choose to handle monitor rotation themselves by using the
Display is not rotated.
Display is rotated 90 degrees.
Display is rotated 180 degrees.
Display is rotated 270 degrees.
Effect data types. The data is contained in the pValue member of
Describes the type of events that can be keyed by the animation controller.
+Track speed.
Track weight.
Track position.
Enable flag.
Priority blend value.
Defines constants describing the fill mode.
+The values in this enumerated type are used by the
Fill points.
Fill wireframes.
Fill solids.
The following flags are used to specify which channels in a texture to operate on.
+Texture filtering constants.
+Defines constants that describe the fog mode.
+The values in this enumerated type are used by the
Fog can be considered a measure of visibility: the lower the fog value produced by a fog equation, the less visible an object is.
+No fog effect.
Fog effect intensifies exponentially, according to the following formula. +
Fog effect intensifies exponentially with the square of the distance, according to the following formula. +
Fog effect intensifies linearly between the start and end points, according to the following formula.
This is the only fog mode currently supported.
Defines the various types of surface formats.
typedef enum _D3DFORMAT {There are several types of formats:
All formats are listed from left to right, most-significant bit to least-significant bit. For example, D3DFORMAT_ARGB is ordered from the most-significant bit channel A (alpha), to the least-significant bit channel B (blue). When traversing surface data, the data is stored in memory from least-significant bit to most-significant bit, which means that the channel order in memory is from least-significant bit (blue) to most-significant bit (alpha).
The default value for formats that contain undefined channels (G16R16, A8, and so on) is 1. The only exception is the A8 format, which is initialized to 000 for the three color channels.
The order of the bits is from the most significant byte first, so
Pixel formats have been chosen to enable the expression of hardware-vendor-defined extension formats, as well as to include the well-established FOURCC method. The set of formats understood by the Direct3D runtime is defined by
Note that formats are supplied by independent hardware vendors (IHVs) and many FOURCC codes are not listed. The formats in this enumeration are unique in that they are sanctioned by the runtime, meaning that the reference rasterizer will operate on all these types. IHV-supplied formats will be supported by the individual IHVs on a card-by-card basis.
+Options for saving and creating effects.
The constants in the following table are defined in d3dx9effect.h.
+Describes the supported image file formats. See Remarks for descriptions of these formats.
+Functions that begin with D3DXLoadxxx support all of the formats listed. Functions that begin with D3DXSavexxx support all of the formats listed except the Truevision (.tga) and portable pixmap (.ppm) formats.
The following table lists the available input and output formats.
File Extension | Description |
---|---|
.bmp | Windows bitmap 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. |
.dds | DirectDraw Surface file format. Stores textures, volume textures, and cubic environment maps, with or without mipmap levels, and with or without pixel compression. See DDS. |
.dib | Windows DIB. Contains an array of bits combined with structures that specify width and height of the bitmapped image, color format of the device where the image was created, and resolution of the device used to create that image. |
.hdr | HDR format. Encodes each pixel as an RGBE 32-bit color, with 8 bits of mantissa for red, green, and blue, and a shared 8-bit exponent. Each channel is separately compressed with run-length encoding (RLE). |
.jpg | JPEG standard. Specifies variable compression of 24-bit RGB color and 8-bit gray-scale Tagged Image File Format (TIFF) image document files. |
.pfm | Portable float map format. A raw floating point image format, without any compression. The file header specifies image width, height, monochrome or color, and machine word order. Pixel data is stored as 32-bit floating point values, with 3 values per pixel for color, and one value per pixel for monochrome. |
.png | PNG format. A non-proprietary bitmap format using lossless compression. |
.ppm | Portable Pixmap format. A binary or ASCII file format for color images that includes image height and width and the maximum color component value. |
.tga | Targa or Truevision Graphics Adapter format. Supports depths of 8, 15, 16, 24, and 32 bits, including 8-bit gray scale, and contains optional color palette data, image (x, y) origin and size data, and pixel data. |
?
See Types of Bitmaps for more information on some of these formats.
+Windows bitmap (BMP) file format.
Joint Photographics Experts Group (JPEG) compressed file format.
Truevision (Targa, or TGA) image file format.
Portable Network Graphics (PNG) file format.
DirectDraw surface (DDS) file format.
Portable pixmap (PPM) file format.
Windows device-independent bitmap (DIB) file format.
High dynamic range (HDR) file format.
Portable float map file format.
Describes the location for the include file.
+Look in the local project for the include file.
Look in the system path for the include file.
This macro creates a value used by Issue to issue a query end.
#defineThis macro changes the query state to nonsignaled.
Defines the light type.
+Directional lights are slightly faster than point light sources, but point lights look a little better. Spotlights offer interesting visual effects but are computationally time-consuming.
+Light is a point source. The light has a position in space and radiates light in all directions.
Light is a spotlight source. This light is like a point light, except that the illumination is limited to a cone. This light type has a direction and several other parameters that determine the shape of the cone it produces. For information about these parameters, see the
Light is a directional light source. This is equivalent to using a point light source at an infinite distance.
A combination of zero or more locking options that describe the type of lock to perform.
+Defines the type of mesh data present in
Flags used to specify creation options for a mesh.
+A 32-bit mesh (
The mesh has 32-bit indices instead of 16-bit indices. See Remarks.
Use the
Use the
Use the
Specifying this flag causes the vertex and index buffer of the mesh to be created with
Use the
Use the
Use the
Use the
Use the
Use the
Use the
Use the
Use the
Use the
Forces the cloned meshes to share vertex buffers.
Use hardware processing only. For mixed-mode device, this flag will cause the system to use hardware (if supported in hardware) or will default to software processing.
Equivalent to specifying both
Equivalent to specifying both
Equivalent to specifying both
Equivalent to specifying both
Equivalent to specifying both
Specifies the type of mesh optimization to be performed.
+The
The D3DXMESHOPT_SHAREVB flag has been removed from this enumeration. Use
Reorders faces to remove unused vertices and faces.
Reorders faces to optimize for fewer attribute bundle state changes and enhanced
Reorders faces to increase the cache hit rate of vertex caches.
Reorders faces to maximize length of adjacent triangles.
Optimize the faces only; do not optimize the vertices.
While attribute sorting, do not split vertices that are shared between attribute groups.
Affects the vertex cache size. Using this flag specifies a default vertex cache size that works well on legacy hardware.
Specifies simplification options for a mesh.
+The mesh will be simplified by the number of vertices specified in the MinValue parameter.
The mesh will be simplified by the number of faces specified in the MinValue parameter.
Defines the levels of full-scene multisampling that the device can apply.
+In addition to enabling full-scene multisampling at
Multisampling is valid only on a swap chain that is being created or reset with the
The multisample antialiasing value can be set with the parameters (or sub-parameters) in the following methods.
Method | Parameters | Sub-parameters |
---|---|---|
| MultiSampleType and pQualityLevels | |
| pPresentationParameters | MultiSampleType and pQualityLevels |
| pPresentationParameters | MultiSampleType and pQualityLevels |
| MultiSampleType and pQualityLevels | |
| MultiSampleType and pQualityLevels | |
| pPresentationParameters | MultiSampleType and pQualityLevels |
?
It is not good practice to switch from one multisample type to another to raise the quality of the antialiasing.
Whether the display device supports maskable multisampling (more than one sample for a multiple-sample render-target format plus antialias support) or just non-maskable multisampling (only antialias support), the driver for the device provides the number of quality levels for the
The quality levels supported by the device can be obtained with the pQualityLevels parameter of
See
No level of full-scene multisampling is available.
Enables the multisample quality value. See Remarks.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Level of full-scene multisampling available.
Normal maps generation constants.
+The type of object.
+Constant is a scalar.
Constant is a vector.
Constant is a row major matrix.
Constant is a column major matrix.
Constant is either a texture, shader, or a string.
Constant is a structure.
These flags provide additional information about effect parameters.
Effect parameter constants are used by
Describes the data contained by the enumeration.
+Parameter is a void reference.
Parameter is a Boolean. Any non-zero value passed into
Parameter is an integer. Any floating-point values passed into
Parameter is a floating-point number.
Parameter is a string.
Parameter is a texture.
Parameter is a 1D texture.
Parameter is a 2D texture.
Parameter is a 3D texture.
Parameter is a cube texture.
Parameter is a sampler.
Parameter is a 1D sampler.
Parameter is a 2D sampler.
Parameter is a 3D sampler.
Parameter is a cube sampler.
Parameter is a pixel shader.
Parameter is a vertex shader.
Parameter is a pixel shader fragment.
Parameter is a vertex shader fragment.
Parameter is not supported.
Defines whether the current tessellation mode is discrete or continuous.
+Note that continuous tessellation produces a completely different tessellation pattern from the discrete one for the same tessellation values (this is more apparent in wireframe mode). Thus, 4.0 continuous is not the same as 4 discrete.
+Discrete edge style. In discrete mode, you can specify float tessellation but it will be truncated to integers.
Continuous edge style. In continuous mode, tessellation is specified as float values that can be smoothly varied to reduce "popping" artifacts.
Mesh patch types.
+Triangle patches have three sides and are described in
Rectangle patch mesh type.
Triangle patch mesh type.
N-patch mesh type.
Defines the type of animation set looping modes used for playback.
+The animation repeats endlessly.
The animation plays once, and then it stops on the last frame.
The animation alternates endlessly between playing forward and playing backward.
Defines the memory class that holds the buffers for a resource.
+All pool types are valid with all resources including: vertex buffers, index buffers, textures, and surfaces.
The following tables indicate restrictions on pool types for render targets, depth stencils, and dynamic and mipmap usages. An x indicates a compatible combination; lack of an x indicates incompatibility.
Pool | ||
---|---|---|
x | x | |
?
Pool | ||
---|---|---|
x | x | |
x | ||
x |
?
For more information about usage types, see
Pools cannot be mixed for different objects contained within one resource (mip levels in a mipmap) and, when a pool is chosen, it cannot be changed.
Applications should use
For dynamic textures, it is sometimes desirable to use a pair of video memory and system memory textures, allocating the video memory using
Resources are placed in the memory pool most appropriate for the set of usages requested for the given resource. This is usually video memory, including both local video memory and AGP memory. The
When creating resources with
Resources are copied automatically to device-accessible memory as needed. Managed resources are backed by system memory and do not need to be recreated when a device is lost. See Managing Resources (Direct3D 9) for more information. Managed resources can be locked. Only the system-memory copy is directly modified. Direct3D copies your changes to driver-accessible memory as needed.
Differences between Direct3D 9 and Direct3D 9Ex: |
?
Resources are placed in memory that is not typically accessible by the Direct3D device. This memory allocation consumes system RAM but does not reduce pageable RAM. These resources do not need to be recreated when a device is lost. Resources in this pool can be locked and can be used as the source for a
Resources are placed in system RAM and do not need to be recreated when a device is lost. These resources are not bound by device size or format restrictions. Because of this, these resources cannot be accessed by the Direct3D device nor set as textures or render targets. However, these resources can always be created, locked, and copied.
Describes the relationship between the adapter refresh rate and the rate at which Present or Present operations are completed. These values also serve as flag values for the PresentationIntervals field of
Windowed mode supports
Full-screen mode supports similar usage as windowed mode by supporting
Constants used by
Describes the relationship between the adapter refresh rate and the rate at which Present or Present operations are completed. These values also serve as flag values for the PresentationIntervals field of
Windowed mode supports
Full-screen mode supports similar usage as windowed mode by supporting
Miscellaneous driver primitive capability flags.
+Defines the primitives supported by Direct3D.
+Using Triangle Strips or Triangle Fans (Direct3D 9) is often more efficient than using triangle lists because fewer vertices are duplicated.
+Renders the vertices as a collection of isolated points. This value is unsupported for indexed primitives.
Renders the vertices as a list of isolated straight line segments.
Renders the vertices as a single polyline.
Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle.
Back-face culling is affected by the current winding-order render state.
Renders the vertices as a triangle strip. The backface-culling flag is automatically flipped on even-numbered triangles.
Renders the vertices as a triangle fan.
Identifies the query type. For information about queries, see Queries (Direct3D 9)
+A programmable pixel shader is made up of a set of instructions that operate on pixel data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.
Data type of the register.
+Boolean value.
4D integer number.
4D floating-point number.
The register contains 4D sampler data.
The
#define D3DRENDERSTATE_EVICTMANAGEDTEXTURES 61 + #define D3DRENDERSTATE_SCENECAPTURE 62 + #define D3DRS_DELETERTPATCH 169 + #define D3DRS_MAXVERTEXSHADERINST 196 + #define D3DRS_MAXPIXELSHADERINST 197
Enumerators
Determines whether textures are evicted from memory.
+ The driver uses a
This render state determines whether the driver evicts textures that it manages (as opposed to textures managed by the Direct3D runtime) from video memory. If the render state value is TRUE, the driver evicts the textures. Otherwise, the driver does not evict those textures.
Specifies either begin scene information or end scene information for geometric data captured within a frame.
+ The driver uses a
The driver responds to D3DRENDERSTATE_SCENECAPTURE first with TRUE for begin scene information and next with
Care must be taken in updating a driver that implements the legacy D3DHALCallbacks->D3dSceneCapture callback routine to one using the D3DRENDERSTATE_SCENECAPTURE render state. The D3dSceneCapture callback routine uses the constants D3DHAL_SCENE_CAPTURE_START and D3DHAL_SCENE_CAPTURE_END to indicate, respectively, the beginning and end of a scene. The values of these constants are, respectively, 0 and 1. If you use these constants in place of TRUE and
DirectX 8.0 and later versions only.
Deletes either a rectangular or triangular patch from memory. + The driver uses a DWORD data type without a default value to detect the patch to delete.
This render state notifies the driver that a patch is to be deleted. The value of this render state is the handle to the patch affected. All cached information should be freed and the handle should be removed from the driver's patch handle table. This render state is not visible to applications but is generated internally when an application calls the DeletePatch function. This render state is sent to the driver only when patches are deleted by DeletePatch explicitly. All other patches should be cleaned up when the device is destroyed.
DirectX 9.0 and later versions only.
Determines the maximum number of instructions that the vertex shader assembler can execute.
The driver uses a DWORD data type with a default value of D3DINFINITEINSTRUCTIONS (0xffffffff) to report the maximum number of vertex-shader instructions. + This maximum number depends on the version of the vertex shader that the display device supports as shown in the following table.
Version | Maximum number |
---|---|
earlier than 2_0 | 0 |
2_0 and later | From 216 (0x0000ffff) to D3DINFINITEINSTRUCTIONS |
?
D3DINFINITEINSTRUCTIONS represents a virtually unlimited amount.
Valid values for this render state are numbers that are powers of 2; if the driver sets any other integer, the runtime uses the next nearest power of 2 number.
The runtime sets the MaxVShaderInstructionsExecuted member of the
DirectX 9.0 and later versions only.
Determines the maximum number of instructions that the pixel shader assembler can execute.
The driver uses a DWORD data type with a default value of D3DINFINITEINSTRUCTIONS (0xffffffff) to report the maximum number of pixel-shader instructions. + This maximum number depends on the version of the pixel shader that the display device supports as shown in the following table.
Version | Maximum number |
---|---|
earlier than 2_0 | 0 |
2_0 | From 96 to D3DINFINITEINSTRUCTIONS |
3_0 and later | From 216 (0x0000ffff) to D3DINFINITEINSTRUCTIONS |
?
D3DINFINITEINSTRUCTIONS represents a virtually unlimited amount.
Valid values for this render state are numbers that are powers of 2; if the driver sets any other integer, the runtime uses the next nearest power of 2 number.
The runtime sets the MaxVShaderInstructionsExecuted member of the
The driver uses these render states when it performs graphics rendering. Only render states that are specific to drivers are included in the Windows Driver Kit (WDK) documentation. The render states accessible to DirectX applications are included in the DirectX SDK documentation. These application-level render states include such characteristics as whether alpha blending is enabled, whether dithering is enabled, whether Direct3D lighting is used, and the type of shading to be used.
To update a particular render state, Direct3D stores information about the render state, and then calls the driver's D3dDrawPrimitives2 callback routine. The information provided to the driver enables it to:
Determine that it should update one or more render states.
Identify which render states to update, and what the new render state values should be.
Note that for certain render states to be honored, the driver must have previously set capability flags in the relevant member of the D3DPRIMCAPS structure.
In order to indicate a specific render state update, Direct3D inserts a D3DHAL_DP2COMMAND structure into the command buffer, setting the bCommand member of this structure to D3DDP2OP_RENDERSTATE (see the description for D3DDP2OP_RENDERSTATE in D3DHAL_DP2OPERATION), and setting the wStateCount member of the same structure to the number of render states to be updated.
Immediately following the D3DHAL_DP2COMMAND structure, Direct3D inserts one D3DHAL_DP2RENDERSTATE structure into the command buffer for each render state to be updated. The RenderState member of this structure identifies the render state to be changed; the new value of this render state is specified in either the dwState member (for DWORD values) or the fState member (for D3DVALUE values).
The following figure shows a portion of the command buffer containing a D3DDP2OP_RENDERSTATE command and two D3DHAL_DP2RENDERSTATE structures. The first of the three structures indicates that two render states are to be updated. The second structure indicates that the D3DRENDERSTATE_FILLMODE render state is to be changed to
Additional Notes
See the
Some changes have been made to the
Multitexture macro ops and D3DRENDERSTATE_TEXTUREFACTOR override all of the per-texture stage blending controls (COLOR{OP,ARG1,ARG2} & ALPHA{OP,ARG1,ARG2}).
+ Determines whether textures are evicted from memory.
+ The driver uses a
This render state determines whether the driver evicts textures that it manages (as opposed to textures managed by the Direct3D runtime) from video memory. If the render state value is TRUE, the driver evicts the textures. Otherwise, the driver does not evict those textures.
Specifies either begin scene information or end scene information for geometric data captured within a frame.
+ The driver uses a
The driver responds to D3DRENDERSTATE_SCENECAPTURE first with TRUE for begin scene information and next with
Care must be taken in updating a driver that implements the legacy D3DHALCallbacks->D3dSceneCapture callback routine to one using the D3DRENDERSTATE_SCENECAPTURE render state. The D3dSceneCapture callback routine uses the constants D3DHAL_SCENE_CAPTURE_START and D3DHAL_SCENE_CAPTURE_END to indicate, respectively, the beginning and end of a scene. The values of these constants are, respectively, 0 and 1. If you use these constants in place of TRUE and
DirectX 8.0 and later versions only.
Deletes either a rectangular or triangular patch from memory. + The driver uses a DWORD data type without a default value to detect the patch to delete.
This render state notifies the driver that a patch is to be deleted. The value of this render state is the handle to the patch affected. All cached information should be freed and the handle should be removed from the driver's patch handle table. This render state is not visible to applications but is generated internally when an application calls the DeletePatch function. This render state is sent to the driver only when patches are deleted by DeletePatch explicitly. All other patches should be cleaned up when the device is destroyed.
DirectX 9.0 and later versions only.
Determines the maximum number of instructions that the vertex shader assembler can execute.
The driver uses a DWORD data type with a default value of D3DINFINITEINSTRUCTIONS (0xffffffff) to report the maximum number of vertex-shader instructions. + This maximum number depends on the version of the vertex shader that the display device supports as shown in the following table.
Version | Maximum number |
---|---|
earlier than 2_0 | 0 |
2_0 and later | From 216 (0x0000ffff) to D3DINFINITEINSTRUCTIONS |
?
D3DINFINITEINSTRUCTIONS represents a virtually unlimited amount.
Valid values for this render state are numbers that are powers of 2; if the driver sets any other integer, the runtime uses the next nearest power of 2 number.
The runtime sets the MaxVShaderInstructionsExecuted member of the
DirectX 9.0 and later versions only.
Determines the maximum number of instructions that the pixel shader assembler can execute.
The driver uses a DWORD data type with a default value of D3DINFINITEINSTRUCTIONS (0xffffffff) to report the maximum number of pixel-shader instructions. + This maximum number depends on the version of the pixel shader that the display device supports as shown in the following table.
Version | Maximum number |
---|---|
earlier than 2_0 | 0 |
2_0 | From 96 to D3DINFINITEINSTRUCTIONS |
3_0 and later | From 216 (0x0000ffff) to D3DINFINITEINSTRUCTIONS |
?
D3DINFINITEINSTRUCTIONS represents a virtually unlimited amount.
Valid values for this render state are numbers that are powers of 2; if the driver sets any other integer, the runtime uses the next nearest power of 2 number.
The runtime sets the MaxVShaderInstructionsExecuted member of the
Sampler states define texture sampling operations such as texture addressing and texture filtering. Some sampler states set-up vertex processing, and some set-up pixel processing. Sampler states can be saved and restored using stateblocks (see State Blocks Save and Restore State (Direct3D 9)).
+Defines the sampler texture types for vertex shaders.
+Uninitialized value. The value of this element is D3DSP_TEXTURETYPE_SHIFT.
Declaring a 2D texture. The value of this element is D3DSP_TEXTURETYPE_SHIFT * 4.
Declaring a cube texture. The value of this element is D3DSP_TEXTURETYPE_SHIFT * 8.
Declaring a volume texture. The value of this element is D3DSP_TEXTURETYPE_SHIFT * 16.
Flags indicating the method the rasterizer uses to create an image on a surface.
+This enumeration is used as a member in
The image is created from the first scanline to the last without skipping any.
The image is created using the interlaced method in which odd-numbered lines are drawn on odd-numbered passes and even lines are drawn on even-numbered passes.
The image is created using the interlaced method in which odd-numbered lines are drawn on odd-numbered passes and even lines are drawn on even-numbered passes.
The following page provides a basic outline of key differences between Direct3D 9 and Direct3D 10. The outline below provides some insight to assist developers with Direct3D 9 experience to explore and relate to Direct3D 10.
Although the info in this topic compares Direct3D 9 with Direct3D 10, because Direct3D 11 builds on the improvements made in Direct3D 10 and 10.1, you also need this info to migrate from Direct3D 9 to Direct3D 11. For info about moving beyond Direct3D 10 to Direct3D 11, see Migrating to Direct3D 11.
Defines constants that describe the supported shading modes.
+The first vertex of a triangle for flat shading mode is defined in the following manner.
The members of this enumerated type define the vales for the
Flat shading mode. The color and specular component of the first vertex in the triangle are used to determine the color and specular component of the face. These colors remain constant across the triangle; that is, they are not interpolated. The specular alpha is interpolated. See Remarks.
Gouraud shading mode. The color and specular components of the face are determined by a linear interpolation between all three of the triangle's vertices.
Not supported.
The
Parser flags
Parse time flags are only used by the effect system (before effect compilation) when you create an effect compiler. For example, you could create a compiler object with
The effect system will use parser flags when called by the following functions:
The effect system will use compiler flags when called by the following functions:
In addition, you can use compiler flags when creating an effect by calling
The effect system will use assembler flags when called by the following functions:
Applying compiler flags or assembler flags to the incorrect API will fail shader validation. Check the Direct3D error code return value from the function (with the DirectX Error Lookup Tool) to help track down this error.
+The following flags are used to specify sprite rendering options to the flags parameter in the Begin method:
+Predefined sets of pipeline state used by state blocks (see State Blocks Save and Restore State (Direct3D 9)).
+As the following diagram shows, vertex and pixel state are both subsets of device state.
There are only a few states that are considered both vertex and pixel state. These states are:
Driver stencil capability flags.
+Defines stencil-buffer operations.
+Stencil-buffer entries are integer values ranging from 0 through 2n - 1, where n is the bit depth of the stencil buffer.
+Do not update the entry in the stencil buffer. This is the default value.
Set the stencil-buffer entry to 0.
Replace the stencil-buffer entry with a reference value.
Increment the stencil-buffer entry, clamping to the maximum value.
Decrement the stencil-buffer entry, clamping to zero.
Invert the bits in the stencil-buffer entry.
Increment the stencil-buffer entry, wrapping to zero if the new value exceeds the maximum value.
Decrement the stencil-buffer entry, wrapping to the maximum value if the new value is less than zero.
Given a scene that contains many objects that use the same geometry, you can draw many instances of that geometry at different orientations, sizes, colors, and so on with dramatically better performance by reducing the amount of data you need to supply to the renderer.
This can be accomplished through the use of two techniques: the first for drawing indexed geometry and the second for non-indexed geometry. Both techniques use two vertex buffers: one to supply geometry data and one to supply per-object instance data. The instance data can be a wide variety of information such as a transform, color data, or lighting data - basically anything that you can describe in a vertex declaration. Drawing many instances of geometry with these techniques can dramatically reduce the amount of data sent to the renderer.
Defines swap effects.
+The state of the back buffer after a call to Present is well-defined by each of these swap effects, and whether the Direct3D device was created with a full-screen swap chain or a windowed swap chain has no effect on this state. In particular, the
Applications that use
An invisible window cannot receive user-mode events; furthermore, an invisible-fullscreen window will interfere with the presentation of another applications' windowed-mode window. Therefore, each application needs to ensure that a device window is visible when a swapchain is presented in fullscreen mode.
+When a swap chain is created with a swap effect of
Like a swap chain that uses
An application that uses this swap effect cannot make any assumptions about the contents of a discarded back buffer and should therefore update an entire back buffer before invoking a Present operation that would display it. Although this is not enforced, the debug version of the runtime will overwrite the contents of discarded back buffers with random data to enable developers to verify that their applications are updating the entire back buffer surfaces correctly.
The swap chain might include multiple back buffers and is best envisaged as a circular queue that includes the front buffer. Within this queue, the back buffers are always numbered sequentially from 0 to (n - 1), where n is the number of back buffers, so that 0 denotes the least recently presented buffer. When Present is invoked, the queue is "rotated" so that the front buffer becomes back buffer (n - 1), while the back buffer 0 becomes the new front buffer.
This swap effect may be specified only for a swap chain comprising a single back buffer. Whether the swap chain is windowed or full-screen, the runtime will guarantee the semantics implied by a copy-based Present operation, namely that the operation leaves the content of the back buffer unchanged, instead of replacing it with the content of the front buffer as a flip-based Present operation would.
For a full-screen swap chain, the runtime uses a combination of flip operations and copy operations, supported if necessary by hidden back buffers, to accomplish the Present operation. Accordingly, the presentation is synchronized with the display adapter's vertical retrace and its rate is constrained by the chosen presentation interval. A swap chain specified with the
Use a dedicated area of video memory that can be overlayed on the primary surface. No copy is performed when the overlay is displayed. The overlay operation is performed in hardware, without modifying the data in the primary surface.
Differences between Direct3D 9 and Direct3D 9Ex: |
?
Designates when an application is adopting flip mode, during which time an application's frame is passed instead of copied to the Desktop Window Manager(DWM) for composition when the application is presenting in windowed mode. Flip mode allows an application to more efficiently use memory bandwidth as well as enabling an application to take advantage of full-screen-present statistics. Flip mode does not affect full-screen behavior. A sample application that uses
Note??If you create a swap chain with
Differences between Direct3D 9 and Direct3D 9Ex: |
?
Defines settings used for mesh tangent frame computations.
+Texture coordinate values in the u direction are between 0 and 1. In this case a texture coordinate set will be chosen that minimizes the perimeter of the triangle. See Texture Wrapping (Direct3D 9).
Texture coordinate values in the v direction are between 0 and 1. In this case a texture coordinate set will be chosen that minimizes the perimeter of the triangle. See Texture Wrapping (Direct3D 9).
Texture coordinate values in both u and v directions are between 0 and 1. In this case a texture coordinate set will be chosen that minimizes the perimeter of the triangle. See Texture Wrapping (Direct3D 9).
Do not normalize partial derivatives with respect to texture coordinates. If not normalized, the scale of the partial derivatives is proportional to the scale of the 3D model divided by the scale of the triangle in (u, v) space. This scale value provides a measure of how much the texture is stretched in a given direction. The resulting vector length is a weighted sum of the lengths of the partial derivatives.
Do not transform texture coordinates to orthogonal Cartesian coordinates. Mutually exclusive with
Compute the partial derivative with respect to texture coordinate v independently for each vertex, and then compute the partial derivative with respect to u as the cross product of the partial derivative with respect to v and the normal vector. Mutually exclusive with
Compute the partial derivative with respect to texture coordinate u independently for each vertex, and then compute the partial derivative with respect to v as the cross product of the normal vector and the partial derivative with respect to u. Mutually exclusive with
Weight the direction of the computed per-vertex normal or partial derivative vector according to the areas of triangles attached to that vertex. Mutually exclusive with
Compute a unit-length normal vector for each triangle of the input mesh. Mutually exclusive with
Vertices are ordered in a clockwise direction around each triangle. The computed normal vector direction is therefore inverted 180 degrees from the direction computed using counterclockwise vertex ordering.
Compute the per-vertex normal vector for each triangle of the input mesh, and ignore any normal vectors already in the input mesh.
The results are stored in the original input mesh, and the output mesh is not used.
Defines constants that describe the supported texture-addressing modes.
+Tile the texture at every integer junction. For example, for u values between 0 and 3, the texture is repeated three times; no mirroring is performed.
Similar to
Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
Texture coordinates outside the range [0.0, 1.0] are set to the border color.
Similar to
A programmable pixel shader is made up of a set of instructions that operate on pixel data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.
Texture argument constants are used as values for the following members of the
Set and retrieve texture arguments by calling the SetTextureStageState and GetTextureStageState methods.
Argument flags
You can combine an argument flag with a modifier, but two argument flags cannot be combined.
+A programmable pixel shader is made up of a set of instructions that operate on pixel data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.
Driver texture coordinate capability flags.
+Defines texture filtering modes for a texture stage.
+To check if a format supports texture filter types other than
Set a texture stage's magnification filter by calling
Set a texture stage's minification filter by calling
Set the texture filter to use between-mipmap levels by calling
Not all valid filtering modes for a device will apply to volume maps. In general,
When used with
When used with D3DSAMP_ MAGFILTER or
When used with D3DSAMP_ MAGFILTER or
When used with D3DSAMP_ MAGFILTER or
A 4-sample tent filter used as a texture magnification or minification filter. Use with
A 4-sample Gaussian filter used as a texture magnification or minification filter. Use with
Convolution filter for monochrome textures. See
Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. |
?
Use with
Defines per-stage texture-blending operations.
+ The members of this type are used when setting color or alpha operations by using the
In the above formulas, SRGBA is the RGBA color produced by a texture operation, and Arg1, Arg2, and Arg3 represent the complete RGBA color of the texture arguments. Individual components of an argument are shown with subscripts. For example, the alpha component for argument 1 would be shown as Arg1A.
+Disables output from this texture stage and all stages with a higher index. To disable texture mapping, set this as the color operation for the first texture stage (stage 0). Alpha operations cannot be disabled when color operations are enabled. Setting the alpha operation to
Use this texture stage's first color or alpha argument, unmodified, as the output. This operation affects the color argument when used with the
Use this texture stage's second color or alpha argument, unmodified, as the output. This operation affects the color argument when used with the
Multiply the components of the arguments.
Multiply the components of the arguments, and shift the products to the left 1 bit (effectively multiplying them by 2) for brightening.
Multiply the components of the arguments, and shift the products to the left 2 bits (effectively multiplying them by 4) for brightening.
Add the components of the arguments.
Add the components of the arguments with a - 0.5 bias, making the effective range of values from - 0.5 through 0.5.
Add the components of the arguments with a - 0.5 bias, and shift the products to the left 1 bit.
Subtract the components of the second argument from those of the first argument.
Add the first and second arguments; then subtract their product from the sum.
Linearly blend this texture stage, using the interpolated alpha from each vertex.
Linearly blend this texture stage, using the alpha from this stage's texture.
Linearly blend this texture stage, using a scalar alpha set with the
Linearly blend a texture stage that uses a premultiplied alpha.
Linearly blend this texture stage, using the alpha taken from the previous texture stage.
Modulate the color of the second argument, using the alpha of the first argument; then add the result to argument one. This operation is supported only for color operations (
Modulate the arguments; then add the alpha of the first argument. This operation is supported only for color operations (
Similar to
Similar to
Perform per-pixel bump mapping, using the environment map in the next texture stage, without luminance. This operation is supported only for color operations (
Perform per-pixel bump mapping, using the environment map in the next texture stage, with luminance. This operation is supported only for color operations (
Modulate the components of each argument as signed components, add their products; then replicate the sum to all color channels, including alpha. This operation is supported for color and alpha operations.
In DirectX 6 and DirectX 7, multitexture operations the above inputs are all shifted down by half (y = x - 0.5) before use to simulate signed data, and the scalar result is automatically clamped to positive values and replicated to all three output channels. Also, note that as a color operation this does not updated the alpha it just updates the RGB components.
However, in DirectX 8.1 shaders you can specify that the output be routed to the .rgb or the .a components or both (the default). You can also specify a separate scalar operation on the alpha channel.
Performs a multiply-accumulate operation. It takes the last two arguments, multiplies them together, and adds them to the remaining input/source argument, and places that into the result.
SRGBA = Arg1 + Arg2 * Arg3
Linearly interpolates between the second and third source arguments by a proportion specified in the first source argument.
SRGBA = (Arg1) * Arg2 + (1- Arg1) * Arg3.
Represents the capabilities of the hardware exposed through the Direct3D object.
+The MaxTextureBlendStages and MaxSimultaneousTextures members might seem similar, but they contain different information. The MaxTextureBlendStages member contains the total number of texture-blending stages supported by the current device, and the MaxSimultaneousTextures member describes how many of those stages can have textures bound to them by using the SetTexture method.
When the driver fills this structure, it can set values for execute-buffer capabilities, even when the interface being used to retrieve the capabilities (such as
In general, performance problems may occur if you use a texture and then modify it during a scene. Ensure that no texture used in the current BeginScene and EndScene block is evicted unless absolutely necessary. In the case of extremely high texture usage within a scene, the results are undefined. This occurs when you modify a texture that you have used in the scene and there is no spare texture memory available. For such systems, the contents of the z-buffer become invalid at EndScene. Applications should not call UpdateSurface to or from the back buffer on this type of hardware inside a BeginScene/EndScene pair. In addition, applications should not try to access the z-buffer if the
The following flags concerning mipmapped textures are not supported in Direct3D 9.
Member of the
Adapter on which this Direct3D device was created. This ordinal is valid only to pass to methods of the
The following driver-specific capability.
Value | Meaning |
---|---|
Display hardware is capable of returning the current scan line. | |
The display driver supports an overlay DDI that allows for verification of overlay capabilities. For more information about the overlay DDI, see Overlay DDI. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? |
?
Driver-specific capabilities identified in
Driver-specific capabilities identified in
Bit mask of values representing what presentation swap intervals are available.
Value | Meaning |
---|---|
The driver supports an immediate presentation swap interval. | |
The driver supports a presentation swap interval of every screen refresh. | |
The driver supports a presentation swap interval of every second screen refresh. | |
The driver supports a presentation swap interval of every third screen refresh. | |
The driver supports a presentation swap interval of every fourth screen refresh. |
?
Bit mask indicating what hardware support is available for cursors. Direct3D 9 does not define alpha-blending cursor capabilities.
Value | Meaning |
---|---|
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports at least a hardware color cursor in high-resolution modes (with scan lines greater than or equal to 400). | |
A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports a hardware color cursor in both high-resolution and low-resolution modes (with scan lines less than 400). |
?
Flags identifying the capabilities of the device.
Value | Meaning |
---|---|
Device supports blits from system-memory textures to nonlocal video-memory textures. | |
Device can queue rendering commands after a page flip. Applications do not change their behavior if this flag is set; this capability means that the device is relatively fast. | |
Device can support at least a DirectX 5-compliant driver. | |
Device can support at least a DirectX 7-compliant driver. | |
Device exports an | |
Device can use execute buffers from system memory. | |
Device can use execute buffers from video memory. | |
Device has hardware acceleration for scene rasterization. | |
Device can support transformation and lighting in hardware. | |
Device supports N patches. | |
Device can support rasterization, transform, lighting, and shading in hardware. | |
Device supports quintic B?zier curves and B-splines. | |
Device supports rectangular and triangular patches. | |
When this device capability is set, the hardware architecture does not require caching of any information, and uncached patches (handle zero) will be drawn as efficiently as cached ones. Note that setting | |
Device is texturing from separate memory pools. | |
Device can retrieve textures from non-local video memory. | |
Device can retrieve textures from system memory. | |
Device can retrieve textures from device memory. | |
Device can use buffers from system memory for transformed and lit vertices. | |
Device can use buffers from video memory for transformed and lit vertices. |
?
Miscellaneous driver primitive capabilities. See
Information on raster-drawing capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports anisotropic filtering. | |
Device iterates colors perspective correctly. | |
Device can dither to improve color resolution. | |
Device supports legacy depth bias. For true depth bias, see | |
Device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. | |
Device calculates the fog value by referring to a lookup table containing fog values that are indexed to the depth of a given pixel. | |
Device calculates the fog value during the lighting operation and interpolates the fog value during rasterization. | |
Device supports level-of-detail bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would. For more information about level-of-detail bias in mipmaps, see | |
Device supports toggling multisampling on and off between | |
Device supports scissor test. See Scissor Test (Direct3D 9). | |
Device performs true slope-scale based depth bias. This is in contrast to the legacy style depth bias. | |
Device supports depth buffering using w. | |
Device supports w-based fog. W-based fog is used when a perspective projection matrix is specified, but affine projections still use z-based fog. The system considers a projection matrix that contains a nonzero value in the [3][4] element to be a perspective projection matrix. | |
Device can perform hidden-surface removal (HSR) without requiring the application to sort polygons and without requiring the allocation of a depth-buffer. This leaves more video memory for textures. The method used to perform HSR is hardware-dependent and is transparent to the application. Z-bufferless HSR is performed if no depth-buffer surface is associated with the rendering-target surface and the depth-buffer comparison test is enabled (that is, when the state value associated with the | |
Device supports z-based fog. | |
Device can perform z-test operations. This effectively renders a primitive and indicates whether any z pixels have been rendered. |
?
Z-buffer comparison capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Always pass the z-test. | |
Pass the z-test if the new z equals the current z. | |
Pass the z-test if the new z is greater than the current z. | |
Pass the z-test if the new z is greater than or equal to the current z. | |
Pass the z-test if the new z is less than the current z. | |
Pass the z-test if the new z is less than or equal to the current z. | |
Always fail the z-test. | |
Pass the z-test if the new z does not equal the current z. |
?
Source-blending capabilities. This member can be one or more of the following flags. (The RGBA values of the source and destination are indicated by the subscripts s and d.)
Value | Meaning |
---|---|
The driver supports both | |
Source blend factor is (1 - As, 1 - As, 1 - As, 1 - As) and destination blend factor is (As, As, As, As); the destination blend selection is overridden. | |
The driver supports the | |
Blend factor is (Ad, Ad, Ad, Ad). | |
Blend factor is (Rd, Gd, Bd, Ad). | |
Blend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad). | |
Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad). | |
Blend factor is (1 - As, 1 - As, 1 - As, 1 - As). | |
Blend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As). | |
Blend factor is (1 - PSOutColor[1]r, 1 - PSOutColor[1]g, 1 - PSOutColor[1]b, not used)). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (1, 1, 1, 1). | |
Blend factor is (As, As, As, As). | |
Blend factor is (f, f, f, 1); f = min(As, 1 - Ad). | |
Blend factor is (Rs, Gs, Bs, As). | |
Blend factor is (PSOutColor[1]r, PSOutColor[1]g, PSOutColor[1]b, not used). See Render Target Blending. Differences between Direct3D 9 and Direct3D 9Ex: This flag is available in Direct3D 9Ex only. ? | |
Blend factor is (0, 0, 0, 0). |
?
Destination-blending capabilities. This member can be the same capabilities that are defined for the SrcBlendCaps member.
Alpha-test comparison capabilities. This member can include the same capability flags defined for the ZCmpCaps member. If this member contains only the
Shading operations capabilities. It is assumed, in general, that if a device supports a given command at all, it supports the
The color, specular highlights, fog, and alpha interpolants of a triangle each have capability flags that an application can use to find out how they are implemented by the device driver.
This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device can support an alpha component for Gouraud-blended transparency (the | |
Device can support colored Gouraud shading. In this mode, the per-vertex color components (red, green, and blue) are interpolated across a triangle face. | |
Device can support fog in the Gouraud shading mode. | |
Device supports Gouraud shading of specular highlights. |
?
Miscellaneous texture-mapping capabilities. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Alpha in texture pixels is supported. | |
Device can draw alpha from texture palettes. | |
Supports cube textures. | |
Device requires that cube texture maps have dimensions specified as powers of two. | |
Device supports mipmapped cube textures. | |
Device supports mipmapped textures. | |
Device supports mipmapped volume textures. | |
If this flag is not set, and A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem - ps and texm3x3 - ps instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem - ps, texbeml - ps, and texm3x3spec - ps. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these types of textures. | |
Device does not support a projected bump-environment loopkup operation in programmable and fixed function shaders. | |
Perspective correction texturing is supported. | |
If If If this flag is not set, and | |
Supports the | |
All textures must be square. | |
Texture indices are not scaled by the texture size prior to interpolation. | |
Device supports volume textures. | |
Device requires that volume texture maps have dimensions specified as powers of two. |
?
Texture-filtering capabilities for a texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-filtering capabilities for a cube texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-filtering capabilities for a volume texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in
Texture-addressing capabilities for texture objects. This member can be one or more of the following flags.
Value | Meaning |
---|---|
Device supports setting coordinates outside the range [0.0, 1.0] to the border color, as specified by the | |
Device can clamp textures to addresses. | |
Device can separate the texture-addressing modes of the u and v coordinates of the texture. This ability corresponds to the | |
Device can mirror textures to addresses. | |
Device can take the absolute value of the texture coordinate (thus, mirroring around 0) and then clamp to the maximum value. | |
Device can wrap textures to addresses. |
?
Texture-addressing capabilities for a volume texture. This member can be one or more of the flags defined for the TextureAddressCaps member.
Defines the capabilities for line-drawing primitives.
Value | Meaning |
---|---|
Supports alpha-test comparisons. | |
Antialiased lines are supported. | |
Supports source-blending. | |
Supports fog. | |
Supports texture-mapping. | |
Supports z-buffer comparisons. |
?
Maximum texture width for this device.
Maximum texture height for this device.
Maximum value for any of the three dimensions (width, height, and depth) of a volume texture.
This number represents the maximum range of the integer bits of the post-normalized texture coordinates. A texture coordinate is stored as a 32-bit signed integer using 27 bits to store the integer part and 5 bits for the floating point fraction. The maximum integer index, 227, is used to determine the maximum texture coordinate, depending on how the hardware does texture-coordinate scaling.
Some hardware reports the cap
Less desirably, on some hardware
For example, assume that MaxTextureRepeat is equal to 32k and the size of the texture is 4k. If the hardware sets
Texture stage states define multi-blender texture operations. Some sampler states set up vertex processing, and some set up pixel processing. Texture stage states can be saved and restored using stateblocks (see State Blocks Save and Restore State (Direct3D 9)).
+Members of this enumerated type are used with the
The valid range of values for the
Defines texture coordinate transformation values.
+Texture coordinates can be transformed using a 4 x 4 matrix before the results are passed to the rasterizer. The texture coordinate transforms are set by calling
Texture coordinates are passed directly to the rasterizer.
The rasterizer should expect 1D texture coordinates. This value is used by fixed function vertex processing; it should be set to 0 when using a programmable vertex shader.
The rasterizer should expect 2D texture coordinates. This value is used by fixed function vertex processing; it should be set to 0 when using a programmable vertex shader.
The rasterizer should expect 3D texture coordinates. This value is used by fixed function vertex processing; it should be set to 0 when using a programmable vertex shader.
The rasterizer should expect 4D texture coordinates. This value is used by fixed function vertex processing; it should be set to 0 when using a programmable vertex shader.
This flag is honored by the fixed function pixel pipeline, as well as the programmable pixel pipeline in versions ps_1_1 to ps_1_3. When texture projection is enabled for a texture stage, all four floating point values must be written to the corresponding texture register. Each texture coordinate is divided by the last element before being passed to the rasterizer. For example, if this flag is specified with the
In short, texture wrapping changes the basic way that Direct3D rasterizes textured polygons using the texture coordinates specified for each vertex. While rasterizing a polygon, the system interpolates between the texture coordinates at each of the polygon's vertices to determine the texels that should be used for every pixel of the polygon. Normally, the system treats the texture as a 2D plane, interpolating new texels by taking the shortest route from point A within a texture to point B. If point A represents the u, v position (0.8, 0.1), and point B is at (0.1,0.1), the line of interpolation looks like the following diagram.
Note that the shortest distance between A and B in this illustration runs roughly through the middle of the texture. Enabling u-texture or v-texture coordinate wrapping changes how Direct3D perceives the shortest route between texture coordinates in the u-direction and v-direction. By definition, texture wrapping causes the rasterizer to take the shortest route between texture coordinate sets, assuming that 0.0 and 1.0 are coincident. The last bit is the tricky part: You can imagine that enabling texture wrapping in one direction causes the system to treat a texture as though it were wrapped around a cylinder. For example, consider the following diagram.
The preceding illustration shows how wrapping in the u - direction affects how the system interpolates texture coordinates. Using the same points as in the example for normal, or nonwrapped, textures, you can see that the shortest route between points A and B is no longer across the middle of the texture; it's now across the border where 0.0 and 1.0 exist together. Wrapping in the v-direction is similar, except that it wraps the texture around a cylinder that is lying on its side. Wrapping in both the u-direction and v-direction is more complex. In this situation, you can envision the texture as a torus, or doughnut.
The most common practical application for texture wrapping is to perform environment mapping. Usually, an object textured with an environment map appears very reflective, showing a mirrored image of the object's surroundings in the scene. For the sake of this discussion, picture a room with four walls, each one painted with a letter R, G, B, Y and the corresponding colors: red, green, blue, and yellow. The environment map for such a simple room might look like the following illustration.
Imagine that the room's ceiling is held up by a perfectly reflective, four-sided, pillar. Mapping the environment map texture to the pillar is simple; making the pillar look as though it is reflecting the letters and colors is not as easy. The following diagram shows a wire frame of the pillar with the applicable texture coordinates listed near the top vertices. The seam where wrapping will cross the edges of the texture is shown with a dotted line.
With wrapping enabled in the u-direction, the textured pillar shows the colors and symbols from the environment map appropriately and, at the seam in the front of the texture, the rasterizer properly chooses the shortest route between the texture coordinates, assuming that u-coordinates 0.0 and 1.0 share the same location. The textured pillar looks like the following illustration.
If texture wrapping isn't enabled, the rasterizer does not interpolate in the direction needed to generate a believable, reflected image. Rather, the area at the front of the pillar contains a horizontally compressed version of the texels between u-coordinates 0.175 and 0.875, as they pass through the center of the texture. The wrap effect is ruined.
+Defines the priority type to which an animation track is assigned.
+Tracks with the same priority are blended together, and the two resulting values are then blended using the priority blend factor.
+Track should be blended with all the low-priority tracks before the low-priority blend is mixed with the high-priority blend.
Track should be blended with all the high-priority tracks before the high-priority blend is mixed with the low-priority blend.
Defines the transition style between values of a mesh animation.
+The calculation for the ramp from ease in to ease out is calculated as follows:
where the ramp is a function Q(t) with the following properties:
Mathematically, this translates into:
Solving for A, B, C, D:
Therefore:
Linear transition between values.
Ease-in, ease-out spline transition between values.
Usage options that identify how resources are to be used.
The following table summarizes the available usage options.
+Texture wrapping options for IMT computation APIs.
+The texture wraps in the U direction.
The texture wraps in the V direction.
The texture wraps in both the U and V direction.
Defines flags used to control the number or matrices that the system applies when performing multimatrix vertex blending.
+Members of this type are used with the
Geometry blending (multimatrix vertex blending) requires that your application use a vertex format that has blending (beta) weights for each vertex.
+Disable vertex blending; apply only the world matrix set by the D3DTS_WORLDMATRIX macro, where the index value for the transformation state is 0.
Enable vertex blending between the two matrices set by the D3DTS_WORLDMATRIX macro, where the index value for the transformation states are 0 and 1.
Enable vertex blending between the three matrices set by the D3DTS_WORLDMATRIX macro, where the index value for the transformation states are 0, 1, and 2.
Enable vertex blending between the four matrices set by the D3DTS_WORLDMATRIX macro, where the index value for the transformation states are 0, 1, 2, and 3.
Vertex blending is done by using the value assigned to
Use a single matrix with a weight of 1.0.
Flexible Vertex Format Constants, or FVF codes, are used to describe the contents of vertices interleaved in a single data stream that will be processed by the fixed-function pipeline.
+This constant is the maximum number of vertex declarators for a mesh.
+MAXD3DDECLLENGTH is defined as a maximum of 64 (see d3d9types.h). This does not include the "end" marker vertex element.
+The maximum number of elements in the vertex declaration. The additional (+1) is for D3DDECL_END.
A combination of one or more flags that control the device create behavior.
+Vertex shader caps constants. These constants are used by the VS20Caps member of
Vertex texture sampler constants.
These constants identify the texture samplers used by vertex shaders.
+Specifies the type of I/O bus used by the graphics adapter.
+As many as three flags can be set. Flags in the range 0x00 through 0x04 (D3DBUSTYPE_Xxx) provide the basic bus type. Flags in the range 0x10000 through 0x50000 (D3DBUSIMPL_MODIFIER_Xxx) modify the basic description. The driver sets one bus-type flag, and can set zero or one modifier flag. If the driver sets a modifier flag, it also sets the
Indicates a type of bus other than the types listed here. +
PCI bus. +
PCI-X bus. +
PCI Express bus. +
Accelerated Graphics Port (AGP) bus. +
The implementation for the graphics adapter is in a motherboard chipset's north bridge. This flag implies that data never goes over an expansion bus (such as PCI or AGP) when it is transferred from main memory to the graphics adapter.
Indicates that the graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard and all of the graphics adapter's chips are soldered to the motherboard. This flag implies that data never goes over an expansion bus (such as PCI or AGP) when it is transferred from main memory to the graphics adapter.
The graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are connected through sockets to the motherboard. +
The graphics adapter is connected to the motherboard through a daughterboard connector. +
The graphics adapter is connected to the motherboard through a daughterboard connector, and the graphics adapter is inside an enclosure that is not user accessible. +
One of the D3DBUSIMPL_MODIFIER_MODIFIER_Xxx flags is set. +
Options for welding together vertices.
+Weld together all vertices that are at the same location. Using this flag avoids an epsilon comparison between vertex components.
If a given vertex component is within epsilon, modify partially matched vertices so that both components are identical. If all components are equal, remove one of the vertices.
Instructs the weld to allow only modifications to vertices and not removal. This flag is valid only if
Instructs the weld not to split vertices that are in separate attribute groups. When the
Creates an
The
The
Pass the
Note??Direct3DCreate9Ex is supported only in Windows Vista, Windows Server 2008, and Windows 7. Earlier versions of the D3D9.dll library do not include Direct3D9Ex and Direct3DCreate9Ex.
+Create an
The value of this parameter should be
If successful, this function returns a reference to an
The Direct3D object is the first Direct3D COM object that your graphical application needs to create and the last object that your application needs to release. Functions for enumerating and retrieving capabilities of a device are accessible through the Direct3D object. This enables applications to select devices without creating them.
Create an
LPDIRECT3D9 g_pD3D =null ; if(null == (g_pD3D = Direct3DCreate9())) return E_FAIL; +
The
For an example, see Creating a Device (Direct3D 9).
+Marks the beginning of a section of event code.
+A
Returns the number of previous calls to BeginEvent that have not yet been finalized by calls to the ID3DUserDefinedAnnotation::EndEvent method.
The return value is ?1 if the calling application is not running under a Direct3D profiling tool.
You call the EndEvent method to mark the end of the section of event code.
A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
BeginEvent has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Adds a child frame to a frame.
+Pointer to the parent node.
Pointer to the child node.
If the function succeeds, the return value is
Loads the first frame hierarchy from a .x file.
+Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Combination of one or more flags from the D3DXMESH enumeration that specify creation options for the mesh.
Pointer to an
Pointer to an
Application provided interface that allows loading of user data. See
Returns a reference to the loaded frame hierarchy. See
Returns a reference to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
During the load, CreateFrame and LoadFrameChildData are called back on each frame to control loading and allocation of the frame. The application defines these methods to control how frames are stored. CreateMeshContainer and LoadMeshChildData are called back on each mesh object to control loading and allocation of mesh objects. LoadTopLevelData is called back for each top level object that doesn't get loaded by the other methods.
To free this data, call ID3DXAnimationController::Release to free the animation sets, and D3DXFRAMEDestroy, passing in the root node of the frame hierarchy and an object of your derived
Given a frame hierarchy, registers all the named matrices in the animation mixer.
+The top level node in the frame hierarchy.
Pointer to the animation controller object.
If the function succeeds, the return value is
Loads the first frame hierarchy from a .x file.
+Pointer to a buffer that contains the mesh hierarchy.
Size of the pMemory buffer, in bytes.
Combination of one or more flags from the D3DXMESH enumeration that specify creation options for the mesh.
Pointer to an
Pointer to an
Application provided interface that allows loading of user data. See
Returns a reference to the loaded frame hierarchy. See
Returns a reference to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See
If the function succeeds, the return value is
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
+Creates a
If the function succeeds, the return value is
Creates a .x file and saves the mesh hierarchy and corresponding animations in it.
+Pointer to a string that specifies the name of the .x file identifying the saved mesh. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Format of the .x file (text or binary, compressed or not). See
Root node of the hierarchy to be saved. See
Animation controller that has animation sets to be stored. See
Application-provided interface that allows saving of user data. See
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function does not save compressed animation sets.
+Computes the bounding sphere of all the meshes in the frame hierarchy.
+Pointer to the root node.
Returns the center of the bounding sphere.
Returns the radius of the bounding sphere.
If the function succeeds, the return value is
Creates an animation controller object.
+Maximum number of animation outputs the controller can support.
Maximum number of animation sets that can be mixed.
Maximum number of animation sets that can be mixed simultaneously.
Maximum number of outstanding events that the controller will support.
Pointer to the animation controller object created. See
If the function succeeds, the return value is
An animation controller controls an animation mixer. The controller adds methods to modify blending parameters over time to enable smooth transitions.
+Finds the child frame of a root frame.
+Pointer to the root frame. See
Name of the child frame to find.
Returns the child frame if it is found, or
Creates a
If the function succeeds, the return value is
Destroys the subtree of frames under the root, including the root.
+Pointer to the root node.
Allocation interface used to deallocate nodes of the frame hierarchy.
If the function succeeds, the return value is
Counts number of frames in a subtree that have non-null names.
+Pointer to the root node of the subtree.
Returns the frame count.
Creates a render environment map.
+Pointer to an
Size of the render surface.
The number of mipmap levels.
Member of the
If TRUE, the render surface supports a depth-stencil surface. Otherwise, this member is set to
If DepthStencil is set to TRUE, this parameter is a member of the
Address of a reference to an
If the function succeeds, the return value is
Returns the driver level.
+Pointer to an
The driver level. See remarks.
This method returns the driver version, which is one of the following:
Creates a font object for a device and font.
+Pointer to an
The height of the characters in logical units.
The width of the characters in logical units.
Typeface weight. One example is bold.
The number of mipmap levels.
True for italic font, false otherwise.
The character set of the font.
Specifies how Windows should attempt to match the desired font sizes and characteristics with actual fonts. Use OUT_TT_ONLY_PRECIS for instance, to ensure that you always get a TrueType font.
Specifies how Windows should match the desired font with a real font. It applies to raster fonts only and should not affect TrueType fonts.
Pitch and family index.
String containing the typeface name. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Returns a reference to an
If the function succeeds, the return value is
The creation of an
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
If you want more information about font parameters, see The Logical Font.
+Creates a render surface.
+Pointer to an
Width of the render surface, in pixels.
Height of the render surface, in pixels.
Member of the
If TRUE, the render surface supports a depth-stencil surface. Otherwise, this member is set to
If DepthStencil is set to TRUE, this parameter is a member of the
Address of a reference to an
If the function succeeds, the return value is
Creates a sprite object which is associated with a particular device. Sprite objects are used to draw 2D images to the screen.
+Pointer to an
Address of a reference to an
If the function succeeds, the return value is
This interface can be used to draw two dimensional images in screen space of the associated device.
+Creates a font object indirectly for both a device and a font.
+Pointer to an
Pointer to a
Returns a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Uses a left-handed coordinate system to create a line.
+Pointer to an
Pointer to an
If the function succeeds, the return value is
This function creates a mesh with the
Turns on or off all D3DX debug output.
+If TRUE, debugger output is halted; if
Returns the previous value of Mute.
Verify that the version of D3DX you compiled with is the version that you are running.
+Use
Use
Returns TRUE if the version of D3DX you compiled against is the version you are running with; otherwise,
Use this function during the initialization of your application like this:
CD3DXMyApplication::Initialize( hInstance, LPCSTR szWindowName, LPCSTR szClassName, UINT uWidth, UINT uHeight) + { hr; if (! ( , )) return E_FAIL; ... + } +
Use Direct3DCreate9 to verify that the correct runtime is installed.
+Create an effect from an ASCII or binary effect description.
+Pointer to the device that will create the effect. See
Pointer to a buffer containing an effect description.
Length of the effect data, in bytes.
An optional
Optional interface reference,
If pSrcData contains a text effect, flags can be a combination of
Pointer to a
Returns a reference to an
Returns a buffer containing a listing of compile errors.
If the function succeeds, the return value is
Disassemble an effect.
+Pointer to an
Enable color coding to make the disassembly easier to read.
Returns a buffer containing the disassembled shader. See
If the function succeeds, the return value is
Create an effect from an ASCII or binary effect description. This is an extended version of
If the function succeeds, the return value is
This function is an extended version of
This function checks each constant in pSkipConstants to see that:
If a constant is named in the string that is not present in the effect, it is ignored.
If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the LPCTSTR data type resolves to LPCSTR.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Create an effect from an ASCII or binary effect description.
+Pointer to the device.
Handle to a module containing the effect description. If this parameter is
Pointer to the resource. This parameter supports both Unicode and ANSI strings. See Remarks.
An optional
Optional interface reference,
If hSrcModule contains a text effect, flags can be a combination of
Pointer to a
Returns a buffer containing the compiled effect.
Returns a buffer containing a listing of compile errors.
If the function succeeds, the return value is
If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the LPCTSTR data type resolves to LPCSTR.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Creates an effect compiler from an ASCII effect description.
+Pointer to a buffer containing an effect description.
Length, in bytes, of the effect data.
An optional
Optional interface reference,
Compile options identified by various flags (see
Address of a reference to an
Address of a reference to an
If the function succeeds, the return value is
Create an effect from an ASCII or binary effect description. This function is an extended version of
If the function succeeds, the return value is
This function is an extended version of
This function checks each constant in pSkipConstants to see that:
If a constant is named in the string that is not present in the effect, it is ignored.
If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the LPCTSTR data type resolves to LPCSTR.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Creates an effect compiler from an ASCII effect description.
+Pointer to the filename. This parameter supports both Unicode and ANSI strings. See Remarks.
An optional
Optional interface reference,
Compile options identified by various flags (see
Address of a reference to an
Address of a reference to an
If the function succeeds, the return value is
If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the LPCTSTR data type resolves to LPCSTR.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Creates an
If the function succeeds, the return value is
If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the LPCTSTR data type resolves to LPCSTR.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Create an effect from an ASCII or binary effect description.
+Pointer to the device that will create the effect. See
Pointer to the filename. This parameter supports both Unicode and ANSI strings. See Remarks.
Optional
Optional interface reference,
If pSrcFile contains a text effect, flags can be a combination of
Pointer to a
Returns a reference to a buffer containing the compiled effect. See
Returns a reference to a buffer containing a listing of compile errors. See
If the function succeeds, the return value is
If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the LPCTSTR data type resolves to LPCSTR.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Create an effect pool. A pool is used to share parameters between effects.
+Returns a reference to the created pool.
If the method succeeds, the return value is
If the arguments are invalid, the method will return
If the method fails, the return value will be E_FAIL.
For effects within a pool, shared parameters with the same name share values.
+Creates an effect from an ASCII or binary effect description. This function is an extended version of
If the function succeeds, the return value is
This function is an extended version of
This function checks each constant in pSkipConstants to see that:
If a constant is named in the string that is not present in the effect, it is ignored.
+Saves a mesh to a .x file.
+Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh. This parameter may be
Pointer to an array of
Pointer to an array of effect instances, one per attribute group in the mesh. This parameter may be
Number of
A combination of file format and save options when saving an .x file. See D3DX X File Constants.
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
The default file format is binary; however, if a file is specified as both a binary and a text file, it will be saved as a text file. Regardless of the file format, you may also use the compressed format to reduce the file size.
The following is a typical code example of how to use this function.
+* m_pMesh; // Mesh object to be saved to a .x file + * m_pMaterials; // Array of material structs in the mesh + DWORD m_dwNumMaterials; // Number of material structs in the mesh DWORD dwFormat = ; // Binary-format .x file (default) + // DWORD dwFormat = ; // Text-format .x file // Load mesh into m_pMesh and determine values of m_pMaterials and + // m_dwNumMaterials with calls to D3DXLoadMeshxxx or other D3DX functions // ... ( L"outputxfilename.x", m_pMesh, null , m_pMaterials,null , m_dwNumMaterials, dwFormat ); +
Creates an N-patch mesh from a triangle mesh.
+Address of a reference to an
Address of a reference to an
If the function succeeds, the return value is
Returns a declarator from a flexible vertex format (FVF) code.
+Combination of
An array of
If the function succeeds, the return value is
Compute tangent, binormal, and normal vectors for a mesh.
+Pointer to an input
Combination of one or more
Use
If the function succeeds, the return value is
This function simply calls
(pMesh, , 0, , 0, , 0, , 0, dwOptions | , null , 0.01f, 0.25f, 0.01f,null ,null ); +
Singularities are handled as required by grouping edges and splitting vertices. If any vertices need to be split, the function will fail. The computed normal vector at each vertex is always normalized to have unit length.
The most robust solution for computing orthogonal Cartesian coordinates is to not set flags
Generates an optimized face remapping for a triangle list.
+Pointer to triangle list indices to use for ordering vertices.
Number of faces in the triangle list. For 16-bit meshes, this is limited to 2^16 - 1 (65535) or fewer faces.
Number of vertices referenced by the triangle list.
Flag indicating index type: TRUE if indices are 32-bit (more than 65535 indices),
Pointer to the original mesh face that was split to generate the current face.
If the function succeeds, the return value is
This function's optimization procedure is functionally equivalent to calling
Welds together replicated vertices that have equal attributes. This method uses specified epsilon values for equality comparisons.
+Pointer to an
Combination of one or more flags from D3DXWELDEPSILONSFLAGS.
Pointer to a D3DXWeldEpsilons structure, specifying the epsilon values to be used for this method. Use
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh. If the edge has no adjacent faces, the value is 0xffffffff. If this parameter is set to
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the optimized mesh. If the edge has no adjacent faces, the value is 0xffffffff.
An array of DWORDs, one per face, that identifies the original mesh face that corresponds to each face in the welded mesh.
Address of a reference to an
If the function succeeds, the return value is
This function uses supplied adjacency information to determine the points that are replicated. Vertices are merged based on an epsilon comparison. Vertices with equal position must already have been calculated and represented by point-representative data.
This function combines logically-welded vertices that have similar components, such as normals or texture coordinates within pEpsilons.
The following example code calls this function with welding enabled. Vertices are compared using epsilon values for normal vector and vertex position. A reference is returned to a face remapping array (pFaceRemap).
TCHAR strMediaPath[512]; // X-file path + LPD3DXBUFFER pAdjacencyBuffer =+null ; // adjacency data buffer + LPD3DXBUFFER pD3DXMtrlBuffer =null ; // material buffer + LPD3DXMESH pMesh =null ; // mesh object + DWORD m_dwNumMaterials; // number of materials +Epsilons; // structure with epsilon values + DWORD *pFaceRemap[65536]; // face remapping array + DWORD i; // internal variable // Load the mesh from the specified file hr = ( strMediaPath, , m_pd3dDevice, &pAdjacencyBuffer, &pD3DXMtrlBuffer, null , &m_dwNumMaterials, &pMesh ) ) if( FAILED( hr ) ) goto End; // Go to error handling // Set epsilon values Epsilons.Normal = 0.001; Epsilons.Position = 0.1; // Weld the vertices for( i=0; i < 65536; i++ ) { pFaceRemap[i] = 0; } hr =( pMesh, , &Epsilons, (DWORD*)pAdjacencyBuffer->GetBufferPointer(), (DWORD*)pAdjacencyBuffer->GetBufferPointer(), (DWORD*)pFaceRemap, null ) if( FAILED( hr ) ) goto End; // Go to error handling +
Generates an output vertex declaration from the input declaration. The output declaration is intended for use by the mesh tessellation functions.
+Pointer to the output vertex declaration. See
Pointer to the input vertex declaration. See
If the function succeeds, the return value is
Creates a buffer object.
+Size of the buffer to create, in bytes.
Address of a reference to an
If the function succeeds, the return value is
Loads a patch mesh from an
If the function succeeds, the return value is
For mesh files that do not contain effect instance information, default effect instances will be generated from the material information in the .x file. A default effect instance will have default values that correspond to the members of the
The default texture name is also filled in, but is handled differently. The name will be Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This will contain the string file name for the texture.
+Tessellates the given mesh using the N-patch tessellation scheme.
+Pointer to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh. This parameter may be
Number of segments per edge to tessellate.
Set to TRUE to use quadratic interpolation for normals; set to
Address of a reference to an
Address of a reference to an
If the function succeeds, the return value is
This function tessellates by using the N-patch algorithm.
+Calculates per-triangle IMT's from a custom application-specified signal that varies over the surface of the mesh (generally at a higher frequency than vertex data). The signal is evaluated via a user-specified callback function.
+A reference to an input mesh (see
Zero-based texture coordinate index that identifies which set of texture coordinates to use.
The number of components in each data point in the signal.
The maximum distance between vertices; the algorithm continues subdividing until the distance between all vertices is less than or equal to fMaxUVDistance.
Texture wrap options. This is a combination of one or more
A reference to a user-provided evaluator function, which will be used to compute the signal value at arbitrary U,V coordinates. The function follows the prototype of LPD3DXIMTSIGNALCALLBACK.
A reference to a user-defined value which is passed to the signal callback function. Typically used by an application to pass a reference to a data structure that provides context information for the callback function.
A reference to a callback function to monitor IMT computation progress.
A reference to a user-defined variable which is passed to the status callback function. Typically used by an application to pass a reference to a data structure that provides context information for the callback function.
A reference to the buffer (see
If the function succeeds, the return value is
This function requires that the input mesh contain a signal-to-mesh texture mapping (ie. texture coordinates). It allows the user to define a signal arbitrarily over the surface of the mesh.
+Validates a patch mesh, returning the number of degenerate vertices and patches.
+Pointer to an
Returns the number of degenerate vertices in the patch mesh.
Returns the number of degenerate patches in the patch mesh.
Returns a reference to a buffer containing a string of errors and warnings that explain the problems found in the patch mesh.
If the function succeeds, the return value is
This method validates the mesh by checking for invalid indices. Error information is available from the debugger output.
+Validates a mesh.
+Pointer to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh to be tested.
Returns a buffer containing a string of errors and warnings, which explain the problems found in the mesh.
If the function succeeds, the return value is
This method validates the mesh by checking for invalid indices. Error information is available from the debugger output.
+Splits a mesh into meshes smaller than the specified size.
+Pointer to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh to be simplified.
Maximum number of vertices in the resulting mesh.
Option flags for the new meshes.
Number of meshes returned.
Buffer containing an array of
Buffer containing an array of adjacency arrays (DWORDs) for the new meshes. See
Buffer containing an array of face remap arrays (DWORDs) for the new meshes. See
Buffer containing an array of vertex remap arrays for the new meshes. See
If the function succeeds, the return value is
A common use of this function is to split a mesh with 32-bit indices (more than 65535 vertices) into more than one mesh, each of which has 16-bit indices.
The adjacency, vertex remap and face remap arrays are arrays are DWORDs where each array contains n DWORD references, followed by the DWORD data referenced by the references. For example, to obtain the face remap information for face 3 in mesh 2, the following code could be used, assuming the face remap data was returned in a variable named ppFaceRemapArrayOut.
const DWORD **face_remaps = static_cast<DWORD **>(ppFaceRemapArrayOut->GetBufferPointer()); + const DWORD remap = face_remaps[2][3]; ++
Computes the tangent vectors for the texture coordinates given in the texture stage. Provided to support legacy applications. Use
If the function succeeds, the return value is
If the mesh vertex declaration specifies tangent or binormal fields,
This function simply calls
+( Mesh, , TexStageIndex, ( BinormIndex == D3DX_DEFAULT ) ? D3DX_DEFAULT : , // provides backward function compatibility BinormIndex, ( TangentIndex == D3DX_DEFAULT ) ? D3DX_DEFAULT : , TangentIndex, D3DX_DEFAULT, // do not store normals 0, ( Wrap ? : 0 ) | | , pAdjacency, -1.01f, -0.01f, -1.01f, null ,null ); +
Determines if a ray intersects with a mesh.
+Pointer to an
Pointer to a
Pointer to a
Pointer to a
Pointer to an index value of the face closest to the ray origin, if pHit is TRUE.
Pointer to a barycentric hit coordinate, U.
Pointer to a barycentric hit coordinate, V.
Pointer to a ray intersection parameter distance.
Pointer to an
Pointer to a DWORD that contains the number of entries in the ppAllHits array.
If the function succeeds, the return value is
The
Any point in the plane V1V2V3 can be represented by the barycentric coordinate (U,V). The parameter U controls how much V2 gets weighted into the result, and the parameter V controls how much V3 gets weighted into the result. Lastly, the value of [1 - (U + V)] controls how much V1 gets weighted into the result.
Barycentric coordinates are a form of general coordinates. In this context, using barycentric coordinates represents a change in coordinate systems. What holds true for Cartesian coordinates holds true for barycentric coordinates.
Barycentric coordinates define a point inside a triangle in terms of the triangle's vertices. For a more in-depth description of barycentric coordinates, see Mathworld's Barycentric Coordinates Description.
+Pack mesh partitioning data into an atlas.
+Pointer to an input mesh (see
Texture width.
Texture height.
The minimum distance, in texels, between two charts on the atlas. The gutter is always scaled by the width; so, if a gutter of 2.5 is used on a 512x512 texture, then the minimum distance between two charts is 2.5 / 512.0 texels.
Zero-based texture coordinate index that identifies which set of texture coordinates to use.
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh. It should be derived from the ppPartitionResultAdjacency returned from
A reference to a callback function (see LPD3DXUVATLASCB) that is useful for monitoring progress.
Specify how often D3DX will call the callback; a reasonable default value is 0.0001f.
A void reference to be passed back to the callback function.
This options parameter is currently reserved.
A reference to an
If the function succeeds, the return value is
Loads a skin mesh from a DirectX .x file data object.
+Pointer to an
Combination of one or more flags, from the D3DXMESH enumeration, specifying creation options for the mesh.
Pointer to an
Address of a reference to an
Address of a reference to an
Pointer to a buffer containing an array of effect instances, one per attribute group in the returned mesh. An effect instance is a particular instance of state information used to initialize an effect. See
Pointer to the number of
Address of a reference to an
Address of a reference to an
If the function succeeds, the return value is
This method takes a reference to an internal object in the .x file, enabling you to load the frame hierarchy.
For mesh files that do not contain effect instance information, default effect instances will be generated from the material information in the .x file. A default effect instance will have default values that correspond to the members of the
The default texture name is also filled in, but is handled differently. The name will be Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This will contain the string file name for the texture.
+Creates a mesh object using a declarator.
+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.
Number of vertices for the mesh. This parameter must be greater than 0.
Combination of one or more flags from the D3DXMESH enumeration, specifying options for the mesh.
Array of
Pointer to an
Address of a reference to an
If the function succeeds, the return value is
Creates an empty skin mesh object using a flexible vertex format (FVF) code.
+Number of vertices for the skin mesh.
Combination of
Number of bones for the skin mesh.
Address of a reference to an
If the function succeeds, the return value is
Use SetBoneInfluence to populate the empty skin mesh object returned by this method.
+Intersects the specified ray with the given mesh subset. This provides similar functionality to
If the function succeeds, the return value is
The
Any point in the plane V1V2V3 can be represented by the barycentric coordinate (U,V). The parameter U controls how much V2 gets weighted into the result and the parameter V controls how much V3 gets weighted into the result. Lastly, the value of [1 - (U + V)] controls how much V1 gets weighted into the result.
Barycentric coordinates are a form of general coordinates. In this context, using barycentric coordinates represents a change in coordinate systems. What holds true for Cartesian coordinates holds true for barycentric coordinates.
Barycentric coordinates define a point inside a triangle in terms of the triangle's vertices. For a more in-depth description of barycentric coordinates, see Mathworld's Barycentric Coordinates Description.
+Returns the size of a vertex for a flexible vertex format (FVF).
+FVF to be queried. A combination of
The FVF vertex size, in bytes.
Returns the number of elements in the vertex declaration.
+A reference to the vertex declaration. See
The number of elements in the vertex declaration.
Cleans a mesh, preparing it for simplification.
+Vertex operations to perform in preparation for mesh cleaning. See
Pointer to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh to be cleaned.
Address of a reference to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the output mesh.
Returns a buffer containing a string of errors and warnings, which explain the problems found in the mesh.
If the function succeeds, the return value is
This function cleans a mesh using the cleaning method and options specified in the CleanType parameter. See the
Computes the intersection of a ray and a triangle.
+Pointer to a
Pointer to a
Pointer to a
Pointer to a
Pointer to a
Barycentric hit coordinates, U.
Barycentric hit coordinates, V.
Ray-intersection parameter distance.
Returns TRUE if the ray intersects the area of the triangle. Otherwise, returns
Any point in the plane V1V2V3 can be represented by the barycentric coordinate (U,V). The parameter U controls how much V2 gets weighted into the result, and the parameter V controls how much V3 gets weighted into the result. Lastly, the value of [1 - (U + V)] controls how much V1 gets weighted into the result.
Barycentric coordinates are a form of general coordinates. In this context, using barycentric coordinates represents a change in coordinate systems. What holds true for Cartesian coordinates holds true for barycentric coordinates.
Barycentric coordinates define a point inside a triangle in terms of the triangle's vertices. For a more in-depth description of barycentric coordinates, see Mathworld's Barycentric Coordinates Description.
+Converts the specified mesh subset into a single triangle strip.
+Pointer to an
Attribute ID of the mesh subset to convert to strips.
Combination of one or more flags from the D3DXMESH enumeration, specifying options for creating the index buffer. Cannot be
Pointer to an
Number of indices in the buffer returned in the ppIndexBuffer parameter.
If the function succeeds, the return value is
Before running this function, call Optimize or
Creates an empty skin mesh object using a declarator.
+Number of vertices for the skin mesh.
Array of
Number of bones for the skin mesh.
Address of a reference to an
If the function succeeds, the return value is
Use SetBoneInfluence to populate the empty skin mesh object returned by this method.
+Returns the size of a vertex from the vertex declaration.
+A reference to the vertex declaration. See
The zero-based stream index.
The vertex declaration size, in bytes.
Tessellates a rectangular higher-order surface patch into a triangle mesh.
+Vertex buffer containing the patch data.
Pointer to an array of four floating-point values that identify the number of segments into which each edge of the rectangle patch should be divided when tessellated. See
Vertex declaration structure that defines the vertex data. See
Describes a rectangular patch. See
Pointer to the created mesh. See
If the function succeeds, the return value is
Use
Returns a flexible vertex format (FVF) code from a declarator.
+Array of
Pointer to a DWORD value, representing the returned combination of
This function will fail for any declarator that does not map directly to an FVF.
+Computes a coordinate-axis oriented bounding box.
+Pointer to the first position.
Number of vertices.
Count or number of bytes between vertices.
Pointer to a
Pointer to a
If the function succeeds, the return value is
Creates a skin mesh from another mesh.
+Pointer to an
The length of the array attached to the BoneId. See
Pointer to an array of bone combinations. See
Address of a reference to an
If the function succeeds, the return value is
Performs tangent frame computations on a mesh. Tangent, binormal, and optionally normal vectors are generated. Singularities are handled as required by grouping edges and splitting vertices.
+Pointer to an input
Specifies the texture coordinate input semantic. If D3DX_DEFAULT, the function assumes that there are no texture coordinates, and the function will fail unless normal vector calculation is specified.
If a mesh has multiple texture coordinates, specifies the texture coordinate to use for the tangent frame computations. If zero, the mesh has only a single texture coordinate.
Specifies the output semantic for the type, typically
Specifies the semantic index at which to store the partial derivative with respect to the U texture coordinate.
Specifies the
Specifies the semantic index at which to store the partial derivative with respect to the V texture coordinate.
Specifies the output normal semantic, typically
Specifies the semantic index at which to store the normal vector at each vertex.
Combination of one or more
Description | |
---|---|
Weight the normal vector length by the angle, in radians, subtended by the two edges leaving the vertex. | & !( |
Compute orthogonal Cartesian coordinates from texture coordinates (u, v). See Remarks. | & !( |
Textures are not wrapped in either u or v directions | & !( |
Partial derivatives with respect to texture coordinates are normalized. | & !( |
Vertices are ordered in a counterclockwise direction around each triangle. | & !( |
Use per-vertex normal vectors already present in the input mesh. | & !( |
?
If
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh. The number of bytes in this array must be at least 3 * GetNumFaces * sizeof(DWORD).
Specifies the maximum cosine of the angle at which two partial derivatives are deemed to be incompatible with each other. If the dot product of the direction of the two partial derivatives in adjacent triangles is less than or equal to this threshold, then the vertices shared between these triangles will be split.
Specifies the maximum magnitude of a partial derivative at which a vertex will be deemed singular. As multiple triangles are incident on a point that have nearby tangent frames, but altogether cancel each other out (such as at the top of a sphere), the magnitude of the partial derivative will decrease. If the magnitude is less than or equal to this threshold, then the vertex will be split for every triangle that contains it.
Similar to fPartialEdgeThreshold, specifies the maximum cosine of the angle between two normals that is a threshold beyond which vertices shared between triangles will be split. If the dot product of the two normals is less than the threshold, the shared vertices will be split, forming a hard edge between neighboring triangles. If the dot product is more than the threshold, neighboring triangles will have their normals interpolated.
Address of a reference to an output
Address of a reference to an output
If the function succeeds, the return value is
A simplified version of this function is available as
The computed normal vector at each vertex is always normalized to have unit length.
The most robust solution for computing orthogonal Cartesian coordinates is to not set flags
Determines if a ray intersects the volume of a sphere's bounding box.
+Pointer to a
Radius of the sphere.
Pointer to a
Pointer to a
Returns TRUE if the ray intersects the volume of the sphere's bounding box. Otherwise, returns
Create a UV atlas for a mesh.
+Pointer to an input mesh (see
The maximum number of charts to partition the mesh into. See remarks about the partitioning modes. Use 0 to tell D3DX that the atlas should be parameterized based on stretch.
The amount of stretching allowed. 0 means no stretching is allowed, 1 means any amount of stretching can be used.
Texture width.
Texture height.
The minimum distance, in texels, between two charts on the atlas. The gutter is always scaled by the width; so, if a gutter of 2.5 is used on a 512x512 texture, then the minimum distance between two charts is 2.5 / 512.0 texels.
Zero-based texture coordinate index that identifies which set of texture coordinates to use.
A reference to an array of adjacency data. with 3 DWORDs per face, indicating which triangles are adjacent to each other (see
An array with 3 DWORDS per face. Each face indicates if an edge is false or not. A non-false edge is indicated by -1, a false edge is indicated by any other value. This enables the parameterization of a mesh of quads where the edges down the middle of each quad will not be cut.
A reference to an array of integrated metric tensors that describes how to stretch a triangle (see IntegratedMetricTensor).
A reference to a callback function (see LPD3DXUVATLASCB) that is useful for monitoring progress.
Specify how often D3DX will call the callback; a reasonable default value is 0.0001f.
Pointer to a user-defined value which is passed to the callback function; typically used by an application to pass a reference to a data structure that provides context information for the callback function.
Specify the quality of the charts generated. See D3DXUVATLAS.
Pointer to the created mesh with the atlas (see
A reference to an array of the final face-partitioning data. Each element contains one DWORD per face (see
A reference to an array of remapped vertices. Each array element identifies the original vertex that each final vertex came from (if the vertex was split during remapping). Each array element contains one DWORD per vertex.
A reference to the maximum stretch value generated by the atlas algorithm. The range is between 0.0 and 1.0.
A reference to the number of charts created by the atlas algorithm. If dwMaxChartNumber is too low, this parameter will return the minimum number of charts required to create an atlas.
If the function succeeds, the return value is
Create a UV atlas for a mesh.
+Pointer to an input mesh (see
The maximum number of charts to partition the mesh into. See remarks about the partitioning modes. Use 0 to tell D3DX that the atlas should be parameterized based on stretch.
The amount of stretching allowed. 0 means no stretching is allowed, 1 means any amount of stretching can be used.
Zero-based texture coordinate index that identifies which set of texture coordinates to use.
A reference to an array of adjacency data with 3 DWORDs per face, indicating which triangles are adjacent to each other (see
An array with 3 DWORDS per face. Each face indicates if an edge is false or not. A non-false edge is indicated by -1, a false edge is indicated by any other value. This enables the parameterization of a mesh of quads where the edges down the middle of each quad will not be cut.
A reference to an array of integrated metric tensors that describes how to stretch a triangle (see IntegratedMetricTensor).
A reference to a callback function (see LPD3DXUVATLASCB) that is useful for monitoring progress.
Specify how often D3DX will call the callback; a reasonable default value is 0.0001f.
Pointer to a user-defined value that is passed to the callback function; typically used by an application to pass a reference to a data structure that provides context information for the callback function.
Specify the quality of the charts generated by combining one or more D3DXUVATLAS flags.
Pointer to the created mesh with the atlas (see
A reference to an array of the final face-partitioning data. Each element contains one DWORD per face (see
A reference to an array of remapped vertices. Each array element identifies the original vertex each final vertex came from (if the vertex was split during remapping). Each array element contains one DWORD per vertex.
Address of a reference to an
A reference to the maximum stretch value generated by the atlas algorithm. The range is between 0.0 and 1.0.
A reference to the number of charts created by the atlas algorithm. If dwMaxChartNumber is too low, this parameter will return the minimum number of charts required to create an atlas.
If the function succeeds, the return value is
Calculates per-triangle IMT's from a texture mapped onto a mesh, to be used optionally as input to the D3DX UVAtlas Functions.
+If the function succeeds, the return value is
Given a texture that maps over the surface of the mesh, the algorithm computes the IMT for each face. This will cause triangles containing lower-frequency signal data to take up less space in the final texture atlas when parameterized with the UVAtlas functions. The texture is assumed to be interpolated over the mesh bilinearly.
+Concatenates a group of meshes into one common mesh. This method can optionally apply a matrix transformation to each input mesh and its texture coordinates.
+Array of input mesh references (see
Number of input meshes to concatenate.
Mesh creation options; this is a combination of one or more D3DXMESH flags. The mesh creation options are equivalent to the options parameter required by
Optional array of geometry transforms. The number of elements in the array is NumMeshes; each element is a transformation matrix (see
Optional array of texture transforms. The number of elements in the array is NumMeshes; each element is a transformation matrix (see
Optional reference to a vertex declaration (see
Pointer to a
Address of a reference to the mesh created (see
If the function succeeds, the return value is
If no vertex declaration is given as part of the Options mesh creation parameter, the method will generate a union of all of the vertex declarations of the submeshes, promoting channels and types if necessary. The method will create an attribute table from attribute tables of the input meshes. To ensure creation of an attribute table, call Optimize with Flags set to
Determines whether a ray intersects the volume of a box's bounding box.
+Pointer to a
Pointer to a
Pointer to a
Pointer to a
Returns TRUE if the ray intersects the volume of the box's bounding box. Otherwise, returns
The values passed to
xmax, ymax, zmax + xmax, ymax, zmin + xmax, ymin, zmax + xmax, ymin, zmin + xmin, ymax, zmax + xmin, ymax, zmin + xmin, ymin, zmax + xmin, ymin, zmin +
The depth of the bounding box in the z direction is zmax - zmin, in the y direction is ymax - ymin, and in the x direction is xmax - xmin. For example, with the following minimum and maximum vectors, min (-1, -1, -1) and max (1, 1, 1), the bounding box is defined in the following manner.
1, 1, 1 1, 1, -1 1, -1, 1 1, -1, -1 + -1, 1, 1 + -1, 1, -1 + -1, -1, 1 + -1, -1, -l ++
Loads a mesh from a resource.
+Handle to the module where the resource is located, or
Pointer to a string that specifies the resource to create the mesh from. See remarks.
Pointer to a string that specifies the resource type. See remarks.
Combination of one or more flags from the D3DXMESH enumeration that specify creation options for the mesh.
Pointer to an
Address of a reference to an
Address of a reference to an
Pointer to a buffer containing an array of effect instances, one per attribute group in the returned mesh. An effect instance is a particular instance of state information used to initialize an effect. See
Pointer to the number of
Address of a reference to an
If the function succeeds, the return value is
See FindResource to find out more about the Module, Name and Type parameters.
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
For mesh files that do not contain effect instance information, default effect instances will be generated from the material information in the .x file. A default effect instance will have default values that correspond to the members of the
The default texture name is also filled in, but is handled differently. The name will be Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This will contain the string file name for the texture.
+Generates a simplified mesh using the provided weights that come as close as possible to the given MinValue.
+Pointer to an
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh to be simplified.
Pointer to a
Pointer to an array of vertex weights. If this parameter is set to
Number of vertices or faces, depending on the flag set in the Options parameter, by which to simplify the source mesh.
Specifies simplification options for the mesh. One of the flags in D3DXMESHSIMP can be set.
Address of a reference to an
If the function succeeds, the return value is
This function generates a mesh that has MinValue vertices or faces.
If the simplification process cannot reduce the mesh to MinValue, the call still succeeds because MinValue is a desired minimum, not an absolute minimum.
If pVertexAttributeWeights is set to
AttributeWeights; AttributeWeights.Position = 1.0; + AttributeWeights.Boundary = 1.0; + AttributeWeights.Normal = 1.0; + AttributeWeights.Diffuse = 0.0; + AttributeWeights.Specular = 0.0; + AttributeWeights.Tex[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; +
This default structure is what most applications should use because it considers only geometric and normal adjustment. Only in special cases will the other member fields need to be modified.
+Creates a mesh object using a flexible vertex format (FVF) code.
+Number of faces for the mesh. The valid range for this number is greater than 0, and one less than the max DWORD value, typically 232 - 1, because the last index is reserved.
Number of vertices for the mesh. This parameter must be greater than 0.
Combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh.
Combination of
Pointer to an
Address of a reference to an
If the function succeeds, the return value is
Calculate per-triangle IMT's from from per-vertex data. This function allows you to calculate the IMT based off of any value in a mesh (color, normal, etc).
+A reference to an input mesh (see
A reference to an array of per-vertex data from which IMT will be computed. The array size is uSignalStride * v, where v is the number of vertices in the mesh.
The number of floats per vertex.
The number of bytes per vertex in the array. This must be a multiple of sizeof(float)
Texture wrap options. This is a combination of one or more
A reference to a callback function to monitor IMT computation progress.
A reference to a user-defined variable which is passed to the status callback function. Typically used by an application to pass a reference to a data structure that provides context information for the callback function.
A reference to the buffer (see
If the function succeeds, the return value is
Generates an optimized vertex remapping for a triangle list. This function is commonly used after applying the face remapping generated by
If the function succeeds, the return value is
By default, a mesh uses 16 bit indices when it is created unless the application specifies otherwise. To check whether an existing mesh uses 16-bit or 32-bit indices, call
Loads a mesh from a DirectX .x file.
+Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Combination of one or more flags from the D3DXMESH enumeration, which specifies creation options for the mesh.
Pointer to an
Pointer to a buffer that contains adjacency data. The adjacency data contains an array of three DWORDs per face that specify the three neighbors for each face in the mesh. For more information about accessing the buffer, see
Pointer to a buffer containing materials data. The buffer contains an array of
Pointer to a buffer containing an array of effect instances, one per attribute group in the returned mesh. An effect instance is a particular instance of state information used to initialize an effect. See
Pointer to the number of
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
For mesh files that do not contain effect instance information, default effect instances will be generated from the material information in the .x file. A default effect instance will have default values that correspond to the members of the
The default texture name is also filled in, but is handled differently. The name will be Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This will contain the string file name for the texture.
+Creates a mesh from a control-patch mesh.
+Patch information structure. For more information, see
Number of patches.
Number of control vertices in the patch.
Unused. Reserved for later use.
Array of
Pointer the device that creates the patch mesh. See
Pointer to the
If the function succeeds, the return value is
This method takes an input patch mesh and converts it to a tessellated mesh. Patch meshes use 16-bit index buffers. Therefore, indices to LockIndexBuffer are 16 bits.
+Gets the size of the rectangle patch.
+Number of segments per edge to tessellate.
Pointer to a DWORD that contains the number of triangles in the patch.
Pointer to a DWORD that contains the number of vertices in the patch.
If the function succeeds, the return value is
Tessellates a triangular higher-order surface patch into a triangle mesh.
+Vertex buffer containing the patch data.
Pointer to an array of three floating-point values that identify the number of segments into which each edge of the triangle patch should be divided when tessellated. See
Vertex declaration structure that defines the vertex data. See
Describes a triangle patch. See
Pointer to the created mesh. See
If the function succeeds, the return value is
Use
Computes a bounding sphere for the mesh.
+Pointer to first position.
Number of vertices.
Number of bytes between position vectors. Use GetNumBytesPerVertex,
Radius of the returned bounding sphere.
If the function succeeds, the return value is
Loads a mesh from a DirectX .x file.
+Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Combination of one or more flags from the D3DXMESH enumeration, which specifies creation options for the mesh.
Pointer to an
Pointer to a buffer that contains adjacency data. The adjacency data contains an array of three DWORDs per face that specify the three neighbors for each face in the mesh. For more information about accessing the buffer, see
Pointer to a buffer containing materials data. The buffer contains an array of
Pointer to a buffer containing an array of effect instances, one per attribute group in the returned mesh. An effect instance is a particular instance of state information used to initialize an effect. See
Pointer to the number of
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
For mesh files that do not contain effect instance information, default effect instances will be generated from the material information in the .x file. A default effect instance will have default values that correspond to the members of the
The default texture name is also filled in, but is handled differently. The name will be Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This will contain the string file name for the texture.
+Loads a mesh from memory.
+Pointer to the memory buffer which contains the mesh data.
Size of the file in memory, in bytes.
Combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh.
Pointer to an
Address of a reference to an
Address of a reference to an
Pointer to a buffer containing an array of effect instances, one per attribute group in the returned mesh. An effect instance is a particular instance of state information used to initialize an effect. See
Pointer to the number of
Address of a reference to an
If the function succeeds, the return value is
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
For mesh files that do not contain effect instance information, default effect instances will be generated from the material information in the .x file. A default effect instance will have default values that correspond to the members of the
The default texture name is also filled in, but is handled differently. The name will be Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This will contain the string file name for the texture.
+Convert the specified mesh subset into a series of strips.
+Pointer to an
Attribute ID of the mesh subset to convert to strips.
Combination of one or more flags from the D3DXMESH enumeration, specifying options for creating the index buffer. Cannot be
Pointer to an
Number of indices in the buffer returned in the ppIndexBuffer parameter.
Buffer containing an array of one DWORD per strip, which specifies the number of triangles in the that strip.
Number of individual strips in the index buffer and corresponding strip length array.
If the function succeeds, the return value is
Before running this function, call Optimize or
Calculate per-triangle IMT's from per-texel data. This function is similar to
If the function succeeds, the return value is
Gets the size of the triangle patch.
+Number of segments per edge to tessellate.
Pointer to a DWORD that contains the number of triangles in the patch.
Pointer to a DWORD that contains the number of vertices in the triangle patch.
If the function succeeds, the return value is
Computes unit normals for each vertex in a mesh. Provided to support legacy applications. Use
If the function succeeds, the return value is
The input mesh must have the
A normal for a vertex is generated by averaging the normals of all faces that share that vertex.
If adjacency is provided, replicated vertices are ignored and "smoothed" over. If adjacency is not provided, replicated vertices will have normals averaged in from only the faces explicitly referencing them.
This function simply calls
+( pMesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, , 0, | , pAdjacency, -1.01f, -0.01f, -1.01f, null ,null ); +
Disassemble a shader.
Note??Instead of using this legacy function, we recommend that you use the
If the function succeeds, the return value is
Preprocesses a shader without performing compilation. This resolves all #defines and #includes, providing a self-contained shader for subsequent compilation.
Note??Instead of using this legacy function, we recommend that you use the
If the function succeeds, the return value is
Compile a shader file.
Note??Instead of using this legacy function, we recommend that you compile offline by using the Fxc.exe command-line compiler or use the
If the function succeeds, the return value is
E_NOTIMPL is returned if you're using 1.1 shaders (vs_1_1and ps_1_1).
Creates a texture shader object from the compiled shader.
+Pointer to the function DWORD stream.
Returns an
If the function succeeds, the return value is
Get the semantics for all shader output elements.
+Pointer to the shader function DWORD stream.
Pointer to an array of
Returns the number of elements in pSemantics.
If the function succeeds, the return value is
Gets the semantics for the shader inputs. Use this method to determine the input vertex format.
+Pointer to the shader function DWORD stream.
Pointer to an array of
Returns the number of elements in pSemantics.
If the function succeeds, the return value is
Use
Returns the name of the highest high-level shader language (HLSL) profile supported by a given device.
+Pointer to the device. See
The HLSL profile name.
If the device does not support pixel shaders then the function returns
A shader profile specifies the assembly shader version to use and the capabilities available to the HLSL compiler when compiling a shader. The following table lists the pixel shader profiles that are supported.
Shader Profile | Description |
---|---|
ps_1_1 | Compile to ps_1_1 version. |
ps_1_2 | Compile to ps_1_2 version. |
ps_1_3 | Compile to ps_1_3 version. |
ps_1_4 | Compile to ps_1_4 version. |
ps_2_0 | Compile to ps_2_0 version. |
ps_2_a | Same as the ps_2_0 profile, with the following additional capabilities available for the compiler to target:
|
ps_2_b | Same as the ps_2_0 profile, with the following additional capabilities available for the compiler to target:
|
ps_3_0 | Compile to ps_3_0 version. |
?
For more information about the differences between shader versions, see Pixel Shader Differences.
+Searches through a shader for a particular comment. The comment is identified by a four-character code (FOURCC) in the first DWORD of the comment.
+Pointer to the shader function DWORD stream.
FOURCC code that identifies the comment block. See FourCC Formats.
Returns a reference to the comment data (not including the comment token and FOURCC code). This value can be
Returns the size of the comment data in bytes. This value can be
If the function succeeds, the return value is
Assemble a shader.
+Handle to a module containing the effect description. If this parameter is
Pointer to a string that specifies the resource name. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
An optional
Optional interface reference,
Compile options identified by various flags. The Direct3D 10 HLSL compiler is now the default. See
Returns a buffer containing the created shader. This buffer contains the compiled shader code, as well as any embedded debug and symbol table information.
Returns a buffer containing a listing of errors and warnings that were encountered during the compile. These are the same messages the debugger displays when running in debug mode. This value may be
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Assemble a shader.
+Pointer to a memory buffer that contains the shader data.
Length of the effect data, in bytes.
An optional
Optional interface reference,
Compile options identified by various flags. The Direct3D 10 HLSL compiler is now the default. See
Returns a buffer containing the created shader. This buffer contains the compiled shader code, as well as any embedded debug and symbol table information.
Returns a buffer containing a listing of errors and warnings that were encountered during the compile. These are the same messages the debugger displays when running in debug mode. This value may be
If the function succeeds, the return value is
Compile a shader file.
Note??Instead of using this legacy function, we recommend that you compile offline by using the Fxc.exe command-line compiler or use the
If the function succeeds, the return value is
Get the sampler names referenced in a shader.
+Pointer to the shader function DWORD stream.
Pointer to an array of LPCSTRs. The function will fill this array with references to the sampler names contained within pFunction. The maximum array size is the maximum number of sampler registers (16 for vs_3_0 and ps_3_0).
To find the number of samplers used, check pCount after calling
Returns the number of samplers referenced by the shader.
If the function succeeds, the return value is
Gets the shader-constant table embedded inside a shader.
+Pointer to the function DWORD stream.
Returns the constant table interface (see
A constant table is generated by
Assemble a shader.
+Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
An optional
Optional interface reference,
Compile options identified by various flags. The Direct3D 10 HLSL compiler is now the default. See
Returns a buffer containing the created shader. This buffer contains the compiled shader code, as well as any embedded debug and symbol table information.
Returns a buffer containing a listing of errors and warnings that were encountered during the compile. These are the same messages the debugger displays when running in debug mode. This value may be
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Gets the shader-constant table embedded inside a shader.
+Pointer to the function DWORD stream.
Use the D3DXCONSTTABLE_LARGEADDRESSAWARE flag to access up to 4 GB of virtual address space (instead of the default of 2 GB). If you do not need the additional virtual address space, use
Returns the constant table interface (see
If the function succeeds, the return value is
A constant table is generated by
Returns the name of the highest high-level shader language (HLSL) profile supported by a given device.
+Pointer to the device. See
The HLSL profile name.
If the device does not support vertex shaders then the function returns
A shader profile specifies the assembly shader version to use and the capabilities available to the HLSL compiler when compiling a shader. The following table lists the vertex shader profiles that are supported.
Shader Profile | Description |
---|---|
vs_1_1 | Compile to vs_1_1 version. |
vs_2_0 | Compile to vs_2_0 version. |
vs_2_a | Same as the vs_2_0 profile, with the following additional capabilities available for the compiler to target:
|
vs_3_0 | Compile to vs_3_0 version. |
?
For more information about the differences between shader versions, see Vertex Shader Differences.
+Preprocesses a shader resource without performing compilation. This resolves all #defines and #includes, providing a self-contained shader for subsequent compilation.
Note??Instead of using this legacy function, we recommend that you use the
If the function succeeds, the return value is
Compile a shader file.
Note??Instead of using this legacy function, we recommend that you compile offline by using the Fxc.exe command-line compiler or use the
If the function succeeds, the return value is
Preprocesses a shader file without performing compilation. This resolves all #defines and #includes, providing a self-contained shader for subsequent compilation.
Note??Instead of using this legacy function, we recommend that you use the
If the function succeeds, the return value is
Returns the size of the shader byte code, in bytes.
+Pointer to the function DWORD stream.
Returns the size of the shader byte code, in bytes.
Returns the shader version of the compiled shader.
+Pointer to the function DWORD stream.
Returns the shader version of the given shader, or zero if the shader function is
Uses a left-handed coordinate system to create a mesh containing a cylinder.
+Pointer to an
Radius at the negative Z end. Value should be greater than or equal to 0.0f.
Radius at the positive Z end. Value should be greater than or equal to 0.0f.
Length of the cylinder along the z-axis.
Number of slices about the main axis.
Number of stacks along the main axis.
Address of a reference to the output shape, an
Address of a reference to an
If the function succeeds, the return value is
The created cylinder is centered at the origin, and its axis is aligned with the z-axis.
This function creates a mesh with the
Uses a left-handed coordinate system to create a mesh containing a torus.
+Pointer to an
Inner-radius of the torus. Value should be greater than or equal to 0.0f.
Outer-radius of the torus. Value should be greater than or equal to 0.0f.
Number of sides in a cross-section. Value must be greater than or equal to 3.
Number of rings making up the torus. Value must be greater than or equal to 3.
Address of a reference to the output shape, an
Address of a reference to an
If the function succeeds, the return value is
The created torus is centered at the origin, and its axis is aligned with the z-axis. The inner radius of the torus is the radius of the cross-section (the minor radius), and the outer radius of the torus is the radius of the central hole.
This function returns a mesh that can be used later for drawing or manipulation by the application.
This function creates a mesh with the
Uses a left-handed coordinate system to create a mesh containing a sphere.
+Pointer to an
Radius of the sphere. This value should be greater than or equal to 0.0f.
Number of slices about the main axis.
Number of stacks along the main axis.
Address of a reference to the output shape, an
Address of a reference to an
If the function succeeds, the return value is
The created sphere is centered at the origin, and its axis is aligned with the z-axis.
This function creates a mesh with the
Uses a left-handed coordinate system to create a mesh containing a teapot.
+Pointer to an
Address of a reference to the output shape, an
Address of a reference to an
If the function succeeds, the return value is
This function creates a mesh with the
Uses a left-handed coordinate system to create a mesh containing an axis-aligned box.
+Pointer to an
Width of the box, along the x-axis.
Height of the box, along the y-axis.
Depth of the box, along the z-axis.
Address of a reference to the output shape, an
Address of a reference to an
If the function succeeds, the return value is
The created box is centered at the origin.
This function creates a mesh with the
Uses a left-handed coordinate system to create a mesh containing an + n-sided polygon.
+Pointer to an
Length of each side.
Number of sides for the polygon. Value must be greater than or equal to 3.
Address of a reference to the output shape, an
Address of a reference to an
If the function succeeds, the return value is
The created polygon is centered at the origin.
This function creates a mesh with the
Creates a mesh containing the specified text, using the font associated with the device context.
+Pointer to the device that created the mesh.
Device context, containing the font for output. The font selected by the device context must be a TrueType font.
Pointer to a string that specifies the text to generate. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Maximum chordal deviation from TrueType font outlines.
Amount to extrude text in the negative z-direction.
Pointer to the returned mesh.
Pointer to a buffer containing adjacency information. May be
Pointer to an array of GLYPHMETRICSFLOAT structures that contain the glyph metric data. Each element contains information about the position and orientation of the corresponding glyph in the string. The number of elements in the array should be equal to the number of characters in the string. Note that the origin in each structure is not relative to the entire string, but rather is relative to that character cell. To compute the entire bounding box, add the increment for each glyph while traversing the string. If you are not concerned with the glyph sizes, set this parameter to
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function creates a mesh with the
Retrieves information about a given image file in memory.
+VOID reference to the source file in memory.
Size of file in memory, in bytes. .
Pointer to a
Uses a compiled high-level shader language (HLSL) function to fill each texel of each mipmap level of a texture.
+Pointer to an
Pointer to a
If the function succeeds, the return value is
The texture target must be an HLSL function that takes contains the following semantics:
The input parameters can be in any order. For an example, see
Creates an empty cube texture, adjusting the calling parameters as needed.
+Pointer to an
Width and height of the cube texture, in pixels. For example, if the cube texture is an 8-pixel by 8-pixel cube, the value for this parameter should be 8.
Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created.
0,
Member of the
Member of the
Address of a reference to an
If the function succeeds, the return value is
Cube textures differ from other surfaces in that they are collections of surfaces.
Internally,
Creates a volume texture from a file. This is a more advanced function than
If the function succeeds, the return value is
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
+Uses a compiled high-level shader language (HLSL) function to fill each texel of each mipmap level of a texture.
+Pointer to an
Pointer to a
If the function succeeds, the return value is
The texture target must be an HLSL function that takes contains the following semantics:
The following is an example of such an HLSL function:
float4 TextureGradientFill( float2 vTexCoord : POSITION, float2 vTexelSize : PSIZE) : COLOR { float r,g, b, xSq,ySq, a; xSq = 2.f*vTexCoord.x-1.f; xSq *= xSq; ySq = 2.f*vTexCoord.y-1.f; ySq *= ySq; a = sqrt(xSq+ySq); if (a > 1.0f) { a = 1.0f-(a-1.0f); } else if (a < 0.2f) { a = 0.2f; } r = 1-vTexCoord.x; g = 1-vTexCoord.y; b = vTexCoord.x; return float4(r, g, b, a); }; +
Note that the input parameters can be in any order, but both input semantics must be represented.
+Checks cube-texture-creation parameters.
+Pointer to an
Pointer to the requested width and height in pixels, or
Pointer to the number of requested mipmap levels, or
0 or
Pointer to a member of the
Member of the
If the function succeeds, the return value is
If parameters to this function are invalid, this function returns corrected parameters.
Cube textures differ from other surfaces in that they are collections of surfaces. To call SetRenderTarget with a cube texture, you must select an individual face using GetCubeMapSurface and pass the resulting surface to SetRenderTarget.
+Creates a texture from a file.
+Pointer to an
Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
The function is equivalent to
Mipmapped textures automatically have each level filled with the loaded texture.
When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, the images need to be loaded manually.
Note that a resource created with this function will be placed in the memory class denoted by
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
For the best performance when using
Loads a surface from a file.
+Pointer to an
Pointer to a
Pointer to a
Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to a
Combination of one or more
Pointer to a
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function handles conversion to and from compressed texture formats and supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Writing to a non-level-zero surface will not cause the dirty rectangle to be updated. If
Uses a user-provided function to fill each texel of each mip level of a given cube texture.
+Pointer to an
Pointer to a user-provided evaluator function, which will be used to compute the value of each texel. The function follows the prototype of LPD3DXFILL3D.
Pointer to an arbitrary block of user-defined data. This reference will be passed to the function provided in pFunction.
If the function succeeds, the return value is
Here is an example that creates a function called ColorCubeFill, which relies on
// Define a function that matches the prototype of LPD3DXFILL3D + VOID WINAPI ColorCubeFill (+* pOut, const * pTexCoord, + const * pTexelSize, LPVOID pData) + { *pOut = (pTexCoord->x, pTexCoord->y, pTexCoord->z, 0.0f); + } // Fill the texture using + if (FAILED (hr = (m_pTexture, ColorCubeFill, null ))) + { return hr; + } +
Creates an empty volume texture, adjusting the calling parameters as needed.
+Pointer to an
Width in pixels. This value must be nonzero. The maximum dimension that a driver supports (for width, height, and depth) can be found in MaxVolumeExtent in
Height in pixels. This value must be nonzero. The maximum dimension that a driver supports (for width, height, and depth) can be found in MaxVolumeExtent in
Depth in pixels. This value must be nonzero. The maximum dimension that a driver supports (for width, height, and depth) can be found in MaxVolumeExtent in
Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created.
0 or
Member of the
Member of the
Address of a reference to an
If the function succeeds, the return value is
Internally,
Loads a volume from a file.
+Pointer to an
Pointer to a
Pointer to a
Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to a
Combination of one or more
Pointer to a
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function handles conversion to and from compressed texture formats and supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If
Creates a texture from a file. This is a more advanced function than
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Use
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Mipmapped textures automatically have each level filled with the loaded texture. When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, then the images need to be loaded manually.
For the best performance when using
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
+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
Pointer to an
Pointer to a
One or more
One
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.
If the function succeeds, the return value is
This method computes the normal by using the central difference with a kernel size of 3x3. The central differencing denominator used is 2.0. RGB channels in the destination contain biased (x,y,z) components of the normal.
+Checks volume-texture-creation parameters.
+Pointer to an
Pointer to the requested width in pixels, or
Pointer to the requested height in pixels, or
Pointer to the requested depth in pixels, or
Pointer to the number of requested mipmap levels, or
Currently not used, set to 0.
Pointer to a member of the
Member of the
If the function succeeds, the return value is
If parameters to this function are invalid, this function returns corrected parameters.
+Creates a texture from a file in memory.
+Pointer to an
Pointer to the file in memory from which to create the texture.
Size in bytes of the file in memory.
Address of a reference to an
If the function succeeds, the return value is
The function is equivalent to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Note that a resource created with this function when called from a
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Creates a cube texture from a resource specified by a string. This is a more advanced function than
If the function succeeds, the return value is
The compiler setting determines the function version. If Unicode is defined, the function call resolves to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Cube textures differ from other surfaces in that they are collections of surfaces. To call SetRenderTarget with a cube texture, you must select an individual face using GetCubeMapSurface and pass the resulting surface to SetRenderTarget.
Creates a volume texture from a file in memory.
+Pointer to an
Pointer to the file in memory from which to create the volume texture.
Size of the file in memory, in bytes.
Address of a reference to an
If the function succeeds, the return value is
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
The function is equivalent to
Note that a resource created with this function when called from a
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Loads a volume from another volume.
+Pointer to an
Pointer to a
Pointer to a
A Pointer to an
Pointer to a
Pointer to a
A combination of one or more
If the function succeeds, the return value is
Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If
Saves a texture to a file.
+Pointer to a string that specifies the file name of the destination image. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to
Pointer to a
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function handles conversion to and from compressed texture formats.
If the volume is nondynamic (because of a usage parameter set to 0 at the creation) and located in video memory (the memory pool set to
Creates a texture from a file.
+Pointer to an
Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
The function is equivalent to
Mipmapped textures automatically have each level filled with the loaded texture.
When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, the images need to be loaded manually.
Note that a resource created with this function will be placed in the memory class denoted by
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
For the best performance when using
Creates a cube texture from a file in memory. This is a more advanced function than
If the function succeeds, the return value is
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Cube textures differ from other surfaces in that they are collections of surfaces. To call SetRenderTarget with a cube texture, you must select an individual face using GetCubeMapSurface and pass the resulting surface to SetRenderTarget .
This method is designed to be used for loading image files stored as RT_RCDATA, which is an application-defined resource (raw data). Otherwise this method will fail.
For details on
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
+Creates a texture from a resource. This is a more advanced function than
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
The resource being loaded must be of type RT_BITMAP or RT_RCDATA. Resource type RT_RCDATA is used to load formats other than bitmaps (such as .tga, .jpg, and .dds).
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
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.
Pointer to a
This function supports both Unicode and ANSI strings.
+Loads a surface from memory.
+Pointer to an
Pointer to a
Pointer to a
Pointer to the upper left corner of the source image in memory.
Member of the
Pitch of source image, in bytes. For DXT formats, this number should represent the width of one row of cells, in bytes.
Pointer to a
Pointer to a
Combination of one or more
If the function succeeds, the return value is
This function handles conversion to and from compressed texture formats.
Writing to a non-level-zero surface will not cause the dirty rectangle to be updated. If
Saves a texture to an image file.
+
Pointer to
Pointer to a
Address of a reference to an
This function handles conversion to and from compressed texture formats.
+Checks texture-creation parameters.
+Pointer to an
Pointer to the requested width in pixels, or
Pointer to the requested height in pixels, or
Pointer to number of requested mipmap levels, or
0 or
Pointer to a member of the
Member of the
If the function succeeds, the return value is
If parameters to this function are invalid, this function returns corrected parameters.
This function uses the following heuristics when comparing the requested requirements against available formats:
Saves a volume to a file on disk.
+Pointer to a string that specifies the file name of the destination image. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to
Pointer to a
Pointer to a
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function handles conversion to and from compressed texture formats.
If the volume is nondynamic (because of a usage parameter set to 0 at the creation) and located in video memory (the memory pool set to
Loads a volume from a resource.
+Pointer to an
Pointer to a
Pointer to a
Handle to the module where the resource is located, or
Pointer to a string that specifies the file name of the source image. If UNICODE or _UNICODE are defined, this parameter type is LPCWSTR, otherwise, the type is LPCSTR.
Pointer to a
Combination of one or more
Pointer to a
If the function succeeds, the return value is
The resource being loaded must be a bitmap resource(RT_BITMAP).
This function handles conversion to and from compressed texture formats.
Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If
This function supports both Unicode and ANSI strings.
+Creates a volume texture from a resource specified by a string. This is a more advanced function than
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
The resource being loaded must be an application-defined resource (RT_RCDATA).
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Creates a cube texture from a resource.
+Pointer to an
Handle to the module where the resource is located, or
Pointer to a string that specifies the resource name. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Address of a reference to an
If the function succeeds, the return value is
The compiler setting determines the function version. If Unicode is defined, the function call resolves to
The function is equivalent to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Note that a resource created with this function when called from a
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Saves a surface to a file.
+Pointer to a string that specifies the file name of the destination image. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to
Pointer to a
Pointer to a
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function handles conversion to and from compressed texture formats.
+Creates a cube texture from a file in memory.
+Pointer to an
Pointer to the file in memory from which to create the cubemap. See Remarks.
Size of the file in memory, in bytes.
Address of a reference to an
If the function succeeds, the return value is
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
The function is equivalent to
Note that a resource created with this function when called from a
This method is designed to be used for loading image files stored as RT_RCDATA, which is an application-defined resource (raw data). Otherwise this method will fail.
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Creates a cube texture from a file. This is a more advanced function than
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Cube textures differ from other surfaces in that they are collections of surfaces. To call SetRenderTarget with a cube texture, you must select an individual face using GetCubeMapSurface and pass the resulting surface to SetRenderTarget.
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
+Retrieves information about a given image in a resource.
+Module where the resource is loaded. Set this parameter to
Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Pointer to a
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
Uses a compiled high-level shader language (HLSL) function to fill each texel of each mipmap level of a texture.
+Pointer to an
Pointer to a
If the function succeeds, the return value is
The texture target must be an HLSL function that takes contains the following semantics:
The input parameters can be in any order. For an example, see
Uses a user-provided function to fill each texel of each mip level of a given texture.
+Pointer to an
Pointer to a user-provided evaluator function, which will be used to compute the value of each texel. The function follows the prototype of LPD3DXFILL2D.
Pointer to an arbitrary block of user-defined data. This reference will be passed to the function provided in pFunction.
If the function succeeds, the return value is
Here is an example that creates a function called ColorFill, which relies on
// Define a function that matches the prototype of LPD3DXFILL3D + VOID WINAPI ColorFill (+* pOut, const * pTexCoord, + const * pTexelSize, LPVOID pData) + { *pOut = (pTexCoord->x, pTexCoord->y, 0.0f, 0.0f); + } // Fill the texture using + if (FAILED (hr = (m_pTexture, ColorFill, null ))) + { return hr; + } +
Saves a surface to an image file.
+Address of a reference to an
Pointer to
Pointer to a
Pointer to a
If the function succeeds, the return value is
This function handles conversion to and from compressed texture formats.
+Creates a volume texture from a file.
+Pointer to an
Pointer to a string that specifies the file name. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
The function is equivalent to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Mipmapped textures automatically have each level filled with the loaded texture.
When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, then the images need to be loaded manually.
Note that a resource created with this function when called from a
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Creates a texture from a resource.
+Pointer to an
Handle to the module where the resource is located, or
Pointer to a string that specifies the resource name. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
The function is equivalent to
The resource being loaded must be of type RT_BITMAP or RT_RCDATA. Resource type RT_RCDATA is used to load formats other than bitmaps (such as .tga, .jpg, and .dds).
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Note that a resource created with this function when called from a
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Loads a volume from memory.
+Pointer to an
Pointer to a
Pointer to a
Pointer to the top-left corner of the source volume in memory.
Member of the
Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one row of cells, in bytes.
Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one slice of cells, in bytes.
Pointer to a
Pointer to a
A combination of one or more
If the function succeeds, the return value is
Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If
Creates a volume texture from a file.
+Pointer to an
Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Width in pixels. If this value is zero or D3DX_DEFAULT, the dimensions are taken from the file. The maximum dimension that a driver supports (for width, height, and depth) can be found in MaxVolumeExtent in
Height, in pixels. If this value is zero or D3DX_DEFAULT, the dimensions are taken from the file. The maximum dimension that a driver supports (for width, height, and depth) can be found in MaxVolumeExtent in
Depth, in pixels. If this value is zero or D3DX_DEFAULT, the dimensions are taken from the file. The maximum dimension that a driver supports (for width, height, and depth) can be found in MaxVolumeExtent in
Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created.
0,
Member of the
Member of the
A combination of one or more
A combination of one or more
Pointer to a
Pointer to a
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Mipmapped textures automatically have each level filled with the loaded volume texture. When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, then the images need to be loaded manually.
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
+Creates a texture from a file in memory. This is a more advanced function than
If the function succeeds, the return value is
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
For details about
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
+Saves a volume to a buffer. The method creates an
If the function succeeds, the return value is
Creates a volume texture from a resource.
+Pointer to an
Handle to the module where the resource is located, or
Pointer to a string that specifies the resource name. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
Address of a reference to an
If the function succeeds, the return value is
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to
The function is equivalent to
The resource being loaded must be an application-defined resource (RT_RCDATA).
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Note that a resource created with this function when called from a
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to
Creates an empty texture, adjusting the calling parameters as needed.
+Pointer to an
Width in pixels. If this value is 0, a value of 1 is used. See Remarks.
Height in pixels. If this value is 0, a value of 1 is used. See Remarks.
Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created.
0,
Member of the
Member of the
Address of a reference to an
If the function succeeds, the return value is
Internally,
If both Height and Width are set to D3DX_DEFAULT, a value of 256 is used for both parameters. If either Height or Width is set to D3DX_DEFAULT And the other parameter is set to a numeric value, the texture will be square with both the height and width equal to the numeric value.
+Uses a user-provided function to fill each texel of each mip level of a given volume texture.
+Pointer to an
Pointer to a user-provided evaluator function, which will be used to compute the value of each texel. The function follows the prototype of LPD3DXFILL3D.
Pointer to an arbitrary block of user-defined data. This reference will be passed to the function provided in pFunction.
If the function succeeds, the return value is
If the volume is non-dynamic (because usage is set to 0 when it is created), and located in video memory (the memory pool set to
This example creates a function called ColorVolumeFill, which relies on
// Define a function that matches the prototype of LPD3DXFILL3D + VOID WINAPI ColorVolumeFill (+* pOut, const * pTexCoord, + const * pTexelSize, LPVOID pData) + { *pOut = (pTexCoord->x, pTexCoord->y, pTexCoord->z, 0.0f); + } // Fill volume texture + if (FAILED (hr = (m_pTexture, ColorVolumeFill, null ))) + { return hr; + } +
Loads a surface from another surface with color conversion.
+Pointer to an
Pointer to a
Pointer to a
Pointer to an
Pointer to a
Pointer to a
A combination of one or more
If the function succeeds, the return value is
This function handles conversion to and from compressed texture formats.
Writing to a non-level-zero surface will not cause the dirty rectangle to be updated. If
Loads a volume from a file in memory.
+Pointer to an
Pointer to a
Pointer to a
Pointer to the file in memory from which to load the volume.
Size in bytes of the file in memory.
Pointer to a
Combination of one or more
Pointer to a
If the function succeeds, the return value is
This function handles conversion to and from compressed texture formats and supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See
Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If
Creates an instance of an
If the function succeeds, the return value is
After using this function, use RegisterTemplates or RegisterEnumTemplates to register templates, CreateEnumObject to create an enumerator object, or CreateSaveObject to create a save object.
+An application implements this interface to handle callbacks in animation sets generated by calls to
The LPD3DXANIMATIONCALLBACKHANDLER type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXANIMATIONCALLBACKHANDLER; +
The application implements this method. This method is called when a callback occurs for an animation set in one of the tracks during a call to
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
This interface is used to control animation functionality, connecting animation sets with the transformation frames that are being animated. The interface has methods to mix multiple animations and to modify blending parameters over time to enable smooth transitions and other effects.
+Create an animation controller object with
The LPD3DXANIMATIONCONTROLLER type is defined as a reference to the
typedef interface; + typedef interface *LPD3DXANIMATIONCONTROLLER; +
The D3DXEVENTHANDLE type is defined as an event handle to animation controller events.
typedef DWORD D3DXEVENTHANDLE; +
The LPD3DXEVENTHANDLE type is defined as a reference to an event handle to animation controller events.
typedef D3DXEVENTHANDLE *LPD3DXEVENTHANDLE; ++
Get the maximum number of animation outputs the animation controller can support.
+Gets the maximum number of animation sets the animation controller can support.
+Gets the maximum number of tracks in the animation controller.
+The maximum number of tracks the controller can manage.
+Gets the maximum number of events the animation controller can support.
+Returns the number of animation sets currently registered in the animation controller.
+The controller contains any number of animations sets and tracks. Animation sets can be registered with RegisterAnimationOutput. An animation controller created by a call to
Gets the global animation time.
+Animations are designed using a local animation time and mixed into global time with AdvanceTime.
+Gets or sets the current priority blending weight used by the animation controller.
+The priority blending weight is used to blend high and low priority tracks together.
+Returns an event handle to a priority blend event that is currently running.
+Get the maximum number of animation outputs the animation controller can support.
+The maximum number of animation outputs the controller can manage.
Gets the maximum number of animation sets the animation controller can support.
+The maximum number of animation sets the controller can manage.
Gets the maximum number of tracks in the animation controller.
+Number of tracks.
The maximum number of tracks the controller can manage.
+Gets the maximum number of events the animation controller can support.
+The maximum number of events the controller can manage.
Adds an animation output to the animation controller and registers references for scale, rotate, and translate (SRT) transformations.
+Name of the animation output.
Pointer to a
Pointer to a
Pointer to a
Pointer to a
If the method succeeds, the return value is
If the animation output is already registered, pMatrix will be filled with the input transformation data.
Animation sets created with
Adds an animation set to the animation controller.
+Pointer to the
If the method succeeds, the return value is
Removes an animation set from the animation controller.
+Pointer to the
If the method succeeds, the return value is
Returns the number of animation sets currently registered in the animation controller.
+Number of animation sets.
The controller contains any number of animations sets and tracks. Animation sets can be registered with RegisterAnimationOutput. An animation controller created by a call to
Gets an animation set.
+Index of the animation set.
Pointer to the
If the method succeeds, the return value is
The animation controller contains an array of animation sets. This method returns one of them at the given index.
+Gets an animation set, given its name.
+String containing the name of the animation set.
Pointer to the
If the method succeeds, the return value is
The animation controller contains an array of animation sets. This method returns an animation set that has the given name.
+Animates the mesh and advances the global animation time by a specified amount.
+Amount, in seconds, by which to advance the global animation time. TimeDelta value must be non-negative or zero.
Pointer to a user-defined animation callback handler interface,
If the method succeeds, the return value is
Resets the global animation time to zero. Any pending events will retain their original schedules, but in the new timeframe.
+If the method succeeds, the return value is
This method is typically used when the global animation time value is nearing the maximum precision of DOUBLE storage, or 264 - 1.
+Gets the global animation time.
+Returns the global animation time.
Animations are designed using a local animation time and mixed into global time with AdvanceTime.
+Applies the animation set to the specified track.
+Identifier of the track to which the animation set is applied.
Pointer to the
If the method succeeds, the return value is
This method sets the animation set to the specified track for mixing. The animation set for each track is blended according to the track weight and speed when AdvanceTime is called.
+Gets the animation set for the given track.
+Track identifier.
Pointer to the
If the method succeeds, the return value is
Sets the priority blending weight for the specified animation track.
+Track identifier.
Track priority. This parameter should be set to one of the constants from
If the method succeeds, the return value is
Sets the track speed. The track speed is similar to a multiplier that is used to speed up or slow down the playback of the track.
+Identifier of the track to set the speed on.
New speed.
If the method succeeds, the return value is
Sets the track weight. The weight is used to determine how to blend multiple tracks together.
+Identifier of the track to set the weight on.
Weight value.
If the method succeeds, the return value is
Sets the track to the specified local animation time.
+Track identifier.
Local animation time value to assign to the track.
If the method succeeds, the return value is
Enables or disables a track in the animation controller.
+Identifier of the track to be mixed.
Enable value. Set to TRUE to enable this track in the controller, or to
If the method succeeds, the return value is
To mix a track with other tracks, the Enable flag must be set to TRUE. Conversely, setting the flag to
Sets the track description.
+Identifier of the track to modify.
Description of the track.
If the method succeeds, the return value is
Gets the track description.
+Track identifier.
Pointer to the track description. See
If the method succeeds, the return value is
Sets the priority blending weight used by the animation controller.
+Priority blending weight used by the animation controller.
If the method succeeds, the return value is
The blend weight is used to blend high and low priority tracks together.
+Gets the current priority blending weight used by the animation controller.
+Returns the current priority blending weight.
The priority blending weight is used to blend high and low priority tracks together.
+Sets an event key that changes the rate of play of an animation track.
+Identifier of the track to modify.
New speed of the animation track.
Global time key. Specifies the global time when the change will take place.
Transition time, which specifies how long the smooth transition will take to complete.
Specifies the transition type used for transitioning between speeds. See
Event handle to the priority blend event.
Sets an event key that changes the weight of an animation track. The weight is used as a multiplier when combining multiple tracks together.
+Identifier of the track to modify.
New weight of the track.
Global time key. Specifies the global time when the change will take place.
Transition time, which specifies how long the smooth transition will take to complete.
Specifies the transition type used for transitioning between weights. See
Event handle to the priority blend event.
The weight is used like a multiplier to determine how much of this track to blend together with other tracks.
+Sets an event key that changes the local time of an animation track.
+Identifier of the track to modify.
New local time of the animation track.
Global time key. Specifies the global time when the change will take place.
Event handle to the priority blend event.
Sets an event key that enables or disables an animation track.
+Identifier of the animation track to modify.
Enable flag. Set this to TRUE to enable the animation track, or to
Global time key. Specifies the global time when the change will take place.
Event handle to the priority blend event.
Sets blending event keys for the specified animation track.
+Number between 0 and 1 that is used to blend tracks together.
Global time to start the blend.
Global time duration of the blend.
Specifies the transition type used for the duration of the blend. See
Event handle to the priority blend event.
The animation controller blends in three phases: low priority tracks are blended first, high priority tracks are blended second, and then the results of both are blended.
+Removes a specified event from an animation track, preventing the execution of the event.
+Event handle to the event to be removed from the animation track.
If the method succeeds, the return value is
Removes all events from a specified animation track.
+Identifier of the track on which all events should be removed.
If the method succeeds, the return value is
This method prevents the execution of all events previously scheduled on the track, and discards all data associated with those events.
+Removes all scheduled priority blend events from the animation controller.
+If the method succeeds, the return value is
Returns an event handle to the event currently running on the specified animation track.
+Track identifier.
Type of event to query.
Event handle to the event currently running on the specified track.
Returns an event handle to a priority blend event that is currently running.
+Event handle to the currently running priority blend event.
Returns an event handle to the next event scheduled to occur after a specified event on an animation track.
+Track identifier.
Event handle to a specified event after which to search for a following event. If set to
Event handle to the next event scheduled to run on the specified track.
This method can be used iteratively to locate a desired event by repeatedly passing in
Note??Do not iterate further after the method has returned
Returns an event handle to the next priority blend event scheduled to occur after a specified event.
+Event handle to a specified event after which to search for a following priority blend event. If set to
Event handle to the next scheduled priority blend event.
This method can be used iteratively to locate a desired priority blend event by repeatedly passing in
Note??Do not iterate further after the method has returned
Checks whether a specified event handle is valid and the animation event has not yet completed.
+Event handle to an animation event.
Returns
Returns E_FAIL if the event handle is invalid and/or the event has completed.
The method will indicate that an event handle is valid even if the event is running but has not yet completed.
+Gets a description of a specified animation event.
+Event handle to an animation event to describe.
Pointer to a
If the method succeeds, the return value is
Clones, or copies, an animation controller.
+Maximum number of animation outputs the controller can support.
Maximum number of animation sets the controller can support.
Maximum number of tracks the controller can support.
Maximum number of events the controller can support.
Address of a reference to the cloned
If the method succeeds, the return value is
This interface encapsulates the minimum functionality required of an animation set by an animation controller. Advanced users might want to implement this interface themselves to suit their specialized needs; for most users, however, the derived
An animation set consists of animations for many nodes for the same animation.
The LPD3DXANIMATIONSET type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXANIMATIONSET; +
Gets the animation set name.
+Gets the period of the animation set.
+The period is the range of time that the animation key frames are valid. For looping animations, this is the period of the loop. The time units that the key frames are specified in (for example, seconds) is determined by the application.
+Gets the number of animations in the animation set.
+Gets the animation set name.
+Name of the animation set.
Gets the period of the animation set.
+Period of the animation set.
The period is the range of time that the animation key frames are valid. For looping animations, this is the period of the loop. The time units that the key frames are specified in (for example, seconds) is determined by the application.
+Returns time position in the local timeframe of an animation set.
+Local time of the animation set.
Time position as measured in the timeframe of the animation set. This value will be bounded by the period of the animation set.
The time position returned by this method can be used as the PeriodicPosition parameter of
Gets the number of animations in the animation set.
+Number of animations in the animation set.
Gets the name of an animation, given its index.
+Index of the animation.
Address of a reference to a string that receives the animation name.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
Gets the index of an animation, given its name.
+Name of the animation.
Pointer to the animation index.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
Gets the scale, rotation, and translation values of the animation set.
+Position of the animation set. The position can be obtained by calling
Animation index.
Pointer to the
Pointer to the
Pointer to the
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
Gets information about a specific callback in the animation set.
+Position from which to find callbacks.
Callback search flags. This parameter can be set to a combination of one or more flags from
Pointer to the position of the callback.
Address of the callback data reference.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
Locks a vertex buffer and obtains a reference to the vertex buffer memory.
+When working with vertex buffers, you are allowed to make multiple lock calls; however, you must ensure that the number of lock calls match the number of unlock calls. DrawPrimitive calls will not succeed with any outstanding lock count on any currently set vertex buffer.
+Gets the fixed function vertex value.
+This method can return 0 if the vertex format cannot be mapped directly to an FVF code. This will occur for a mesh created from a vertex declaration that doesn't have the same order and elements supported by the FVF codes.
+Gets the number of bytes per vertex.
+Retrieves the mesh options enabled for this mesh at creation time.
+Retrieves the device associated with the mesh.
+Calling this method will increase the internal reference count on the
Retrieves the vertex buffer associated with the mesh.
+Retrieves the data in an index buffer.
+Draws a subset of a mesh.
+DWORD that 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.
If the method succeeds, the return value is
The subset that is specified by AttribId will be rendered by the
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.
+Retrieves the number of faces in the mesh.
+Returns the number of faces in the mesh.
Retrieves the number of vertices in the mesh.
+Returns the number of vertices in the mesh.
Gets the fixed function vertex value.
+Returns the flexible vertex format (FVF) codes.
This method can return 0 if the vertex format cannot be mapped directly to an FVF code. This will occur for a mesh created from a vertex declaration that doesn't have the same order and elements supported by the FVF codes.
+Retrieves a declaration describing the vertices in the mesh.
+Array of
If the method succeeds, the return value is
The array of elements includes the D3DDECL_END macro, which ends the declaration.
+Gets the number of bytes per vertex.
+Returns the number of bytes per vertex.
Retrieves the mesh options enabled for this mesh at creation time.
+Returns a combination of one or more of the following flags, indicating the options enabled for this mesh at creation time.
Value | Description |
---|---|
Use 32-bit indices. | |
Use the | |
Equivalent to specifying both | |
Use the | |
Specifying this flag causes the vertex and index buffer of the mesh to be created with | |
Equivalent to specifying both | |
Use the | |
Use the | |
Use the | |
Use the | |
Use the | |
Equivalent to specifying both | |
Use the | |
Use the | |
Use the | |
Use the | |
Equivalent to specifying both |
?
Retrieves the device associated with the mesh.
+Address of a reference to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count on the
Clones a mesh using a flexible vertex format (FVF) code.
+A combination of one or more D3DXMESH flags specifying creation options for the mesh.
Combination of FVF codes, which specifies the vertex format for the vertices in the output mesh. For the values of the codes, see
Pointer to an
Address of a reference to an
If the method succeeds, the return value is
Clones a mesh using a declarator.
+A combination of one or more D3DXMESH flags specifying creation options for the mesh.
An array of
Pointer to an
Address of a reference to an
If the method succeeds, the return value is
Retrieves the vertex buffer associated with the mesh.
+Address of a reference to an
If the method succeeds, the return value is
Retrieves the data in an index buffer.
+Address of a reference to an
If the method succeeds, the return value is
Locks a vertex buffer and obtains a reference to the vertex buffer memory.
+Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
VOID* reference to a buffer containing the vertex data.
If the method succeeds, the return value is
When working with vertex buffers, you are allowed to make multiple lock calls; however, you must ensure that the number of lock calls match the number of unlock calls. DrawPrimitive calls will not succeed with any outstanding lock count on any currently set vertex buffer.
+Unlocks a vertex buffer.
+If the method succeeds, the return value is
Locks an index buffer and obtains a reference to the index buffer memory.
+Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
VOID* reference to a buffer containing the index data. The count of indices in this buffer will be equal to
If the method succeeds, the return value is
When working with index buffers, you are allowed to make multiple lock calls. However, you must ensure that the number of lock calls match the number of unlock calls. DrawPrimitive calls will not succeed with any outstanding lock count on any currently set index buffer.
+Unlocks an index buffer.
+If the method succeeds, the return value is
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
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.
If the method succeeds, the return value is
An attribute table is created by
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.
+Converts point representative data to mesh adjacency information.
+Pointer to an array of one DWORD per vertex of the mesh that contains point representative data. This parameter is optional. Supplying a
Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh. The number of bytes in this array must be at least 3 *
If the method succeeds, the return value is
Converts mesh adjacency information to an array of point representatives.
+Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh. The number of bytes in this array must be at least 3 *
Pointer to an array of one DWORD per vertex of the mesh that will be filled with point representative data.
If the method succeeds, the return value is
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.
Pointer to an array of three DWORDs per face to be filled with the indices of adjacent faces. The number of bytes in this array must be at least 3 *
If the method succeeds, the return value is
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.
+This method allows the user to change the mesh declaration without changing the data layout of the vertex buffer. The call is valid only if the old and new declaration formats have the same vertex size.
+An array of
If the method succeeds, the return value is
An application uses the methods of this interface to implement a key frame animation set stored in a compressed data format.
+Create a compressed-format key frame animation set with
The LPD3DXCOMPRESSEDANIMATIONSET type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXCOMPRESSEDANIMATIONSET; +
Gets the type of the animation set playback loop.
+Gets the number of animation key frame ticks that occur per second.
+Gets the data buffer that stores compressed key frame animation data.
+Gets the number of callback keys in the animation set.
+Gets the type of the animation set playback loop.
+Type of the animation set playback loop. See
Gets the number of animation key frame ticks that occur per second.
+Number of animation key frame ticks that occur per second.
Gets the data buffer that stores compressed key frame animation data.
+Address of a reference to the
If the method succeeds, the return value is
Gets the number of callback keys in the animation set.
+Number of callback keys in the animation set.
Fills an array with callback key data used for key frame animation.
+Pointer to a user-allocated array of
If the method succeeds, the return value is
This is a user-implemented interface that allows a user to set the device state from an effect. Each of the methods in this interface must be implemented by the user and will then be used as callbacks to the application when either of the following occur:
When an application uses the state manager to implement custom callbacks, an effect no longer automatically saves and restores state when calling
A user creates an
The LPD3DXEFFECTSTATEMANAGER type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXEFFECTSTATEMANAGER; +
A callback function that must be implemented by a user to set material state.
+A callback function that must be implemented by a user to set the number of subdivision segments for N-patches.
+A callback function that must be implemented by a user to set a FVF code.
+A callback function that must be implemented by a user to set a vertex shader.
+A callback function that must be implemented by a user to set a pixel shader.
+A callback function that must be implemented by a user to set a transform.
+The type of transform to apply the matrix to. See
A transformation matrix. See
The user-implemented method should return
A callback function that must be implemented by a user to set material state.
+A reference to the material state. See
The user-implemented method should return
A callback function that must be implemented by a user to set a light.
+The zero-based index of the light. This is the same index in
The light object. See
The user-implemented method should return
A callback function that must be implemented by a user to enable/disable a light.
+The zero-based index of the light. This is the same index in
True to enable the light, false otherwise.
The user-implemented method should return
A callback function that must be implemented by a user to set render state.
+The render state to set.
The render state value. See Effect States (Direct3D 9).
The user-implemented method should return
A callback function that must be implemented by a user to set a texture.
+The stage to which the texture is assigned. This is the index value in
A reference to the texture object. This can be any of the Direct3D texture types (cube, volume, etc.). See
The user-implemented method should return
A callback function that must be implemented by a user to set the texture stage state.
+The stage that the texture is assigned to. This is the index value in
Defines the type of operation that a texture stage will perform. See
Can be either an operation (
The user-implemented method should return
A callback function that must be implemented by a user to set a sampler.
+The zero-based sampler number.
Identifies sampler state, which can specify the filtering, addressing, or the border color. See
A value from one of the sampler state types in Type.
The user-implemented method should return
A callback function that must be implemented by a user to set the number of subdivision segments for N-patches.
+Break the surface into this number of subdivisions. This is the same as the number used by
The user-implemented method should return
A callback function that must be implemented by a user to set a FVF code.
+The FVF constant, that determines how to interpret vertex data. See
The user-implemented method should return
A callback function that must be implemented by a user to set a vertex shader.
+A reference to a vertex shader object. See
The user-implemented method should return
A callback function that must be implemented by a user to set an array of vertex shader floating-point constants.
+The zero-based index of the first constant register.
An array of floating-point constants.
The number of registers in pConstantData.
The user-implemented method should return
A callback function that must be implemented by a user to set an array of vertex shader integer constants.
+The zero-based index of the first constant register.
An array of integer constants.
The number of registers in pConstantData.
The user-implemented method should return
A callback function that must be implemented by a user to set an array of vertex shader Boolean constants.
+The zero-based index of the first constant register.
An array of Boolean constants.
The number of registers in pConstantData.
The user-implemented method should return
A callback function that must be implemented by a user to set a pixel shader.
+A reference to a pixel shader object. See
The user-implemented method should return
A callback function that must be implemented by a user to set an array of vertex shader floating-point constants.
+The zero-based index of the first constant register.
An array of floating-point constants.
The number of registers in pConstantData.
The user-implemented method should return
A callback function that must be implemented by a user to set an array of vertex shader integer constants.
+The zero-based index of the first constant register.
An array of integer constants.
The number of registers in pConstantData.
The user-implemented method should return
A callback function that must be implemented by a user to set an array of vertex shader Boolean constants.
+The zero-based index of the first constant register.
An array of Boolean constants.
The number of registers in pConstantData.
The user-implemented method should return
This interface is implemented by the application to allocate or free frame and mesh container objects. Methods on this are called during loading and destroying frame hierarchies.
+The LPD3DXALLOCATEHIERARCHY type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXALLOCATEHIERARCHY; +
Requests allocation of a frame object.
+Name of the frame to be created.
Returns the created frame object.
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
Requests allocation of a mesh container object.
+Name of the mesh.
Pointer to the mesh data structure. See
Array of materials used in the mesh.
Array of effect instances used in the mesh. See
Number of materials in the materials array.
Adjacency array for the mesh.
Pointer to the skin mesh object if skin data is found. See
Returns the created mesh container. See
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
Requests deallocation of a frame object.
+Pointer to the frame to be deallocated.
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
Requests deallocation of a mesh container object.
+Pointer to the mesh container object to be deallocated.
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
This interface is implemented by the application to save any additional user data embedded in .x files. An instance of this interface is passed to
The LPD3DXLOADUSERDATA type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXLOADUSERDATA; +
Load top level data from a .x file.
+Pointer to a .x file data structure. This is defined in Dxfile.h.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
Load frame child data from a .x file.
+Pointer to a mesh container. See
Pointer to a .x file data structure. This is defined in Dxfile.h.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
Load mesh child data from a .x file.
+Pointer to a mesh container. See
Pointer to a .x file data structure. This is defined in Dxfile.h.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
A user creates an
The LPD3DXINCLUDE type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXINCLUDE; +
Applications use the methods of the
The
This interface inherits additional functionality from the
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DINDEXBUFFER9 and PDIRECT3DINDEXBUFFER9 types are defined as references to the
typedef struct+*LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9; +
Retrieves a description of the index buffer resource.
+Locks a range of index data and obtains a reference to the index buffer memory.
+Offset into the index data to lock, in bytes. Lock the entire index buffer by specifying 0 for both parameters, SizeToLock and OffsetToLock.
Size of the index data to lock, in bytes. Lock the entire index buffer by specifying 0 for both parameters, SizeToLock and OffsetToLock.
VOID* reference to a memory buffer containing the returned index data.
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
If the method succeeds, the return value is
As a general rule, do not hold a lock across more than one frame. When working with index buffers, you are allowed to make multiple lock calls. However, you must ensure that the number of lock calls match the number of unlock calls.
The
See Programming Tips (Direct3D 9) for information about using
Unlocks index data.
+If the method succeeds, the return value is
Retrieves a description of the index buffer resource.
+Pointer to a
If the method succeeds, the return value is
This interface is implemented by the application to save any additional user data embedded in .x files. An instance of this interface is passed to
The LPD3DXSAVEUSERDATA type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXSAVEUSERDATA; +
Add child data to the frame.
+Pointer to a mesh container. See
Pointer to a .x file save object. Use the reference to call
Pointer to a .x file data node. Use the reference to call
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
Add child data to the mesh.
+Pointer to a mesh container. See
Pointer to a .x file save object. Use the reference to call
Pointer to a .x file data node. Use the reference to call
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
Add a top level object before the frame hierarchy.
+Pointer to a .x file save object. Use this reference to call IDirectXFileSaveObject::CreateDataObject to create the data object to be saved. Then call IDirectXFileSaveObject::SaveData to save the data.
The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return
Add a top level object after the frame hierarchy.
+Pointer to a .x file save object. Use this reference to call IDirectXFileSaveObject::CreateDataObject to create the data object to be saved. Then call IDirectXFileSaveObject::SaveData to save the data.
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
A callback for the user to register a .x file template.
+Use this reference to register user-defined .x file templates. See
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
A callback for the user to save a .x file template.
+Pointer to a .x file save object. Do not use this parameter to add data objects. See
The return values of this method are implemented by an application programmer.In general, if no error occurs, program the method to return
An application uses the methods of this interface to implement a key frame animation set.
+Create a keyframed animation set with
The LPD3DXKEYFRAMEDANIMATIONSET type is defined as a reference to this interface.
typedef interface+; + typedef interface *LPD3DXKEYFRAMEDANIMATIONSET; +
Gets the type of the animation set playback loop.
+Gets the number of animation key frame ticks that occur per second.
+Gets the number of callback keys in the animation set.
+Gets the type of the animation set playback loop.
+Type of the animation set playback loop. See
Gets the number of animation key frame ticks that occur per second.
+Number of animation key frame ticks that occur per second.
Gets the number of scale keys in the specified key frame animation.
+Animation index.
Number of scale keys in the specified key frame animation.
Fills an array with scale key data used for key frame animation.
+Animation index.
Pointer to a user-allocated array of
If the method succeeds, the return value is
Get scale information for a specific key frame in the animation set.
+Animation index.
Key frame.
Pointer to the scale data. See
If the method succeeds, the return value is
Set scale information for a specific key frame in the animation set.
+Animation index.
Key frame.
Pointer to the scale data. See
If the method succeeds, the return value is
Gets the number of rotation keys in the specified key frame animation.
+Animation index.
Number of rotation keys in the specified key frame animation.
Fills an array with rotational key data used for key frame animation.
+Animation index.
Pointer to a user-allocated array of
If the method succeeds, the return value is
Get rotation information for a specific key frame in the animation set.
+Animation index.
Key frame.
Pointer to the rotation data. See
If the method succeeds, the return value is
Set rotation information for a specific key frame in the animation set.
+Animation index.
Key frame.
Pointer to the rotation data. See
If the method succeeds, the return value is
Gets the number of translation keys in the specified key frame animation.
+Animation index.
Number of translation keys in the specified key frame animation.
Fills an array with translational key data used for key frame animation.
+Animation index.
Pointer to a user-allocated array of
If the method succeeds, the return value is
Get translation information for a specific key frame in the animation set.
+Animation index.
Key Frame.
Pointer to the rotation information. See
If the method succeeds, the return value is
Set translation information for a specific key frame in the animation set.
+Animation index.
Key Frame.
Pointer to the translation data. See
If the method succeeds, the return value is
Gets the number of callback keys in the animation set.
+Number of callback keys in the animation set.
Fills an array with callback key data used for key frame animation.
+Pointer to a user-allocated array of
If the method succeeds, the return value is
Gets information about a specific callback in the animation set.
+Animation index.
Pointer to the callback function.
If the method succeeds, the return value is
Sets information about a specific callback in the animation set.
+Animation index.
Pointer to the callback function.
If the method succeeds, the return value is
Removes the scale data at the specified key frame.
+Animation identifier.
Key frame.
If the method succeeds, the return value is
This method is slow and should not be used after an animation has begun to play.
+Removes the rotation data at the specified key frame.
+Animation identifier.
Key frame.
If the method succeeds, the return value is
This method is slow and should not be used after an animation has begun to play.
+Removes the translation data at the specified key frame.
+Animation identifier.
Key frame.
If the method succeeds, the return value is
This method is slow and should not be used after an animation has begun to play.
+Register the scale, rotate, and translate (SRT) key frame data for an animation.
+Pointer to the animation name.
Number of scale keys.
Number of rotation keys.
Number of translation keys.
Address of a reference to a user-allocated array of
Address of a reference to a user-allocated array of
Address of a reference to a user-allocated array of
Returns the animation index.
If the method succeeds, the return value is
Transforms animations in an animation set into a compressed format and returns a reference to the buffer that stores the compressed data.
+One of the
Desired compression loss ratio, in the range from 0 to 1.
Pointer to a
Address of a reference to the
If the method succeeds, the return value is
Remove the animation data from the animation set.
+The animation index.
If the method succeeds, the return value is
The
Create a line drawing object with
The LPD3DXLINE type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DXLINE; +
Retrieves the Direct3D device associated with the line object.
+Gets or sets the line stipple pattern.
+Gets or sets the stipple-pattern scale value.
+Gets or sets the thickness of the line.
+Gets or sets the line antialiasing state.
+Gets or sets the OpenGL-style line-drawing mode.
+Retrieves the Direct3D device associated with the line object.
+Address of a reference to an
If the method succeeds, the return value is
Prepares a device for drawing lines.
+If the method succeeds, the return value is
Calling
This method must be called from inside an
Draws a line strip in screen space. Input is in the form of an array that defines points (of
If the method succeeds, the return value is
Draws a line strip in screen space with a specified input transformation matrix.
+Array of vertices that make up the line. See
Number of vertices in the vertex list.
A scale, rotate, and translate (SRT) matrix for transforming the points. See
Color of the line. See
If the method succeeds, the return value is
Applies a stipple pattern to the line.
+Describes the stipple pattern: 1 is opaque, 0 is transparent.
If the method succeeds, the return value is
Gets the line stipple pattern.
+Returns the line stipple pattern: 1 is opaque, 0 is transparent.
Stretches the stipple pattern along the line direction.
+Stipple pattern scaling value. 1.0f is the default value and represents no scaling. A value less than 1.0f shrinks the pattern, and a value greater than 1.0 stretches the pattern.
If the method succeeds, the return value is
Gets the stipple-pattern scale value.
+Returns the value used to scale the stipple-pattern. 1.0f is the default value and represents no scaling. A value less than 1.0f shrinks the pattern, and a value greater than 1.0 stretches the pattern.
Specifies the thickness of the line.
+Describes the line width.
If the method succeeds, the return value is
Gets the thickness of the line.
+The line thickness.
Toggles line antialiasing.
+Toggles antialiasing on and off. TRUE turns antialiasing on, and
If the method succeeds, the return value is
Gets the line antialiasing state.
+Returns the antialiasing switch value. TRUE means antialiasing is on, and
Toggles the mode to draw OpenGL-style lines.
+Toggles OpenGL-style line drawing. TRUE enables OpenGL-style lines, and
If the method succeeds, the return value is
Gets the OpenGL-style line-drawing mode.
+Returns TRUE if OpenGL-style lines are enabled, and
Restores the device state to how it was when
If the method succeeds, the return value is
Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost, or before resetting a device.
+If the method succeeds, the return value is
This method should be called whenever the device is lost or before the user calls
Use this method to re-acquire resources and save initial state.
+If the method succeeds, the return value is
Applications use the methods of the
To obtain the
This interface inherits additional functionality from the
The LPD3DXMESH type is defined as a reference to the
typedef struct+*LPD3DXMESH; +
Locks the mesh buffer that contains the mesh attribute data, and returns a reference to it.
+Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
Address of a reference to a buffer containing a DWORD for each face in the mesh.
If the method succeeds, the return value is
If
Unlocks an attribute buffer.
+If the method succeeds, the return value is
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
Pointer to an array of three DWORDs per face that specifies the three neighbors for each face in the source mesh. If the edge has no adjacent faces, the value is 0xffffffff. See Remarks.
Pointer to an array of three DWORDs per face that specifies the three neighbors for each face in the optimized mesh. If the edge has no adjacent faces, the value is 0xffffffff.
An array of DWORDs, 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
Address of a reference to an
Address of a reference to an
If the method succeeds, the return value is
This method generates a new mesh. Before running Optimize, an application must generate an adjacency buffer by calling
This method is very similar to the
Generates a mesh with reordered faces and vertices to optimize drawing performance. This method reorders the existing mesh.
+Combination of one or more D3DXMESHOPT flags, specifying the type of optimization to perform.
Pointer to an array of three DWORDs per face that specifies the three neighbors for each face in the source mesh. If the edge has no adjacent faces, the value is 0xffffffff.
Pointer to an array of three DWORDs per face that specifies the three neighbors for each face in the optimized mesh. If the edge has no adjacent faces, the value is 0xffffffff. If the value supplied for this argument is
An array of DWORDs, 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
Address of a reference to an
If the method succeeds, the return value is
Before running
Note??This method will fail if the mesh is sharing its vertex buffer with another mesh, unless the
Sets the attribute table for a mesh and the number of entries stored in the table.
+Pointer to an array of
Number of attributes in the mesh attribute table.
If the method succeeds, the return value is
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
This interface encapsulates patch mesh functionality.
+A patch mesh is a mesh that consists of a series of patches.
To obtain the
The LPD3DXPATCHMESH type is defined as a reference to the
typedef struct+*LPD3DXPATCHMESH; +
Gets the number of patches in the mesh.
+Gets the number of vertices in the mesh.
+Gets the number of control vertices per patch.
+Gets the type of patch.
+For more information about patch types, see
Gets the device that created the mesh.
+Gets the mesh vertex buffer.
+This method assumes uniform tessellation.
+Gets the mesh index buffer.
+The index buffer contains the vertex ordering in the vertex buffer. The index buffer is used to access the vertex buffer when the mesh is rendered.
+Gets the number of patches in the mesh.
+The number of patches.
Gets the number of vertices in the mesh.
+The number of vertices.
Gets the vertex declaration.
+Array of
If the method succeeds, the return value is
The array of elements includes the D3DDECL_END macro, which ends the declaration.
+Gets the number of control vertices per patch.
+The number of control vertices per patch.
Gets the type of patch.
+The patch type.
For more information about patch types, see
Gets the device that created the mesh.
+Pointer to the device.
If the method succeeds, the return value is
Gets the attributes of the patch.
+Pointer to the structures containing the patch attributes. For more information about patch attributes, see
If the method succeeds, the return value is
Gets the mesh vertex buffer.
+Pointer to the vertex buffer.
If the method succeeds, the return value is
This method assumes uniform tessellation.
+Gets the mesh index buffer.
+Pointer to the index buffer.
If the method succeeds, the return value is
The index buffer contains the vertex ordering in the vertex buffer. The index buffer is used to access the vertex buffer when the mesh is rendered.
+Lock the vertex buffer.
+Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
VOID* reference to a memory buffer containing the returned vertex data.
If the method succeeds, the return value is
The vertex buffer is usually locked, written to, and then unlocked for reading.
Patch meshes use 16-bit index buffers.
+Unlock the vertex buffer.
+If the method succeeds, the return value is
The vertex buffer is usually locked, written to, and then unlocked for reading.
+Lock the index buffer.
+Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
VOID* reference to a memory buffer containing the returned index data.
If the method succeeds, the return value is
The index buffer is usually locked, written to, and then unlocked for reading. Patch mesh index buffers are 16-bit buffers.
+Unlock the index buffer.
+If the method succeeds, the return value is
The index buffer is usually locked, written to, and then unlocked for reading.
+Locks the attribute buffer.
+Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
Address of a reference to a buffer containing a DWORD for each face in the mesh.
If the method succeeds, the return value is
The attribute buffer is usually locked, written to, and then unlocked for reading.
+Unlock the attribute buffer.
+If the method succeeds, the return value is
The attribute buffer is usually locked, written to, and then unlocked for reading.
+Gets the size of the tessellated mesh, given a tessellation level.
+Tessellation level.
Adaptive tessellation. For adaptive tessellation, set this value to TRUE and set fTessLevel to the maximum tessellation value. This will result in the maximum mesh size necessary for adaptive tessellation.
Pointer to the number of triangles generated by the tessellated mesh.
Pointer to the number of vertices generated by the tessellated mesh.
If the method succeeds, the return value is
This method assumes uniform tessellation.
+Generate a list of mesh edges and the patches that share each edge.
+Specifies that vertices that differ in position by less than the tolerance should be treated as coincident.
If the method succeeds, the return value is
After an application generates adjacency information for a mesh, the mesh data can be optimized for better drawing performance. This method determines which patches are adjacent (within the provided tolerance). This information is used internally to optimize tessellation.
+Creates a new patch mesh with the specified vertex declaration.
+Combination of one or more D3DXMESH flags that specify creation options for the mesh.
Array of
Address of a reference to an
If the method succeeds, the return value is
CloneMesh converts the vertex buffer to the new vertex declaration. Entries in the vertex declaration that are new to the original mesh are set to 0. If the current mesh has adjacency, the new mesh will also have adjacency.
+Optimizes the patch mesh for efficient tessellation.
+Currently unused.
If the method succeeds, the return value is
After an application generates adjacency information for a mesh, the mesh data can be optimized (reordered) for better drawing performance. This method determines which patches are adjacent (within the provided tolerance).
Adjacency information is also used to optimize tessellation. Generate adjacency information once and tessellate repeatedly by calling
Sets mesh geometry displacement parameters.
+Texture containing the displacement data.
Minification level. For more information, see
Magnification level. For more information, see
Mip filter level. For more information, see
Texture address wrap mode. For more information, see
Level of detail bias value.
If the method succeeds, the return value is
Displacement maps can only be 2D textures. Mipmapping is ignored for nonadaptive tessellation.
+Gets mesh geometry displacement parameters.
+Texture containing the displacement data.
Minification level. For more information, see
Magnification level. For more information, see
Mip filter level. For more information, see
Texture address wrap mode. For more information, see
Level of detail bias value.
If the method succeeds, the return value is
Displacement maps can only be 2D textures. Mipmapping is ignored for nonadaptive tessellation.
+Performs uniform tessellation based on the tessellation level.
+Tessellation level. This is the number of vertices introduced between existing vertices. The range of this float parameter is 0 < fTessLevel <= 32.
Resulting tessellated mesh. See
If the method succeeds, the return value is
This function will perform more efficiently if the patch mesh has been optimized using
Performs adaptive tessellation based on the z-based adaptive tessellation criterion.
+Specifies a 4D vector that is dotted with the vertices to get the per-vertex adaptive tessellation amount. Each edge is tessellated to the average value of the tessellation levels for the two vertices it connects.
Maximum limit for adaptive tessellation. This is the number of vertices introduced between existing vertices. This integer value can range from 1 to 32, inclusive.
Minimum limit for adaptive tessellation. This is the number of vertices introduced between existing vertices. This integer value can range from 1 to 32, inclusive.
Resulting tessellated mesh. See
If the method succeeds, the return value is
This function will perform more efficiently if the patch mesh has been optimized using
Applications use the methods of the
The LPDIRECT3DPIXELSHADER9 and PDIRECT3DPIXELSHADER9 types are defined as references to the
typedef struct+*LPDIRECT3DPIXELSHADER9, *PDIRECT3DPIXELSHADER9;
Gets the device.
+Gets the device.
+Pointer to the
If the method succeeds, the return value is
Gets a reference to the shader data.
+Pointer to a buffer that contains the shader data. The application needs to allocate enough room for this.
Size of the data, in bytes. To get the buffer size that is needed to retrieve the data, set pData =
If the method succeeds, the return value is
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
Pointer to an array of three DWORDs per face that specifies the three neighbors for each face in the optimized mesh. If the edge has no adjacent faces, the value is 0xffffffff.
An array of DWORDs, 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
Address of a reference to an
Address of a reference to an
If the method succeeds, the return value is
This method generates a new mesh. Before running Optimize, an application must generate an adjacency buffer by calling
This method is very similar to the
Applications use the methods of the
The LPDIRECT3DQUERY9 and PDIRECT3DQUERY9 types are defined as references to the
typedef struct+*LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
Gets the device that is being queried.
+Gets the number of bytes in the query data.
+Gets the device that is being queried.
+Pointer to the device being queried. See
If the method succeeds, the return value is
Gets the query type.
+Returns the query type. See
Gets the number of bytes in the query data.
+Returns the number of bytes of query data.
Issue a query.
+Query flags specify the type of state change for the query. See
If the method succeeds, the return value is
A signaled query means the query has completed, the data is available, and
Polls a queried resource to get the query state or a query result. For more information about queries, see Queries (Direct3D 9).
+The return type identifies the query state (see Queries (Direct3D 9)). The method returns
It is possible to lose the device while polling for query status. When D3DGETDATA_FLUSH is specified, this method will return
An application must never write code that only invokes GetData ( ... , 0 ), expecting that GetData will eventually return
// Enables an infinite loop: + while( pQuery->GetData( ... , 0 ) == S_FALSE ) ; // Still enables an infinite loop: + pQuery->GetData( ... , D3DGETDATA_FLUSH ); + while( pQuery->GetData( ... , 0 ) == S_FALSE ) ; // Does not enable an infinite loop because eventually the command + // buffer will fill up and that will cause a flush to occur. + while( pQuery->GetData( ..., 0 ) == S_FALSE ) { pDevice->SetTexture(...); pDevice->Draw(...); + } ++
The
An environment map is used to texture-map scene geometry to provide a more sophisticated scene without using complex geometry. This interface supports creating surfaces for the following kinds of geometry: cube, half sphere or hemispheric, parabolic, or sphere.
The
The LPD3DXRenderToEnvMap type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DXRenderToEnvMap; +
Retrieves the Direct3D device associated with the environment map.
+Retrieves the description of the render surface.
+Retrieves the Direct3D device associated with the environment map.
+Address of a reference to an
If the method succeeds, the return value is
Retrieves the description of the render surface.
+Pointer to a
If the method succeeds, the return value is
Initiate the rendering of a cubic environment map.
+Pointer to an
If the method succeeds, the return value is
See
Initiate the rendering of a spherical environment map.
+Pointer to an
If the method succeeds, the return value is
See
Initiate the rendering of a hemispheric environment map.
+Pointer to an
Pointer to an
If the method succeeds, the return value is
See
Initiate the rendering of a parabolic environment map.
+Pointer to an
Pointer to an
If the function succeeds, the return value is
See
Initiate the drawing of each face of an environment map.
+The first face of the environmental cube map. See
A valid combination of one or more
If the method succeeds, the return value is
This method must be called once for each type of environment map. The only exception is a cubic environment map which requires this method to be called six times, once for each face in
Restore all render targets and, if needed, compose all the rendered faces into the environment map surface.
+A valid combination of one or more
If the method succeeds, the return value is
Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost, or before resetting a device.
+If the method succeeds, the return value is
This method should be called whenever the device is lost or before the user calls
Use this method to re-acquire resources and save initial state.
+If the method succeeds, the return value is
The
Surfaces can be used in a variety of ways including render targets, off-screen rendering, or rendering to textures.
A surface can be configured using a separate viewport using the
The
The LPD3DXRENDERTOSURFACE type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DXRENDERTOSURFACE; +
Retrieves the Direct3D device associated with the render surface.
+Retrieves the parameters of the render surface.
+Retrieves the Direct3D device associated with the render surface.
+Address of a reference to an
If the method succeeds, the return value is
Retrieves the parameters of the render surface.
+Pointer to a
If the method succeeds, the return value is
Begins a scene.
+Pointer to an
Pointer to a
If the method succeeds, the return value is
Ends a scene.
+Filter options, enumerated in
If the method succeeds, the return value is
Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost or before resetting a device.
+If the method succeeds, the return value is
This method should be called whenever the device is lost or before the user calls
Use this method to re-acquire resources and save initial state.
+If the method succeeds, the return value is
Pointer to an
Width of the render surface, in pixels.
Height of the render surface, in pixels.
Member of the
If TRUE, the render surface supports a depth-stencil surface. Otherwise, this member is set to
If DepthStencil is set to TRUE, this parameter is a member of the
Applications use the methods of the
To create a texture resource, you can call one of the following methods.
To create a geometry-oriented resource, you can call one of the following methods.
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DRESOURCE9 and PDIRECT3DRESOURCE9 types are defined as references to the
typedef struct+*LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9; +
Retrieves the device associated with a resource.
+This method allows navigation to the owning device object.
Calling this method will increase the internal reference count on the
Retrieves the priority for this resource.
+Priorities are used to determine when managed resources are to be removed from memory. A resource assigned a low priority is removed before a resource with a high priority. If two resources have the same priority, the resource that was used more recently is kept in memory; the other resource is removed. Managed resources have a default priority of 0.
+Returns the type of the resource.
+Retrieves the device associated with a resource.
+Address of a reference to an
If the method succeeds, the return value is
This method allows navigation to the owning device object.
Calling this method will increase the internal reference count on the
Associates data with the resource that is intended for use by the application, not by Direct3D. Data is passed by value, and multiple sets of data can be associated with a single resource.
+Reference to the globally unique identifier that identifies the private data to set.
Pointer to a buffer that contains the data to be associated with the resource.
Size of the buffer at pData, in bytes.
Value that describes the type of data being passed, or indicates to the application that the data should be invalidated when the resource changes.
Item | Description |
---|---|
(none) | If no flags are specified, Direct3D allocates memory to hold the data within the buffer and copies the data into the new buffer. The buffer allocated by Direct3D is automatically freed, as appropriate. |
D3DSPD_IUNKNOWN | The data at pData is a reference to an |
?
If the method succeeds, the return value is
Direct3D does not manage the memory at pData. If this buffer was dynamically allocated, it is the calling application's responsibility to free the memory.
+Copies the private data associated with the resource to a provided buffer.
+The globally unique identifier that identifies the private data to retrieve.
Pointer to a previously allocated buffer to fill with the requested private data if the call succeeds. The application calling this method is responsible for allocating and releasing this buffer. If this parameter is
Pointer to the size of the buffer at pData, in bytes. If this value is less than the actual size of the private data (such as 0), the method sets this parameter to the required buffer size and the method returns
If the method succeeds, the return value is
This method is inherited by the following interfaces:
Frees the specified private data associated with this resource.
+Reference to the globally unique identifier that identifies the private data to free.
If the method succeeds, the return value is
Direct3D calls this method automatically when a resource is released.
+Assigns the priority of a resource for scheduling purposes.
+Priority to assign to a resource.
Differences between Direct3D 9 and Direct3D 9 for Windows Vista The priority can be any DWORD value; Direct3D 9 for Windows Vista also supports any of these pre-defined values D3D9_RESOURCE_PRIORITY. |
?
Returns the previous priority value for the resource.
This method is used to change the priority of managed resources (resources created with the
Priorities are used to determine when managed resources are to be removed from memory. A resource assigned a low priority is removed before a resource with a high priority. If two resources have the same priority, the resource that was used more recently is kept in memory; the other resource is removed. Managed resources have a default priority of 0.
Windows Vista only - When this method is called using an
Retrieves the priority for this resource.
+Returns a DWORD value, indicating the priority of the resource.
Priorities are used to determine when managed resources are to be removed from memory. A resource assigned a low priority is removed before a resource with a high priority. If two resources have the same priority, the resource that was used more recently is kept in memory; the other resource is removed. Managed resources have a default priority of 0.
+Preloads a managed resource.
+Calling this method indicates that the application will need this managed resource shortly. This method has no effect on nonmanaged resources.
Returns the type of the resource.
+Returns a member of the
Gets the maximum number of influences for any vertex in the mesh.
+Gets the number of bones.
+Gets or sets the minimum bone influence. Influence values smaller than this are ignored.
+Gets or sets the fixed function vertex value.
+This method can return 0 if the vertex format cannot be mapped directly to an FVF code. This will occur for a mesh created from a vertex declaration that doesn't have the same order and elements supported by the FVF codes.
+Sets the influence value for a bone.
+Bone number.
Number of influences.
The array of vertices influenced by a bone.
The array of weights influenced by a bone.
If the method succeeds, the return value is
Sets an influence value of a bone on a single vertex.
+Index of the bone. Must be between 0 and the number of bones.
Index of the influence array of the specified bone.
Blend factor of the specified bone influence.
If the method succeeds, the return value is
Gets the number of influences for a bone.
+Bone number.
Returns the number of influences for a bone.
Gets the vertices and weights that a bone influences.
+Bone number.
Get the array of vertices influenced by a bone.
Get the array of weights influenced by a bone.
If the method succeeds, the return value is
Use
Retrieves the blend factor and vertex affected by a specified bone influence.
+Index of the bone. Must be between 0 and the number of bones.
Index of the influence array of the specified bone.
Pointer to the blend factor influenced by influenceNum.
Pointer to the vertex influenced by influenceNum.
If the method succeeds, the return value is
Gets the maximum number of influences for any vertex in the mesh.
+Pointer to the maximum vertex influence.
If the method succeeds, the return value is
Gets the number of bones.
+Returns the number of bones.
Retrieves the index of the bone influence affecting a single vertex.
+Index of the bone. Must be between 0 and the number of bones.
Index of the vertex for which the bone influence is to be found. Must be between 0 and the number of vertices in the mesh.
Pointer to the index of the bone influence that affects vertexNum.
If the method succeeds, the return value is
Gets the maximum face influences in a triangle mesh with the specified index buffer.
+Pointer to the index buffer that contains the mesh index data.
Number of faces in the mesh.
Pointer to the maximum face influences.
If the method succeeds, the return value is
Sets the minimum bone influence. Influence values smaller than this are ignored.
+Minimum influence value. Influence values smaller than this are ignored.
If the method succeeds, the return value is
Gets the minimum bone influence. Influence values smaller than this are ignored.
+Returns the minimum bone influence value.
Sets the bone name.
+Bone number
Bone name
If the method succeeds, the return value is
Bone names are returned by
Gets the bone name, from the bone index.
+Bone number.
Returns the bone name. Do not free this string.
Sets the bone offset matrix.
+Bone number.
Pointer to the bone offset matrix.
If the method succeeds, the return value is
Bone names are returned by
Gets the bone offset matrix.
+Bone number.
Returns a reference to the bone offset matrix. Do not free this reference.
Clones a skin info object.
+Address of a reference to an
If the method succeeds, the return value is
Updates bone influence information to match vertices after they are reordered. This method should be called if the target vertex buffer has been reordered externally.
+Number of vertices to remap.
Array of DWORDS whose length is specified by NumVertices.
If the method succeeds, the return value is
Each element in pVertexRemap specifies the previous vertex index for that position. For example, if a vertex was in position 3 but has been remapped to position 5, then the fifth element of pVertexRemap should contain 3. The vertex remap array returned by
Sets the flexible vertex format (FVF) type.
+Flexible vertex format. See
If the method succeeds, the return value is
Sets the vertex declaration.
+Pointer to an array of
If the method succeeds, the return value is
Gets the fixed function vertex value.
+Returns the flexible vertex format (FVF) codes.
This method can return 0 if the vertex format cannot be mapped directly to an FVF code. This will occur for a mesh created from a vertex declaration that doesn't have the same order and elements supported by the FVF codes.
+Gets the vertex declaration.
+Array of
If the method succeeds, the return value is
The array of elements includes the D3DDECL_END macro, which ends the declaration.
+Applies software skinning to the target vertices based on the current matrices.
+Bone transform matrix.
Inverse transpose of the bone transform matrix.
Pointer to the buffer containing the source vertices.
Pointer to the buffer containing the destination vertices.
If the method succeeds, the return value is
When used to skin vertices with two position elements, this method skins the second position element with the inverse of the bone instead of the bone itself.
+Takes a mesh and returns a new mesh with per-vertex blend weights and a bone combination table. The table describes which bones affect which subsets of the mesh.
+Input mesh. See
Currently unused.
Input mesh adjacency information.
Output mesh adjacency information.
An array of DWORDs, one per face, that identifies the original mesh face that corresponds to each face in the blended mesh. If the value supplied for this argument is
Address of a reference to an
Pointer to a DWORD that will contain the maximum number of bone influences required per vertex for this skinning method.
Pointer to the number of bones in the bone combination table.
Pointer to the bone combination table. The data is organized in a
Pointer to the new mesh.
If the method succeeds, the return value is
Each element in the remap array specifies the previous index for that position. For example, if a vertex was in position 3 but has been remapped to position 5, then the fifth element of pVertexRemap will contain 3.
This method does not run on hardware that does not support fixed-function vertex blending.
+Takes a mesh and returns a new mesh with per-vertex blend weights, indices, and a bone combination table. The table describes which bone palettes affect which subsets of the mesh.
+The input mesh. See
Currently unused.
Number of bone matrices available for matrix palette skinning.
Input mesh adjacency information.
Output mesh adjacency information.
An array of DWORDs, one per face, that identifies the original mesh face that corresponds to each face in the blended mesh. If the value supplied for this argument is
Address of a reference to an
Pointer to a DWORD that will contain the maximum number of bone influences required per vertex for this skinning method.
Pointer to the number of bones in the bone combination table.
Pointer to the bone combination table. The data is organized in a
Pointer to the new mesh.
If the method succeeds, the return value is
Each element in the remap arrays specifies the previous index for that position. For example, if a vertex was in position 3 but has been remapped to position 5, then the fifth element of pVertexRemap will contain 3.
This method does not run on hardware that does not support fixed-function vertex blending.
+The
The
The application typically first calls
The LPD3DXSPRITE type is defined as a reference to the
typedef interface+; + typedef interface *LPD3DXSPRITE; +
Retrieves the device associated with the sprite object.
+Calling this method will increase the internal reference count on the
Gets or sets the sprite transform.
+Retrieves the device associated with the sprite object.
+Address of a reference to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count on the
Gets the sprite transform.
+Pointer to a
If the method succeeds, the return value is
Sets the sprite transform.
+Pointer to a
If the method succeeds, the return value is
Sets the right-handed world-view transform for a sprite. A call to this method is required before billboarding or sorting sprites.
+Pointer to a
Pointer to a
If the method succeeds, the return value is
A call to this method (or to
Sets the left-handed world-view transform for a sprite. A call to this method is required before billboarding or sorting sprites.
+Pointer to a
Pointer to a
If the method succeeds, the return value is
A call to this method (or to
Prepares a device for drawing sprites.
+Combination of zero or more flags that describe sprite rendering options. For this method, the valid flags are:
For a description of the flags and for information on how to control device state capture and device view transforms, see
If the method succeeds, the return value is
This method must be called from inside a
This method will set the following states on the device.
Render States:
Type ( | Value |
---|---|
TRUE | |
0x00 | |
AlphaCmpCaps | |
TRUE | |
0 |
?
Texture Stage States:
Stage Identifier | Type ( | Value |
---|---|---|
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | 0 | |
0 | ||
1 | ||
1 |
?
Sampler States:
Sampler Stage Index | Type ( | Value |
---|---|---|
0 | ||
0 | ||
0 | ||
0 | 0 | |
0 | MaxAnisotropy | |
0 | ||
0 | ||
0 | 0 | |
0 | 0 |
?
Note??This method disables N-patches.
+Adds a sprite to the list of batched sprites.
+Pointer to an
Pointer to a
Pointer to a
Pointer to a
If the method succeeds, the return value is
To scale, rotate, or translate a sprite, call
Forces all batched sprites to be submitted to the device. Device states remain as they were after the last call to
If the method succeeds, the return value is
Calls
If the method succeeds, the return value is
Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost or before resetting a device.
+If the method succeeds, the return value is
This method should be called whenever the device is lost or before the user calls
Use this method to re-acquire resources and save initial state.
+If the method succeeds, the return value is
Adds a sprite to the list of batched sprites.
+Pointer to an
If the method succeeds, the return value is
To scale, rotate, or translate a sprite, call
Adds a sprite to the list of batched sprites.
+Pointer to an
Pointer to a
Pointer to a
Pointer to a
If the method succeeds, the return value is
To scale, rotate, or translate a sprite, call
Applications use the methods of the
This interface can be used to save and restore pipeline state. It can also be used to capture the current state.
The LPDIRECT3DSTATEBLOCK9 and PDIRECT3DSTATEBLOCK9 types are defined as references to the
typedef struct+*LPDIRECT3DSTATEBLOCK9, *PDIRECT3DSTATEBLOCK9;
Gets the device.
+Gets the device.
+Pointer to the
If the method succeeds, the return value is
Capture the current value of states that are included in a stateblock.
+If the method succeeds, the return value is
The Capture method captures current values for states within an existing state block. It does not capture the entire state of the device. For example:
* pStateBlock = null ; pd3dDevice->BeginStateBlock(); + // Add the ZENABLE state to the stateblock + pd3dDevice->SetRenderState (, ); + pd3dDevice->EndStateBlock ( &pStateBlock ); // Change the current value that is stored in the state block + pd3dDevice->SetRenderState ( , ); + pStateBlock->Capture(); pStateBlock->Release(); +
Creating an empty stateblock and calling the Capture method does nothing if no states have been set.
The Capture method will not capture information for lights that are explicitly or implicitly created after the stateblock is created.
+Apply the state block to the current device state.
+If the method succeeds, the return value is
Applications use the methods of the
The LPDIRECT3DSURFACE9 and PDIRECT3DSURFACE9 types are defined as references to the
typedef struct+*LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9; +
Retrieves a description of the surface.
+Provides access to the parent cube texture or texture (mipmap) object, if this surface is a child level of a cube texture or a mipmap. This method can also provide access to the parent swap chain if the surface is a back-buffer child.
+Reference identifier of the container being requested.
Address of a reference to fill with the container reference if the query succeeds. See Remarks.
If the method succeeds, the return value is
If the surface is created using CreateRenderTarget or CreateOffscreenPlainSurface or CreateDepthStencilSurface, the surface is considered stand alone. In this case, GetContainer will return the Direct3D device used to create the surface.
If the call succeeds, the reference count of the container is increased by one.
Here's an example getting the parent texture of a mip surface.
// Assumes pSurface is a valid+reference + void *pContainer = null ; +*pTexture = null ; +hr = pSurface->GetContainer(IID_IDirect3DTexture9, &pContainer); + if (SUCCEEDED(hr) && pContainer) + { pTexture = ( *)pContainer; + } +
Retrieves a description of the surface.
+Pointer to a
If the method succeeds, the return value is
Locks a rectangle on a surface.
+Pointer to a
Pointer to a rectangle to lock. Specified by a reference to a
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
You may not specify a subrect when using
If the method succeeds, the return value is
If the method fails, the return value can be
If the
The only lockable format for a depth-stencil surface is
For performance reasons, dirty regions are recorded only for level zero of a texture. Dirty regions are automatically recorded when
A multisample back buffer cannot be locked.
This method cannot retrieve data from a surface that is is contained by a texture resource created with
Unlocks a rectangle on a surface.
+If the method succeeds, the return value is
Retrieves a device context.
+Pointer to the device context for the surface.
The following restrictions apply.
When a device context is outstanding on a surface, the application may not call these methods:
| |
| |
| |
| |
| |
| |
| |
|
?
* (on a swap chain that contains the surface)
It is valid to call
The hdc provides access to Win32 and GDI functionality.
+Release a device context handle.
+Handle to a device context.
If the method succeeds, the return value is
An hdc is a Windows resource. It must be released after use so Windows can return it to the pool of available resources.
This method will release only the device context returned by
Presents the contents of the next buffer in the sequence of back buffers owned by the swap chain.
+The Present method is a shortcut to Present. Present has been updated to take a flag allowing the application to request that the method return immediately when the driver reports that it cannot schedule a presentation.
If necessary, a stretch operation is applied to transfer the pixels within the source rectangle to the destination rectangle in the client area of the target window.
Present will fail if called between BeginScene and EndScene pairs unless the render target is not the current render target (such as the back buffer you get from creating an additional swap chain). This is a new behavior for Direct3D 9.
+Returns information describing the raster of the monitor on which the swap chain is presented.
+Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.
+Retrieves the device associated with the swap chain.
+This method allows navigation to the owning device object.
Calling this method will increase the internal reference count on the
Retrieves the presentation parameters associated with a swap chain.
+This method can be used to see the presentation parameters of the parent swap chain of a surface (a back buffer, for instance). The parent swap chain can be retrieved with
Presents the contents of the next buffer in the sequence of back buffers owned by the swap chain.
+Pointer to the source rectangle (see
Pointer to the destination rectangle in client coordinates (see
Destination window whose client area is taken as the target for this presentation. If this value is
This value must be
Allows the application to request that the method return immediately when the driver reports that it cannot schedule a presentation. Valid values are 0, or any combination of
If the method succeeds, the return value is
The Present method is a shortcut to Present. Present has been updated to take a flag allowing the application to request that the method return immediately when the driver reports that it cannot schedule a presentation.
If necessary, a stretch operation is applied to transfer the pixels within the source rectangle to the destination rectangle in the client area of the target window.
Present will fail if called between BeginScene and EndScene pairs unless the render target is not the current render target (such as the back buffer you get from creating an additional swap chain). This is a new behavior for Direct3D 9.
+Generates a copy of the swapchain's front buffer and places that copy in a system memory buffer provided by the application.
+Pointer to an
If the method succeeds, the return value is
Calling this method will increase the internal reference count on the
Retrieves a back buffer from the swap chain of the device.
+Index of the back buffer object to return. Back buffers are numbered from 0 to the total number of back buffers - 1. A value of 0 returns the first back buffer, not the front buffer. The front buffer is not accessible through this method. Use
Stereo view is not supported in Direct3D 9, so the only valid value for this parameter is
Address of a reference to an
Calling this method will increase the internal reference count on the
Returns information describing the raster of the monitor on which the swap chain is presented.
+Pointer to a
If the method succeeds, the return value is
Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.
+Pointer to a
If the method succeeds, the return value is
Retrieves the device associated with the swap chain.
+Address of a reference to an
If the method succeeds, the return value is
This method allows navigation to the owning device object.
Calling this method will increase the internal reference count on the
Retrieves the presentation parameters associated with a swap chain.
+Pointer to the presentation parameters. See
If the method succeeds, the return value is
This method can be used to see the presentation parameters of the parent swap chain of a surface (a back buffer, for instance). The parent swap chain can be retrieved with
Applications use the methods of the
There is always at least one swap chain for each device, known as the implicit swap chain. However, an additional swap chain for rendering multiple views from the same device can be created by calling the CreateAdditionalSwapChain method.
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DSWAPCHAIN9 and PDIRECT3DSWAPCHAIN9 types are defined as references to the
Returns the number of times the swapchain has been processed.
+Returns the number of times the swapchain has been processed.
+Pointer to a UINT to be filled with the number of times the
Retrieves the display mode's spatial resolution, color resolution, refresh frequency, and rotation settings.
+Pointer to a
Pointer to a
If the method succeeds, the return value is
Applications use the methods of the
The
This interface inherits additional functionality from the
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DTEXTURE9 and PDIRECT3DTEXTURE9 types are defined as references to the
typedef struct+*LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9; +
Retrieves a level description of a texture resource.
+Identifies a level of the texture resource. This method returns a surface description for the level specified by this parameter.
Pointer to a
Retrieves the specified texture surface level.
+Identifies a level of the texture resource. This method returns a surface for the level specified by this parameter. The top-level surface is denoted by 0.
Address of a reference to an
Calling this method will increase the internal reference count on the
Locks a rectangle on a texture resource.
+Specifies the level of the texture resource to lock.
Pointer to a
Pointer to a rectangle to lock. Specified by a reference to a
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
You may not specify a subrect when using
If the method succeeds, the return value is
Textures created with
For performance reasons, dirty regions are recorded only for level zero of a texture. Dirty regions are automatically recorded when
The only lockable format for a depth-stencil texture is D3DLOCK_D16_LOCKABLE.
Video memory textures cannot be locked, but must be modified by calling
This method cannot retrieve data from a texture resource created with
Unlocks a rectangle on a texture resource.
+Specifies the level of the texture resource to unlock.
If the method succeeds, the return value is
Adds a dirty region to a texture resource.
+Pointer to a
If the method succeeds, the return value is
For performance reasons, dirty regions are only recorded for level zero of a texture. For sublevels, it is assumed that the corresponding (scaled) rectangle or box is also dirty. Dirty regions are automatically recorded when
Using
The
The
The
The LPD3DXTEXTURESHADER type is defined as a reference to the
typedef interface+*LPD3DXTEXTURESHADER; +
Gets a reference to the function DWORD stream.
+Get a reference to the constant table.
+Gets a description of the constant table.
+Gets a reference to the function DWORD stream.
+A reference to the function DWORD stream. See
If the method succeeds, the return value is
Get a reference to the constant table.
+Pointer to an
If the method succeeds, the return value is
Gets a description of the constant table.
+The attributes of the constant table. See
If the method succeeds, the return value is
Gets a reference to the array of constants in the constant table.
+Unique identifier to a constant. See
Returns a reference to an array of descriptions. See
The input supplied must be the maximum size of the array. The output is the number of elements that are filled in the array when the function returns.
If the method succeeds, the return value is
Samplers can appear more than once in a constant table, therefore, this method can return an array of descriptions each with a different register index.
+Gets a constant by looking up its index.
+A handle to the parent data structure. If the constant is a top-level parameter (there is no parent data structure), use
Zero-based index of the constant.
Returns a unique identifier to the constant.
To get a constant from an array of constants, use
Gets a constant by looking up its name.
+A handle to the parent data structure. If the constant is a top-level parameter (there is no parent data structure), use
A string containing the name of the constant.
Returns a unique identifier to the constant.
Get a constant from the constant table.
+A handle to the array of constants. This value may not be
Zero-based index of the element in the constant table.
Returns a unique identifier to the constant.
To get a constant that is not part of an array, use
Sets the constants to the default values declared in the shader.
+If the method succeeds, the return value is
Sets the constant table with the data in the buffer.
+Unique identifier to a constant. See
A reference to a buffer containing the constant data.
Size of the buffer, in bytes.
If the method succeeds, the return value is
Sets a
Unique identifier to the constant. See
If the method succeeds, the return value is
Sets an array of
Unique identifier to the array of constants. See
Array of
Number of
If the method succeeds, the return value is
Sets an integer value.
+Unique identifier to the constant. See
Integer value.
If the method succeeds, the return value is
Sets an array of integers.
+Unique identifier to the array of constants. See
Array of integers.
Number of integers in the array.
If the method succeeds, the return value is
Sets a floating-point number.
+Unique identifier to the constant. See
Floating-point number.
If the method succeeds, the return value is
Sets an array of floating-point numbers.
+Unique identifier to the array of constants. See
Array of floating-point numbers.
Number of floating-point values in the array.
If the method succeeds, the return value is
Sets a 4D vector.
+Unique identifier to the vector constant. See
Pointer to a 4D vector. See
If the method succeeds, the return value is
Sets an array of 4D vectors.
+Unique identifier to the array of vector constants. See
Array of 4D vectors. See
Number of vectors in the array.
If the method succeeds, the return value is
Sets a non-transposed matrix.
+Unique identifier to the matrix of constants. See
Pointer to a non-transposed matrix. See
If the method succeeds, the return value is
A non-transposed matrix contains row-major data; that is, each vector is contained in a row.
+Sets an array of non-transposed matrices.
+Unique identifier to the array of constant matrices. See
Array of non-transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A non-transposed matrix contains row-major data; that is, each vector is contained in a row.
+Sets an array of references to non-transposed matrices.
+Unique identifier to an array of constant matrices. See
Array of references to non-transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A non-transposed matrix contains row-major data; that is, each vector is contained in a row.
+Sets a transposed matrix.
+Unique identifier to the matrix of constants. See
Pointer to a transposed matrix. See
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
+Sets an array of transposed matrices.
+Unique identifier to the array of matrix constants. See
Array of transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
+Sets an array of references to transposed matrices.
+Unique identifier to the array of matrix constants. See
Array of references to transposed matrices. See
Number of matrices in the array.
If the method succeeds, the return value is
A transposed matrix contains column-major data; that is, each vector is contained in a column.
+Applications use the methods of the
The
This interface inherits additional functionality from the
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DVERTEXBUFFER9 and PDIRECT3DVERTEXBUFFER9 types are defined as references to the
typedef struct+*LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9; +
Retrieves a description of the vertex buffer resource.
+Locks a range of vertex data and obtains a reference to the vertex buffer memory.
+Offset into the vertex data to lock, in bytes. To lock the entire vertex buffer, specify 0 for both parameters, SizeToLock and OffsetToLock.
Size of the vertex data to lock, in bytes. To lock the entire vertex buffer, specify 0 for both parameters, SizeToLock and OffsetToLock.
VOID* reference to a memory buffer containing the returned vertex data.
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
If the method succeeds, the return value is
As a general rule, do not hold a lock across more than one frame. When working with vertex buffers, you are allowed to make multiple lock calls; however, you must ensure that the number of lock calls match the number of unlock calls. DrawPrimitive calls will not succeed with any outstanding lock count on any currently set vertex buffer.
The
For information about using
Unlocks vertex data.
+If the method succeeds, the return value is
Retrieves a description of the vertex buffer resource.
+Pointer to a
If the method succeeds, the return value is
Applications use the methods of the
A vertex shader declaration is made up of an array of vertex elements.
The LPDIRECT3DVERTEXDECLARATION9 and PDIRECT3DVERTEXDECLARATION9 types are defined as references to the
typedef struct+*LPDIRECT3DVERTEXDECLARATION9, *PDIRECT3DVERTEXDECLARATION9;
Gets the current device.
+Gets the current device.
+Pointer to the
If the method succeeds, the return value is
Gets the vertex shader declaration.
+Array of vertex elements (see
Number of elements in the array. The application needs to allocate enough room for this.
If the method succeeds, the return value is
The number of elements, pNumElements, includes the D3DDECL_END macro, which ends the declaration. So the element count is actually one higher than the number of valid vertex elements.
Here's an example that will return the vertex declaration array of up to 256 elements:
decl[MAXD3DDECLLENGTH]; + UINT numElements; + hr = m_pVertexDeclaration->GetDeclaration( decl, &numElements); +
Specify
Applications use the methods of the
The LPDIRECT3DVERTEXSHADER9 and PDIRECT3DVERTEXSHADER9 types are defined as references to the
typedef struct+*LPDIRECT3DVERTEXSHADER9, *PDIRECT3DVERTEXSHADER9;
Gets the device.
+Gets the device.
+Pointer to the
If the method succeeds, the return value is
Gets a reference to the shader data.
+Pointer to a buffer that contains the shader data. The application needs to allocate enough room for this.
Size of the data, in bytes. To get the buffer size that is needed to retrieve the data, set pData =
If the method succeeds, the return value is
Applications use the methods of the
The
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DVOLUME9 and PDIRECT3DVOLUME9 types are defined as references to the
typedef struct+*LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9; +
Retrieves the device associated with a volume.
+This method allows navigation to the owning device object.
Calling this method will increase the internal reference count on the
Retrieves a description of the volume.
+Retrieves the device associated with a volume.
+Address of a reference to an
If the method succeeds, the return value is
This method allows navigation to the owning device object.
Calling this method will increase the internal reference count on the
Associates data with the volume that is intended for use by the application, not by Direct3D.
+Reference to the globally unique identifier that identifies the private data to set.
Pointer to a buffer that contains the data to associate with the volume.
Size of the buffer at pData in bytes.
Value that describes the type of data being passed, or indicates to the application that the data should be invalidated when the resource changes.
Item | Description |
---|---|
(none) | If no flags are specified, Direct3D allocates memory to hold the data within the buffer and copies the data into the new buffer. The buffer allocated by Direct3D is automatically freed, as appropriate. |
D3DSPD_IUNKNOWN | The data at pData is a reference to an |
?
If the method succeeds, the return value is
Direct3D does not manage the memory at pData. If this buffer was dynamically allocated, it is the calling application's responsibility to free the memory.
Data is passed by value, and multiple sets of data can be associated with a single volume.
+Copies the private data associated with the volume to a provided buffer.
+Reference to (C++) or address of (C) the globally unique identifier that identifies the private data to retrieve.
Pointer to a previously allocated buffer to fill with the requested private data if the call succeeds. The application calling this method is responsible for allocating and releasing this buffer. If this parameter is
Pointer to the size of the buffer at pData, in bytes. If this value is less than the actual size of the private data, such as 0, the method sets this parameter to the required buffer size, and the method returns
If the method succeeds, the return value is
Frees the specified private data associated with this volume.
+Reference to the globally unique identifier that identifies the private data to free.
If the method succeeds, the return value is
Direct3D calls this method automatically when a volume is released.
+Provides access to the parent volume texture object, if this surface is a child level of a volume texture.
+Reference identifier of the volume being requested.
Address of a reference to fill with the container reference, if the query succeeds.
If the method succeeds, the return value is
If the call succeeds, the reference count of the container is increased by one.
Here's an example getting the parent volume texture of a volume texture.
// Assumes pSurface is a valid+reference + void *pContainer = null ; +*pVolumeTexture = null ; +hr = pVolume->GetContainer(IID_IDirect3DVolumeTexture9, &pContainer); + if (SUCCEEDED(hr) && pContainer) + { pVolumeTexture = ( *)pContainer; +
Retrieves a description of the volume.
+Pointer to a
If the method succeeds, the return value is
Locks a box on a volume resource.
+Pointer to a
Pointer to a box to lock. Specified by a reference to a
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
If the method succeeds, the return value is
For performance reasons, dirty regions are only recorded for level zero of a texture. Dirty regions are automatically recorded when
Unlocks a box on a volume resource.
+If the method succeeds, the return value is
Applications use the methods of the
The
This interface inherits additional functionality from the
This interface, like all COM interfaces, inherits from the
The LPDIRECT3DVOLUMETEXTURE9 and PDIRECT3DVOLUMETEXTURE9 types are defined as references to the
typedef struct+*LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9; +
Retrieves a level description of a volume texture resource.
+Identifies a level of the volume texture resource. This method returns a volume description for the level specified by this parameter.
Pointer to a
Retrieves the specified volume texture level.
+Identifies a level of the volume texture resource. This method returns a volume for the level specified by this parameter.
Address of a reference to an
Calling this method will increase the internal reference count on the
Locks a box on a volume texture resource.
+Specifies the level of the volume texture resource to lock.
Pointer to a
Pointer to the volume to lock. This parameter is specified by a reference to a
Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
For a description of the flags, see
If the method succeeds, the return value is
For performance reasons, dirty regions are only recorded for level zero of a texture. Dirty regions are automatically recorded when LockBox is called without
Unlocks a box on a volume texture resource.
+Specifies the level of the volume texture resource to unlock.
If the method succeeds, the return value is
Adds a dirty region to a volume texture resource.
+Pointer to a
If the method succeeds, the return value is
For performance reasons, dirty regions are only recorded for level zero of a texture. For sublevels, it is assumed that the corresponding (scaled) box is also dirty. Dirty regions are automatically recorded when LockBox is called without
Using
Applications use the methods of the
An
The
The globally unique identifier (
The LPD3DXFILE type is defined as a reference to the
typedef interface+*LPD3DXFILE; +
Creates an enumerator object that will read a .x file.
+The data source. Either:
Depending on the value of loadflags.
Value that specifies the source of the data. This value can be one of the D3DXF_FILELOADOPTIONS flags.
Address of a reference to an
If the method succeeds, the return value is
After using this method, use one of the
Creates a save object that will be used to save data to a .x file.
+Pointer to the name of the file to use for saving data.
Value that specifies the name of the file to which data is to be saved. This value can be one of the File Save Options flags.
Indicates the format to use when saving the .x file. This value can be one of the File Formats flags. For more information, see Remarks.
Address of a reference to an
If the method succeeds, the return value is
After using this method, use methods of the
For the saved file format dwFileFormat, one of the binary, legacy binary, or text flags in File Formats must be specified. The file can be compressed by using the optional
The file format values can be combined in a logical OR to create compressed text or compressed binary files. If you indicate that the file format should be text and compressed, the file will be written out first as text and then compressed. However, compressed text files are not as efficient as binary text files; in most cases, therefore, you will want to indicate binary and compressed.
+Registers custom templates.
+Pointer to a buffer consisting of a .x file in text or binary format that contains templates.
Size of the buffer pointed to by pvData, in bytes.
If the method succeeds, the return value is
The following code fragment provides an example call to RegisterTemplates And example contents for the buffer to which pvData points.
#define XSKINEXP_TEMPLATES \ "xof 0303txt 0032\ template XSkinMeshHeader \ { \ <3CF169CE-FF7C-44ab-93C0-F78F62D172E2> \ WORD nMaxSkinWeightsPerVertex; \ WORD nMaxSkinWeightsPerFace; \ WORD nBones; \ } \ template VertexDuplicationIndices \ { \ <B8D65549-D7C9-4995-89CF-53A9A8B031E3> \ DWORD nIndices; \ DWORD nOriginalVertices; \ array DWORD indices[nIndices]; \ } \ template SkinWeights \ { \ <6F0D123B-BAD2-4167-A0D0-80224F25FABB> \ STRING transformNodeName;\ DWORD nWeights; \ array DWORD vertexIndices[nWeights]; \ array float weights[nWeights]; \ Matrix4x4 matrixOffset; \ }" + . + . + . LPD3DXFILE pD3DXFile =null ; if ( FAILED (hr = pD3DXFile->RegisterTemplates( (LPVOID)XSKINEXP_TEMPLATES, sizeof( XSKINEXP_TEMPLATES ) - 1 ) ) ) + goto End; +
All templates must specify a name and a UUID.
This method calls the RegisterEnumTemplates method, obtaining an
Registers custom templates, given an
If the method succeeds, the return value is
If the method fails, the following value will be returned: D3DXFERR_BADVALUE.
When this method is called, it copies templates stored with the
If an
Applications use the methods of the
Data types allowed by the template are called optional members. The optional members are not required, but an object might miss important information without them. These optional members are saved as children of the data object. A child can be another data object or a reference to an earlier data object.
The
The LPD3DXFILEDATA type is defined as a reference to this interface.
typedef interface+*LPD3DXFILEDATA; +
Retrieves the enumeration object in this file data object.
+Retrieves the template ID in this file data object.
+Indicates whether this file data object is a reference object that points to another child data object.
+Retrieves the number of children in this file data object.
+Retrieves the enumeration object in this file data object.
+Address of a reference to receive the enumeration object in this file data object.
If the method succeeds, the return value is
Retrieves the name of this file data object.
+Address of a reference to receive the name of this file data object. If this parameter is
Pointer to the size of the string that represents the name of this file data object. This parameter can be
If the method succeeds, the return value is
For this method to succeed, either szName or puiSize must be non-
Retrieves the
Pointer to a
If the method succeeds, the return value is
Accesses the .x file data.
+Pointer to the size of the .x file data.
Address of a reference to receive the
If the method succeeds, the return value is
The ppData reference is only valid during a
Because file data is not guaranteed to be aligned properly with byte boundaries, you should access ppData with UNALIGNED references.
Returned parameter values are not guaranteed to be valid due to possible file corruption; therefore, your code should verify the returned parameter values.
+Ends the lifespan of the ppData reference returned by
The return value is
You must ensure that the number of
Retrieves the template ID in this file data object.
+Pointer to the
If the method succeeds, the return value is
Indicates whether this file data object is a reference object that points to another child data object.
+Returns TRUE if the file data object is a reference object; returns
Retrieves the number of children in this file data object.
+Address of a reference to receive the number of children in this file data object.
If the method succeeds, the return value is
Retrieves a child object in this file data object.
+ID of the child object to retrieve.
Address of a reference to receive the child object's interface reference.
If the method succeeds, the return value is
Applications use the methods of the
The
The LPD3DXFILEENUMOBJECT type is defined as a reference to this interface.
typedef interface+*LPD3DXFILEENUMOBJECT; +
Retrieves the
Retrieves the number of child objects in this file data object.
+Retrieves the
If the method succeeds, the return value is
Retrieves the number of child objects in this file data object.
+Address of a reference to receive the number of child objects in this file data object.
If the method succeeds, the return value is
Retrieves a child object in this file data object.
+ID of the child object to retrieve.
Address of a reference to receive the child object's interface reference.
If the method succeeds, the return value is
Retrieves the data object that has the specified
Reference to the requested
Address of a reference to an
If the method succeeds, the return value is
Obtain the
Retrieves the data object that has the specified name.
+Pointer to the requested name.
Address of a reference to an
If the method succeeds, the return value is
Obtain the name szName of the current file data object with the
Applications use the methods of the
The
The LPD3DXFileSaveData type is defined as a reference to this interface.
typedef interface+*LPD3DXFILESAVEDATA; +
Retrieves a reference to this
Retrieves the template ID of this file data node.
+Retrieves a reference to this
If the method succeeds, the return value is
Retrieves the name of this
If the method succeeds, the return value is
For this method to succeed, either szName or puiSize must be non-
Retrieves the
If the method succeeds, the return value is
Retrieves the template ID of this file data node.
+Pointer to the
If the method succeeds, the return value is
Adds a data object as a child of the
If the method succeeds, the return value is
Adds a data reference as a child of this
If the method succeeds, the return value is
The file data object being referenced must have either a name or a
Applications use the methods of the
Templates are not required in every file. For example, you could put all templates into a single .x file rather than duplicating them in every .x file.
The
The globally unique identifier (
The LPD3DXFILESAVEOBJECT type is defined as a reference to this interface.
typedef interface+*LPD3DXFILESAVEOBJECT; +
Gets the
Gets the
If the method succeeds, the return value is
Adds a data object as a child of the
If the method succeeds, the return value is
If a data reference object will reference the data object, either the szName or pId parameter must be non-
Save the created data to disk by using the
Saves a data object and its children to a .x file on disk.
+If the method succeeds, the return value is
After this method succeeds,
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 LPD3DXATTRIBUTERANGE type is defined as a reference to the
typedef+* LPD3DXATTRIBUTERANGE; +
Attribute table identifier.
Starting face.
Face count.
Starting vertex.
Vertex count.
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 LPD3DXATTRIBUTEWEIGHTS type is defined as a reference to the
typedef+* LPD3DXATTRIBUTEWEIGHTS; +
Position.
Blend weight.
Normal.
Diffuse lighting value.
Specular lighting value.
Eight texture coordinates.
Tangent.
Binormal.
Throughput metrics for help in understanding the performance of an application.
+The bandwidth or maximum data transfer rate from the host CPU to the GPU. This is typically the bandwidth of the PCI or AGP bus which connects the CPU and the GPU.
Memory utilized percentage when uploading data from the host CPU to the GPU.
Vertex throughput percentage. This is the number of vertices processed compared to the theoretical maximum vertex processing rate.
Triangle set-up throughput percentage. This is the number of triangles that are set up for rasterization compared to the theoretical maximum triangle set-up rate.
Pixel fill throughput percentage. This is the number of pixels that are filled compared to the theoretical pixel fill.
Defines a volume.
+The restrictions on side ordering observed for
Position of the left side of the box on the x-axis.
Position of the top of the box on the y-axis.
Position of the right side of the box on the x-axis.
Position of the bottom of the box on the y-axis.
Position of the front of the box on the z-axis.
Position of the back of the box on the z-axis.
Measure the cache hit rate performance for textures and indexed vertices.
+An efficient cache is typically closer to a 90 percent hit rate, and an inefficient cache is typically closer to a 10 percent hit rate (although a low percentage is not necessarily a problem).
+The hit rate for finding a texture in the texture cache. This assumes there is a texture cache. Increasing the level-of-detail bias to use the most detailed texture, using many large textures, or producing a near random texture access pattern on large textures with custom shader code can dramatically affect the texture cache hit rate.
The hit rate for finding transformed vertices in the vertex cache. The GPU is designed to transform indexed vertices and may store them in a vertex cache. If you are using meshes,
Describes a callback key for use in key frame animation.
+Key frame time stamp.
Pointer to user callback data.
Describes the current clip status.
+When clipping is enabled during vertex processing (by ProcessVertices, DrawPrimitive, or other drawing functions), Direct3D computes a clip code for every vertex. The clip code is a combination of D3DCS_* bits. When a vertex is outside a particular clipping plane, the corresponding bit is set in the clipping code. Direct3D maintains the clip status using
Clip status is not updated by DrawRectPatch and DrawTriPatch because there is no software emulation for them.
+Clip union flags that describe the current clip status. This member can be one or more of the following flags:
Value | Meaning |
---|---|
Combination of all clip flags. | |
All vertices are clipped by the left plane of the viewing frustum. | |
All vertices are clipped by the right plane of the viewing frustum. | |
All vertices are clipped by the top plane of the viewing frustum. | |
All vertices are clipped by the bottom plane of the viewing frustum. | |
All vertices are clipped by the front plane of the viewing frustum. | |
All vertices are clipped by the back plane of the viewing frustum. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. | |
Application-defined clipping planes. |
?
Clip intersection flags that describe the current clip status. This member can take the same flags as ClipUnion.
A description of a constant in a constant table.
+Name of the constant.
Constant data type. See
Zero-based index of the constant in the table.
Number of registers that contain data.
Parameter class. See
Parameter type. See
Number of rows.
Number of columns.
Number of elements in the array.
Number of structure member sub-parameters.
Data size in number of bytes.
Pointer to the default value.
A description of the constant table.
+Name of the constant table creator.
Shader version.
Number of constants in the constant table.
Describes the creation parameters for a device.
+Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter. Use this ordinal as the Adapter parameter for any of the
Member of the
Window handle to which focus belongs for this Direct3D device. The value of this parameter mirrors the value passed to the CreateDevice call that created this device.
A combination of one or more
Specifies types of display modes to filter out.
+The size of this structure. This should always be set to sizeof(
The display mode format to filter out. See
Whether the scanline ordering is interlaced or progressive. See
Describes an effect object.
+An effect object can contain multiple rendering techniques and parameters for the same effect.
+String that contains the name of the effect creator.
Number of parameters used for effect.
Number of techniques that can render the effect.
Number of functions that can render the effect.
Describes an animation event.
+Event type, as defined in
Event track identifier.
Start time of the event in global time.
Duration of the event in global time.
Transition style of the event, as defined in
Track weight for the event.
Track speed for the event.
Track position for the event.
Enable flag.
Returns material information saved in Direct3D (.x) files.
+The
The LPD3DXMATERIAL type is defined as a reference to the
typedef struct+* LPD3DXMATERIAL; +
Pointer to a string that specifies the file name of the texture.
Defines the attributes of a font.
+The compiler setting also determines the structure type. If Unicode is defined, the
Possible values of the above members are given in the GDI
Height, in logical units, of the font's character cell or character.
Width, in logical units, of characters in the font.
Weight of the font in the range from 0 through 1000.
Number of mip 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.
Set to TRUE for an Italic font.
Character set.
Output precision. The output precision defines how closely the output must match the requested font height, width, character orientation, escapement, pitch, and font type.
Output quality.
Pitch and family of the font.
A null-terminated string or characters 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.
Encapsulates a transform frame in a transformation frame hierarchy.
+An application can derive from this structure to add other data.
+Name of the frame.
Transformation matrix.
Pointer to the mesh container.
Pointer to a sibling frame.
Pointer to a child frame.
Contains red, green, and blue ramp data.
+Array of 256 WORD element that describes the red gamma ramp.
Array of 256 WORD element that describes the green gamma ramp.
Array of 256 WORD element that describes the blue gamma ramp.
Returns a description of the original contents of an image file.
+Width of original image in pixels.
Height of original image in pixels.
Depth of original image in pixels.
Number of mip levels in original image.
A value from the
Represents the type of the texture stored in the file. It is either
Represents the format of the image file.
Describes an index buffer.
+Member of the
Member of the
Combination of one or more of the following flags, specifying the usage for this resource.
Value | Meaning |
---|---|
Set to indicate that the index buffer content will never require clipping. | |
Set to indicate that the index buffer requires dynamic memory use. This is useful for drivers because it enables them to decide where to place the buffer. In general, static index buffers are placed in video memory and dynamic index buffers are placed in AGP memory. Note that there is no separate static usage; if you do not specify For more information about using dynamic index buffers, see Using Dynamic Vertex and Index Buffers. Note that | |
Set to indicate when the index buffer is to be used for drawing high-order primitives. | |
Set to indicate when the index buffer is to be used for drawing N patches. | |
Set to indicate when the index buffer is to be used for drawing point sprites or indexed point lists. | |
Set to indicate that the buffer is to be used with software processing. | |
Informs the system that the application writes only to the index buffer. Using this flag enables the driver to choose the best memory location for efficient write operations and rendering. Attempts to read from an index buffer that is created with this capability can result in degraded performance. |
?
Member of the
Size of the index buffer, in bytes.
Percent of time processing data in the driver. These statistics may help identify cases when the driver is waiting for other resources.
+These metrics help identify when a driver is waiting and what it is waiting for. High percentages are not necessarily a problem.
These system-global metrics may or may not be implemented. Depending on the specific hardware, these metrics may not support multiple queries simultaneously.
+Percentage of time the driver spent waiting for the GPU to finish using a locked resource (and
Percentage of time the driver spent waiting for the GPU to finish processing some commands before the driver could send more. This indicates the driver has run out of room to send commands to the GPU.
Percentage of time the driver spent waiting for the GPU latency to reduce to less than three rendering frames.
If an application is GPU-limited, the driver must stall the CPU until the GPU gets within three frames. This prevents an application from queuing up many seconds' worth of rendering calls which may dramatically increase the latency between when the user inputs new data and when the user sees the results of that input. In general, the driver can track the number of times Present is called to prevent queuing up more than three frames of rendering work.
Percentage of time the driver spent waiting for a resource that cannot be pipelined (that is operated in parallel). An application may want to avoid using a non-pipelined resource for performance reasons.
Percentage of time the driver spent waiting for other GPU processing.
Defines a set of lighting properties.
+Type of the light source. This value is one of the members of the
Diffuse color emitted by the light. This member is a
Specular color emitted by the light. This member is a
Ambient color emitted by the light. This member is a
Position of the light in world space, specified by a
Direction that the light is pointing in world space, specified by a
Distance beyond which the light has no effect. The maximum allowable value for this member is the square root of FLT_MAX. This member does not affect directional lights.
Decrease in illumination between a spotlight's inner cone (the angle specified by Theta) and the outer edge of the outer cone (the angle specified by Phi).
The effect of falloff on the lighting is subtle. Furthermore, a small performance penalty is incurred by shaping the falloff curve. For these reasons, most developers set this value to 1.0.
Value specifying how the light intensity changes over distance. Attenuation values are ignored for directional lights. This member represents an attenuation constant. For information about attenuation, see Light Properties (Direct3D 9). Valid values for this member range from 0.0 to infinity. For non-directional lights, all three attenuation values should not be set to 0.0 at the same time.
Value specifying how the light intensity changes over distance. Attenuation values are ignored for directional lights. This member represents an attenuation constant. For information about attenuation, see Light Properties (Direct3D 9). Valid values for this member range from 0.0 to infinity. For non-directional lights, all three attenuation values should not be set to 0.0 at the same time.
Value specifying how the light intensity changes over distance. Attenuation values are ignored for directional lights. This member represents an attenuation constant. For information about attenuation, see Light Properties (Direct3D 9). Valid values for this member range from 0.0 to infinity. For non-directional lights, all three attenuation values should not be set to 0.0 at the same time.
Angle, in radians, of a spotlight's inner cone - that is, the fully illuminated spotlight cone. This value must be in the range from 0 through the value specified by Phi.
Angle, in radians, defining the outer edge of the spotlight's outer cone. Points outside this cone are not lit by the spotlight. This value must be between 0 and pi.
Describes a locked rectangular region.
+The pitch for DXTn formats is different from what was returned in DirectX 7. It now refers to the number of bytes in a row of blocks. For example, if you have a width of 16, then you will have a pitch of 4 blocks (4*8 for DXT1, 4*16 for DXT2-5.)
+Number of bytes in one row of the surface.
Pointer to the locked bits. If a
Describes preprocessor definitions used by an effect object.
+To use
sample= + macro.Name = "DO_CODE_BLOCK"; + macro.Definition = "/* here is a block of code */\\\n" "{ do something ... }\\\n"; +
Notice the 3 backslash characters at the end of the line. The first two are required to output a single '\', followed by the newline character "\n". Optionally, you may also want to terminate your lines using "\\\r\n".
+Preprocessor name.
Definition name.
Specifies material properties.
+To turn off specular highlights, set
For more information about using the lighting engine to calculate specular lighting, see Specular Lighting (Direct3D 9).
+Value specifying the diffuse color of the material. See
Value specifying the ambient color of the material. See
Value specifying the specular color of the material. See
Value specifying the emissive color of the material. See
Floating-point value specifying the sharpness of specular highlights. The higher the value, the sharper the highlight.
Mesh data structure.
+Defines the mesh data type. See
Pointer to a mesh. See
Pointer to a patch mesh. See
Pointer to a patch mesh. See
Describes a parameter used for an effect object.
+Name of the parameter.
Semantic meaning, also called the usage.
Parameter class. Set this to one of the values in
Parameter type. Set this to one of the values in
Number of rows in the array.
Number of columns in the array.
Number of elements in the array.
Number of annotations.
Number of structure members.
Parameter attributes. See Effect Constants.
The size of the parameter, in bytes.
Describes a pass for an effect object.
+String value used for the pass.
Annotations are user-specific data that can be attached to any technique, pass, or parameter. See Add Information to Effect Parameters with_Annotations.
Pointer to the vertex shader function. If an effect is created with
Pointer to the pixel shader function. If an effect is created with
Structure that contains the attributes of a patch mesh.
+A mesh is a set of faces, each of which is described by a simple polygon. Objects can be created by connecting several meshes together. A patch mesh is constructed from patches. A patch is a four-sided piece of geometry constructed from curves. The type of curve used and the order of the curve can be varied so that the patch surface will fit almost any surface shape.
The following types of patch combinations are supported:
Patch Type | Basis | Degree |
---|---|---|
Rectangle | Bezier | 2,3,5 |
Rectangle | B-Spline | 2,3,5 |
Rectangle | Catmull-Rom | 3 |
Triangle | Bezier | 2,3,5 |
N-patch | N/A | 3 |
?
+The patch type. For information about patch types, see
Degree of the curves used to construct the patch. For information about the degrees supported, see
Type of curve used to construct the patch. For information about the basis types supported, see
Percent of time processing data in the pipeline.
+For best performance, a balanced load is recommended.
+Percent of time spent running vertex shaders.
Percent of time spent running pixel shaders.
Percent of time spent doing other processing.
Percent of time not processing anything.
Pixel shader driver caps.
+Instruction predication is supported if this value is nonzero. See setp_comp - vs.
Either 0 or 24, which represents the depth of the dynamic flow control instruction nesting. See
The number of temporary registers supported. See
The depth of nesting of the loop - vs/rep - vs and call - vs/callnz bool - vs instructions. See
The number of instruction slots supported. See
Describes swapchain statistics relating to PresentEx calls.
+When a 9Ex application adopts Flip Mode present (
Applications can determine whether a frame has been dropped by sampling any two instances of PresentCount and GetPresentStats (by calling GetPresentStats API at any two points in time). For example, a media application that is presenting at the same rate as the monitor refresh rate (for example, monitor refresh rate is 60Hz, the application presents a frame every 1/60 seconds) wants to present frames A, B, C, D, E, each corresponding to Present IDs (PresentCount) 1, 2, 3, 7, 8.
The application code looks like the following sequence.
Note that GetPresentStatistics will be processed after it is called, regardless of the state of FLIPEX mode PresentEx calls.
Windows?Vista:??The Present calls will be queued and then processed before GetPresentStats call will be processed.
When an application detects that the presentation of certain frames are behind, it can skip those frames and correct the presentation to re-synchronize with the vblank. To do this, an application can simply not render the late frames and start rendering with the next correct frame in the queue. However, if an application has already started the rendering of late frames, it can use a new Present parameter in D3D9Ex called
Applications can synchronize video and audio streams in the same manner because the behavior of GetPresentStatistics does not change in that scenario.
D3D9Ex Flip Mode provides frame statistics information to windowed applications and full screen 9Ex applications.
Windows?Vista:??Use the DWM APIs for retrieving present statistics.
When Desktop Window Manager is turned off, windowed mode 9Ex applications using flip mode will receive present statistics information of limited accuracy.
Windows?Vista:??
If an application is not fast enough to keep up with the monitor's refresh rate, possibly due to slow hardware or lack of system resources, then it can experience a graphics glitch. A glitch is a so-called visual hiccup. If a monitor is set to refresh at 60 Hz, and the application can only manage 30 fps, then half of the frames will have glitches.
Applications can detect a glitch by keeping track of SynchRefreshCount. For example, an application might perform the following sequence of actions.
Describes the presentation parameters.
+Width of the new swap chain's back buffers, in pixels. If Windowed is
Height of the new swap chain's back buffers, in pixels. If Windowed is
The back buffer format. For more information about formats, see
In fact,
For windowed applications, the back buffer format no longer needs to match the display-mode format because color conversion can now be done by the hardware (if the hardware supports color conversion). The set of possible back buffer formats is constrained, but the runtime will allow any valid back buffer format to be presented to any desktop format. (There is the additional requirement that the device be operable in the desktop; devices typically do not operate in 8 bits per pixel modes.)
Full-screen applications cannot do color conversion.
This value can be between 0 and
The method fails if one back buffer cannot be created. The value of BackBufferCount influences what set of swap effects are allowed. Specifically, any
Member of the
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by CheckDeviceMultiSampleType. Passing a larger value returns the error
Member of the
Differences between Direct3D9 and Direct3D9Ex In Direct3D9Ex, |
?
The device window determines the location and size of the back buffer on screen. This is used by Direct3D when the back buffer contents are copied to the front buffer during Present.
For a full-screen application, this is a handle to the top window (which is the focus window).
For applications that use multiple full-screen devices (such as a multimonitor system), exactly one device can use the focus window as the device window. All other devices must have unique device windows.
Note that no attempt is made by the runtime to reflect user changes in window size. The back buffer is not implicitly reset when this window is reset. However, the Present method does automatically track window position changes.
TRUE if the application runs windowed;
If this value is TRUE, Direct3D will manage depth buffers for the application. The device will create a depth-stencil buffer when it is created. The depth-stencil buffer will be automatically set as the render target of the device. When the device is reset, the depth-stencil buffer will be automatically destroyed and recreated in the new size.
If EnableAutoDepthStencil is TRUE, then AutoDepthStencilFormat must be a valid depth-stencil format.
Member of the
One of the
The rate at which the display adapter refreshes the screen. The value depends on the mode in which the application is running:
The maximum rate at which the swap chain's back buffers can be presented to the front buffer. For a detailed explanation of the modes and the intervals that are supported, see
Describes the raster status.
+TRUE if the raster is in the vertical blank period.
If InVBlank is
If InVBlank is TRUE, then this value is set to zero and can be ignored.
Describes a rectangular high-order patch.
+The following diagram identifies the parameters that specify a rectangle patch.
Each of the vertices in the vertex buffer is shown as a black dot. In this case, the vertex buffer has 20 vertices in it, 16 of which are in the rectangle patch. The stride is the number of vertices in the width of the vertex buffer, in this case five. The x offset to the first vertex is called the StartIndexVertexWidth and is in this case 1. The y offset to the first patch vertex is called the StartIndexVertexHeight and is in this case 0.
To render a stream of individual rectangular patches (non-mosaic), you should interpret your geometry as a long narrow (1 x N) rectangular patch. The
+RectInfo; RectInfo.Width = 4; + RectInfo.Height = 4; + RectInfo.Stride = 4; + RectInfo.Basis = ; + RectInfo.Order = D3DORDER_CUBIC; + RectInfo.StartVertexOffsetWidth = 0; + RectInfo.StartVertexOffsetHeight = 4*i; // The variable i is the index of the + // patch you want to render. +
Starting vertex offset width, in number of vertices.
Starting vertex offset height, in number of vertices.
Width of each vertex, in number of vertices.
Height of each vertex, in number of vertices.
Width of the imaginary two-dimensional vertex array, which occupies the same space as the vertex buffer. For an example, see the diagram below.
Member of the
Value | Order supported | Width and height |
---|---|---|
Linear, cubic, and quintic | Width = height = (DWORD)order + 1 | |
Linear, cubic, and quintic | Width = height > (DWORD)order | |
D3DBASIS_INTERPOLATE | Cubic | Width = height > (DWORD)order |
?
Member of the
Describes an off-screen render target used by an instance of
This method is used to return the creation parameters used when creating an
Describes a render surface.
+Width of the render surface, in pixels.
Height of the render surface, in pixels.
Member of the
If TRUE, the render surface supports a depth-stencil surface; otherwise this member is set to
If DepthStencil is set to TRUE, this parameter is a member of the
Resource statistics gathered by the D3DDEVINFO_ResourceManager when using the asynchronous query mechanism.
+Describes a vector key for use in key frame animation. It specifies a vector at a given time. This is used for scale and translation keys.
+Key frame time stamp.
Offset from the beginning of this structure, in bytes, to the string that contains the constant information.
Register set. See
The register index.
Number of registers.
Reserved.
Offset from the beginning of this structure, in bytes, to the string that contains the D3DXSHADER_TYPEINFO information.
Offset from the beginning of this structure, in bytes, to the string that contains the default value.
Helper structure for managing a shader constant table. This can also be done using
Shader constant information is included in a tab-delimited table of comments. All offsets are measured in bytes from the beginning of the structure. Entries in the constant table are sorted by Creator in ascending order.
A shader constant table can be managed with the
This size member is often initialized using the following:
+constantTable; + constantTable.Size = sizeof( ) +
Semantics map a parameter to vertex or pixel shader registers. They can also be optional descriptive strings attached to non-register parameters.
+Semantics are required for vertex and pixel shader, input and output registers.
+Options that identify how resources are used. See
Options that modify how the usage is interpreted. The usage and usage index make up a vertex declaration. See Vertex Declaration (Direct3D 9).
Percent of time processing shader data.
+For best performance, a balanced load is recommended.
+Percent of time in shader spent on memory accesses.
Percent of time processing (moving data around in registers or doing mathematical operations).
Describes a surface.
+Member of the
Member of the
Either the
Member of the
Member of the
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by CheckDeviceMultiSampleType. Passing a larger value returns the error,
Width of the surface, in pixels.
Height of the surface, in pixels.
Describes a technique used by an effect.
+Some video cards can render two textures in a single pass. However, if a card does not have this capability, it is often possible to render the same effect in two passes, using one texture for each pass.
+String that contains the technique name.
Number of rendering passes the technique requires. See Remarks.
The number of annotations. See Add Information to Effect Parameters with_Annotations.
Describes an animation track and specifies blending weight, speed, and position for the track at a given time.
+Tracks with the same priority are blended together, and the two resulting values are then blended using the priority blend factor. A track must have an animation set (stored separately) associated with it.
+Priority type, as defined in
Weight value. The weight determines the proportion of this track to blend with other tracks.
Speed value. This is used similarly to a multiplier to scale the period of the track.
Time position of the track, in the local timeframe of its current animation set.
Track enable/disable. To enable, set to TRUE. To disable, set to
Describes a triangular high-order patch.
+For example, the following diagram identifies the vertex order and segment numbers for a cubic B?zier triangle patch. The vertex order determines the segment numbers used by DrawTriPatch. The offset is the number of bytes to the first triangle patch vertex in the vertex buffer.
+Starting vertex offset, in number of vertices.
Number of vertices.
Member of the
Member of the
Value | Number of vertices |
---|---|
10 | |
3 | |
N/A | |
21 |
?
N/A - Not available. Not supported.
DirectX 8.1 and later versions only.
The
DirectX 8.1 versions only. The Direct3D runtime calls a driver's D3dGetDriverState function to obtain vertex-cache information from the driver. In this D3dGetDriverState call, the runtime specifies the D3DDEVINFOID_VCACHE flag in the dwFlags member of the DD_GETDRIVERSTATEDATA structure that the runtime passes. The driver specifies vertex-cache information in a
DirectX 9.0 and later versions only. The Direct3D runtime specifies D3DDP2OP_CREATEQUERY and D3DDP2OP_ISSUEQUERY commands in calls to the driver's D3dDrawPrimitives2 callback to create driver-side resources for the query and then to asynchronously query the driver for vertex-cache information. In the call with the D3DDP2OP_CREATEQUERY command, the runtime specifies the
When the driver completes a vertex-cache query, the driver sets the total size of the response buffer in the dwErrorOffset member of the D3DHAL_DRAWPRIMITIVES2DATA structure and sets the ddrval member of D3DHAL_DRAWPRIMITIVES2DATA to
Specifies the bit pattern. The driver must specify the bit pattern as the CACH four-character code (FOURCC) value. The driver can use the MAKEFOURCC macro as follows to specify the FOURCC value as CACH:
MAKEFOURCC('C', 'A', 'C', 'H');
Specifies the method of mesh optimization. The driver can use one of the following values to specify the mesh optimization that it uses:
Value | Meaning |
---|---|
| Longest strips optimization |
D3DXMESHOPT_VCACHE (1) | Vertex-cache based optimization |
?
Specifies the effective size, in entries, for which the driver optimizes the vertex cache. The actual cache size is not required to be the size specified in CacheSize because in most cases the actual cache size turns out to be larger. The driver only specifies an optimized size in CacheSize if it also specifies D3DXMESHOPT_VCACHE in the OptMethod member.
Specifies the number that should be used as part of a trial-and-error procedure when determining when to restart the strips list. This number can be set from 1 to the value in the CacheSize member. Typically, the best values are near CacheSize/2.
Describes a vertex buffer.
+Member of the
Member of the
Combination of one or more
Member of the
Size of the vertex buffer, in bytes.
Combination of
Defines the vertex data layout. Each vertex can contain one or more data types, and each data type is described by a vertex element.
+Vertex data is defined using an array of
Stream number.
Offset from the beginning of the vertex data to the data associated with the particular data type.
The data type, specified as a
The method specifies the tessellator processing, which determines how the tessellator interprets (or operates on) the vertex data. For more information, see
Defines what the data will be used for; that is, the interoperability between vertex data layouts and vertex shaders. Each usage acts to bind a vertex declaration to a vertex shader. In some cases, they have a special interpretation. For example, an element that specifies
Modifies the usage data to allow the user to specify multiple usage types.
Vertex shader caps.
+Instruction predication is supported if this value is nonzero. See setp_comp - vs.
Either 0 or 24, which represents the depth of the dynamic flow control instruction nesting. See
The number of temporary registers supported. See
The depth of nesting of the loop - vs/rep - vs and call - vs/callnz bool - vs instructions. See
Reports the number of triangles that have been processed and clipped by the runtime's software vertex processing.
+Use the debug runtime and software vertex processing to get the number of non-clipped and clipped primitives for a particular scene. Primitives will typically be clipped based on a guard band (if one is present). The clipping guard band is set with parameters such as GuardBandLeft in
Total number of triangles that are not clipped in this frame.
Number of new triangles generated by clipping.
Describes a volume.
+Member of the
Member of the
Currently not used. Always returned as 0.
Member of the
Width of the volume, in pixels.
Height of the volume, in pixels.
Depth of the volume, in pixels.
Specifies tolerance values for each vertex component when comparing vertices to determine if they are similar enough to be welded together.
+The LPD3DXWELDEPSILONS type is defined as a reference to the
typedef+*LPD3DXWELDEPSILONS; +
Position
Blend weight
Normal
Point size value
Specular lighting value
Diffuse lighting value
Eight texture coordinates
Tangent
Binormal
Tessellation factor
Identifies compressed key frame animation data.
+Total size, in bytes, of the compressed data in the compressed key frame animation data buffer.
Number of animation key frame ticks that occur per second.
Type of the animation set playback loop. See
Minimum buffer size, in bytes, required to hold compressed key frame animation data. Value is equal to ( ( CompressedBlockSize + 3 ) / 4 ).
s = det([o_2 - o_1, d_2, d_1 x d_2]) / ||d_1 x d_2||^2
+ t = det([o_2 - o_1, d_1, d_1 x d_2]) / ||d_1 x d_2||^2
+ Where o_1 is the position of the first ray, o_2 is the position of the second ray,
+ d_1 is the normalized direction of the first ray, d_2 is the normalized direction
+ of the second ray, det denotes the determinant of a matrix, x denotes the cross
+ product, [ ] denotes a matrix, and || || denotes the length or magnitude of a vector.
+ start + (end - start) * amount
+ Passing start + (end - start) * amount
+ Passing The
+
You can specify
Typically, use
The
+
The
+
The
+
The
+
The methods in this interface present your object's data as a contiguous sequence of bytes that you can read or write. There are also methods for committing and reverting changes on streams that are open in transacted mode and methods for restricting access to a range of bytes in the stream.
Streams can remain open for long periods of time without consuming file-system resources. The IUnknown::Release method is similar to a close function on a file. Once released, the stream object is no longer valid and cannot be used.
Clients of asynchronous monikers can choose between a data-pull or data-push model for driving an asynchronous
+ IMoniker::BindToStorage operation and for receiving asynchronous notifications. See
+ URL Monikers for more information. The following table compares the behavior of asynchronous
+
The Seek method changes the seek reference to a new location. The new location is relative to either the beginning of the stream, the end of the stream, or the current seek reference.
+The displacement to be added to the location indicated by the dwOrigin parameter. If dwOrigin is STREAM_SEEK_SET, this is interpreted as an unsigned value rather than a signed value.
The origin for the displacement specified in dlibMove. The origin can be the beginning of the file (STREAM_SEEK_SET), the current seek reference (STREAM_SEEK_CUR), or the end of the file (STREAM_SEEK_END). For more information about values, see the STREAM_SEEK enumeration.
A reference to the location where this method writes the value of the new seek reference from the beginning of the stream.
You can set this reference to
You can also use this method to obtain the current value of the seek reference by calling this method with the dwOrigin parameter set to STREAM_SEEK_CUR and the dlibMove parameter set to 0 so that the seek reference is not changed. The current seek reference is returned in the plibNewPosition parameter.
+The SetSize method changes the size of the stream object.
+Specifies the new size, in bytes, of the stream.
This method can return one of these values.
The size of the stream object was successfully changed.
Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information, see IFillLockBytes and Asynchronous Storage.
The stream size is not changed because there is no space left on the storage device.
The value of the libNewSize parameter is not supported by the implementation. Not all streams support greater than 2?? bytes. If a stream does not support more than 2?? bytes, the high DWORD data type of libNewSize must be zero. If it is nonzero, the implementation may return STG_E_INVALIDFUNCTION. In general, COM-based implementations of the
The object has been invalidated by a revert operation above it in the transaction tree.
If the libNewSize parameter is smaller than the current stream, the stream is truncated to the indicated size.
The seek reference is not affected by the change in stream size.
Calling
The CopyTo method copies a specified number of bytes from the current seek reference in the stream to the current seek reference in another stream.
+A reference to the destination stream. The stream pointed to by pstm can be a new stream or a clone of the source stream.
The number of bytes to copy from the source stream.
A reference to the location where this method writes the actual number of bytes written to the destination. You can set this reference to
A reference to the location where this method writes the actual number of bytes read from the source. You can set this reference to
The CopyTo method copies the specified bytes from one stream to another. It can also be used to copy a stream to itself. The seek reference in each stream instance is adjusted for the number of bytes read or written. This method is equivalent to reading cb bytes into memory using
+
The destination stream can be a clone of the source stream created by calling the
+
If
If
To copy the remainder of the source from the current seek reference, specify the maximum large integer value for the cb parameter. If the seek reference is the beginning of the stream, this operation copies the entire stream.
+The Commit method ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage. If the stream object is open in direct mode,
Controls how the changes for the stream object are committed. See the
This method can return one of these values.
Changes to the stream object were successfully committed to the parent level.
Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information see IFillLockBytes and Asynchronous Storage.
The commit operation failed due to lack of space on the storage device.
The object has been invalidated by a revert operation above it in the transaction tree.
The Commit method ensures that changes to a stream object opened in transacted mode are reflected in the parent storage. Changes that have been made to the stream since it was opened or last committed are reflected to the parent storage object. If the parent is opened in transacted mode, the parent may revert at a later time, rolling back the changes to this stream object. The compound file implementation does not support the opening of streams in transacted mode, so this method has very little effect other than to flush memory buffers. For more information, see
+
If the stream is open in direct mode, this method ensures that any memory buffers have been flushed out to the underlying storage object. This is much like a flush in traditional file systems.
The
The Revert method discards all changes that have been made to a transacted stream since the last
+
This method can return one of these values.
The stream was successfully reverted to its previous version.
Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information see IFillLockBytes and Asynchronous Storage.
The Revert method discards changes made to a transacted stream since the last commit operation.
+ The Stat method retrieves the
+
The Clone method creates a new stream object with its own seek reference that references the same bytes as the original stream.
+When successful, reference to the location of an
The Clone method creates a new stream object for accessing the same bytes but using a separate seek reference. The new stream object sees the same data as the source-stream object. Changes written to one object are immediately visible in the other. Range locking is shared between the stream objects.
The initial setting of the seek reference in the cloned stream instance is the same as the current setting of the seek reference in the original stream at the time of the clone operation.
+ The
+
Reads a specified number of bytes from the stream object into memory starting at the current read/write location within the stream.
+[in]Points to the buffer into which the stream is read. If an error occurs, this value is
[in]Specifies the number of bytes of data to attempt to read from the stream object.
[out]Pointer to a location where this method writes the actual number of bytes read from the stream object. You can set this reference to
Writes a specified number of bytes into the stream object starting at the current read/write location within the stream.
+[in] Points to the buffer into which the stream should be written.
[in] The number of bytes of data to attempt to write into the stream.
[out] Pointer to a location where this method writes the actual number of bytes written to the stream object. The caller can set this reference to
The
+
The
+
The methods in this interface present your object's data as a contiguous sequence of bytes that you can read or write. There are also methods for committing and reverting changes on streams that are open in transacted mode and methods for restricting access to a range of bytes in the stream.
Streams can remain open for long periods of time without consuming file-system resources. The IUnknown::Release method is similar to a close function on a file. Once released, the stream object is no longer valid and cannot be used.
Clients of asynchronous monikers can choose between a data-pull or data-push model for driving an asynchronous
+ IMoniker::BindToStorage operation and for receiving asynchronous notifications. See
+ URL Monikers for more information. The following table compares the behavior of asynchronous
+
The
+
The
+
This interface is used to return arbitrary length data.
+An
The ID3DBlob interface is type defined in the D3DCommon.h header file as a
Blobs can be used as a data buffer, storing vertex, adjacency, and material information during mesh optimization and loading operations. Also, these objects are used to return object code and error messages in APIs that compile vertex, geometry and pixel shaders.
+Get a reference to the data.
+Get the size.
+Get a reference to the data.
+Returns a reference.
Get the size.
+The size of the data, in bytes.
Defines a shader macro.
+You can use shader macros in your shaders. The
Shader_Macros[] = { "zero", "0", null ,null }; +
The following shader or effect creation functions take an array of shader macros as an input parameter:
The macro name.
The macro definition.
Driver type options.
+The driver type is required when calling
The driver type is unknown.
A hardware driver, which implements Direct3D features in hardware. This is the primary driver that you should use in your Direct3D applications because it provides the best performance. A hardware driver uses hardware acceleration (on supported hardware) but can also use software for parts of the pipeline that are not supported in hardware. This driver type is often referred to as a hardware abstraction layer or HAL.
A reference driver, which is a software implementation that supports every Direct3D feature. A reference driver is designed for accuracy rather than speed and as a result is slow but accurate. The rasterizer portion of the driver does make use of special CPU instructions whenever it can, but it is not intended for retail applications; use it only for feature testing, demonstration of functionality, debugging, or verifying bugs in other drivers. The reference device for this driver is installed by the Windows SDK 8.0 or later and is intended only as a debug aid for development purposes. This driver may be referred to as a REF driver, a reference driver, or a reference rasterizer.
Note??When you use the REF driver in Windows Store apps, the REF driver renders correctly but doesn't display any output on the screen. To verify bugs in hardware drivers for Windows Store apps, useA
A software driver, which is a driver implemented completely in software. The software implementation is not intended for a high-performance application due to its very slow performance.
A WARP driver, which is a high-performance software rasterizer. The rasterizer supports feature levels 9_1 through level 10_1 with a high performance software implementation. For information about limitations creating a WARP device on certain feature levels, see Limitations Creating WARP and Reference Devices. For more information about using a WARP driver, see Windows Advanced Rasterization Platform (WARP) In-Depth Guide.
Note??The WARP driver that Windows?8 includes supports feature levels 9_1 through level 11_1. ? Note??The WARP driver that Windows?8.1 includes fully supports feature level 11_1, including tiled resources,Describes the set of features targeted by a Direct3D device.
+For an overview of the capabilities of each feature level, see Overview For Each Feature Level.
For information about limitations creating non-hardware-type devices on certain feature levels, see Limitations Creating WARP and Reference Devices.
+Targets features supported by feature level 9.1 including shader model 2.
Targets features supported by feature level 9.2 including shader model 2.
Targets features supported by feature level 9.3 including shader model 2.0b.
Targets features supported by Direct3D 10.0 including shader model 4.
Targets features supported by Direct3D 10.1 including shader model 4.
Targets features supported by Direct3D 11.0 including shader model 5.
Targets features supported by Direct3D 11.1 including shader model 5 and logical blend operations. This feature level requires a display driver that is at least implemented to WDDM for Windows?8 (WDDM 1.2).
Targets features supported by Direct3D 12.0 including shader model 5.
Targets features supported by Direct3D 12.1 including shader model 5.
Specifies interpolation mode, which affects how values are calculated during rasterization.
+The interpolation mode is undefined.
Don't interpolate between register values.
Interpolate linearly between register values.
Interpolate linearly between register values but centroid clamped when multisampling.
Interpolate linearly between register values but with no perspective correction.
Interpolate linearly between register values but with no perspective correction and centroid clamped when multisampling.
Interpolate linearly between register values but sample clamped when multisampling.
Interpolate linearly between register values but with no perspective correction and sample clamped when multisampling.
Values that indicate the minimum desired interpolation precision.
+For more info, see Scalar Types and Using HLSL minimum precision.
+Default minimum precision, which is 32-bit precision.
Minimum precision is min16float, which is 16-bit floating point.
Minimum precision is min10float, which is 10-bit floating point.
Reserved
Minimum precision is min16int, which is 16-bit signed integer.
Minimum precision is min16uint, which is 16-bit unsigned integer.
Minimum precision is any 16-bit value.
Minimum precision is any 10-bit value.
Values that indicate how the pipeline interprets vertex data that is bound to the input-assembler stage. These primitive topology values determine how the vertex data is rendered on screen.
+Use the
The following diagram shows the various primitive types for a geometry shader object.
+Values that identify the type of resource to be viewed as a shader resource.
+A
The type is unknown.
The resource is a buffer.
The resource is a 1D texture.
The resource is an array of 1D textures.
The resource is a 2D texture.
The resource is an array of 2D textures.
The resource is a multisampling 2D texture.
The resource is an array of multisampling 2D textures.
The resource is a 3D texture.
The resource is a cube texture.
The resource is an array of cube textures.
The resource is a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.
A multithread interface accesses multithread settings and can only be used if the thread-safe layer is turned on.
+This interface is obtained by querying it from the ID3D10Device Interface using IUnknown::QueryInterface.
+Enter a device's critical section.
+Entering a device's critical section prevents other threads from simultaneously calling that device's methods (if multithread protection is set to true), calling DXGI methods, and calling the methods of all resource, view, shader, state, and asynchronous interfaces.
This function should be used in multithreaded applications when there is a series of graphics commands that must happen in order. This function is typically called at the beginning of the series of graphics commands, and
Leave a device's critical section.
+This function is typically used in multithreaded applications when there is a series of graphics commands that must happen in order.
Turn multithreading on or off.
+True to turn multithreading on, false to turn it off.
True if multithreading was turned on prior to calling this method, false otherwise.
Find out if multithreading is turned on or not.
+Whether or not multithreading is turned on. True means on, false means off.
The
The IAudioClient::Initialize and IAudioClient::IsFormatSupported methods use the constants defined in the
In shared mode, the client can share the audio endpoint device with clients that run in other user-mode processes. The audio engine always supports formats for client streams that match the engine's mix format. In addition, the audio engine might support another format if the Windows audio service can insert system effects into the client stream to convert the client format to the mix format.
In exclusive mode, the Windows audio service attempts to establish a connection in which the client has exclusive access to the audio endpoint device. In this mode, the audio engine inserts no system effects into the local stream to aid in the creation of the connection point. Either the audio device can handle the specified format directly or the method fails.
For more information about shared-mode and exclusive-mode streams, see User-Mode Audio Components.
+The audio stream will run in shared mode. For more information, see Remarks.
The audio stream will run in exclusive mode. For more information, see Remarks.
The AudioSessionState enumeration defines constants that indicate the current state of an audio session.
+When a client opens a session by assigning the first stream to the session (by calling the IAudioClient::Initialize method), the initial session state is inactive. The session state changes from inactive to active when a stream in the session begins running (because the client has called the IAudioClient::Start method). The session changes from active to inactive when the client stops the last running stream in the session (by calling the IAudioClient::Stop method). The session state changes to expired when the client destroys the last stream in the session by releasing all references to the stream object.
The system volume-control program, Sndvol, displays volume controls for both active and inactive sessions. Sndvol stops displaying the volume control for a session when the session state changes to expired. For more information about Sndvol, see Audio Sessions.
The IAudioSessionControl::GetState and IAudioSessionEvents::OnStateChanged methods use the constants defined in the AudioSessionState enumeration.
For more information about session states, see Audio Sessions.
+The audio session is inactive. (It contains at least one stream, but none of the streams in the session is currently running.)
The audio session is active. (At least one of the streams in the session is running.)
The audio session has expired. (It contains no streams.)
Specifies the category of an audio stream.
+Note that only a subset of the audio stream categories are valid for certain stream types.
Stream type | Valid categories |
---|---|
Render stream | All categories are valid. |
Capture stream | AudioCategory_Communications, AudioCategory_Speech, AudioCategory_Other |
Loopback stream | AudioCategory_Other |
?
Games should categorize their music streams as AudioCategory_GameMedia so that game music mutes automatically if another application plays music in the background. Music or video applications should categorize their streams as AudioCategory_Media or AudioCategory_Movie so they will take priority over AudioCategory_GameMedia streams.
The values AudioCategory_ForegroundOnlyMedia and AudioCategory_BackgroundCapableMedia are deprecated. For Windows Store apps, these values will continue to function the same when running on Windows?10 as they did on Windows?8.1. Attempting to use these values in a Universal Windows Platform (UWP) app, will result in compilation errors and an exception at runtime. Using these values in a Windows desktop application built with the Windows?10 SDK the will result in a compilation error.
+Other audio stream.
Media that will only stream when the app is in the foreground. This enumeration value has been deprecated. For more information, see the Remarks section.
Real-time communications, such as VOIP or chat.
Alert sounds.
Sound effects.
Game sound effects.
Background audio for games.
Game chat audio. Similar to AudioCategory_Communications except that AudioCategory_GameChat will not attenuate other streams.
Speech.
Stream that includes audio with dialog.
Stream that includes audio without dialog.