private void Reload(GraphicsResourceBase graphicsResourceBase) { forceDataChanged = true; // Force recreation graphicsResourceBase.OnRecreate(); }
/// <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 <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(); }