#ifndef LINUX_VR_COMPOSITOR_H #define LINUX_VR_COMPOSITOR_H #include #ifndef __GBM__ #define __GBM__ #endif // __GBM__ #include #include #define LVRC_API __attribute__ ((visibility ("default"))) #ifdef __cplusplus extern "C" { #endif // // Instance // struct lvrcInstance; LVRC_API struct lvrcInstance * lvrcCreateInstance(ohmd_device * hmd); LVRC_API void lvrcDestroyInstance(struct lvrcInstance * state); // // Swap Chain // LVRC_API bool lvrcInitSwapChain(struct lvrcInstance * state); LVRC_API bool lvrcReleaseSwapChain(struct lvrcInstance * state); LVRC_API EGLNativeDisplayType lvrcSwapChainGetNativeDisplay(struct lvrcInstance * state); LVRC_API EGLNativeWindowType lvrcSwapChainGetNativeWindow(struct lvrcInstance * state); LVRC_API unsigned int lvrcSwapChainGetWidth(struct lvrcInstance * state); LVRC_API unsigned int lvrcSwapChainGetHeight(struct lvrcInstance * state); // // Frame // LVRC_API bool lvrcInitFrameResources(struct lvrcInstance * state); LVRC_API bool lvrcReleaseFrameResources(struct lvrcInstance * state); LVRC_API bool lvrcBeginFrame(struct lvrcInstance * state); LVRC_API bool lvrcSubmitFrameLeft(struct lvrcInstance * state, GLuint texture); LVRC_API bool lvrcSubmitFrameRight(struct lvrcInstance * state, GLuint texture); LVRC_API bool lvrcEndFrame(struct lvrcInstance * state); #ifdef __cplusplus } #endif #endif // LINUX_VR_COMPOSITOR_H