Ejemplo n.º 1
0
        /// <inheritdoc />
        public virtual void Dispose()
        {
            FpsCounter.Dispose();
            FpsCounter = default;

            HostHandle = default;
        }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public void Render()
 {
     FrameStarted = DateTime.UtcNow;
     FpsCounter.StartFrame();
     RenderInternal();
     FpsCounter.StopFrame();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        protected RenderHost(IRenderHostSetup renderHostSetup)
        {
            HostHandle = renderHostSetup.HostHandle;
            HostInput  = renderHostSetup.HostInput;

            BufferSize   = HostInput.Size;
            ViewportSize = HostInput.Size;

            FpsCounter = new FpsCounter(new TimeSpan(0, 0, 0, 0, 1000));

            HostInput.SizeChanged += HostInputOnSizeChanged;
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public virtual void Dispose()
        {
            HostInput.SizeChanged -= HostInputOnSizeChanged;

            FpsCounter.Dispose();
            FpsCounter = default;

            BufferSize   = default;
            ViewportSize = default;

            HostInput.Dispose();
            HostInput = default;

            HostHandle = default;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor.
        /// </summary>
        protected RenderHost(IntPtr hostHandle)
        {
            HostHandle = hostHandle;

            FpsCounter = new FpsCounter(new TimeSpan(0, 0, 0, 0, 1000));
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected RenderHost(IRenderHostSetup renderHostSetup)
 {
     HostHandle = renderHostSetup.HostHandle;
     HostInput  = renderHostSetup.HostInput;
     FpsCounter = new FpsCounter(new TimeSpan(0, 0, 0, 0, 1000));
 }