summaryrefslogtreecommitdiff
path: root/kmscube/cube-egl.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-04-16 22:16:44 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-04-16 22:16:44 +0300
commitf902b289c2a3956176fc328afb31ea4fc91f8984 (patch)
treeda71d4ee7ff0c5dd499631ccf8ff3201fcad70ef /kmscube/cube-egl.h
parentd54a6e8e8a170591d6eb98c8e2d4236763258f5d (diff)
kmscube: split into parts
Diffstat (limited to 'kmscube/cube-egl.h')
-rw-r--r--kmscube/cube-egl.h34
1 files changed, 34 insertions, 0 deletions
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 <EGL/egl.h>
+
+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;
+};