#region Header

// Copyright (c) 2021-2022 AccelByte Inc. All Rights Reserved.
// This is licensed software from AccelByte Inc, for limitations
// and restrictions contact your company contract manager.

#endregion

using UnityEngine;
using UnityEngine.Rendering;

namespace BlackBox
{
    public class ScreenGrabber
    {
        public void Update()
        {
#if UNITY_STANDALONE_WIN
            if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11)
            {
                GL.IssuePluginEvent(PluginAPI.blackbox_get_render_event_func(), 1);
            }
            else if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12)
            {
                if (GraphicsSettings.currentRenderPipeline == null)
                    PluginManager.SendTextureToPlugin();
            }
#endif
        }
    }
}
