BsMacOSVideoModeInfo.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsGLPrerequisites.h"
  5. #include "RenderAPI/BsVideoModeInfo.h"
  6. #include <CoreGraphics/CoreGraphics.h>
  7. #include <CoreVideo/CoreVideo.h>
  8. namespace bs { namespace ct
  9. {
  10. /** @addtogroup GL
  11. * @{
  12. */
  13. /** @copydoc VideoMode */
  14. class MacOSVideoMode : public VideoMode
  15. {
  16. public:
  17. MacOSVideoMode(UINT32 width, UINT32 height, float refreshRate, UINT32 outputIdx);
  18. ~MacOSVideoMode() override;
  19. /** Returns internal Core Graphics video mode reference. */
  20. CGDisplayModeRef _getModeRef() const { return mModeRef; }
  21. private:
  22. MacOSVideoMode(CGDisplayModeRef modeRef, CVDisplayLinkRef linkRef, UINT32 outputIdx);
  23. friend class MacOSVideoOutputInfo;
  24. CGDisplayModeRef mModeRef;
  25. };
  26. /** @copydoc VideoOutputInfo */
  27. class MacOSVideoOutputInfo : public VideoOutputInfo
  28. {
  29. public:
  30. MacOSVideoOutputInfo(CGDirectDisplayID displayID, UINT32 outputIdx);
  31. /** Returns the Core Graphics identifier for this display. */
  32. CGDirectDisplayID _getDisplayID() const { return mDisplayID; }
  33. private:
  34. CGDirectDisplayID mDisplayID;
  35. };
  36. /** @copydoc VideoModeInfo */
  37. class MacOSVideoModeInfo : public VideoModeInfo
  38. {
  39. public:
  40. MacOSVideoModeInfo();
  41. };
  42. /** @} */
  43. }}