Sélectionner une révision Git
MainWindow.h
MainWindow.h 822 o
#pragma once
#include "imgui.h"
#include "imgui_impl_sdl.h"
#include "imgui_impl_opengl3.h"
#include <memory>
#include <SDL.h>
#include <mpv/client.h>
#include <mpv/render_gl.h>
#include <GL/gl3w.h>
class MainWindow
{
private:
bool show_demo_window;
bool show_another_window;
ImVec4 clear_color;
mpv_render_context *mpv_gl;
mpv_handle *mpv;
SDL_WindowFlags window_flags;
SDL_Window* window;
SDL_GLContext gl_context;
ImGuiIO *io;
ImGuiStyle *style;
static Uint32 wakeup_on_mpv_render_update, wakeup_on_mpv_events; /* Need to be static */
static std::shared_ptr<MainWindow> self;
MainWindow(void);
void DeInit(void);
public:
void Main(void);
static void Init(void);
static inline std::shared_ptr<MainWindow>& GetInstance(void) { return self; }
};