Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
android_window.h
1 #pragma once
2 
3 #include <EGL/egl.h>
4 #include "../../window.h"
5 
6 namespace smlt {
7 
8 class AndroidWindow : public Window {
9 public:
10  static Window::ptr create(Application* app) {
11  return Window::create<AndroidWindow>(app);
12  }
13 
14  AndroidWindow();
15 
16  void set_title(const std::string&) override {} // No-op
17  void cursor_position(int32_t&, int32_t&) override {} // No-op
18  void show_cursor(bool) override {} // No-op
19  void lock_cursor(bool) override {} // No-op
20 
21  void swap_buffers() override;
22  void destroy_window() override;
23  void check_events() override;
24 
25  void initialize_input_controller(InputState &controller) override;
26 
27  std::shared_ptr<SoundDriver> create_sound_driver(const std::string& from_config) override;
28 
29 private:
30  EGLDisplay dpy_;
31  EGLSurface surface_;
32  EGLContext ctx_;
33 
34  bool _init_window() override;
35  bool _init_renderer(Renderer *renderer) override;
36 };
37 
38 }
smlt::Application
Definition: application.h:162
smlt
Definition: animation.cpp:25
smlt::Window
Definition: window.h:65
smlt::AndroidWindow
Definition: android_window.h:8
smlt::Renderer
Definition: renderer.h:40
smlt::InputState
Definition: input_state.h:230