public CommandList(GraphicsDevice device) : base(device) { nativeDeviceContext = device.NativeDeviceContext; nativeDeviceProfiler = device.IsDebugMode ? SharpDX.ComObject.QueryInterfaceOrNull <SharpDX.Direct3D11.UserDefinedAnnotation>(nativeDeviceContext.NativePointer) : null; InitializeStages(); ClearState(); }
public CommandList(GraphicsDevice device) : base(device) { nativeDeviceContext = device.NativeDeviceContext; nativeDeviceProfiler = device.IsDebugMode ? SharpDX.ComObject.QueryInterfaceOrNull<SharpDX.Direct3D11.UserDefinedAnnotation>(nativeDeviceContext.NativePointer) : null; InitializeStages(); ClearState(); }
/// <summary> /// Initializes a new instance of the <see cref="GraphicsDevice" /> class using the default GraphicsAdapter /// and the Level10 <see cref="GraphicsProfile" />. /// </summary> /// <param name="device">The device.</param> private GraphicsDevice(GraphicsDevice device) { RootDevice = device; Adapter = device.Adapter; creationFlags = device.creationFlags; Features = device.Features; sharedDataPerDevice = device.sharedDataPerDevice; InputLayoutManager = device.InputLayoutManager; nativeDevice = device.NativeDevice; nativeDeviceContext = new SharpDX.Direct3D11.DeviceContext(NativeDevice).DisposeBy(this); nativeDeviceProfiler = SharpDX.ComObject.QueryInterfaceOrNull <SharpDX.Direct3D11.UserDefinedAnnotation>(nativeDeviceContext.NativePointer); isDeferred = true; IsDebugMode = device.IsDebugMode; if (IsDebugMode) { GraphicsResourceBase.SetDebugName(device, nativeDeviceContext, "DeferredContext"); } NeedWorkAroundForUpdateSubResource = !Features.HasDriverCommandLists; primitiveQuad = new PrimitiveQuad(this).DisposeBy(this); InitializeStages(); }
/// <summary> /// Initializes a new instance of the <see cref="GraphicsDevice" /> class using the default GraphicsAdapter /// and the Level10 <see cref="GraphicsProfile" />. /// </summary> /// <param name="device">The device.</param> private GraphicsDevice(GraphicsDevice device) { RootDevice = device; Adapter = device.Adapter; creationFlags = device.creationFlags; Features = device.Features; sharedDataPerDevice = device.sharedDataPerDevice; InputLayoutManager = device.InputLayoutManager; nativeDevice = device.NativeDevice; nativeDeviceContext = new SharpDX.Direct3D11.DeviceContext(NativeDevice).DisposeBy(this); nativeDeviceProfiler = SharpDX.ComObject.QueryInterfaceOrNull<SharpDX.Direct3D11.UserDefinedAnnotation>(nativeDeviceContext.NativePointer); isDeferred = true; IsDebugMode = device.IsDebugMode; if (IsDebugMode) { GraphicsResourceBase.SetDebugName(device, nativeDeviceContext, "DeferredContext"); } NeedWorkAroundForUpdateSubResource = !Features.HasDriverCommandLists; primitiveQuad = new PrimitiveQuad(this).DisposeBy(this); InitializeStages(); }