using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BansheeEngine
{
///
/// Determines type of data to display on the profiler overlay.
///
public enum ProfilerOverlayType // Note: Must match the C++ enum ProfilerOverlayType
{
CPUSamples,
GPUSamples
};
///
/// Component that displays a profiler overlay on the main game window.
///
public class ProfilerOverlay : Component
{
private ProfilerOverlayInternal impl;
///
/// Controls whether the overlay is getting updated or not.
///
public bool Paused { get; set; }
///
/// Changes the type of data displayed by the overlay.
///
/// Type that determines the type of data to display.
public void SetType(ProfilerOverlayType type)
{
impl.SetType(type);
}
private void OnReset()
{
if (impl != null)
impl.Destroy();
Camera cam = SceneObject.GetComponent();
impl = new ProfilerOverlayInternal(cam);
}
private void Update()
{
if(!Paused)
impl.Update();
}
private void OnDestroy()
{
impl.Destroy();
}
}
}