From f902b289c2a3956176fc328afb31ea4fc91f8984 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 16 Apr 2016 22:16:44 +0300 Subject: kmscube: split into parts --- kmscube/cube-egl.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 kmscube/cube-egl.h (limited to 'kmscube/cube-egl.h') diff --git a/kmscube/cube-egl.h b/kmscube/cube-egl.h new file mode 100644 index 0000000..a7de103 --- /dev/null +++ b/kmscube/cube-egl.h @@ -0,0 +1,34 @@ +#pragma once + +#include + +class EglState +{ +public: + EglState(void *native_display); + ~EglState(); + + EGLDisplay display() const { return m_display; } + EGLConfig config() const { return m_config; } + EGLContext context() const { return m_context; } + +private: + EGLDisplay m_display; + EGLConfig m_config; + EGLContext m_context; +}; + +class EglSurface +{ +public: + EglSurface(const EglState& egl, void *native_window); + ~EglSurface(); + + void make_current(); + void swap_buffers(); + +private: + const EglState& egl; + + EGLSurface esurface; +}; -- cgit v1.2.3