summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/egl_drm/intel/intel_egl.h
blob: 18e84e8eeab3a93409b974a10eb688f2bfb70bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

#ifndef _INTEL_EGL_H_
#define _INTEL_EGL_H_

struct egl_drm_device
{
	void *priv;
	int drmFD;
};

struct egl_drm_context
{
	void *priv;
	struct egl_drm_device *device;
};

struct egl_drm_drawable
{
	void *priv;
	struct egl_drm_device *device;
	size_t h;
	size_t w;
};

struct egl_drm_frontbuffer
{
	uint32_t handle;
	uint32_t pitch;
	uint32_t width;
	uint32_t height;
};

#include "GL/internal/glcore.h"

int intel_init_driver(struct egl_drm_device *device);
int intel_create_context(struct egl_drm_context *context, const __GLcontextModes *visual, void *sharedContextPrivate);
int intel_create_drawable(struct egl_drm_drawable *drawable, const __GLcontextModes * visual);
void intel_make_current(struct egl_drm_context *context, struct egl_drm_drawable *draw, struct egl_drm_drawable *read);
void intel_swap_buffers(struct egl_drm_drawable *draw);
void intel_bind_frontbuffer(struct egl_drm_drawable *draw, struct egl_drm_frontbuffer *front);

#endif