19 #ifndef MIR_EXAMLPES_CLIENT_HELPERS_H_
20 #define MIR_EXAMLPES_CLIENT_HELPERS_H_
24 #include <GLES2/gl2.h>
50 MirSurface* create_surface(
MirConnection* connection,
unsigned int width,
unsigned int height,
bool prefers_alpha);
51 std::function<void(MirSurface*)>
const surface_deleter{
54 std::unique_ptr<MirSurface, decltype(surface_deleter)> surface;
69 EGLConfig chooseconfig(EGLDisplay disp);
70 EGLNativeDisplayType native_display;
71 EGLNativeWindowType native_window;
74 Display(EGLNativeDisplayType native);
81 Surface(EGLDisplay display, EGLConfig config, EGLNativeWindowType native_window);
88 EglContext(EGLDisplay disp, EGLConfig config);
90 EGLint context_attribs[3] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
98 Shader(GLchar
const*
const* src, GLuint type);
All things Mir.
Definition: atomic_callback.h:25
Definition: mir_surface.h:136
~Program()
Definition: client_helpers.cpp:204
Definition: client_helpers.h:103
NormalSurface(Connection &connection, unsigned int width, unsigned int height, bool prefers_alpha=false)
Definition: client_helpers.cpp:48
Context & operator=(Context const &)=delete
~Connection()
Definition: client_helpers.cpp:38
Context(Connection &connection, MirSurface *surface, int swap_interval)
Definition: client_helpers.cpp:93
Shader(GLchar const *const *src, GLuint type)
Definition: client_helpers.cpp:184
Definition: client_helpers.h:43
void make_current()
Definition: client_helpers.cpp:107
GLuint shader
Definition: client_helpers.h:100
Connection & operator=(Connection const &)=delete
Connection(char const *socket_file)
Definition: client_helpers.cpp:30
unsigned int width
Definition: black_arrow.c:4
Definition: client_helpers.h:96
unsigned int height
Definition: black_arrow.c:5
void release_current()
Definition: client_helpers.cpp:113
GLuint program
Definition: client_helpers.h:107
Program(Shader &vertex, Shader &fragment)
Definition: client_helpers.cpp:196
Definition: mir_connection.h:88
Definition: client_helpers.h:59
~Shader()
Definition: client_helpers.cpp:191
Definition: client_helpers.h:31
void swapbuffers()
Definition: client_helpers.cpp:118