NativeWindowSdl.h 638 B

12345678910111213141516171819202122232425262728
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Core/NativeWindow.h>
  7. #include <SDL.h>
  8. namespace anki {
  9. /// Native window implementation for SDL
  10. class NativeWindowSdl : public NativeWindow
  11. {
  12. public:
  13. SDL_Window* m_window = nullptr;
  14. ~NativeWindowSdl();
  15. ANKI_USE_RESULT Error init(const NativeWindowInitInfo& init);
  16. private:
  17. static constexpr U32 INIT_SUBSYSTEMS =
  18. SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_EVENTS | SDL_INIT_GAMECONTROLLER;
  19. };
  20. } // end namespace anki