AVProVideoUnityRegisterRenderingPluginV5.c 786 B

1234567891011121314151617181920212223242526272829303132
  1. // AVProVideo
  2. // (C) 2017-2018 RenderHeads Ltd
  3. //
  4. // AVProVideo iOS plugin bootstrap.
  5. //
  6. // Unity removed UnityRegisterRenderingPlugin with Unity5.5 and replaced
  7. // it with UnityRegisterRenderingPluginV5 (first available in Unity5.4).
  8. // We patch through to UnityRegisterRenderingPlugin for older versions
  9. // of Unity.
  10. //
  11. // Unity removed UnityEndCurrentMTLCommandEncoder with Unity2018 so we
  12. // provide a stub here for the plugin to link against.
  13. #if !defined(UNITY_5_4_0) || UNITY_VERSION < 540
  14. extern void AVPPluginUnityRegisterRenderingPlugin();
  15. void UnityRegisterRenderingPluginV5(void (*unused)(void *), void (*unused2)())
  16. {
  17. AVPPluginUnityRegisterRenderingPlugin();
  18. }
  19. #endif
  20. #if UNITY_VERSION >= UNITY_2018_1_0
  21. void UnityEndCurrentMTLCommandEncoder()
  22. {
  23. // Empty
  24. }
  25. #endif