Update API + example

This commit is contained in:
2018-09-22 18:16:48 +02:00
parent b1febba24e
commit bdb827e07e
15 changed files with 680 additions and 722 deletions

View File

@@ -7,19 +7,48 @@
# include <xcb/xcb.h>
#endif // ENABLE_XCB
#include "swapChain.h"
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <gbm.h>
#include <EGL/egl.h>
#include <GL/gl.h>
typedef struct
{
ohmd_device * device;
ohmd_device * hmd;
#ifdef ENABLE_XCB
xcb_connection_t * connection;
int screen;
#endif // ENABLE_XCB
SwapChain * swapChain;
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