public override RenderFrame GetRenderFrame(RenderContext context) { // Get the relative frame var relativeFrame = context.Tags.Get(RelativeSizeSource == RenderFrameRelativeMode.Current ? RenderFrame.Current : SceneGraphicsLayer.Master); // Check if we need to resize it if (currentFrame != null && (currentFrame.Descriptor != Descriptor || currentFrame.CheckIfResizeRequired(relativeFrame))) { Dispose(); } // Allocate the render frame if necessary // TODO: Should we use allocated shared textures from RenderContext? return(currentFrame ?? (currentFrame = RenderFrame.New(context.GraphicsDevice, Descriptor, relativeFrame))); }