Add cairo interface.

This commit is contained in:
jmsgrogan 2021-04-17 13:57:14 +01:00
parent a03eb9599f
commit 9bcc0ae88e
63 changed files with 1247 additions and 450 deletions

View file

@ -5,28 +5,29 @@
class GlxInterface
{
GLXContext mContext;
GLXDrawable mDrawable;
GLXWindow mWindow;
GLXFBConfig mConfig;
public:
GlxInterface();
GlxInterface();
void SetupContext(Display* display, int default_screen);
static std::unique_ptr<GlxInterface> Create();
bool SetupWindow(Display* display, xcb_window_t window);
void SetupContext(Display* display, int default_screen);
void DestroyWindow(Display* display);
bool SetupWindow(Display* display, xcb_window_t window);
void DestroyContext(Display* display);
void DestroyWindow(Display* display);
void SwapBuffers(Display* display);
void DestroyContext(Display* display);
void Draw();
void SwapBuffers(Display* display);
static std::shared_ptr<GlxInterface> Create();
void Draw();
private:
GLXContext mContext;
GLXDrawable mDrawable;
GLXWindow mWindow;
GLXFBConfig mConfig;
};
using GlxInterfacePtr = std::shared_ptr<GlxInterface>;
using GlxInterfacePtr = std::unique_ptr<GlxInterface>;