Esempio n. 1
0
        /// <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);
        }
Esempio n. 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);
 }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="buffer"></param>
 public void SetRenderTargets(IDX11RenderBufferProxy buffer)
 {
     buffer.SetDefaultRenderTargets(deviceContext);
 }
Esempio n. 4
0
 /// <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);
 }