feat: separate wayland implementation
This commit is contained in:
40
include/renderer.h
Normal file
40
include/renderer.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef H_RENDERER_
|
||||
#define H_RENDERER_
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <wayland-egl.h>
|
||||
|
||||
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_
|
||||
Reference in New Issue
Block a user