55 lines
846 B
C
55 lines
846 B
C
#ifndef LINUX_VR_COMPOSITOR_STATE_H
|
|
#define LINUX_VR_COMPOSITOR_STATE_H
|
|
|
|
#include <openhmd.h>
|
|
|
|
#ifdef ENABLE_XCB
|
|
# include <xcb/xcb.h>
|
|
#endif // ENABLE_XCB
|
|
|
|
#include <xf86drm.h>
|
|
#include <xf86drmMode.h>
|
|
|
|
#include <gbm.h>
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
#include <GL/gl.h>
|
|
|
|
typedef struct
|
|
{
|
|
ohmd_device * hmd;
|
|
|
|
#ifdef ENABLE_XCB
|
|
xcb_connection_t * connection;
|
|
int screen;
|
|
#endif // ENABLE_XCB
|
|
|
|
int fd;
|
|
|
|
drmModeConnector * connector;
|
|
drmModeEncoder * encoder;
|
|
drmModeModeInfo * mode;
|
|
|
|
struct gbm_device * device;
|
|
struct gbm_surface * surface;
|
|
|
|
uint32_t fbid;
|
|
struct gbm_bo * bo;
|
|
|
|
EGLDisplay vr_display;
|
|
EGLContext vr_context;
|
|
EGLSurface vr_surface;
|
|
|
|
EGLDisplay user_display;
|
|
EGLContext user_context;
|
|
EGLSurface user_surface;
|
|
|
|
GLuint textures [2];
|
|
|
|
} Instance;
|
|
|
|
void SwapBuffers(Instance * instance);
|
|
|
|
#endif // LINUX_VR_COMPOSITOR_STATE_H
|