glcontext_ios.h 696 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
  3. * License: http://www.opensource.org/licenses/BSD-2-Clause
  4. */
  5. #ifndef BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD
  6. #define BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD
  7. #if BX_PLATFORM_IOS
  8. namespace bgfx
  9. {
  10. struct GlContext
  11. {
  12. GlContext()
  13. : m_context(0)
  14. {
  15. }
  16. void create(uint32_t _width, uint32_t _height);
  17. void destroy();
  18. void resize(uint32_t _width, uint32_t _height, bool _vsync);
  19. void swap();
  20. void import();
  21. bool isValid() const
  22. {
  23. return 0 != m_context;
  24. }
  25. void* m_view;
  26. void* m_context;
  27. };
  28. } // namespace bgfx
  29. #endif // BX_PLATFORM_IOS
  30. #endif // BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD