#pragma once #ifndef H_RENDERER_ #define H_RENDERER_ #include #include #include class Renderer { public: static Renderer *GetInstance(); public: const EGLConfig &GetConfig() const; public: void DestroyWindow(const EGLSurface& surface, struct wl_egl_window* window); void DestroyContext(const EGLContext& context); EGLContext CreateContext(); EGLSurface CreateSurface(struct wl_egl_window *window); void SurfaceSetContext(const EGLSurface &surface, const EGLContext &context); void SwapBuffers(const EGLSurface &surface); private: Renderer(); ~Renderer(); private: static Renderer *s_instance; EGLDisplay m_egl_display; EGLConfig m_config; }; #endif // H_RENDERER_