#ifndef TARGET_LINUX_DRAW_OPENGL_X11_SERVICE #define TARGET_LINUX_DRAW_OPENGL_X11_SERVICE #include "allocate/factory.h" #include "code/return.h" #include class opengl_x11_service_t { friend class opengl_x11_service_factory_t; public: enum error_t { none, unknown, no_visual_found }; struct configuration_t { GLXContext glx_context_m; }; return_t get_visual_info( Display* display_p ); void_t initialize_context( Display* display_p, XVisualInfo* visual_info_p, Window window_p ); void_t swap_buffers( Display* display_p, Window window_p ); void_t dispose( Display* display_p ); private: opengl_x11_service_t( configuration_t* configuration_p ); configuration_t* configuration_m; }; class opengl_x11_service_factory_t : public factory_t { public: return_t create( opengl_x11_service_t::configuration_t* configuration_p ); void_t dispose( opengl_x11_service_t* opengl_x11_service_p ); }; #endif