/// <summary> /// Creates the and bind buffers. /// </summary> protected void CreateAndBindBuffers() { Log(LogLevel.Information, ""); RemoveAndDispose(ref renderBuffer); renderBuffer = Collect(CreateRenderBuffer()); renderBuffer.OnNewBufferCreated += RenderBuffer_OnNewBufferCreated; renderBuffer.OnDeviceLost += RenderBuffer_OnDeviceLost; RemoveAndDispose(ref renderer); renderer = Collect(CreateRenderer()); OnInitializeBuffers(renderBuffer, renderer); }
/// <summary> /// Clears the render targets. /// </summary> /// <param name="buffer">The buffer.</param> /// <param name="color">The color.</param> public void ClearRenderTargets(IDX11RenderBufferProxy buffer, Color4 color) { buffer.ClearRenderTarget(deviceContext, color); }
/// <summary> /// /// </summary> /// <param name="buffer"></param> public void SetRenderTargets(IDX11RenderBufferProxy buffer) { buffer.SetDefaultRenderTargets(deviceContext); }
/// <summary> /// Called when [initialize buffers]. /// </summary> /// <param name="buffer">The buffer.</param> /// <param name="renderer">The renderer.</param> protected virtual void OnInitializeBuffers(IDX11RenderBufferProxy buffer, IRenderer renderer) { buffer.Initialize((int)ActualWidth, (int)ActualHeight, MSAA); }