NativeWindowSdl.h 610 B

123456789101112131415161718192021222324252627
  1. // Copyright (C) 2009-present, 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/Window/NativeWindow.h>
  7. #include <SDL3/SDL.h>
  8. namespace anki {
  9. /// Native window implementation for SDL
  10. class NativeWindowSdl : public NativeWindow
  11. {
  12. public:
  13. SDL_Window* m_sdlWindow = nullptr;
  14. ~NativeWindowSdl();
  15. Error initSdl(CString title);
  16. private:
  17. static constexpr U32 kInitSubsystems = SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_EVENTS | SDL_INIT_GAMEPAD;
  18. };
  19. } // end namespace anki