Пример #1
0
 /// <summary>
 /// Set default render target to specify context.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="clear"></param>
 /// <returns>Set successful?</returns>
 public bool SetDefaultRenderTargets(DeviceContext context, bool clear = true)
 {
     if (!IsInitialized)
     {
         return(false);
     }
     renderBuffer.SetDefaultRenderTargets(context);
     if (clear)
     {
         renderBuffer.ClearRenderTarget(context, ClearColor);
     }
     return(true);
 }
Пример #2
0
 /// <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);
 }
Пример #3
0
 /// <summary>
 /// Clears the render target.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="clearBackBuffer">if set to <c>true</c> [clear back buffer].</param>
 /// <param name="clearDepthStencilBuffer">if set to <c>true</c> [clear depth stencil buffer].</param>
 public void ClearRenderTarget(DeviceContext context, bool clearBackBuffer, bool clearDepthStencilBuffer)
 {
     renderBuffer?.ClearRenderTarget(context, ClearColor, clearBackBuffer, clearDepthStencilBuffer);
 }