Simulant  21.12-194
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 swap_buffers() override;
24  void destroy_window() override;
25  void check_events() override;
26 
27  void initialize_input_controller(InputState &controller) override;
28 
29  std::shared_ptr<SoundDriver> create_sound_driver(const std::string& from_config) override;
30 
31 private:
32  EGLDisplay dpy_;
33  EGLSurface surface_;
34  EGLContext ctx_;
35 
36  void render_screen(Screen*, const uint8_t*) override {}
37 
38  bool _init_window() override;
39  bool _init_renderer(Renderer *renderer);
40 };
41 
42 }
smlt::Application
Definition: application.h:167
smlt
Definition: animation.cpp:25
smlt::Window
Definition: window.h:65
smlt::Screen
Definition: screen.h:20
smlt::Renderer
Definition: renderer.h:40
smlt::InputState
Definition: input_state.h:150
smlt::PSPWindow
Definition: psp_window.h:10