19 #ifndef MIR_EXAMPLES_CLIENT_HELPERS_H_ 20 #define MIR_EXAMPLES_CLIENT_HELPERS_H_ 24 #include <GLES2/gl2.h> 51 bool prefer_alpha =
false,
52 bool hardware =
true);
63 std::unique_ptr<MirBufferStream, decltype(&mir_buffer_stream_release_sync)>
const stream;
76 MirWindow* create_window(
MirConnection* connection,
unsigned int width,
unsigned int height,
bool prefers_alpha,
bool hardware);
77 std::function<void(MirWindow*)>
const window_deleter{
80 std::unique_ptr<MirWindow, decltype(window_deleter)> window;
90 void release_current();
95 EGLConfig chooseconfig(EGLDisplay disp);
96 EGLNativeDisplayType native_display;
97 EGLNativeWindowType native_window;
100 Display(EGLNativeDisplayType native);
107 Surface(EGLDisplay display, EGLConfig config, EGLNativeWindowType native_window);
114 EglContext(EGLDisplay disp, EGLConfig config);
116 EGLint context_attribs[3] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
124 Shader(GLchar
const*
const* src, GLuint type);
Definition: as_render_target.h:27
bool make_current(mrg::RenderTarget *render_target)
Definition: server_example_adorning_compositor.cpp:39
Definition: client_helpers.h:129
~Connection()
Definition: client_helpers.cpp:44
GLuint shader
Definition: client_helpers.h:126
unsigned int height
Definition: mir_image.h:27
Definition: client_helpers.h:69
Connection & operator=(Connection const &)=delete
Connection(char const *socket_file)
Definition: client_helpers.cpp:39
unsigned int width
Definition: mir_image.h:26
Definition: client_helpers.h:122
Definition: client_helpers.h:44
GLuint program
Definition: client_helpers.h:133
char const * name
Definition: client_types.h:171
Definition: client_helpers.h:85
Definition: client_helpers.h:31