#ifndef MGL_MGL_H #define MGL_MGL_H #include "gl.h" /* Display* on x11 */ typedef void* mgl_connection; typedef struct mgl_context mgl_context; struct mgl_context { mgl_connection connection; mgl_gl gl; unsigned long wm_delete_window_atom; unsigned long net_wm_ping_atom; unsigned long net_wm_pid_atom; int render_event_base; int render_error_base; int randr_event_base; int randr_error_base; }; /* Safe to call multiple times, but will only be initialized the first time called. Returns non-0 value on failure. Note: not thread safe. */ int mgl_init(void); /* Safe to call multiple times, but will only be deinitialized the last time called. Note: not thread safe. */ void mgl_deinit(void); mgl_context* mgl_get_context(void); #endif /* MGL_MGL_H */