EAGLContextHelper.h 825 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. struct UnityDisplaySurfaceBase;
  3. #ifdef __OBJC__
  4. @class EAGLContext;
  5. #else
  6. typedef struct objc_object EAGLContext;
  7. #endif
  8. extern "C" bool AllocateRenderBufferStorageFromEAGLLayer(void* eaglContext, void* eaglLayer);
  9. extern "C" void DeallocateRenderBufferStorageFromEAGLLayer(void* eaglContext);
  10. extern "C" EAGLContext* UnityCreateContextEAGL(EAGLContext * parent, int api);
  11. extern "C" void UnityMakeCurrentContextEAGL(EAGLContext* context);
  12. extern "C" EAGLContext* UnityGetCurrentContextEAGL();
  13. #if __OBJC__
  14. class
  15. EAGLContextSetCurrentAutoRestore
  16. {
  17. public:
  18. EAGLContext* old;
  19. EAGLContext* cur;
  20. EAGLContextSetCurrentAutoRestore(EAGLContext* cur);
  21. EAGLContextSetCurrentAutoRestore(UnityDisplaySurfaceBase* surface);
  22. ~EAGLContextSetCurrentAutoRestore();
  23. };
  24. #endif // __OBJC__