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