예제 #1
0
 public override void VOnRender(float time, float elapsedTime, Cv_Renderer renderer)
 {
     if (m_Root != null && Camera != null)
     {
         m_TransformStack.Clear();
         renderer.BeginDraw(Camera);
         m_Root.VPreRender(renderer);
         m_Root.VRender(renderer);
         m_Root.VRenderChildren(renderer);
         m_Root.VPostRender(renderer);
         renderer.EndDraw();
     }
 }
예제 #2
0
        public override void VOnRender(float time, float elapsedTime, Cv_Renderer renderer)
        {
            m_iFrameCounter++;

            string fps          = string.Format(m_Format, "{0} fps", m_iFrameRate);
            var    fontResource = Cv_ResourceManager.Instance.GetResource <Cv_SpriteFontResource>("FramerateCounterFont", "Default");

            if (fontResource != null)
            {
                renderer.BeginDraw();
                renderer.DrawText(fontResource.GetFontData().Font, fps, m_Position + Vector2.One, Color.Black);
                renderer.DrawText(fontResource.GetFontData().Font, fps, m_Position, Color.White);
                renderer.EndDraw();
            }
        }