NoGraphicsHelper.mm 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #include "UnityRendering.h"
  2. extern "C" void CreateUnityRenderBuffersNULL(UnityDisplaySurfaceBase* surface)
  3. {
  4. UnityRenderBufferDesc sys_desc = { surface->systemW, surface->systemH, 1, 1, 1 };
  5. UnityRenderBufferDesc tgt_desc = { surface->targetW, surface->targetH, 1, (unsigned int)surface->msaaSamples, 1 };
  6. surface->unityColorBuffer = UnityCreateDummySurface(surface->unityColorBuffer, true, &tgt_desc);
  7. surface->unityDepthBuffer = UnityCreateDummySurface(surface->unityDepthBuffer, false, &tgt_desc);
  8. surface->systemColorBuffer = UnityCreateDummySurface(surface->systemColorBuffer, true, &sys_desc);
  9. surface->systemDepthBuffer = UnityCreateDummySurface(surface->systemDepthBuffer, false, &sys_desc);
  10. }
  11. extern "C" void DestroyUnityRenderBuffersNULL(UnityDisplaySurfaceBase* surface)
  12. {
  13. UnityDestroyExternalSurface(surface->unityColorBuffer);
  14. UnityDestroyExternalSurface(surface->systemColorBuffer);
  15. surface->unityColorBuffer = surface->systemColorBuffer = 0;
  16. UnityDestroyExternalSurface(surface->unityDepthBuffer);
  17. UnityDestroyExternalSurface(surface->systemDepthBuffer);
  18. surface->unityDepthBuffer = surface->systemDepthBuffer = 0;
  19. }
  20. extern "C" void InitRenderingNULL() {}
  21. extern "C" void CreateSystemRenderingSurfaceNULL(UnityDisplaySurfaceBase* surface) {}
  22. extern "C" void CreateRenderingSurfaceNULL(UnityDisplaySurfaceBase* surface) {}
  23. extern "C" void DestroyRenderingSurfaceNULL(UnityDisplaySurfaceBase* surface) {}
  24. extern "C" void CreateSharedDepthbufferNULL(UnityDisplaySurfaceBase* surface) {}
  25. extern "C" void DestroySharedDepthbufferNULL(UnityDisplaySurfaceBase* surface) {}
  26. extern "C" void DestroySystemRenderingSurfaceNULL(UnityDisplaySurfaceBase* surface) {}
  27. extern "C" void StartFrameRenderingNULL(UnityDisplaySurfaceBase* surface) {}
  28. extern "C" void EndFrameRenderingNULL(UnityDisplaySurfaceBase* surface) {}
  29. extern "C" void PreparePresentNULL(UnityDisplaySurfaceBase* surface) {}
  30. extern "C" void PresentNULL(UnityDisplaySurfaceBase* surface) {}