Пример #1
0
 /// <summary>
 /// Returns if the data (matrix etc) from the RenderTarget that was last used is still valid or not.
 /// </summary>
 /// <param name="activeRenderTarget"></param>
 /// <returns>
 /// True if still valid. False if invalid.
 /// </returns>
 public bool IsRenderTargetDataValid(IRenderTarget activeRenderTarget)
 {
     //! The data received from the RenderTarget is only valid if:
     //! 1. The RenderTarget is the same as the one used the last time
     //! 2. The GeometryBuffer never skipped a RenderTarget activation (Checked via counter)
     return((d_lastRenderTarget == activeRenderTarget) &&
            (d_lastRenderTargetActivationCount + 1 == activeRenderTarget.GetActivationCounter()));
 }
Пример #2
0
 //TODO DOCU
 public void UpdateRenderTargetData(IRenderTarget activeRenderTarget)
 {
     d_lastRenderTarget = activeRenderTarget;
     d_lastRenderTargetActivationCount = activeRenderTarget.GetActivationCounter();
 }