summaryrefslogtreecommitdiff
path: root/navit/graphics/opengl/graphics_opengl.h
blob: cce39dd3064356cb7e2ffec58de58e7153e31c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct graphics_opengl_window_system;
struct graphics_opengl_platform;


struct graphics_opengl_window_system_methods {
	void (*destroy)(struct graphics_opengl_window_system *);
	void *(*get_display)(struct graphics_opengl_window_system *);
	void *(*get_window)(struct graphics_opengl_window_system *);
	void (*set_callbacks)(struct graphics_opengl_window_system *, void *data, void *resize, void *button, void *motion, void *keypress);
};

struct graphics_opengl_platform_methods {
	void (*destroy)(struct graphics_opengl_platform *);
	void (*swap_buffers)(struct graphics_opengl_platform *);
};

struct graphics_opengl_window_system *graphics_opengl_x11_new(void *displayname, int w, int h, int depth, struct graphics_opengl_window_system_methods **methods);
struct graphics_opengl_platform *graphics_opengl_egl_new(void *display, void *window, struct graphics_opengl_platform_methods **methods);